aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-omap.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2012-04-13 08:34:27 -0400
committerPaul Walmsley <paul@pwsan.com>2012-04-13 08:34:27 -0400
commitd3645d39ad0ed9f09535065676ea0ba114f93cdf (patch)
tree53c7c5e09f27f8780cbfbc5d1d941691ea30a21b /drivers/usb/host/ohci-omap.c
parent6f3c1af26543e11fe7549be162698111ed773cb7 (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 'drivers/usb/host/ohci-omap.c')
-rw-r--r--drivers/usb/host/ohci-omap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 96451e41ee8a..71229cb97e3e 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -205,8 +205,9 @@ static int ohci_omap_init(struct usb_hcd *hcd)
205 need_transceiver = need_transceiver 205 need_transceiver = need_transceiver
206 || machine_is_omap_h2() || machine_is_omap_h3(); 206 || machine_is_omap_h2() || machine_is_omap_h3();
207 207
208 if (cpu_is_omap16xx()) 208 /* XXX OMAP16xx only */
209 ocpi_enable(); 209 if (config->ocpi_enable)
210 config->ocpi_enable();
210 211
211#ifdef CONFIG_USB_OTG 212#ifdef CONFIG_USB_OTG
212 if (need_transceiver) { 213 if (need_transceiver) {