summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLucas Stach <dev@lynxeye.de>2012-09-26 00:14:34 +0200
committerTom Rini <trini@ti.com>2012-10-15 11:54:00 -0700
commitc7e3b2b58636704d504ac270031d87b716d8b273 (patch)
treeccbba6153c289fdb23ce766b80094b0a98d53bd2 /drivers
parent5527efe501c117fc86273e2d7c7b6f30884015c3 (diff)
usb: lowlevel interface change to support multiple controllers
Carry an index in the lowlevel usb functions to make specify the respective usb controller. Also pass through an controller struct from lowlevel_init to the creation of the root usb device of this controller. Signed-off-by: Lucas Stach <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/ehci-hcd.c4
-rw-r--r--drivers/usb/host/isp116x-hcd.c4
-rw-r--r--drivers/usb/host/ohci-hcd.c4
-rw-r--r--drivers/usb/host/r8a66597-hcd.c4
-rw-r--r--drivers/usb/host/sl811-hcd.c4
-rw-r--r--drivers/usb/musb/musb_hcd.c4
6 files changed, 12 insertions, 12 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 392e286224..5d8714e688 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -829,12 +829,12 @@ unknown:
return -1;
}
-int usb_lowlevel_stop(void)
+int usb_lowlevel_stop(int index)
{
return ehci_hcd_stop();
}
-int usb_lowlevel_init(void)
+int usb_lowlevel_init(int index, void **controller)
{
uint32_t reg;
uint32_t cmd;
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index 5ef34c30fd..19e16a4a80 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -1391,7 +1391,7 @@ int isp116x_check_id(struct isp116x *isp116x)
return 0;
}
-int usb_lowlevel_init(void)
+int usb_lowlevel_init(int index, void **controller))
{
struct isp116x *isp116x = &isp116x_dev;
@@ -1428,7 +1428,7 @@ int usb_lowlevel_init(void)
return 0;
}
-int usb_lowlevel_stop(void)
+int usb_lowlevel_stop(int index)
{
struct isp116x *isp116x = &isp116x_dev;
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 9f4735167a..c2106adbd3 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1865,7 +1865,7 @@ static void hc_release_ohci(ohci_t *ohci)
*/
static char ohci_inited = 0;
-int usb_lowlevel_init(void)
+int usb_lowlevel_init(int index, void **controller)
{
#ifdef CONFIG_PCI_OHCI
pci_dev_t pdev;
@@ -1971,7 +1971,7 @@ int usb_lowlevel_init(void)
return 0;
}
-int usb_lowlevel_stop(void)
+int usb_lowlevel_stop(int index)
{
/* this gets called really early - before the controller has */
/* even been initialized! */
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index ab1b8d0d8b..2a4e7ff4b3 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -908,7 +908,7 @@ int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
return 0;
}
-int usb_lowlevel_init(void)
+int usb_lowlevel_init(int index, void **controller))
{
struct r8a66597 *r8a66597 = &gr8a66597;
@@ -931,7 +931,7 @@ int usb_lowlevel_init(void)
return 0;
}
-int usb_lowlevel_stop(void)
+int usb_lowlevel_stop(int index)
{
disable_controller(&gr8a66597);
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index bb27dd514a..2830616046 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -210,14 +210,14 @@ static int sl811_hc_reset(void)
return 1;
}
-int usb_lowlevel_init(void)
+int usb_lowlevel_init(int index, void **controller)
{
root_hub_devnum = 0;
sl811_hc_reset();
return 0;
}
-int usb_lowlevel_stop(void)
+int usb_lowlevel_stop(int index)
{
sl811_hc_reset();
return 0;
diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index 8d44c4657f..06be38d1cf 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -1092,7 +1092,7 @@ int submit_bulk_msg(struct usb_device *dev, unsigned long pipe,
/*
* This function initializes the usb controller module.
*/
-int usb_lowlevel_init(void)
+int usb_lowlevel_init(int index, void **controller)
{
u8 power;
u32 timeout;
@@ -1144,7 +1144,7 @@ int usb_lowlevel_init(void)
/*
* This function stops the operation of the davinci usb module.
*/
-int usb_lowlevel_stop(void)
+int usb_lowlevel_stop(int index)
{
/* Reset the USB module */
musb_platform_deinit();