add generic 2.6.23 patches and config
[openwrt/svn-archive/archive.git] / target / linux / generic-2.6 / patches-2.6.23 / 300-ssb_integrate.patch
1 Index: linux-2.6.23-rc6/drivers/usb/host/Kconfig
2 ===================================================================
3 --- linux-2.6.23-rc6.orig/drivers/usb/host/Kconfig 2007-09-21 16:23:52.000000000 +0800
4 +++ linux-2.6.23-rc6/drivers/usb/host/Kconfig 2007-09-21 16:24:07.000000000 +0800
5 @@ -154,6 +154,19 @@
6 Enables support for PCI-bus plug-in USB controller cards.
7 If unsure, say Y.
8
9 +config USB_OHCI_HCD_SSB
10 + bool "OHCI support for the Broadcom SSB OHCI core (embedded systems only)"
11 + depends on USB_OHCI_HCD && ((USB_OHCI_HCD=m && SSB) || (USB_OHCI_HCD=y && SSB=y)) && EXPERIMENTAL
12 + default n
13 + ---help---
14 + Support for the Sonics Silicon Backplane (SSB) attached
15 + Broadcom USB OHCI core.
16 +
17 + This device is only present in some embedded devices with
18 + Broadcom based SSB bus.
19 +
20 + If unsure, say N.
21 +
22 config USB_OHCI_BIG_ENDIAN_DESC
23 bool
24 depends on USB_OHCI_HCD
25 Index: linux-2.6.23-rc6/drivers/usb/host/ohci-hcd.c
26 ===================================================================
27 --- linux-2.6.23-rc6.orig/drivers/usb/host/ohci-hcd.c 2007-09-21 16:23:52.000000000 +0800
28 +++ linux-2.6.23-rc6/drivers/usb/host/ohci-hcd.c 2007-09-21 16:24:07.000000000 +0800
29 @@ -926,11 +926,17 @@
30 #define PS3_SYSTEM_BUS_DRIVER ps3_ohci_driver
31 #endif
32
33 +#ifdef CONFIG_USB_OHCI_HCD_SSB
34 +#include "ohci-ssb.c"
35 +#define SSB_OHCI_DRIVER ssb_ohci_driver
36 +#endif
37 +
38 #if !defined(PCI_DRIVER) && \
39 !defined(PLATFORM_DRIVER) && \
40 !defined(OF_PLATFORM_DRIVER) && \
41 !defined(SA1111_DRIVER) && \
42 - !defined(PS3_SYSTEM_BUS_DRIVER)
43 + !defined(PS3_SYSTEM_BUS_DRIVER) && \
44 + !defined(SSB_OHCI_DRIVER)
45 #error "missing bus glue for ohci-hcd"
46 #endif
47
48 @@ -975,10 +981,20 @@
49 goto error_pci;
50 #endif
51
52 +#ifdef SSB_OHCI_DRIVER
53 + retval = ssb_driver_register(&SSB_OHCI_DRIVER);
54 + if (retval)
55 + goto error_ssb;
56 +#endif
57 +
58 return retval;
59
60 /* Error path */
61 +#ifdef SSB_OHCI_DRIVER
62 + error_ssb:
63 +#endif
64 #ifdef PCI_DRIVER
65 + pci_unregister_driver(&PCI_DRIVER);
66 error_pci:
67 #endif
68 #ifdef SA1111_DRIVER
69 @@ -1003,6 +1019,9 @@
70
71 static void __exit ohci_hcd_mod_exit(void)
72 {
73 +#ifdef SSB_OHCI_DRIVER
74 + ssb_driver_unregister(&SSB_OHCI_DRIVER);
75 +#endif
76 #ifdef PCI_DRIVER
77 pci_unregister_driver(&PCI_DRIVER);
78 #endif