ehci-omap.c 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021
  1. /*
  2. * ehci-omap.c - driver for USBHOST on OMAP3/4 processors
  3. *
  4. * Bus Glue for the EHCI controllers in OMAP3/4
  5. * Tested on several OMAP3 boards, and OMAP4 Pandaboard
  6. *
  7. * Copyright (C) 2007-2010 Texas Instruments, Inc.
  8. * Author: Vikram Pandita <vikram.pandita@ti.com>
  9. * Author: Anand Gadiyar <gadiyar@ti.com>
  10. *
  11. * Copyright (C) 2009 Nokia Corporation
  12. * Contact: Felipe Balbi <felipe.balbi@nokia.com>
  13. *
  14. * Based on "ehci-fsl.c" and "ehci-au1xxx.c" ehci glue layers
  15. *
  16. * This program is free software; you can redistribute it and/or modify
  17. * it under the terms of the GNU General Public License as published by
  18. * the Free Software Foundation; either version 2 of the License, or
  19. * (at your option) any later version.
  20. *
  21. * This program is distributed in the hope that it will be useful,
  22. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. * GNU General Public License for more details.
  25. *
  26. * You should have received a copy of the GNU General Public License
  27. * along with this program; if not, write to the Free Software
  28. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  29. *
  30. * TODO (last updated Nov 21, 2010):
  31. * - add kernel-doc
  32. * - enable AUTOIDLE
  33. * - add suspend/resume
  34. * - move workarounds to board-files
  35. * - factor out code common to OHCI
  36. * - add HSIC and TLL support
  37. * - convert to use hwmod and runtime PM
  38. */
  39. #include <linux/platform_device.h>
  40. #include <linux/clk.h>
  41. #include <linux/gpio.h>
  42. #include <linux/regulator/consumer.h>
  43. #include <linux/slab.h>
  44. #include <linux/usb/ulpi.h>
  45. #include <plat/usb.h>
  46. /*
  47. * OMAP USBHOST Register addresses: VIRTUAL ADDRESSES
  48. * Use ehci_omap_readl()/ehci_omap_writel() functions
  49. */
  50. /* TLL Register Set */
  51. #define OMAP_USBTLL_REVISION (0x00)
  52. #define OMAP_USBTLL_SYSCONFIG (0x10)
  53. #define OMAP_USBTLL_SYSCONFIG_CACTIVITY (1 << 8)
  54. #define OMAP_USBTLL_SYSCONFIG_SIDLEMODE (1 << 3)
  55. #define OMAP_USBTLL_SYSCONFIG_ENAWAKEUP (1 << 2)
  56. #define OMAP_USBTLL_SYSCONFIG_SOFTRESET (1 << 1)
  57. #define OMAP_USBTLL_SYSCONFIG_AUTOIDLE (1 << 0)
  58. #define OMAP_USBTLL_SYSSTATUS (0x14)
  59. #define OMAP_USBTLL_SYSSTATUS_RESETDONE (1 << 0)
  60. #define OMAP_USBTLL_IRQSTATUS (0x18)
  61. #define OMAP_USBTLL_IRQENABLE (0x1C)
  62. #define OMAP_TLL_SHARED_CONF (0x30)
  63. #define OMAP_TLL_SHARED_CONF_USB_90D_DDR_EN (1 << 6)
  64. #define OMAP_TLL_SHARED_CONF_USB_180D_SDR_EN (1 << 5)
  65. #define OMAP_TLL_SHARED_CONF_USB_DIVRATION (1 << 2)
  66. #define OMAP_TLL_SHARED_CONF_FCLK_REQ (1 << 1)
  67. #define OMAP_TLL_SHARED_CONF_FCLK_IS_ON (1 << 0)
  68. #define OMAP_TLL_CHANNEL_CONF(num) (0x040 + 0x004 * num)
  69. #define OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF (1 << 11)
  70. #define OMAP_TLL_CHANNEL_CONF_ULPI_ULPIAUTOIDLE (1 << 10)
  71. #define OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE (1 << 9)
  72. #define OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE (1 << 8)
  73. #define OMAP_TLL_CHANNEL_CONF_CHANEN (1 << 0)
  74. #define OMAP_TLL_ULPI_FUNCTION_CTRL(num) (0x804 + 0x100 * num)
  75. #define OMAP_TLL_ULPI_INTERFACE_CTRL(num) (0x807 + 0x100 * num)
  76. #define OMAP_TLL_ULPI_OTG_CTRL(num) (0x80A + 0x100 * num)
  77. #define OMAP_TLL_ULPI_INT_EN_RISE(num) (0x80D + 0x100 * num)
  78. #define OMAP_TLL_ULPI_INT_EN_FALL(num) (0x810 + 0x100 * num)
  79. #define OMAP_TLL_ULPI_INT_STATUS(num) (0x813 + 0x100 * num)
  80. #define OMAP_TLL_ULPI_INT_LATCH(num) (0x814 + 0x100 * num)
  81. #define OMAP_TLL_ULPI_DEBUG(num) (0x815 + 0x100 * num)
  82. #define OMAP_TLL_ULPI_SCRATCH_REGISTER(num) (0x816 + 0x100 * num)
  83. #define OMAP_TLL_CHANNEL_COUNT 3
  84. #define OMAP_TLL_CHANNEL_1_EN_MASK (1 << 0)
  85. #define OMAP_TLL_CHANNEL_2_EN_MASK (1 << 1)
  86. #define OMAP_TLL_CHANNEL_3_EN_MASK (1 << 2)
  87. /* UHH Register Set */
  88. #define OMAP_UHH_REVISION (0x00)
  89. #define OMAP_UHH_SYSCONFIG (0x10)
  90. #define OMAP_UHH_SYSCONFIG_MIDLEMODE (1 << 12)
  91. #define OMAP_UHH_SYSCONFIG_CACTIVITY (1 << 8)
  92. #define OMAP_UHH_SYSCONFIG_SIDLEMODE (1 << 3)
  93. #define OMAP_UHH_SYSCONFIG_ENAWAKEUP (1 << 2)
  94. #define OMAP_UHH_SYSCONFIG_SOFTRESET (1 << 1)
  95. #define OMAP_UHH_SYSCONFIG_AUTOIDLE (1 << 0)
  96. #define OMAP_UHH_SYSSTATUS (0x14)
  97. #define OMAP_UHH_HOSTCONFIG (0x40)
  98. #define OMAP_UHH_HOSTCONFIG_ULPI_BYPASS (1 << 0)
  99. #define OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS (1 << 0)
  100. #define OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS (1 << 11)
  101. #define OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS (1 << 12)
  102. #define OMAP_UHH_HOSTCONFIG_INCR4_BURST_EN (1 << 2)
  103. #define OMAP_UHH_HOSTCONFIG_INCR8_BURST_EN (1 << 3)
  104. #define OMAP_UHH_HOSTCONFIG_INCR16_BURST_EN (1 << 4)
  105. #define OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN (1 << 5)
  106. #define OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS (1 << 8)
  107. #define OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS (1 << 9)
  108. #define OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS (1 << 10)
  109. /* OMAP4-specific defines */
  110. #define OMAP4_UHH_SYSCONFIG_IDLEMODE_CLEAR (3 << 2)
  111. #define OMAP4_UHH_SYSCONFIG_NOIDLE (1 << 2)
  112. #define OMAP4_UHH_SYSCONFIG_STDBYMODE_CLEAR (3 << 4)
  113. #define OMAP4_UHH_SYSCONFIG_NOSTDBY (1 << 4)
  114. #define OMAP4_UHH_SYSCONFIG_SOFTRESET (1 << 0)
  115. #define OMAP4_P1_MODE_CLEAR (3 << 16)
  116. #define OMAP4_P1_MODE_TLL (1 << 16)
  117. #define OMAP4_P1_MODE_HSIC (3 << 16)
  118. #define OMAP4_P2_MODE_CLEAR (3 << 18)
  119. #define OMAP4_P2_MODE_TLL (1 << 18)
  120. #define OMAP4_P2_MODE_HSIC (3 << 18)
  121. #define OMAP_REV2_TLL_CHANNEL_COUNT 2
  122. #define OMAP_UHH_DEBUG_CSR (0x44)
  123. /* EHCI Register Set */
  124. #define EHCI_INSNREG04 (0xA0)
  125. #define EHCI_INSNREG04_DISABLE_UNSUSPEND (1 << 5)
  126. #define EHCI_INSNREG05_ULPI (0xA4)
  127. #define EHCI_INSNREG05_ULPI_CONTROL_SHIFT 31
  128. #define EHCI_INSNREG05_ULPI_PORTSEL_SHIFT 24
  129. #define EHCI_INSNREG05_ULPI_OPSEL_SHIFT 22
  130. #define EHCI_INSNREG05_ULPI_REGADD_SHIFT 16
  131. #define EHCI_INSNREG05_ULPI_EXTREGADD_SHIFT 8
  132. #define EHCI_INSNREG05_ULPI_WRDATA_SHIFT 0
  133. /* Values of UHH_REVISION - Note: these are not given in the TRM */
  134. #define OMAP_EHCI_REV1 0x00000010 /* OMAP3 */
  135. #define OMAP_EHCI_REV2 0x50700100 /* OMAP4 */
  136. #define is_omap_ehci_rev1(x) (x->omap_ehci_rev == OMAP_EHCI_REV1)
  137. #define is_omap_ehci_rev2(x) (x->omap_ehci_rev == OMAP_EHCI_REV2)
  138. #define is_ehci_phy_mode(x) (x == EHCI_HCD_OMAP_MODE_PHY)
  139. #define is_ehci_tll_mode(x) (x == EHCI_HCD_OMAP_MODE_TLL)
  140. #define is_ehci_hsic_mode(x) (x == EHCI_HCD_OMAP_MODE_HSIC)
  141. /*-------------------------------------------------------------------------*/
  142. static inline void ehci_omap_writel(void __iomem *base, u32 reg, u32 val)
  143. {
  144. __raw_writel(val, base + reg);
  145. }
  146. static inline u32 ehci_omap_readl(void __iomem *base, u32 reg)
  147. {
  148. return __raw_readl(base + reg);
  149. }
  150. static inline void ehci_omap_writeb(void __iomem *base, u8 reg, u8 val)
  151. {
  152. __raw_writeb(val, base + reg);
  153. }
  154. static inline u8 ehci_omap_readb(void __iomem *base, u8 reg)
  155. {
  156. return __raw_readb(base + reg);
  157. }
  158. /*-------------------------------------------------------------------------*/
  159. struct ehci_hcd_omap {
  160. struct ehci_hcd *ehci;
  161. struct device *dev;
  162. struct clk *usbhost_ick;
  163. struct clk *usbhost_hs_fck;
  164. struct clk *usbhost_fs_fck;
  165. struct clk *usbtll_fck;
  166. struct clk *usbtll_ick;
  167. struct clk *xclk60mhsp1_ck;
  168. struct clk *xclk60mhsp2_ck;
  169. struct clk *utmi_p1_fck;
  170. struct clk *utmi_p2_fck;
  171. /* FIXME the following two workarounds are
  172. * board specific not silicon-specific so these
  173. * should be moved to board-file instead.
  174. *
  175. * Maybe someone from TI will know better which
  176. * board is affected and needs the workarounds
  177. * to be applied
  178. */
  179. /* gpio for resetting phy */
  180. int reset_gpio_port[OMAP3_HS_USB_PORTS];
  181. /* phy reset workaround */
  182. int phy_reset;
  183. /* IP revision */
  184. u32 omap_ehci_rev;
  185. /* desired phy_mode: TLL, PHY */
  186. enum ehci_hcd_omap_mode port_mode[OMAP3_HS_USB_PORTS];
  187. void __iomem *uhh_base;
  188. void __iomem *tll_base;
  189. void __iomem *ehci_base;
  190. /* Regulators for USB PHYs.
  191. * Each PHY can have a separate regulator.
  192. */
  193. struct regulator *regulator[OMAP3_HS_USB_PORTS];
  194. };
  195. /*-------------------------------------------------------------------------*/
  196. static void omap_usb_utmi_init(struct ehci_hcd_omap *omap, u8 tll_channel_mask,
  197. u8 tll_channel_count)
  198. {
  199. unsigned reg;
  200. int i;
  201. /* Program the 3 TLL channels upfront */
  202. for (i = 0; i < tll_channel_count; i++) {
  203. reg = ehci_omap_readl(omap->tll_base, OMAP_TLL_CHANNEL_CONF(i));
  204. /* Disable AutoIdle, BitStuffing and use SDR Mode */
  205. reg &= ~(OMAP_TLL_CHANNEL_CONF_UTMIAUTOIDLE
  206. | OMAP_TLL_CHANNEL_CONF_ULPINOBITSTUFF
  207. | OMAP_TLL_CHANNEL_CONF_ULPIDDRMODE);
  208. ehci_omap_writel(omap->tll_base, OMAP_TLL_CHANNEL_CONF(i), reg);
  209. }
  210. /* Program Common TLL register */
  211. reg = ehci_omap_readl(omap->tll_base, OMAP_TLL_SHARED_CONF);
  212. reg |= (OMAP_TLL_SHARED_CONF_FCLK_IS_ON
  213. | OMAP_TLL_SHARED_CONF_USB_DIVRATION
  214. | OMAP_TLL_SHARED_CONF_USB_180D_SDR_EN);
  215. reg &= ~OMAP_TLL_SHARED_CONF_USB_90D_DDR_EN;
  216. ehci_omap_writel(omap->tll_base, OMAP_TLL_SHARED_CONF, reg);
  217. /* Enable channels now */
  218. for (i = 0; i < tll_channel_count; i++) {
  219. reg = ehci_omap_readl(omap->tll_base, OMAP_TLL_CHANNEL_CONF(i));
  220. /* Enable only the reg that is needed */
  221. if (!(tll_channel_mask & 1<<i))
  222. continue;
  223. reg |= OMAP_TLL_CHANNEL_CONF_CHANEN;
  224. ehci_omap_writel(omap->tll_base, OMAP_TLL_CHANNEL_CONF(i), reg);
  225. ehci_omap_writeb(omap->tll_base,
  226. OMAP_TLL_ULPI_SCRATCH_REGISTER(i), 0xbe);
  227. dev_dbg(omap->dev, "ULPI_SCRATCH_REG[ch=%d]= 0x%02x\n",
  228. i+1, ehci_omap_readb(omap->tll_base,
  229. OMAP_TLL_ULPI_SCRATCH_REGISTER(i)));
  230. }
  231. }
  232. /*-------------------------------------------------------------------------*/
  233. static void omap_ehci_soft_phy_reset(struct ehci_hcd_omap *omap, u8 port)
  234. {
  235. unsigned long timeout = jiffies + msecs_to_jiffies(1000);
  236. unsigned reg = 0;
  237. reg = ULPI_FUNC_CTRL_RESET
  238. /* FUNCTION_CTRL_SET register */
  239. | (ULPI_SET(ULPI_FUNC_CTRL) << EHCI_INSNREG05_ULPI_REGADD_SHIFT)
  240. /* Write */
  241. | (2 << EHCI_INSNREG05_ULPI_OPSEL_SHIFT)
  242. /* PORTn */
  243. | ((port + 1) << EHCI_INSNREG05_ULPI_PORTSEL_SHIFT)
  244. /* start ULPI access*/
  245. | (1 << EHCI_INSNREG05_ULPI_CONTROL_SHIFT);
  246. ehci_omap_writel(omap->ehci_base, EHCI_INSNREG05_ULPI, reg);
  247. /* Wait for ULPI access completion */
  248. while ((ehci_omap_readl(omap->ehci_base, EHCI_INSNREG05_ULPI)
  249. & (1 << EHCI_INSNREG05_ULPI_CONTROL_SHIFT))) {
  250. cpu_relax();
  251. if (time_after(jiffies, timeout)) {
  252. dev_dbg(omap->dev, "phy reset operation timed out\n");
  253. break;
  254. }
  255. }
  256. }
  257. /* omap_start_ehc
  258. * - Start the TI USBHOST controller
  259. */
  260. static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
  261. {
  262. unsigned long timeout = jiffies + msecs_to_jiffies(1000);
  263. u8 tll_ch_mask = 0;
  264. unsigned reg = 0;
  265. int ret = 0;
  266. dev_dbg(omap->dev, "starting TI EHCI USB Controller\n");
  267. /* Enable Clocks for USBHOST */
  268. omap->usbhost_ick = clk_get(omap->dev, "usbhost_ick");
  269. if (IS_ERR(omap->usbhost_ick)) {
  270. ret = PTR_ERR(omap->usbhost_ick);
  271. goto err_host_ick;
  272. }
  273. clk_enable(omap->usbhost_ick);
  274. omap->usbhost_hs_fck = clk_get(omap->dev, "hs_fck");
  275. if (IS_ERR(omap->usbhost_hs_fck)) {
  276. ret = PTR_ERR(omap->usbhost_hs_fck);
  277. goto err_host_120m_fck;
  278. }
  279. clk_enable(omap->usbhost_hs_fck);
  280. omap->usbhost_fs_fck = clk_get(omap->dev, "fs_fck");
  281. if (IS_ERR(omap->usbhost_fs_fck)) {
  282. ret = PTR_ERR(omap->usbhost_fs_fck);
  283. goto err_host_48m_fck;
  284. }
  285. clk_enable(omap->usbhost_fs_fck);
  286. if (omap->phy_reset) {
  287. /* Refer: ISSUE1 */
  288. if (gpio_is_valid(omap->reset_gpio_port[0])) {
  289. gpio_request(omap->reset_gpio_port[0],
  290. "USB1 PHY reset");
  291. gpio_direction_output(omap->reset_gpio_port[0], 0);
  292. }
  293. if (gpio_is_valid(omap->reset_gpio_port[1])) {
  294. gpio_request(omap->reset_gpio_port[1],
  295. "USB2 PHY reset");
  296. gpio_direction_output(omap->reset_gpio_port[1], 0);
  297. }
  298. /* Hold the PHY in RESET for enough time till DIR is high */
  299. udelay(10);
  300. }
  301. /* Configure TLL for 60Mhz clk for ULPI */
  302. omap->usbtll_fck = clk_get(omap->dev, "usbtll_fck");
  303. if (IS_ERR(omap->usbtll_fck)) {
  304. ret = PTR_ERR(omap->usbtll_fck);
  305. goto err_tll_fck;
  306. }
  307. clk_enable(omap->usbtll_fck);
  308. omap->usbtll_ick = clk_get(omap->dev, "usbtll_ick");
  309. if (IS_ERR(omap->usbtll_ick)) {
  310. ret = PTR_ERR(omap->usbtll_ick);
  311. goto err_tll_ick;
  312. }
  313. clk_enable(omap->usbtll_ick);
  314. omap->omap_ehci_rev = ehci_omap_readl(omap->uhh_base,
  315. OMAP_UHH_REVISION);
  316. dev_dbg(omap->dev, "OMAP UHH_REVISION 0x%x\n",
  317. omap->omap_ehci_rev);
  318. /*
  319. * Enable per-port clocks as needed (newer controllers only).
  320. * - External ULPI clock for PHY mode
  321. * - Internal clocks for TLL and HSIC modes (TODO)
  322. */
  323. if (is_omap_ehci_rev2(omap)) {
  324. switch (omap->port_mode[0]) {
  325. case EHCI_HCD_OMAP_MODE_PHY:
  326. omap->xclk60mhsp1_ck = clk_get(omap->dev,
  327. "xclk60mhsp1_ck");
  328. if (IS_ERR(omap->xclk60mhsp1_ck)) {
  329. ret = PTR_ERR(omap->xclk60mhsp1_ck);
  330. dev_err(omap->dev,
  331. "Unable to get Port1 ULPI clock\n");
  332. }
  333. omap->utmi_p1_fck = clk_get(omap->dev,
  334. "utmi_p1_gfclk");
  335. if (IS_ERR(omap->utmi_p1_fck)) {
  336. ret = PTR_ERR(omap->utmi_p1_fck);
  337. dev_err(omap->dev,
  338. "Unable to get utmi_p1_fck\n");
  339. }
  340. ret = clk_set_parent(omap->utmi_p1_fck,
  341. omap->xclk60mhsp1_ck);
  342. if (ret != 0) {
  343. dev_err(omap->dev,
  344. "Unable to set P1 f-clock\n");
  345. }
  346. break;
  347. case EHCI_HCD_OMAP_MODE_TLL:
  348. /* TODO */
  349. default:
  350. break;
  351. }
  352. switch (omap->port_mode[1]) {
  353. case EHCI_HCD_OMAP_MODE_PHY:
  354. omap->xclk60mhsp2_ck = clk_get(omap->dev,
  355. "xclk60mhsp2_ck");
  356. if (IS_ERR(omap->xclk60mhsp2_ck)) {
  357. ret = PTR_ERR(omap->xclk60mhsp2_ck);
  358. dev_err(omap->dev,
  359. "Unable to get Port2 ULPI clock\n");
  360. }
  361. omap->utmi_p2_fck = clk_get(omap->dev,
  362. "utmi_p2_gfclk");
  363. if (IS_ERR(omap->utmi_p2_fck)) {
  364. ret = PTR_ERR(omap->utmi_p2_fck);
  365. dev_err(omap->dev,
  366. "Unable to get utmi_p2_fck\n");
  367. }
  368. ret = clk_set_parent(omap->utmi_p2_fck,
  369. omap->xclk60mhsp2_ck);
  370. if (ret != 0) {
  371. dev_err(omap->dev,
  372. "Unable to set P2 f-clock\n");
  373. }
  374. break;
  375. case EHCI_HCD_OMAP_MODE_TLL:
  376. /* TODO */
  377. default:
  378. break;
  379. }
  380. }
  381. /* perform TLL soft reset, and wait until reset is complete */
  382. ehci_omap_writel(omap->tll_base, OMAP_USBTLL_SYSCONFIG,
  383. OMAP_USBTLL_SYSCONFIG_SOFTRESET);
  384. /* Wait for TLL reset to complete */
  385. while (!(ehci_omap_readl(omap->tll_base, OMAP_USBTLL_SYSSTATUS)
  386. & OMAP_USBTLL_SYSSTATUS_RESETDONE)) {
  387. cpu_relax();
  388. if (time_after(jiffies, timeout)) {
  389. dev_dbg(omap->dev, "operation timed out\n");
  390. ret = -EINVAL;
  391. goto err_sys_status;
  392. }
  393. }
  394. dev_dbg(omap->dev, "TLL RESET DONE\n");
  395. /* (1<<3) = no idle mode only for initial debugging */
  396. ehci_omap_writel(omap->tll_base, OMAP_USBTLL_SYSCONFIG,
  397. OMAP_USBTLL_SYSCONFIG_ENAWAKEUP |
  398. OMAP_USBTLL_SYSCONFIG_SIDLEMODE |
  399. OMAP_USBTLL_SYSCONFIG_CACTIVITY);
  400. /* Put UHH in NoIdle/NoStandby mode */
  401. reg = ehci_omap_readl(omap->uhh_base, OMAP_UHH_SYSCONFIG);
  402. if (is_omap_ehci_rev1(omap)) {
  403. reg |= (OMAP_UHH_SYSCONFIG_ENAWAKEUP
  404. | OMAP_UHH_SYSCONFIG_SIDLEMODE
  405. | OMAP_UHH_SYSCONFIG_CACTIVITY
  406. | OMAP_UHH_SYSCONFIG_MIDLEMODE);
  407. reg &= ~OMAP_UHH_SYSCONFIG_AUTOIDLE;
  408. } else if (is_omap_ehci_rev2(omap)) {
  409. reg &= ~OMAP4_UHH_SYSCONFIG_IDLEMODE_CLEAR;
  410. reg |= OMAP4_UHH_SYSCONFIG_NOIDLE;
  411. reg &= ~OMAP4_UHH_SYSCONFIG_STDBYMODE_CLEAR;
  412. reg |= OMAP4_UHH_SYSCONFIG_NOSTDBY;
  413. }
  414. ehci_omap_writel(omap->uhh_base, OMAP_UHH_SYSCONFIG, reg);
  415. reg = ehci_omap_readl(omap->uhh_base, OMAP_UHH_HOSTCONFIG);
  416. /* setup ULPI bypass and burst configurations */
  417. reg |= (OMAP_UHH_HOSTCONFIG_INCR4_BURST_EN
  418. | OMAP_UHH_HOSTCONFIG_INCR8_BURST_EN
  419. | OMAP_UHH_HOSTCONFIG_INCR16_BURST_EN);
  420. reg &= ~OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN;
  421. if (is_omap_ehci_rev1(omap)) {
  422. if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_UNKNOWN)
  423. reg &= ~OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS;
  424. if (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_UNKNOWN)
  425. reg &= ~OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS;
  426. if (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_UNKNOWN)
  427. reg &= ~OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS;
  428. /* Bypass the TLL module for PHY mode operation */
  429. if (cpu_is_omap3430() && (omap_rev() <= OMAP3430_REV_ES2_1)) {
  430. dev_dbg(omap->dev, "OMAP3 ES version <= ES2.1\n");
  431. if (is_ehci_phy_mode(omap->port_mode[0]) ||
  432. is_ehci_phy_mode(omap->port_mode[1]) ||
  433. is_ehci_phy_mode(omap->port_mode[2]))
  434. reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
  435. else
  436. reg |= OMAP_UHH_HOSTCONFIG_ULPI_BYPASS;
  437. } else {
  438. dev_dbg(omap->dev, "OMAP3 ES version > ES2.1\n");
  439. if (is_ehci_phy_mode(omap->port_mode[0]))
  440. reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
  441. else if (is_ehci_tll_mode(omap->port_mode[0]))
  442. reg |= OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS;
  443. if (is_ehci_phy_mode(omap->port_mode[1]))
  444. reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS;
  445. else if (is_ehci_tll_mode(omap->port_mode[1]))
  446. reg |= OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS;
  447. if (is_ehci_phy_mode(omap->port_mode[2]))
  448. reg &= ~OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
  449. else if (is_ehci_tll_mode(omap->port_mode[2]))
  450. reg |= OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS;
  451. }
  452. } else if (is_omap_ehci_rev2(omap)) {
  453. /* Clear port mode fields for PHY mode*/
  454. reg &= ~OMAP4_P1_MODE_CLEAR;
  455. reg &= ~OMAP4_P2_MODE_CLEAR;
  456. if (is_ehci_tll_mode(omap->port_mode[0]))
  457. reg |= OMAP4_P1_MODE_TLL;
  458. else if (is_ehci_hsic_mode(omap->port_mode[0]))
  459. reg |= OMAP4_P1_MODE_HSIC;
  460. if (is_ehci_tll_mode(omap->port_mode[1]))
  461. reg |= OMAP4_P2_MODE_TLL;
  462. else if (is_ehci_hsic_mode(omap->port_mode[1]))
  463. reg |= OMAP4_P2_MODE_HSIC;
  464. }
  465. ehci_omap_writel(omap->uhh_base, OMAP_UHH_HOSTCONFIG, reg);
  466. dev_dbg(omap->dev, "UHH setup done, uhh_hostconfig=%x\n", reg);
  467. /*
  468. * An undocumented "feature" in the OMAP3 EHCI controller,
  469. * causes suspended ports to be taken out of suspend when
  470. * the USBCMD.Run/Stop bit is cleared (for example when
  471. * we do ehci_bus_suspend).
  472. * This breaks suspend-resume if the root-hub is allowed
  473. * to suspend. Writing 1 to this undocumented register bit
  474. * disables this feature and restores normal behavior.
  475. */
  476. ehci_omap_writel(omap->ehci_base, EHCI_INSNREG04,
  477. EHCI_INSNREG04_DISABLE_UNSUSPEND);
  478. if ((omap->port_mode[0] == EHCI_HCD_OMAP_MODE_TLL) ||
  479. (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_TLL) ||
  480. (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_TLL)) {
  481. if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_TLL)
  482. tll_ch_mask |= OMAP_TLL_CHANNEL_1_EN_MASK;
  483. if (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_TLL)
  484. tll_ch_mask |= OMAP_TLL_CHANNEL_2_EN_MASK;
  485. if (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_TLL)
  486. tll_ch_mask |= OMAP_TLL_CHANNEL_3_EN_MASK;
  487. /* Enable UTMI mode for required TLL channels */
  488. omap_usb_utmi_init(omap, tll_ch_mask, OMAP_TLL_CHANNEL_COUNT);
  489. }
  490. if (omap->phy_reset) {
  491. /* Refer ISSUE1:
  492. * Hold the PHY in RESET for enough time till
  493. * PHY is settled and ready
  494. */
  495. udelay(10);
  496. if (gpio_is_valid(omap->reset_gpio_port[0]))
  497. gpio_set_value(omap->reset_gpio_port[0], 1);
  498. if (gpio_is_valid(omap->reset_gpio_port[1]))
  499. gpio_set_value(omap->reset_gpio_port[1], 1);
  500. }
  501. /* Soft reset the PHY using PHY reset command over ULPI */
  502. if (omap->port_mode[0] == EHCI_HCD_OMAP_MODE_PHY)
  503. omap_ehci_soft_phy_reset(omap, 0);
  504. if (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_PHY)
  505. omap_ehci_soft_phy_reset(omap, 1);
  506. return 0;
  507. err_sys_status:
  508. clk_disable(omap->utmi_p2_fck);
  509. clk_put(omap->utmi_p2_fck);
  510. clk_disable(omap->xclk60mhsp2_ck);
  511. clk_put(omap->xclk60mhsp2_ck);
  512. clk_disable(omap->utmi_p1_fck);
  513. clk_put(omap->utmi_p1_fck);
  514. clk_disable(omap->xclk60mhsp1_ck);
  515. clk_put(omap->xclk60mhsp1_ck);
  516. clk_disable(omap->usbtll_ick);
  517. clk_put(omap->usbtll_ick);
  518. err_tll_ick:
  519. clk_disable(omap->usbtll_fck);
  520. clk_put(omap->usbtll_fck);
  521. err_tll_fck:
  522. clk_disable(omap->usbhost_fs_fck);
  523. clk_put(omap->usbhost_fs_fck);
  524. if (omap->phy_reset) {
  525. if (gpio_is_valid(omap->reset_gpio_port[0]))
  526. gpio_free(omap->reset_gpio_port[0]);
  527. if (gpio_is_valid(omap->reset_gpio_port[1]))
  528. gpio_free(omap->reset_gpio_port[1]);
  529. }
  530. err_host_48m_fck:
  531. clk_disable(omap->usbhost_hs_fck);
  532. clk_put(omap->usbhost_hs_fck);
  533. err_host_120m_fck:
  534. clk_disable(omap->usbhost_ick);
  535. clk_put(omap->usbhost_ick);
  536. err_host_ick:
  537. return ret;
  538. }
  539. static void omap_stop_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
  540. {
  541. unsigned long timeout = jiffies + msecs_to_jiffies(100);
  542. dev_dbg(omap->dev, "stopping TI EHCI USB Controller\n");
  543. /* Reset OMAP modules for insmod/rmmod to work */
  544. ehci_omap_writel(omap->uhh_base, OMAP_UHH_SYSCONFIG,
  545. is_omap_ehci_rev2(omap) ?
  546. OMAP4_UHH_SYSCONFIG_SOFTRESET :
  547. OMAP_UHH_SYSCONFIG_SOFTRESET);
  548. while (!(ehci_omap_readl(omap->uhh_base, OMAP_UHH_SYSSTATUS)
  549. & (1 << 0))) {
  550. cpu_relax();
  551. if (time_after(jiffies, timeout))
  552. dev_dbg(omap->dev, "operation timed out\n");
  553. }
  554. while (!(ehci_omap_readl(omap->uhh_base, OMAP_UHH_SYSSTATUS)
  555. & (1 << 1))) {
  556. cpu_relax();
  557. if (time_after(jiffies, timeout))
  558. dev_dbg(omap->dev, "operation timed out\n");
  559. }
  560. while (!(ehci_omap_readl(omap->uhh_base, OMAP_UHH_SYSSTATUS)
  561. & (1 << 2))) {
  562. cpu_relax();
  563. if (time_after(jiffies, timeout))
  564. dev_dbg(omap->dev, "operation timed out\n");
  565. }
  566. ehci_omap_writel(omap->tll_base, OMAP_USBTLL_SYSCONFIG, (1 << 1));
  567. while (!(ehci_omap_readl(omap->tll_base, OMAP_USBTLL_SYSSTATUS)
  568. & (1 << 0))) {
  569. cpu_relax();
  570. if (time_after(jiffies, timeout))
  571. dev_dbg(omap->dev, "operation timed out\n");
  572. }
  573. if (omap->usbtll_fck != NULL) {
  574. clk_disable(omap->usbtll_fck);
  575. clk_put(omap->usbtll_fck);
  576. omap->usbtll_fck = NULL;
  577. }
  578. if (omap->usbhost_ick != NULL) {
  579. clk_disable(omap->usbhost_ick);
  580. clk_put(omap->usbhost_ick);
  581. omap->usbhost_ick = NULL;
  582. }
  583. if (omap->usbhost_fs_fck != NULL) {
  584. clk_disable(omap->usbhost_fs_fck);
  585. clk_put(omap->usbhost_fs_fck);
  586. omap->usbhost_fs_fck = NULL;
  587. }
  588. if (omap->usbhost_hs_fck != NULL) {
  589. clk_disable(omap->usbhost_hs_fck);
  590. clk_put(omap->usbhost_hs_fck);
  591. omap->usbhost_hs_fck = NULL;
  592. }
  593. if (omap->usbtll_ick != NULL) {
  594. clk_disable(omap->usbtll_ick);
  595. clk_put(omap->usbtll_ick);
  596. omap->usbtll_ick = NULL;
  597. }
  598. if (is_omap_ehci_rev2(omap)) {
  599. if (omap->xclk60mhsp1_ck != NULL) {
  600. clk_disable(omap->xclk60mhsp1_ck);
  601. clk_put(omap->xclk60mhsp1_ck);
  602. omap->xclk60mhsp1_ck = NULL;
  603. }
  604. if (omap->utmi_p1_fck != NULL) {
  605. clk_disable(omap->utmi_p1_fck);
  606. clk_put(omap->utmi_p1_fck);
  607. omap->utmi_p1_fck = NULL;
  608. }
  609. if (omap->xclk60mhsp2_ck != NULL) {
  610. clk_disable(omap->xclk60mhsp2_ck);
  611. clk_put(omap->xclk60mhsp2_ck);
  612. omap->xclk60mhsp2_ck = NULL;
  613. }
  614. if (omap->utmi_p2_fck != NULL) {
  615. clk_disable(omap->utmi_p2_fck);
  616. clk_put(omap->utmi_p2_fck);
  617. omap->utmi_p2_fck = NULL;
  618. }
  619. }
  620. if (omap->phy_reset) {
  621. if (gpio_is_valid(omap->reset_gpio_port[0]))
  622. gpio_free(omap->reset_gpio_port[0]);
  623. if (gpio_is_valid(omap->reset_gpio_port[1]))
  624. gpio_free(omap->reset_gpio_port[1]);
  625. }
  626. dev_dbg(omap->dev, "Clock to USB host has been disabled\n");
  627. }
  628. /*-------------------------------------------------------------------------*/
  629. static const struct hc_driver ehci_omap_hc_driver;
  630. /* configure so an HC device and id are always provided */
  631. /* always called with process context; sleeping is OK */
  632. /**
  633. * ehci_hcd_omap_probe - initialize TI-based HCDs
  634. *
  635. * Allocates basic resources for this USB host controller, and
  636. * then invokes the start() method for the HCD associated with it
  637. * through the hotplug entry's driver_data.
  638. */
  639. static int ehci_hcd_omap_probe(struct platform_device *pdev)
  640. {
  641. struct ehci_hcd_omap_platform_data *pdata = pdev->dev.platform_data;
  642. struct ehci_hcd_omap *omap;
  643. struct resource *res;
  644. struct usb_hcd *hcd;
  645. int irq = platform_get_irq(pdev, 0);
  646. int ret = -ENODEV;
  647. int i;
  648. char supply[7];
  649. if (!pdata) {
  650. dev_dbg(&pdev->dev, "missing platform_data\n");
  651. goto err_pdata;
  652. }
  653. if (usb_disabled())
  654. goto err_disabled;
  655. omap = kzalloc(sizeof(*omap), GFP_KERNEL);
  656. if (!omap) {
  657. ret = -ENOMEM;
  658. goto err_disabled;
  659. }
  660. hcd = usb_create_hcd(&ehci_omap_hc_driver, &pdev->dev,
  661. dev_name(&pdev->dev));
  662. if (!hcd) {
  663. dev_dbg(&pdev->dev, "failed to create hcd with err %d\n", ret);
  664. ret = -ENOMEM;
  665. goto err_create_hcd;
  666. }
  667. platform_set_drvdata(pdev, omap);
  668. omap->dev = &pdev->dev;
  669. omap->phy_reset = pdata->phy_reset;
  670. omap->reset_gpio_port[0] = pdata->reset_gpio_port[0];
  671. omap->reset_gpio_port[1] = pdata->reset_gpio_port[1];
  672. omap->reset_gpio_port[2] = pdata->reset_gpio_port[2];
  673. omap->port_mode[0] = pdata->port_mode[0];
  674. omap->port_mode[1] = pdata->port_mode[1];
  675. omap->port_mode[2] = pdata->port_mode[2];
  676. omap->ehci = hcd_to_ehci(hcd);
  677. omap->ehci->sbrn = 0x20;
  678. res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  679. hcd->rsrc_start = res->start;
  680. hcd->rsrc_len = resource_size(res);
  681. hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
  682. if (!hcd->regs) {
  683. dev_err(&pdev->dev, "EHCI ioremap failed\n");
  684. ret = -ENOMEM;
  685. goto err_ioremap;
  686. }
  687. /* we know this is the memory we want, no need to ioremap again */
  688. omap->ehci->caps = hcd->regs;
  689. omap->ehci_base = hcd->regs;
  690. res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
  691. omap->uhh_base = ioremap(res->start, resource_size(res));
  692. if (!omap->uhh_base) {
  693. dev_err(&pdev->dev, "UHH ioremap failed\n");
  694. ret = -ENOMEM;
  695. goto err_uhh_ioremap;
  696. }
  697. res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
  698. omap->tll_base = ioremap(res->start, resource_size(res));
  699. if (!omap->tll_base) {
  700. dev_err(&pdev->dev, "TLL ioremap failed\n");
  701. ret = -ENOMEM;
  702. goto err_tll_ioremap;
  703. }
  704. /* get ehci regulator and enable */
  705. for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) {
  706. if (omap->port_mode[i] != EHCI_HCD_OMAP_MODE_PHY) {
  707. omap->regulator[i] = NULL;
  708. continue;
  709. }
  710. snprintf(supply, sizeof(supply), "hsusb%d", i);
  711. omap->regulator[i] = regulator_get(omap->dev, supply);
  712. if (IS_ERR(omap->regulator[i])) {
  713. omap->regulator[i] = NULL;
  714. dev_dbg(&pdev->dev,
  715. "failed to get ehci port%d regulator\n", i);
  716. } else {
  717. regulator_enable(omap->regulator[i]);
  718. }
  719. }
  720. ret = omap_start_ehc(omap, hcd);
  721. if (ret) {
  722. dev_dbg(&pdev->dev, "failed to start ehci\n");
  723. goto err_start;
  724. }
  725. omap->ehci->regs = hcd->regs
  726. + HC_LENGTH(readl(&omap->ehci->caps->hc_capbase));
  727. dbg_hcs_params(omap->ehci, "reset");
  728. dbg_hcc_params(omap->ehci, "reset");
  729. /* cache this readonly data; minimize chip reads */
  730. omap->ehci->hcs_params = readl(&omap->ehci->caps->hcs_params);
  731. ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
  732. if (ret) {
  733. dev_dbg(&pdev->dev, "failed to add hcd with err %d\n", ret);
  734. goto err_add_hcd;
  735. }
  736. /* root ports should always stay powered */
  737. ehci_port_power(omap->ehci, 1);
  738. return 0;
  739. err_add_hcd:
  740. omap_stop_ehc(omap, hcd);
  741. err_start:
  742. for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) {
  743. if (omap->regulator[i]) {
  744. regulator_disable(omap->regulator[i]);
  745. regulator_put(omap->regulator[i]);
  746. }
  747. }
  748. iounmap(omap->tll_base);
  749. err_tll_ioremap:
  750. iounmap(omap->uhh_base);
  751. err_uhh_ioremap:
  752. iounmap(hcd->regs);
  753. err_ioremap:
  754. usb_put_hcd(hcd);
  755. err_create_hcd:
  756. kfree(omap);
  757. err_disabled:
  758. err_pdata:
  759. return ret;
  760. }
  761. /* may be called without controller electrically present */
  762. /* may be called with controller, bus, and devices active */
  763. /**
  764. * ehci_hcd_omap_remove - shutdown processing for EHCI HCDs
  765. * @pdev: USB Host Controller being removed
  766. *
  767. * Reverses the effect of usb_ehci_hcd_omap_probe(), first invoking
  768. * the HCD's stop() method. It is always called from a thread
  769. * context, normally "rmmod", "apmd", or something similar.
  770. */
  771. static int ehci_hcd_omap_remove(struct platform_device *pdev)
  772. {
  773. struct ehci_hcd_omap *omap = platform_get_drvdata(pdev);
  774. struct usb_hcd *hcd = ehci_to_hcd(omap->ehci);
  775. int i;
  776. usb_remove_hcd(hcd);
  777. omap_stop_ehc(omap, hcd);
  778. iounmap(hcd->regs);
  779. for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) {
  780. if (omap->regulator[i]) {
  781. regulator_disable(omap->regulator[i]);
  782. regulator_put(omap->regulator[i]);
  783. }
  784. }
  785. iounmap(omap->tll_base);
  786. iounmap(omap->uhh_base);
  787. usb_put_hcd(hcd);
  788. kfree(omap);
  789. return 0;
  790. }
  791. static void ehci_hcd_omap_shutdown(struct platform_device *pdev)
  792. {
  793. struct ehci_hcd_omap *omap = platform_get_drvdata(pdev);
  794. struct usb_hcd *hcd = ehci_to_hcd(omap->ehci);
  795. if (hcd->driver->shutdown)
  796. hcd->driver->shutdown(hcd);
  797. }
  798. static struct platform_driver ehci_hcd_omap_driver = {
  799. .probe = ehci_hcd_omap_probe,
  800. .remove = ehci_hcd_omap_remove,
  801. .shutdown = ehci_hcd_omap_shutdown,
  802. /*.suspend = ehci_hcd_omap_suspend, */
  803. /*.resume = ehci_hcd_omap_resume, */
  804. .driver = {
  805. .name = "ehci-omap",
  806. }
  807. };
  808. /*-------------------------------------------------------------------------*/
  809. static const struct hc_driver ehci_omap_hc_driver = {
  810. .description = hcd_name,
  811. .product_desc = "OMAP-EHCI Host Controller",
  812. .hcd_priv_size = sizeof(struct ehci_hcd),
  813. /*
  814. * generic hardware linkage
  815. */
  816. .irq = ehci_irq,
  817. .flags = HCD_MEMORY | HCD_USB2,
  818. /*
  819. * basic lifecycle operations
  820. */
  821. .reset = ehci_init,
  822. .start = ehci_run,
  823. .stop = ehci_stop,
  824. .shutdown = ehci_shutdown,
  825. /*
  826. * managing i/o requests and associated device resources
  827. */
  828. .urb_enqueue = ehci_urb_enqueue,
  829. .urb_dequeue = ehci_urb_dequeue,
  830. .endpoint_disable = ehci_endpoint_disable,
  831. .endpoint_reset = ehci_endpoint_reset,
  832. /*
  833. * scheduling support
  834. */
  835. .get_frame_number = ehci_get_frame,
  836. /*
  837. * root hub support
  838. */
  839. .hub_status_data = ehci_hub_status_data,
  840. .hub_control = ehci_hub_control,
  841. .bus_suspend = ehci_bus_suspend,
  842. .bus_resume = ehci_bus_resume,
  843. .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
  844. };
  845. MODULE_ALIAS("platform:omap-ehci");
  846. MODULE_AUTHOR("Texas Instruments, Inc.");
  847. MODULE_AUTHOR("Felipe Balbi <felipe.balbi@nokia.com>");