[ar71xx] update to 2.6.26
[openwrt/svn-archive/archive.git] / target / linux / ar71xx / patches-2.6.26 / 003-ar71xx_usb_host.patch
1 --- a/drivers/usb/host/Kconfig
2 +++ b/drivers/usb/host/Kconfig
3 @@ -81,6 +81,12 @@
4 depends on USB_EHCI_HCD && (440EPX || ARCH_IXP4XX)
5 default y
6
7 +config USB_EHCI_AR71XX
8 + bool "USB EHCI support for AR71xx"
9 + depends on USB_EHCI_HCD && ATHEROS_AR71XX
10 + help
11 + Support for Atheros AR71xx built-in EHCI controller
12 +
13 config USB_EHCI_FSL
14 bool "Support for Freescale on-chip EHCI USB controller"
15 depends on USB_EHCI_HCD && FSL_SOC
16 @@ -152,6 +158,12 @@
17 To compile this driver as a module, choose M here: the
18 module will be called ohci-hcd.
19
20 +config USB_OHCI_AR71XX
21 + bool "USB OHCI support for Atheros AR71xx"
22 + depends on USB_OHCI_HCD && ATHEROS_AR71XX
23 + help
24 + Support for Atheros AR71xx built-in OHCI controller
25 +
26 config USB_OHCI_HCD_PPC_SOC
27 bool "OHCI support for on-chip PPC USB controller"
28 depends on USB_OHCI_HCD && (STB03xxx || PPC_MPC52xx)
29 --- a/drivers/usb/host/ehci-hcd.c
30 +++ b/drivers/usb/host/ehci-hcd.c
31 @@ -1034,6 +1034,11 @@
32 #define PLATFORM_DRIVER ixp4xx_ehci_driver
33 #endif
34
35 +#ifdef CONFIG_USB_EHCI_AR71XX
36 +#include "ehci-ar71xx.c"
37 +#define PLATFORM_DRIVER ehci_hcd_ar71xx_driver
38 +#endif
39 +
40 #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \
41 !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER)
42 #error "missing bus glue for ehci-hcd"
43 --- a/drivers/usb/host/ohci.h
44 +++ b/drivers/usb/host/ohci.h
45 @@ -538,6 +538,11 @@
46 #define writel_be(val, addr) out_be32((__force unsigned *)addr, val)
47 #endif
48
49 +#if defined(CONFIG_ATHEROS_AR71XX)
50 +#define readl_be(addr) __raw_readl(addr)
51 +#define writel_be(val, addr) __raw_writel(addr, val)
52 +#endif
53 +
54 static inline unsigned int _ohci_readl (const struct ohci_hcd *ohci,
55 __hc32 __iomem * regs)
56 {
57 --- a/drivers/usb/host/ohci-hcd.c
58 +++ b/drivers/usb/host/ohci-hcd.c
59 @@ -1057,6 +1057,11 @@
60 #define SM501_OHCI_DRIVER ohci_hcd_sm501_driver
61 #endif
62
63 +#ifdef CONFIG_USB_OHCI_AR71XX
64 +#include "ohci-ar71xx.c"
65 +#define PLATFORM_DRIVER ohci_hcd_ar71xx_driver
66 +#endif
67 +
68 #if !defined(PCI_DRIVER) && \
69 !defined(PLATFORM_DRIVER) && \
70 !defined(OF_PLATFORM_DRIVER) && \