diff options
author | Paul Walmsley <paul@pwsan.com> | 2012-04-13 08:34:27 -0400 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2012-04-13 08:34:27 -0400 |
commit | d3645d39ad0ed9f09535065676ea0ba114f93cdf (patch) | |
tree | 53c7c5e09f27f8780cbfbc5d1d941691ea30a21b /arch/arm/mach-omap1/usb.c | |
parent | 6f3c1af26543e11fe7549be162698111ed773cb7 (diff) |
ARM: OMAP1: OHCI: use platform_data fn ptr to enable OCPI bus
The OMAP1 OHCI driver needs to enable the OCPI IP block before it can
work. Previously, the driver was simply calling a symbol defined in
the OMAP platform code, but this is incorrect: drivers should be fully
decoupled from platform and architecture code.
So instead, modify the driver to call through a platform_data function
pointer instead. We skip any DT aspect, since OMAP1 is not scheduled
to be converted to DT in the near future.
This resolves the following sparse warning:
It also gets rid of a cpu_is_omap16xx() call in a driver.
In the long term, it probably makes sense to move the OCPI bus code to
somewhere under drivers/. This should avoid the whole platform_data/DT
issue with this function.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Anand Gadiyar <gadiyar@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'arch/arm/mach-omap1/usb.c')
-rw-r--r-- | arch/arm/mach-omap1/usb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c index 19de03b074e3..e61afd922766 100644 --- a/arch/arm/mach-omap1/usb.c +++ b/arch/arm/mach-omap1/usb.c | |||
@@ -29,6 +29,8 @@ | |||
29 | #include <plat/mux.h> | 29 | #include <plat/mux.h> |
30 | #include <plat/usb.h> | 30 | #include <plat/usb.h> |
31 | 31 | ||
32 | #include "common.h" | ||
33 | |||
32 | /* These routines should handle the standard chip-specific modes | 34 | /* These routines should handle the standard chip-specific modes |
33 | * for usb0/1/2 ports, covering basic mux and transceiver setup. | 35 | * for usb0/1/2 ports, covering basic mux and transceiver setup. |
34 | * | 36 | * |
@@ -138,6 +140,7 @@ static inline void ohci_device_init(struct omap_usb_config *pdata) | |||
138 | if (cpu_is_omap7xx()) | 140 | if (cpu_is_omap7xx()) |
139 | ohci_resources[1].start = INT_7XX_USB_HHC_1; | 141 | ohci_resources[1].start = INT_7XX_USB_HHC_1; |
140 | pdata->ohci_device = &ohci_device; | 142 | pdata->ohci_device = &ohci_device; |
143 | pdata->ocpi_enable = &ocpi_enable; | ||
141 | } | 144 | } |
142 | 145 | ||
143 | #else | 146 | #else |