ehci.c 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de>
  3. * Copyright (C) 2010 Freescale Semiconductor, Inc.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License as published by the
  7. * Free Software Foundation; either version 2 of the License, or (at your
  8. * option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  12. * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  13. * for more details.
  14. */
  15. #include <linux/platform_device.h>
  16. #include <mach/hardware.h>
  17. #include <mach/mxc_ehci.h>
  18. int mxc_initialize_usb_hw(int port, unsigned int flags)
  19. {
  20. #if defined(CONFIG_SOC_IMX25)
  21. if (cpu_is_mx25())
  22. return mx25_initialize_usb_hw(port, flags);
  23. #endif /* if defined(CONFIG_SOC_IMX25) */
  24. #if defined(CONFIG_ARCH_MX3)
  25. if (cpu_is_mx31())
  26. return mx31_initialize_usb_hw(port, flags);
  27. if (cpu_is_mx35())
  28. return mx35_initialize_usb_hw(port, flags);
  29. #endif /* CONFIG_ARCH_MX3 */
  30. #ifdef CONFIG_MACH_MX27
  31. if (cpu_is_mx27())
  32. return mx27_initialize_usb_hw(port, flags);
  33. #endif /* CONFIG_MACH_MX27 */
  34. #ifdef CONFIG_SOC_IMX51
  35. if (cpu_is_mx51())
  36. return mx51_initialize_usb_hw(port, flags);
  37. #endif
  38. printk(KERN_WARNING
  39. "%s() unable to setup USBCONTROL for this CPU\n", __func__);
  40. return -EINVAL;
  41. }
  42. EXPORT_SYMBOL(mxc_initialize_usb_hw);