[U-Boot] [PATCH 1/4] 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 d...@lynxeye.de Reviewed-by: Marek Vasut ma...@denx.de --- arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c | 4 ++-- arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c | 4 ++-- arch/powerpc/cpu/mpc5xxx/usb_ohci.c | 4 ++-- arch/powerpc/cpu/ppc4xx/usb_ohci.c| 4 ++-- arch/sparc/cpu/leon3/usb_uhci.c | 4 ++-- arch/sparc/lib/bootm.c| 2 +- board/mpl/common/usb_uhci.c | 4 ++-- common/usb.c | 10 ++ common/usb_hub.c | 2 +- drivers/usb/host/ehci-hcd.c | 4 ++-- drivers/usb/host/isp116x-hcd.c| 4 ++-- drivers/usb/host/ohci-hcd.c | 4 ++-- drivers/usb/host/r8a66597-hcd.c | 4 ++-- drivers/usb/host/sl811-hcd.c | 4 ++-- drivers/usb/musb/musb_hcd.c | 4 ++-- include/usb.h | 10 +++--- include/usb/mv_udc.h | 2 +- 17 Dateien geändert, 40 Zeilen hinzugefügt(+), 34 Zeilen entfernt(-) diff --git a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c index cf0335c..944bb32 100644 --- a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c +++ b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c @@ -1659,7 +1659,7 @@ static void hc_release_ohci(struct ohci *ohci) */ static char ohci_inited = 0; -int usb_lowlevel_init(void) +int usb_lowlevel_init(int index, void **controller) { struct s3c24x0_clock_power *clk_power = s3c24x0_get_base_clock_power(); struct s3c24x0_gpio *gpio = s3c24x0_get_base_gpio(); @@ -1738,7 +1738,7 @@ int usb_lowlevel_init(void) return 0; } -int usb_lowlevel_stop(void) +int usb_lowlevel_stop(int index) { struct s3c24x0_clock_power *clk_power = s3c24x0_get_base_clock_power(); diff --git a/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c b/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c index 7647e11..c747767 100644 --- a/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c +++ b/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c @@ -1565,7 +1565,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) { u32 pin_func; u32 sys_freqctrl, sys_clksrc; @@ -1707,7 +1707,7 @@ int usb_lowlevel_init(void) return -1; } -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/arch/powerpc/cpu/mpc5xxx/usb_ohci.c b/arch/powerpc/cpu/mpc5xxx/usb_ohci.c index 6d91525..607034b 100644 --- a/arch/powerpc/cpu/mpc5xxx/usb_ohci.c +++ b/arch/powerpc/cpu/mpc5xxx/usb_ohci.c @@ -1561,7 +1561,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) { /* Set the USB Clock */ @@ -1629,7 +1629,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/arch/powerpc/cpu/ppc4xx/usb_ohci.c b/arch/powerpc/cpu/ppc4xx/usb_ohci.c index 14c6a28..4ce2726 100644 --- a/arch/powerpc/cpu/ppc4xx/usb_ohci.c +++ b/arch/powerpc/cpu/ppc4xx/usb_ohci.c @@ -1566,7 +1566,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) { memset (gohci, 0, sizeof (ohci_t)); memset (urb_priv, 0, sizeof (urb_priv_t)); @@ -1624,7 +1624,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/arch/sparc/cpu/leon3/usb_uhci.c b/arch/sparc/cpu/leon3/usb_uhci.c index 62cc25d..b3b8a4d 100644 --- a/arch/sparc/cpu/leon3/usb_uhci.c +++ b/arch/sparc/cpu/leon3/usb_uhci.c @@ -706,7 +706,7 @@ void handle_usb_interrupt(void) /* init uhci */ -int usb_lowlevel_init(void) +int usb_lowlevel_init(int index, void **controller) { unsigned char temp; ambapp_ahbdev ahbdev; @@ -745,7 +745,7 @@ int usb_lowlevel_init(void) /* stop uhci */ -int usb_lowlevel_stop(void) +int usb_lowlevel_stop(int index) { if (grusb_irq == -1) return 1; diff --git a/arch/sparc/lib/bootm.c b/arch/sparc/lib/bootm.c index e5b933d..bcc6358 100644 ---
[U-Boot] [PATCH 1/4] 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 d...@lynxeye.de --- arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c | 4 ++-- arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c | 4 ++-- arch/powerpc/cpu/mpc5xxx/usb_ohci.c | 4 ++-- arch/powerpc/cpu/ppc4xx/usb_ohci.c| 4 ++-- arch/sparc/cpu/leon3/usb_uhci.c | 4 ++-- arch/sparc/lib/bootm.c| 2 +- board/mpl/common/usb_uhci.c | 4 ++-- common/usb.c | 10 ++ common/usb_hub.c | 2 +- drivers/usb/host/ehci-hcd.c | 4 ++-- drivers/usb/host/isp116x-hcd.c| 4 ++-- drivers/usb/host/ohci-hcd.c | 4 ++-- drivers/usb/host/r8a66597-hcd.c | 4 ++-- drivers/usb/host/sl811-hcd.c | 4 ++-- drivers/usb/musb/musb_hcd.c | 4 ++-- include/usb.h | 10 +++--- include/usb/mv_udc.h | 2 +- 17 Dateien geändert, 40 Zeilen hinzugefügt(+), 34 Zeilen entfernt(-) diff --git a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c index cf0335c..944bb32 100644 --- a/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c +++ b/arch/arm/cpu/arm920t/s3c24x0/usb_ohci.c @@ -1659,7 +1659,7 @@ static void hc_release_ohci(struct ohci *ohci) */ static char ohci_inited = 0; -int usb_lowlevel_init(void) +int usb_lowlevel_init(int index, void **controller) { struct s3c24x0_clock_power *clk_power = s3c24x0_get_base_clock_power(); struct s3c24x0_gpio *gpio = s3c24x0_get_base_gpio(); @@ -1738,7 +1738,7 @@ int usb_lowlevel_init(void) return 0; } -int usb_lowlevel_stop(void) +int usb_lowlevel_stop(int index) { struct s3c24x0_clock_power *clk_power = s3c24x0_get_base_clock_power(); diff --git a/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c b/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c index 7647e11..c747767 100644 --- a/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c +++ b/arch/mips/cpu/mips32/au1x00/au1x00_usb_ohci.c @@ -1565,7 +1565,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) { u32 pin_func; u32 sys_freqctrl, sys_clksrc; @@ -1707,7 +1707,7 @@ int usb_lowlevel_init(void) return -1; } -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/arch/powerpc/cpu/mpc5xxx/usb_ohci.c b/arch/powerpc/cpu/mpc5xxx/usb_ohci.c index 6d91525..607034b 100644 --- a/arch/powerpc/cpu/mpc5xxx/usb_ohci.c +++ b/arch/powerpc/cpu/mpc5xxx/usb_ohci.c @@ -1561,7 +1561,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) { /* Set the USB Clock */ @@ -1629,7 +1629,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/arch/powerpc/cpu/ppc4xx/usb_ohci.c b/arch/powerpc/cpu/ppc4xx/usb_ohci.c index 14c6a28..4ce2726 100644 --- a/arch/powerpc/cpu/ppc4xx/usb_ohci.c +++ b/arch/powerpc/cpu/ppc4xx/usb_ohci.c @@ -1566,7 +1566,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) { memset (gohci, 0, sizeof (ohci_t)); memset (urb_priv, 0, sizeof (urb_priv_t)); @@ -1624,7 +1624,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/arch/sparc/cpu/leon3/usb_uhci.c b/arch/sparc/cpu/leon3/usb_uhci.c index 62cc25d..b3b8a4d 100644 --- a/arch/sparc/cpu/leon3/usb_uhci.c +++ b/arch/sparc/cpu/leon3/usb_uhci.c @@ -706,7 +706,7 @@ void handle_usb_interrupt(void) /* init uhci */ -int usb_lowlevel_init(void) +int usb_lowlevel_init(int index, void **controller) { unsigned char temp; ambapp_ahbdev ahbdev; @@ -745,7 +745,7 @@ int usb_lowlevel_init(void) /* stop uhci */ -int usb_lowlevel_stop(void) +int usb_lowlevel_stop(int index) { if (grusb_irq == -1) return 1; diff --git a/arch/sparc/lib/bootm.c b/arch/sparc/lib/bootm.c index e5b933d..bcc6358 100644 --- a/arch/sparc/lib/bootm.c +++
Re: [U-Boot] [PATCH 1/4] usb: lowlevel interface change to support multiple controllers
Dear Lucas Stach, 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 d...@lynxeye.de [...] WFM, Reviewed-by: Marek Vasut ma...@denx.de Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot