USB OHCI glue for PowerPC and OHCI compile issue as module
Subsystems (2)
This patch adds USB/OHCI HC glue for OpenFirmware. This allows to support any kind of USB/OHCI controller which is present in an OpenFirmware device tree.
I added a correct description. This code is half copy/paste from ohci-ppc-soc.c. I added the ofplatform specific part. It has been succefully tested on Efika.
By the way, I noticed that ohci-hcd.c module compilation is broken when multiple HC glues are selected. The glues sources files are directly include into ohci-hcd.c. Then, multiple module_init/exit in the same kmod cause compile issue. This news HC glue triggers this issue but is not the issue itself. At least, this is how I understood the issue. I may be wrong but I just wanted to spot this issue.
Could you please review/comment this patch for submission in 2.6.20?
Regards
PATCH 1/1 Add USB/OHCI glue for OpenFirmware devices
From: Nicolas DET <[email protected]>
Add USB/OHCI glue for OpenFirmware devices. It takes advantages of the new of_platform.
This new glue takes advantage of the new of_platform to probe any OHCI node available into an OpenFirmware device tree and then load and startup an OHCI HC.
This is particulary useful for platform featuring an OpenFirmware.
--- drivers/usb/host/Kconfig | 19 +++ drivers/usb/host/ohci-hcd.c | 6 + drivers/usb/host/ohci-ppc-of.c | 285 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 310 insertions(+), 0 deletions(-)
drivers/usb/host/Kconfig +19 -0
@@ -106,6 +106,25 @@ config USB_OHCI_HCD_PPC_SOC Enables support for the USB controller on the MPC52xx or STB03xxx processor chip. If unsure, say Y. +config USB_OHCI_HCD_PPC_OF + bool "OHCI support for PPC USB controller for OpenFirmware platform" + depends on USB_OHCI_HCD && PPC_OF + default y + ---help--- + Enables support for the USB controller PowerPC OpenFirmware platform + +config USB_OHCI_HCD_PPC_OF_BE + bool "Support big endian HC" + depends on USB_OHCI_HCD_PPC_OF + default y + select USB_OHCI_BIG_ENDIAN + +config USB_OHCI_HCD_PPC_OF_LE + bool "Support little endian HC" + depends on USB_OHCI_HCD_PPC_OF + default n + select USB_OHCI_LITTLE_ENDIAN + config USB_OHCI_HCD_PCI bool "OHCI support for PCI-bus USB controllers" depends on USB_OHCI_HCD && PCI && (STB03xxx || PPC_MPC52xx)
drivers/usb/host/ohci-hcd.c +6 -0
@@ -930,6 +930,10 @@ #ifdef CONFIG_USB_OHCI_HCD_PPC_SOC#include "ohci-ppc-soc.c" #endif +#ifdef CONFIG_USB_OHCI_HCD_PPC_OF +#include "ohci-ppc-of.c" +#endif +#if defined(CONFIG_ARCH_AT91RM9200 ) || defined(CONFIG_ARCH_AT91SAM9261 )#include "ohci-at91.c" #endif
@@ -950,6 +954,8 @@ #if !(defined(CONFIG_PCI) \ || defined (CONFIG_ARCH_AT91RM9200) \ || defined (CONFIG_ARCH_AT91SAM9261) \ || defined (CONFIG_ARCH_PNX4008) \ + || defined (CONFIG_USB_OHCI_HCD_PPC_OF_LE) \ + || defined (CONFIG_USB_OHCI_HCD_PPC_OF_BE) \ )#error "missing bus glue for ohci-hcd"#endif
drivers/usb/host/ohci-ppc-of.c new file +285 -0
285 lines not on this page · raw message
Signature · 1 line
1.4.3.2