diff options
author | Cory Maccarrone <darkstar6262@gmail.com> | 2009-11-22 13:10:52 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-11-22 13:24:32 -0500 |
commit | 45f780a06153544ab84fd1da3a8b28c07f61da1d (patch) | |
tree | a2821193afd713c978a828f3dc6d1a05da6ea298 /arch/arm/plat-omap/usb.c | |
parent | 490a56652295825e3006f8703d96da2ef6580318 (diff) |
omap1: omap_udc: Add clocking and disable vbus sense for omap7xx
The l3_ocpi_ck clock is needed on omap7xx processors for USB.
Additionally, bit 8 of the SOFT_REQ_REG needs to be enabled for
the usb_dc_ck on omap7xx, which is a different bit than that
of the omap16xx-defined clock of the same name.
I added a provision for the usb_dc_ck and l3_ocpi_ck clocks as
dc_clk and hhc_clk, respectively, for omap7xx CPUs. Additionally,
I added a check in machine_without_vbus_sense for all omap7xx
devices, as presently I know of no omap7xx-based devices that
have vbus sense, and it made more sense to me to use a cpu check
here than to spell out each machine one at a time. Finally, DMA
is disabled for omap7xx, as it causes problems with these chips.
Cc: linux-usb@vger.kernel.org
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/usb.c')
-rw-r--r-- | arch/arm/plat-omap/usb.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c index 0ea1e0beb455..51033a4503c3 100644 --- a/arch/arm/plat-omap/usb.c +++ b/arch/arm/plat-omap/usb.c | |||
@@ -159,11 +159,14 @@ static u32 __init omap_usb0_init(unsigned nwires, unsigned is_device) | |||
159 | * - OTG support on this port not yet written | 159 | * - OTG support on this port not yet written |
160 | */ | 160 | */ |
161 | 161 | ||
162 | l = omap_readl(USB_TRANSCEIVER_CTRL); | 162 | /* Don't do this for omap7xx -- it causes USB to not work correctly */ |
163 | l &= ~(7 << 4); | 163 | if (!cpu_is_omap7xx()) { |
164 | if (!is_device) | 164 | l = omap_readl(USB_TRANSCEIVER_CTRL); |
165 | l |= (3 << 1); | 165 | l &= ~(7 << 4); |
166 | omap_writel(l, USB_TRANSCEIVER_CTRL); | 166 | if (!is_device) |
167 | l |= (3 << 1); | ||
168 | omap_writel(l, USB_TRANSCEIVER_CTRL); | ||
169 | } | ||
167 | 170 | ||
168 | return 3 << 16; | 171 | return 3 << 16; |
169 | } | 172 | } |
@@ -603,7 +606,12 @@ omap_otg_init(struct omap_usb_config *config) | |||
603 | if (config->otg || config->register_dev) { | 606 | if (config->otg || config->register_dev) { |
604 | syscon &= ~DEV_IDLE_EN; | 607 | syscon &= ~DEV_IDLE_EN; |
605 | udc_device.dev.platform_data = config; | 608 | udc_device.dev.platform_data = config; |
606 | /* FIXME patch IRQ numbers for omap730 */ | 609 | /* IRQ numbers for omap7xx */ |
610 | if(cpu_is_omap7xx()) { | ||
611 | udc_resources[1].start = INT_7XX_USB_GENI; | ||
612 | udc_resources[2].start = INT_7XX_USB_NON_ISO; | ||
613 | udc_resources[3].start = INT_7XX_USB_ISO; | ||
614 | } | ||
607 | status = platform_device_register(&udc_device); | 615 | status = platform_device_register(&udc_device); |
608 | if (status) | 616 | if (status) |
609 | pr_debug("can't register UDC device, %d\n", status); | 617 | pr_debug("can't register UDC device, %d\n", status); |