cns21xx: fix build errors on 3.6
authorGabor Juhos <juhosg@openwrt.org>
Tue, 18 Dec 2012 14:51:55 +0000 (14:51 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Tue, 18 Dec 2012 14:51:55 +0000 (14:51 +0000)
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 34756

target/linux/cns21xx/patches-3.6/003-arm-introduce-fa-platform.patch
target/linux/cns21xx/patches-3.6/100-cns21xx-core.patch
target/linux/cns21xx/patches-3.6/103-cns21xx-usb-ohci-support.patch
target/linux/cns21xx/patches-3.6/104-cns21xx-usb-ehci-support.patch

index 018734e29f37de911792573f2e3ad6c0eb8316f7..902370e15b384f1facab304f3579caee45ed5650 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
-@@ -1133,10 +1133,15 @@ source "arch/arm/mach-vt8500/Kconfig"
+@@ -1134,10 +1134,15 @@ source "arch/arm/mach-vt8500/Kconfig"
  
  source "arch/arm/mach-w90x900/Kconfig"
  
index b386045faa01e185268415fee9394fd03f4f61fb..e0d6cd65f7720ced951b404580607d7c85ab2cef 100644 (file)
@@ -28,7 +28,7 @@
  config ARCH_CLPS711X
        bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
        select CPU_ARM720T
-@@ -1041,6 +1055,8 @@ source "arch/arm/mach-davinci/Kconfig"
+@@ -1042,6 +1056,8 @@ source "arch/arm/mach-davinci/Kconfig"
  
  source "arch/arm/mach-dove/Kconfig"
  
index 5770c212dd8bcc4c0e9d7d988889f85b8f925dc4..f5aa3434b803a1543c330afc88c7f6ac6446e50d 100644 (file)
  #ifdef CONFIG_USB_CNS3XXX_OHCI
  #include "ohci-cns3xxx.c"
  #define PLATFORM_DRIVER               ohci_hcd_cns3xxx_driver
+@@ -1117,7 +1124,7 @@ MODULE_LICENSE ("GPL");
+ #ifdef CONFIG_USB_OHCI_HCD_PLATFORM
+ #include "ohci-platform.c"
+-#define PLATFORM_DRIVER               ohci_platform_driver
++#define OHCI_PLATFORM_DRIVER          ohci_platform_driver
+ #endif
+ #if   !defined(PCI_DRIVER) &&         \
+@@ -1128,7 +1135,8 @@ MODULE_LICENSE ("GPL");
+       !defined(SA1111_DRIVER) &&      \
+       !defined(PS3_SYSTEM_BUS_DRIVER) && \
+       !defined(SM501_OHCI_DRIVER) && \
+-      !defined(TMIO_OHCI_DRIVER)
++      !defined(TMIO_OHCI_DRIVER) && \
++      !defined(OHCI_PLATFORM_DRIVER)
+ #error "missing bus glue for ohci-hcd"
+ #endif
+@@ -1206,9 +1214,19 @@ static int __init ohci_hcd_mod_init(void
+               goto error_tmio;
+ #endif
++#ifdef OHCI_PLATFORM_DRIVER
++      retval = platform_driver_register(&OHCI_PLATFORM_DRIVER);
++      if (retval < 0)
++              goto error_ohci;
++#endif
++
+       return retval;
+       /* Error path */
++#ifdef OHCI_PLATFORM_DRIVER
++      platform_driver_unregister(&OHCI_PLATFORM_DRIVER);
++ error_ohci:
++#endif
+ #ifdef TMIO_OHCI_DRIVER
+       platform_driver_unregister(&TMIO_OHCI_DRIVER);
+  error_tmio:
+@@ -1258,6 +1276,9 @@ module_init(ohci_hcd_mod_init);
+ static void __exit ohci_hcd_mod_exit(void)
+ {
++#ifdef OHCI_PLATFORM_DRIVER
++      platform_driver_unregister(&OHCI_PLATFORM_DRIVER);
++#endif
+ #ifdef TMIO_OHCI_DRIVER
+       platform_driver_unregister(&TMIO_OHCI_DRIVER);
+ #endif
 --- /dev/null
 +++ b/drivers/usb/host/ohci-cns21xx.c
-@@ -0,0 +1,175 @@
+@@ -0,0 +1,176 @@
 +/*
 + *  Copyright (c) 2008 Cavium Networks
 + *  Copyright (c) 2010-2012 Gabor Juhos <juhosg@openwrt.org>
 +
 +      ret = ohci_run(ohci);
 +      if (ret) {
-+              err("can't start %s", ohci_to_hcd(ohci)->self.bus_name);
++              ohci_err(ohci, "can't start %s",
++                       ohci_to_hcd(ohci)->self.bus_name);
 +              goto err;
 +      }
 +
  #define       OHCI_QUIRK_HUB_POWER    0x100                   /* distrust firmware power/oc setup */
  #define       OHCI_QUIRK_AMD_PLL      0x200                   /* AMD PLL quirk*/
  #define       OHCI_QUIRK_AMD_PREFETCH 0x400                   /* pre-fetch for ISO transfer */
-+#define OHCI_QUIRK_INIT_FMINTERVAL 0x1000             /* fminterval must be initialized */
++#define       OHCI_QUIRK_INIT_FMINTERVAL 0x1000               /* fminterval must be initialized */
        // there are also chip quirks/bugs in init logic
  
        struct work_struct      nec_work;       /* Worker for NEC quirk */
index 3936d10f08dc4928089a82fb832e71b2fb6c4a1b..55b3af3858f20763818324aeb1838114181c7fe0 100644 (file)
 +MODULE_ALIAS("platform:" DRIVER_NAME);
 --- a/drivers/usb/host/ehci-hcd.c
 +++ b/drivers/usb/host/ehci-hcd.c
-@@ -1339,6 +1339,11 @@ MODULE_LICENSE ("GPL");
- #define PLATFORM_DRIVER               ehci_platform_driver
+@@ -1334,14 +1334,19 @@ MODULE_LICENSE ("GPL");
+ #define       PLATFORM_DRIVER         ehci_hcd_sead3_driver
  #endif
  
 +#ifdef CONFIG_ARCH_CNS21XX
 +#define PLATFORM_DRIVER               ehci_cns21xx_driver
 +#endif
 +
+ #ifdef CONFIG_USB_EHCI_HCD_PLATFORM
+ #include "ehci-platform.c"
+-#define PLATFORM_DRIVER               ehci_platform_driver
++#define EHCI_PLATFORM_DRIVER  ehci_platform_driver
+ #endif
  #if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \
      !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER) && \
-     !defined(XILINX_OF_PLATFORM_DRIVER)
+-    !defined(XILINX_OF_PLATFORM_DRIVER)
++    !defined(XILINX_OF_PLATFORM_DRIVER) && !defined(EHCI_PLATFORM_DRIVER)
+ #error "missing bus glue for ehci-hcd"
+ #endif
+@@ -1401,10 +1406,21 @@ static int __init ehci_hcd_init(void)
+       if (retval < 0)
+               goto clean4;
+ #endif
++
++#ifdef EHCI_PLATFORM_DRIVER
++      retval = platform_driver_register(&EHCI_PLATFORM_DRIVER);
++      if (retval < 0)
++              goto clean5;
++#endif
++
+       return retval;
++#ifdef EHCI_PLATFORM_DRIVER
++      platform_driver_unregister(&EHCI_PLATFORM_DRIVER);
++clean5:
++#endif
+ #ifdef XILINX_OF_PLATFORM_DRIVER
+-      /* platform_driver_unregister(&XILINX_OF_PLATFORM_DRIVER); */
++      platform_driver_unregister(&XILINX_OF_PLATFORM_DRIVER);
+ clean4:
+ #endif
+ #ifdef OF_PLATFORM_DRIVER
+@@ -1435,6 +1451,9 @@ module_init(ehci_hcd_init);
+ static void __exit ehci_hcd_cleanup(void)
+ {
++#ifdef EHCI_PLATFORM_DRIVER
++      platform_driver_unregister(&EHCI_PLATFORM_DRIVER);
++#endif
+ #ifdef XILINX_OF_PLATFORM_DRIVER
+       platform_driver_unregister(&XILINX_OF_PLATFORM_DRIVER);
+ #endif
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
 @@ -394,6 +394,7 @@ config ARCH_CNS21XX