Author: rmilecki
Date: 2016-05-08 23:09:12 +0200 (Sun, 08 May 2016)
New Revision: 49297

Added:
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-01-USB-bcma-remove-chip-id-check.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-02-USB-bcma-replace-numbers-with-constants.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-03-USB-bcma-use-devm_kzalloc.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-04-USB-bcma-fix-error-handling-in-bcma_hcd_create_pdev.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-05-USB-bcma-add-bcm53xx-support.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-06-USB-bcma-add-support-for-controlling-bus-power-throu.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/083-USB-bcma-switch-to-GPIO-descriptor-for-power-control.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/084-01-USB-bcma-make-helper-creating-platform-dev-more-gene.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/084-02-USB-bcma-separate-code-initializing-USB-2.0-core.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/085-USB-bcma-use-simpler-devm-helper-for-getting-vcc-GPI.patch
Removed:
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/180-USB-bcma-remove-chip-id-check.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/181-USB-bcma-replace-numbers-with-constants.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/182-USB-bcma-use-devm_kzalloc.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/183-USB-bcma-fix-error-handling-in-bcma_hcd_create_pdev.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/184-USB-bcma-add-bcm53xx-support.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/185-USB-bcma-add-support-for-controlling-bus-power-throu.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/186-USB-bcma-switch-to-GPIO-descriptor-for-power-control.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/810-USB-bcma-make-helper-creating-platform-dev-more-gene.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/811-USB-bcma-use-separated-function-for-USB-2.0-initiali.patch
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/813-USB-bcma-use-simpler-devm_gpiod_get.patch
Modified:
   
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/812-USB-bcma-add-USB-3.0-support.patch
Log:
bcm53xx: use backported versions of bcma USB patches

Signed-off-by: Rafa{U+0142} Mi{U+0142}ecki <[email protected]>

Copied: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-01-USB-bcma-remove-chip-id-check.patch
 (from rev 49294, 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/180-USB-bcma-remove-chip-id-check.patch)
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-01-USB-bcma-remove-chip-id-check.patch
                          (rev 0)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-01-USB-bcma-remove-chip-id-check.patch
  2016-05-08 21:09:12 UTC (rev 49297)
@@ -0,0 +1,35 @@
+From 7e4a4da67255d92620ba59b461b5bc295db28dae Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <[email protected]>
+Date: Thu, 11 Jun 2015 22:57:35 +0200
+Subject: [PATCH] USB: bcma: remove chip id check
+
+I have never seen any bcma device with an USB host core which was not a
+SoC, the bcma devices have an USB device core with a different core id.
+Some SoC have IDs with 47XX and 53XX in decimal form which would be
+rejected by this check. Instead of fixing this check just remove it.
+
+Signed-off-by: Hauke Mehrtens <[email protected]>
+Signed-off-by: Greg Kroah-Hartman <[email protected]>
+---
+ drivers/usb/host/bcma-hcd.c | 5 -----
+ 1 file changed, 5 deletions(-)
+
+--- a/drivers/usb/host/bcma-hcd.c
++++ b/drivers/usb/host/bcma-hcd.c
+@@ -214,16 +214,11 @@ err_alloc:
+ static int bcma_hcd_probe(struct bcma_device *dev)
+ {
+       int err;
+-      u16 chipid_top;
+       u32 ohci_addr;
+       struct bcma_hcd_device *usb_dev;
+       struct bcma_chipinfo *chipinfo;
+ 
+       chipinfo = &dev->bus->chipinfo;
+-      /* USBcores are only connected on embedded devices. */
+-      chipid_top = (chipinfo->id & 0xFF00);
+-      if (chipid_top != 0x4700 && chipid_top != 0x5300)
+-              return -ENODEV;
+ 
+       /* TODO: Probably need checks here; is the core connected? */
+ 

Copied: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-02-USB-bcma-replace-numbers-with-constants.patch
 (from rev 49294, 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/181-USB-bcma-replace-numbers-with-constants.patch)
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-02-USB-bcma-replace-numbers-with-constants.patch
                                (rev 0)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-02-USB-bcma-replace-numbers-with-constants.patch
        2016-05-08 21:09:12 UTC (rev 49297)
@@ -0,0 +1,25 @@
+From 98e13e05a1bab82c3bec1d867159bc8384acbe5b Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <[email protected]>
+Date: Thu, 11 Jun 2015 22:57:36 +0200
+Subject: [PATCH] USB: bcma: replace numbers with constants
+
+The constants for these numbers were added long time ago, use them.
+
+Signed-off-by: Hauke Mehrtens <[email protected]>
+Signed-off-by: Greg Kroah-Hartman <[email protected]>
+---
+ drivers/usb/host/bcma-hcd.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/host/bcma-hcd.c
++++ b/drivers/usb/host/bcma-hcd.c
+@@ -233,7 +233,8 @@ static int bcma_hcd_probe(struct bcma_de
+ 
+       /* In AI chips EHCI is addrspace 0, OHCI is 1 */
+       ohci_addr = dev->addr_s[0];
+-      if ((chipinfo->id == 0x5357 || chipinfo->id == 0x4749)
++      if ((chipinfo->id == BCMA_CHIP_ID_BCM5357 ||
++           chipinfo->id == BCMA_CHIP_ID_BCM4749)
+           && chipinfo->rev == 0)
+               ohci_addr = 0x18009000;
+ 

Copied: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-03-USB-bcma-use-devm_kzalloc.patch
 (from rev 49294, 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/182-USB-bcma-use-devm_kzalloc.patch)
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-03-USB-bcma-use-devm_kzalloc.patch
                              (rev 0)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-03-USB-bcma-use-devm_kzalloc.patch
      2016-05-08 21:09:12 UTC (rev 49297)
@@ -0,0 +1,48 @@
+From c27da2b22b558390acc515e71e47b1b307f85d5a Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <[email protected]>
+Date: Thu, 11 Jun 2015 22:57:37 +0200
+Subject: [PATCH] USB: bcma: use devm_kzalloc
+
+Instead of manually handling the frees use devm. There was also a free
+missing in the unregister call which is not needed with devm.
+
+Signed-off-by: Hauke Mehrtens <[email protected]>
+Signed-off-by: Greg Kroah-Hartman <[email protected]>
+---
+ drivers/usb/host/bcma-hcd.c | 11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+--- a/drivers/usb/host/bcma-hcd.c
++++ b/drivers/usb/host/bcma-hcd.c
+@@ -225,7 +225,8 @@ static int bcma_hcd_probe(struct bcma_de
+       if (dma_set_mask_and_coherent(dev->dma_dev, DMA_BIT_MASK(32)))
+               return -EOPNOTSUPP;
+ 
+-      usb_dev = kzalloc(sizeof(struct bcma_hcd_device), GFP_KERNEL);
++      usb_dev = devm_kzalloc(&dev->dev, sizeof(struct bcma_hcd_device),
++                             GFP_KERNEL);
+       if (!usb_dev)
+               return -ENOMEM;
+ 
+@@ -239,10 +240,8 @@ static int bcma_hcd_probe(struct bcma_de
+               ohci_addr = 0x18009000;
+ 
+       usb_dev->ohci_dev = bcma_hcd_create_pdev(dev, true, ohci_addr);
+-      if (IS_ERR(usb_dev->ohci_dev)) {
+-              err = PTR_ERR(usb_dev->ohci_dev);
+-              goto err_free_usb_dev;
+-      }
++      if (IS_ERR(usb_dev->ohci_dev))
++              return PTR_ERR(usb_dev->ohci_dev);
+ 
+       usb_dev->ehci_dev = bcma_hcd_create_pdev(dev, false, dev->addr);
+       if (IS_ERR(usb_dev->ehci_dev)) {
+@@ -255,8 +254,6 @@ static int bcma_hcd_probe(struct bcma_de
+ 
+ err_unregister_ohci_dev:
+       platform_device_unregister(usb_dev->ohci_dev);
+-err_free_usb_dev:
+-      kfree(usb_dev);
+       return err;
+ }
+ 

Copied: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-04-USB-bcma-fix-error-handling-in-bcma_hcd_create_pdev.patch
 (from rev 49294, 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/183-USB-bcma-fix-error-handling-in-bcma_hcd_create_pdev.patch)
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-04-USB-bcma-fix-error-handling-in-bcma_hcd_create_pdev.patch
                            (rev 0)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-04-USB-bcma-fix-error-handling-in-bcma_hcd_create_pdev.patch
    2016-05-08 21:09:12 UTC (rev 49297)
@@ -0,0 +1,34 @@
+From ab2de5793080dfb9f191ca71068b9f476a55a0f4 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <[email protected]>
+Date: Thu, 11 Jun 2015 22:57:38 +0200
+Subject: [PATCH] USB: bcma: fix error handling in bcma_hcd_create_pdev()
+
+This patch makes bcma_hcd_create_pdev() not return NULL, but a prober
+error code in case of an error.
+
+Signed-off-by: Hauke Mehrtens <[email protected]>
+Signed-off-by: Greg Kroah-Hartman <[email protected]>
+---
+ drivers/usb/host/bcma-hcd.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/usb/host/bcma-hcd.c
++++ b/drivers/usb/host/bcma-hcd.c
+@@ -169,7 +169,7 @@ static struct platform_device *bcma_hcd_
+ {
+       struct platform_device *hci_dev;
+       struct resource hci_res[2];
+-      int ret = -ENOMEM;
++      int ret;
+ 
+       memset(hci_res, 0, sizeof(hci_res));
+ 
+@@ -183,7 +183,7 @@ static struct platform_device *bcma_hcd_
+       hci_dev = platform_device_alloc(ohci ? "ohci-platform" :
+                                       "ehci-platform" , 0);
+       if (!hci_dev)
+-              return NULL;
++              return ERR_PTR(-ENOMEM);
+ 
+       hci_dev->dev.parent = &dev->dev;
+       hci_dev->dev.dma_mask = &hci_dev->dev.coherent_dma_mask;

Copied: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-05-USB-bcma-add-bcm53xx-support.patch
 (from rev 49294, 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/184-USB-bcma-add-bcm53xx-support.patch)
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-05-USB-bcma-add-bcm53xx-support.patch
                           (rev 0)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-05-USB-bcma-add-bcm53xx-support.patch
   2016-05-08 21:09:12 UTC (rev 49297)
@@ -0,0 +1,134 @@
+From 10bc04b744c69f253dfe47bc143325349ce8becc Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <[email protected]>
+Date: Thu, 11 Jun 2015 22:57:39 +0200
+Subject: [PATCH] USB: bcma: add bcm53xx support
+
+The Broadcom ARM SoCs with this usb core need a different
+initialization and they have a different core id. This patch adds
+support for these USB 2.0 core.
+
+Signed-off-by: Felix Fietkau <[email protected]>
+Signed-off-by: Hauke Mehrtens <[email protected]>
+Signed-off-by: Greg Kroah-Hartman <[email protected]>
+---
+ drivers/usb/host/bcma-hcd.c | 81 +++++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 78 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/host/bcma-hcd.c
++++ b/drivers/usb/host/bcma-hcd.c
+@@ -2,7 +2,8 @@
+  * Broadcom specific Advanced Microcontroller Bus
+  * Broadcom USB-core driver (BCMA bus glue)
+  *
+- * Copyright 2011-2012 Hauke Mehrtens <[email protected]>
++ * Copyright 2011-2015 Hauke Mehrtens <[email protected]>
++ * Copyright 2015 Felix Fietkau <[email protected]>
+  *
+  * Based on ssb-ohci driver
+  * Copyright 2007 Michael Buesch <[email protected]>
+@@ -88,7 +89,7 @@ static void bcma_hcd_4716wa(struct bcma_
+ }
+ 
+ /* based on arch/mips/brcm-boards/bcm947xx/pcibios.c */
+-static void bcma_hcd_init_chip(struct bcma_device *dev)
++static void bcma_hcd_init_chip_mips(struct bcma_device *dev)
+ {
+       u32 tmp;
+ 
+@@ -159,6 +160,70 @@ static void bcma_hcd_init_chip(struct bc
+       }
+ }
+ 
++static void bcma_hcd_init_chip_arm_phy(struct bcma_device *dev)
++{
++      struct bcma_device *arm_core;
++      void __iomem *dmu;
++
++      arm_core = bcma_find_core(dev->bus, BCMA_CORE_ARMCA9);
++      if (!arm_core) {
++              dev_err(&dev->dev, "can not find ARM Cortex A9 ihost core\n");
++              return;
++      }
++
++      dmu = ioremap_nocache(arm_core->addr_s[0], 0x1000);
++      if (!dmu) {
++              dev_err(&dev->dev, "can not map ARM Cortex A9 ihost core\n");
++              return;
++      }
++
++      /* Unlock DMU PLL settings */
++      iowrite32(0x0000ea68, dmu + 0x180);
++
++      /* Write USB 2.0 PLL control setting */
++      iowrite32(0x00dd10c3, dmu + 0x164);
++
++      /* Lock DMU PLL settings */
++      iowrite32(0x00000000, dmu + 0x180);
++
++      iounmap(dmu);
++}
++
++static void bcma_hcd_init_chip_arm_hc(struct bcma_device *dev)
++{
++      u32 val;
++
++      /*
++       * Delay after PHY initialized to ensure HC is ready to be configured
++       */
++      usleep_range(1000, 2000);
++
++      /* Set packet buffer OUT threshold */
++      val = bcma_read32(dev, 0x94);
++      val &= 0xffff;
++      val |= 0x80 << 16;
++      bcma_write32(dev, 0x94, val);
++
++      /* Enable break memory transfer */
++      val = bcma_read32(dev, 0x9c);
++      val |= 1;
++      bcma_write32(dev, 0x9c, val);
++}
++
++static void bcma_hcd_init_chip_arm(struct bcma_device *dev)
++{
++      bcma_core_enable(dev, 0);
++
++      if (dev->bus->chipinfo.id == BCMA_CHIP_ID_BCM4707 ||
++          dev->bus->chipinfo.id == BCMA_CHIP_ID_BCM53018) {
++              if (dev->bus->chipinfo.pkg == BCMA_PKG_ID_BCM4707 ||
++                  dev->bus->chipinfo.pkg == BCMA_PKG_ID_BCM4708)
++                      bcma_hcd_init_chip_arm_phy(dev);
++
++              bcma_hcd_init_chip_arm_hc(dev);
++      }
++}
++
+ static const struct usb_ehci_pdata ehci_pdata = {
+ };
+ 
+@@ -230,7 +295,16 @@ static int bcma_hcd_probe(struct bcma_de
+       if (!usb_dev)
+               return -ENOMEM;
+ 
+-      bcma_hcd_init_chip(dev);
++      switch (dev->id.id) {
++      case BCMA_CORE_NS_USB20:
++              bcma_hcd_init_chip_arm(dev);
++              break;
++      case BCMA_CORE_USB20_HOST:
++              bcma_hcd_init_chip_mips(dev);
++              break;
++      default:
++              return -ENODEV;
++      }
+ 
+       /* In AI chips EHCI is addrspace 0, OHCI is 1 */
+       ohci_addr = dev->addr_s[0];
+@@ -299,6 +373,7 @@ static int bcma_hcd_resume(struct bcma_d
+ 
+ static const struct bcma_device_id bcma_hcd_table[] = {
+       BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_USB20_HOST, BCMA_ANY_REV, 
BCMA_ANY_CLASS),
++      BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_NS_USB20, BCMA_ANY_REV, 
BCMA_ANY_CLASS),
+       BCMA_CORETABLE_END
+ };
+ MODULE_DEVICE_TABLE(bcma, bcma_hcd_table);

Copied: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-06-USB-bcma-add-support-for-controlling-bus-power-throu.patch
 (from rev 49294, 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/185-USB-bcma-add-support-for-controlling-bus-power-throu.patch)
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-06-USB-bcma-add-support-for-controlling-bus-power-throu.patch
                           (rev 0)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/082-06-USB-bcma-add-support-for-controlling-bus-power-throu.patch
   2016-05-08 21:09:12 UTC (rev 49297)
@@ -0,0 +1,83 @@
+From eb4861c3cef7f745df0d2a26b0f4287da0190424 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <[email protected]>
+Date: Thu, 11 Jun 2015 22:57:40 +0200
+Subject: [PATCH] USB: bcma: add support for controlling bus power through GPIO
+
+On some boards a GPIO is needed to activate USB controller. Make it
+possible to specify such a GPIO in device tree.
+
+Signed-off-by: Felix Fietkau <[email protected]>
+Signed-off-by: Hauke Mehrtens <[email protected]>
+Signed-off-by: Greg Kroah-Hartman <[email protected]>
+---
+ drivers/usb/host/bcma-hcd.c | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+--- a/drivers/usb/host/bcma-hcd.c
++++ b/drivers/usb/host/bcma-hcd.c
+@@ -24,6 +24,8 @@
+ #include <linux/platform_device.h>
+ #include <linux/module.h>
+ #include <linux/slab.h>
++#include <linux/of.h>
++#include <linux/of_gpio.h>
+ #include <linux/usb/ehci_pdriver.h>
+ #include <linux/usb/ohci_pdriver.h>
+ 
+@@ -224,6 +226,23 @@ static void bcma_hcd_init_chip_arm(struc
+       }
+ }
+ 
++static void bcma_hci_platform_power_gpio(struct bcma_device *dev, bool val)
++{
++      int gpio;
++
++      gpio = of_get_named_gpio(dev->dev.of_node, "vcc-gpio", 0);
++      if (!gpio_is_valid(gpio))
++              return;
++
++      if (val) {
++              gpio_request(gpio, "bcma-hcd-gpio");
++              gpio_set_value(gpio, 1);
++      } else {
++              gpio_set_value(gpio, 0);
++              gpio_free(gpio);
++      }
++}
++
+ static const struct usb_ehci_pdata ehci_pdata = {
+ };
+ 
+@@ -295,6 +314,8 @@ static int bcma_hcd_probe(struct bcma_de
+       if (!usb_dev)
+               return -ENOMEM;
+ 
++      bcma_hci_platform_power_gpio(dev, true);
++
+       switch (dev->id.id) {
+       case BCMA_CORE_NS_USB20:
+               bcma_hcd_init_chip_arm(dev);
+@@ -347,6 +368,7 @@ static void bcma_hcd_remove(struct bcma_
+ 
+ static void bcma_hcd_shutdown(struct bcma_device *dev)
+ {
++      bcma_hci_platform_power_gpio(dev, false);
+       bcma_core_disable(dev, 0);
+ }
+ 
+@@ -354,6 +376,7 @@ static void bcma_hcd_shutdown(struct bcm
+ 
+ static int bcma_hcd_suspend(struct bcma_device *dev)
+ {
++      bcma_hci_platform_power_gpio(dev, false);
+       bcma_core_disable(dev, 0);
+ 
+       return 0;
+@@ -361,6 +384,7 @@ static int bcma_hcd_suspend(struct bcma_
+ 
+ static int bcma_hcd_resume(struct bcma_device *dev)
+ {
++      bcma_hci_platform_power_gpio(dev, true);
+       bcma_core_enable(dev, 0);
+ 
+       return 0;

Copied: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/083-USB-bcma-switch-to-GPIO-descriptor-for-power-control.patch
 (from rev 49294, 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/186-USB-bcma-switch-to-GPIO-descriptor-for-power-control.patch)
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/083-USB-bcma-switch-to-GPIO-descriptor-for-power-control.patch
                              (rev 0)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/083-USB-bcma-switch-to-GPIO-descriptor-for-power-control.patch
      2016-05-08 21:09:12 UTC (rev 49297)
@@ -0,0 +1,75 @@
+From 9faae5a37b266afca6914163316856c5ed4ec366 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
+Date: Sun, 1 Nov 2015 10:04:41 +0100
+Subject: [PATCH] USB: bcma: switch to GPIO descriptor for power control
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+So far we were using simple (legacy) GPIO functions & some poor logic to
+control power. It got many drawbacks: we were ignoring OF flags
+(GPIO_ACTIVE_LOW), we were not setting direction to output and we were
+assuming gpio_request success all the time.
+Fix it by switching to gpiod functions and adding appropriate checks.
+
+Signed-off-by: Rafał Miłecki <[email protected]>
+Acked-by: Hauke Mehrtens <[email protected]>
+Signed-off-by: Greg Kroah-Hartman <[email protected]>
+---
+ drivers/usb/host/bcma-hcd.c | 21 ++++++++++-----------
+ 1 file changed, 10 insertions(+), 11 deletions(-)
+
+--- a/drivers/usb/host/bcma-hcd.c
++++ b/drivers/usb/host/bcma-hcd.c
+@@ -21,6 +21,7 @@
+  */
+ #include <linux/bcma/bcma.h>
+ #include <linux/delay.h>
++#include <linux/gpio/consumer.h>
+ #include <linux/platform_device.h>
+ #include <linux/module.h>
+ #include <linux/slab.h>
+@@ -36,6 +37,7 @@ MODULE_LICENSE("GPL");
+ struct bcma_hcd_device {
+       struct platform_device *ehci_dev;
+       struct platform_device *ohci_dev;
++      struct gpio_desc *gpio_desc;
+ };
+ 
+ /* Wait for bitmask in a register to get set or cleared.
+@@ -228,19 +230,12 @@ static void bcma_hcd_init_chip_arm(struc
+ 
+ static void bcma_hci_platform_power_gpio(struct bcma_device *dev, bool val)
+ {
+-      int gpio;
++      struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);
+ 
+-      gpio = of_get_named_gpio(dev->dev.of_node, "vcc-gpio", 0);
+-      if (!gpio_is_valid(gpio))
++      if (IS_ERR_OR_NULL(usb_dev->gpio_desc))
+               return;
+ 
+-      if (val) {
+-              gpio_request(gpio, "bcma-hcd-gpio");
+-              gpio_set_value(gpio, 1);
+-      } else {
+-              gpio_set_value(gpio, 0);
+-              gpio_free(gpio);
+-      }
++      gpiod_set_value(usb_dev->gpio_desc, val);
+ }
+ 
+ static const struct usb_ehci_pdata ehci_pdata = {
+@@ -314,7 +309,11 @@ static int bcma_hcd_probe(struct bcma_de
+       if (!usb_dev)
+               return -ENOMEM;
+ 
+-      bcma_hci_platform_power_gpio(dev, true);
++      if (dev->dev.of_node)
++              usb_dev->gpio_desc = devm_get_gpiod_from_child(&dev->dev, "vcc",
++                                                             
&dev->dev.of_node->fwnode);
++      if (!IS_ERR_OR_NULL(usb_dev->gpio_desc))
++              gpiod_direction_output(usb_dev->gpio_desc, 1);
+ 
+       switch (dev->id.id) {
+       case BCMA_CORE_NS_USB20:

Copied: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/084-01-USB-bcma-make-helper-creating-platform-dev-more-gene.patch
 (from rev 49294, 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/810-USB-bcma-make-helper-creating-platform-dev-more-gene.patch)
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/084-01-USB-bcma-make-helper-creating-platform-dev-more-gene.patch
                           (rev 0)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/084-01-USB-bcma-make-helper-creating-platform-dev-more-gene.patch
   2016-05-08 21:09:12 UTC (rev 49297)
@@ -0,0 +1,77 @@
+From 352d9e2ee85b43170388599a17cd7b219f270163 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
+Date: Sat, 5 Dec 2015 13:15:06 +0100
+Subject: [PATCH] USB: bcma: make helper creating platform dev more generic
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Having "bool ohci" argument in bcma_hcd_create_pdev function limited it
+to support two cases only (OHCI and EHCI) and put too much logic in it.
+Lets make caller pass all required data. This adds few extra arguments
+to the function call but will allow us to reuse this code and handle
+more cases in the future (e.g. add XHCI support).
+
+Signed-off-by: Rafał Miłecki <[email protected]>
+Signed-off-by: Greg Kroah-Hartman <[email protected]>
+---
+ drivers/usb/host/bcma-hcd.c | 24 +++++++++++++-----------
+ 1 file changed, 13 insertions(+), 11 deletions(-)
+
+--- a/drivers/usb/host/bcma-hcd.c
++++ b/drivers/usb/host/bcma-hcd.c
+@@ -244,7 +244,10 @@ static const struct usb_ehci_pdata ehci_
+ static const struct usb_ohci_pdata ohci_pdata = {
+ };
+ 
+-static struct platform_device *bcma_hcd_create_pdev(struct bcma_device *dev, 
bool ohci, u32 addr)
++static struct platform_device *bcma_hcd_create_pdev(struct bcma_device *dev,
++                                                  const char *name, u32 addr,
++                                                  const void *data,
++                                                  size_t size)
+ {
+       struct platform_device *hci_dev;
+       struct resource hci_res[2];
+@@ -259,8 +262,7 @@ static struct platform_device *bcma_hcd_
+       hci_res[1].start = dev->irq;
+       hci_res[1].flags = IORESOURCE_IRQ;
+ 
+-      hci_dev = platform_device_alloc(ohci ? "ohci-platform" :
+-                                      "ehci-platform" , 0);
++      hci_dev = platform_device_alloc(name, 0);
+       if (!hci_dev)
+               return ERR_PTR(-ENOMEM);
+ 
+@@ -271,12 +273,8 @@ static struct platform_device *bcma_hcd_
+                                           ARRAY_SIZE(hci_res));
+       if (ret)
+               goto err_alloc;
+-      if (ohci)
+-              ret = platform_device_add_data(hci_dev, &ohci_pdata,
+-                                             sizeof(ohci_pdata));
+-      else
+-              ret = platform_device_add_data(hci_dev, &ehci_pdata,
+-                                             sizeof(ehci_pdata));
++      if (data)
++              ret = platform_device_add_data(hci_dev, data, size);
+       if (ret)
+               goto err_alloc;
+       ret = platform_device_add(hci_dev);
+@@ -333,11 +331,15 @@ static int bcma_hcd_probe(struct bcma_de
+           && chipinfo->rev == 0)
+               ohci_addr = 0x18009000;
+ 
+-      usb_dev->ohci_dev = bcma_hcd_create_pdev(dev, true, ohci_addr);
++      usb_dev->ohci_dev = bcma_hcd_create_pdev(dev, "ohci-platform",
++                                               ohci_addr, &ohci_pdata,
++                                               sizeof(ohci_pdata));
+       if (IS_ERR(usb_dev->ohci_dev))
+               return PTR_ERR(usb_dev->ohci_dev);
+ 
+-      usb_dev->ehci_dev = bcma_hcd_create_pdev(dev, false, dev->addr);
++      usb_dev->ehci_dev = bcma_hcd_create_pdev(dev, "ehci-platform",
++                                               dev->addr, &ehci_pdata,
++                                               sizeof(ehci_pdata));
+       if (IS_ERR(usb_dev->ehci_dev)) {
+               err = PTR_ERR(usb_dev->ehci_dev);
+               goto err_unregister_ohci_dev;

Copied: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/084-02-USB-bcma-separate-code-initializing-USB-2.0-core.patch
 (from rev 49294, 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/811-USB-bcma-use-separated-function-for-USB-2.0-initiali.patch)
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/084-02-USB-bcma-separate-code-initializing-USB-2.0-core.patch
                               (rev 0)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/084-02-USB-bcma-separate-code-initializing-USB-2.0-core.patch
       2016-05-08 21:09:12 UTC (rev 49297)
@@ -0,0 +1,116 @@
+From adbff3a4f93d8501e8ae11906268e21b086d57ed Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
+Date: Sat, 5 Dec 2015 13:15:07 +0100
+Subject: [PATCH] USB: bcma: separate code initializing USB 2.0 core
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This splits one big probing function into two smaller ones. The main one
+is now responsible for the generic stuff: allocating memory & enabling
+power using GPIO. The new one contains code that is specific to the USB
+2.0 bcma core.
+This will allow adding support for the USB 3.0 bcma core (handling XHCI)
+in the future.
+
+Signed-off-by: Rafał Miłecki <[email protected]>
+Signed-off-by: Greg Kroah-Hartman <[email protected]>
+---
+ drivers/usb/host/bcma-hcd.c | 59 ++++++++++++++++++++++++++++++---------------
+ 1 file changed, 39 insertions(+), 20 deletions(-)
+
+--- a/drivers/usb/host/bcma-hcd.c
++++ b/drivers/usb/host/bcma-hcd.c
+@@ -35,6 +35,7 @@ MODULE_DESCRIPTION("Common USB driver fo
+ MODULE_LICENSE("GPL");
+ 
+ struct bcma_hcd_device {
++      struct bcma_device *core;
+       struct platform_device *ehci_dev;
+       struct platform_device *ohci_dev;
+       struct gpio_desc *gpio_desc;
+@@ -288,31 +289,16 @@ err_alloc:
+       return ERR_PTR(ret);
+ }
+ 
+-static int bcma_hcd_probe(struct bcma_device *dev)
++static int bcma_hcd_usb20_init(struct bcma_hcd_device *usb_dev)
+ {
+-      int err;
++      struct bcma_device *dev = usb_dev->core;
++      struct bcma_chipinfo *chipinfo = &dev->bus->chipinfo;
+       u32 ohci_addr;
+-      struct bcma_hcd_device *usb_dev;
+-      struct bcma_chipinfo *chipinfo;
+-
+-      chipinfo = &dev->bus->chipinfo;
+-
+-      /* TODO: Probably need checks here; is the core connected? */
++      int err;
+ 
+       if (dma_set_mask_and_coherent(dev->dma_dev, DMA_BIT_MASK(32)))
+               return -EOPNOTSUPP;
+ 
+-      usb_dev = devm_kzalloc(&dev->dev, sizeof(struct bcma_hcd_device),
+-                             GFP_KERNEL);
+-      if (!usb_dev)
+-              return -ENOMEM;
+-
+-      if (dev->dev.of_node)
+-              usb_dev->gpio_desc = devm_get_gpiod_from_child(&dev->dev, "vcc",
+-                                                             
&dev->dev.of_node->fwnode);
+-      if (!IS_ERR_OR_NULL(usb_dev->gpio_desc))
+-              gpiod_direction_output(usb_dev->gpio_desc, 1);
+-
+       switch (dev->id.id) {
+       case BCMA_CORE_NS_USB20:
+               bcma_hcd_init_chip_arm(dev);
+@@ -345,7 +331,6 @@ static int bcma_hcd_probe(struct bcma_de
+               goto err_unregister_ohci_dev;
+       }
+ 
+-      bcma_set_drvdata(dev, usb_dev);
+       return 0;
+ 
+ err_unregister_ohci_dev:
+@@ -353,6 +338,40 @@ err_unregister_ohci_dev:
+       return err;
+ }
+ 
++static int bcma_hcd_probe(struct bcma_device *core)
++{
++      int err;
++      struct bcma_hcd_device *usb_dev;
++
++      /* TODO: Probably need checks here; is the core connected? */
++
++      usb_dev = devm_kzalloc(&core->dev, sizeof(struct bcma_hcd_device),
++                             GFP_KERNEL);
++      if (!usb_dev)
++              return -ENOMEM;
++      usb_dev->core = core;
++
++      if (core->dev.of_node)
++              usb_dev->gpio_desc = devm_get_gpiod_from_child(&core->dev, 
"vcc",
++                                                             
&core->dev.of_node->fwnode);
++      if (!IS_ERR_OR_NULL(usb_dev->gpio_desc))
++              gpiod_direction_output(usb_dev->gpio_desc, 1);
++
++      switch (core->id.id) {
++      case BCMA_CORE_USB20_HOST:
++      case BCMA_CORE_NS_USB20:
++              err = bcma_hcd_usb20_init(usb_dev);
++              if (err)
++                      return err;
++              break;
++      default:
++              return -ENODEV;
++      }
++
++      bcma_set_drvdata(core, usb_dev);
++      return 0;
++}
++
+ static void bcma_hcd_remove(struct bcma_device *dev)
+ {
+       struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);

Added: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/085-USB-bcma-use-simpler-devm-helper-for-getting-vcc-GPI.patch
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/085-USB-bcma-use-simpler-devm-helper-for-getting-vcc-GPI.patch
                              (rev 0)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/085-USB-bcma-use-simpler-devm-helper-for-getting-vcc-GPI.patch
      2016-05-08 21:09:12 UTC (rev 49297)
@@ -0,0 +1,34 @@
+From 1507372b97a098fd51b92c4dbdbbcd65cba26939 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
+Date: Wed, 23 Mar 2016 12:37:11 +0100
+Subject: [PATCH] USB: bcma: use simpler devm helper for getting vcc GPIO
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Thanks to switching to devm_gpiod_get:
+1) We don't have to pass fwnode pointer
+2) We can request initial GPIO value at getting call
+This was successfully tested on Netgear R6250 (BCM4708).
+
+Signed-off-by: Rafał Miłecki <[email protected]>
+Signed-off-by: Greg Kroah-Hartman <[email protected]>
+---
+ drivers/usb/host/bcma-hcd.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/drivers/usb/host/bcma-hcd.c
++++ b/drivers/usb/host/bcma-hcd.c
+@@ -352,10 +352,8 @@ static int bcma_hcd_probe(struct bcma_de
+       usb_dev->core = core;
+ 
+       if (core->dev.of_node)
+-              usb_dev->gpio_desc = devm_get_gpiod_from_child(&core->dev, 
"vcc",
+-                                                             
&core->dev.of_node->fwnode);
+-      if (!IS_ERR_OR_NULL(usb_dev->gpio_desc))
+-              gpiod_direction_output(usb_dev->gpio_desc, 1);
++              usb_dev->gpio_desc = devm_gpiod_get(&core->dev, "vcc",
++                                                  GPIOD_OUT_HIGH);
+ 
+       switch (core->id.id) {
+       case BCMA_CORE_USB20_HOST:

Deleted: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/180-USB-bcma-remove-chip-id-check.patch
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/180-USB-bcma-remove-chip-id-check.patch
     2016-05-05 14:56:57 UTC (rev 49296)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/180-USB-bcma-remove-chip-id-check.patch
     2016-05-08 21:09:12 UTC (rev 49297)
@@ -1,34 +0,0 @@
-From baf3d128e5bdf9d322539609133a15b493b0c2ef Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <[email protected]>
-Date: Thu, 11 Jun 2015 22:57:35 +0200
-Subject: [PATCH] USB: bcma: remove chip id check
-
-I have never seen any bcma device with an USB host core which was not a
-SoC, the bcma devices have an USB device core with a different core id.
-Some SoC have IDs with 47XX and 53XX in decimal form which would be
-rejected by this check. Instead of fixing this check just remove it.
-
-Signed-off-by: Hauke Mehrtens <[email protected]>
----
- drivers/usb/host/bcma-hcd.c | 5 -----
- 1 file changed, 5 deletions(-)
-
---- a/drivers/usb/host/bcma-hcd.c
-+++ b/drivers/usb/host/bcma-hcd.c
-@@ -214,16 +214,11 @@ err_alloc:
- static int bcma_hcd_probe(struct bcma_device *dev)
- {
-       int err;
--      u16 chipid_top;
-       u32 ohci_addr;
-       struct bcma_hcd_device *usb_dev;
-       struct bcma_chipinfo *chipinfo;
- 
-       chipinfo = &dev->bus->chipinfo;
--      /* USBcores are only connected on embedded devices. */
--      chipid_top = (chipinfo->id & 0xFF00);
--      if (chipid_top != 0x4700 && chipid_top != 0x5300)
--              return -ENODEV;
- 
-       /* TODO: Probably need checks here; is the core connected? */
- 

Deleted: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/181-USB-bcma-replace-numbers-with-constants.patch
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/181-USB-bcma-replace-numbers-with-constants.patch
   2016-05-05 14:56:57 UTC (rev 49296)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/181-USB-bcma-replace-numbers-with-constants.patch
   2016-05-08 21:09:12 UTC (rev 49297)
@@ -1,24 +0,0 @@
-From f5bc834917a8b1b9487749bdfe8eda52a01967b4 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <[email protected]>
-Date: Thu, 11 Jun 2015 22:57:36 +0200
-Subject: [PATCH] USB: bcma: replace numbers with constants
-
-The constants for these numbers were added long time ago, use them.
-
-Signed-off-by: Hauke Mehrtens <[email protected]>
----
- drivers/usb/host/bcma-hcd.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/drivers/usb/host/bcma-hcd.c
-+++ b/drivers/usb/host/bcma-hcd.c
-@@ -233,7 +233,8 @@ static int bcma_hcd_probe(struct bcma_de
- 
-       /* In AI chips EHCI is addrspace 0, OHCI is 1 */
-       ohci_addr = dev->addr_s[0];
--      if ((chipinfo->id == 0x5357 || chipinfo->id == 0x4749)
-+      if ((chipinfo->id == BCMA_CHIP_ID_BCM5357 ||
-+           chipinfo->id == BCMA_CHIP_ID_BCM4749)
-           && chipinfo->rev == 0)
-               ohci_addr = 0x18009000;
- 

Deleted: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/182-USB-bcma-use-devm_kzalloc.patch
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/182-USB-bcma-use-devm_kzalloc.patch
 2016-05-05 14:56:57 UTC (rev 49296)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/182-USB-bcma-use-devm_kzalloc.patch
 2016-05-08 21:09:12 UTC (rev 49297)
@@ -1,47 +0,0 @@
-From 93724affb195149df6f7630901d878f6e273fa02 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <[email protected]>
-Date: Thu, 11 Jun 2015 22:57:37 +0200
-Subject: [PATCH] USB: bcma: use devm_kzalloc
-
-Instead of manually handling the frees use devm. There was also a free
-missing in the unregister call which is not needed with devm.
-
-Signed-off-by: Hauke Mehrtens <[email protected]>
----
- drivers/usb/host/bcma-hcd.c | 11 ++++-------
- 1 file changed, 4 insertions(+), 7 deletions(-)
-
---- a/drivers/usb/host/bcma-hcd.c
-+++ b/drivers/usb/host/bcma-hcd.c
-@@ -225,7 +225,8 @@ static int bcma_hcd_probe(struct bcma_de
-       if (dma_set_mask_and_coherent(dev->dma_dev, DMA_BIT_MASK(32)))
-               return -EOPNOTSUPP;
- 
--      usb_dev = kzalloc(sizeof(struct bcma_hcd_device), GFP_KERNEL);
-+      usb_dev = devm_kzalloc(&dev->dev, sizeof(struct bcma_hcd_device),
-+                             GFP_KERNEL);
-       if (!usb_dev)
-               return -ENOMEM;
- 
-@@ -239,10 +240,8 @@ static int bcma_hcd_probe(struct bcma_de
-               ohci_addr = 0x18009000;
- 
-       usb_dev->ohci_dev = bcma_hcd_create_pdev(dev, true, ohci_addr);
--      if (IS_ERR(usb_dev->ohci_dev)) {
--              err = PTR_ERR(usb_dev->ohci_dev);
--              goto err_free_usb_dev;
--      }
-+      if (IS_ERR(usb_dev->ohci_dev))
-+              return PTR_ERR(usb_dev->ohci_dev);
- 
-       usb_dev->ehci_dev = bcma_hcd_create_pdev(dev, false, dev->addr);
-       if (IS_ERR(usb_dev->ehci_dev)) {
-@@ -255,8 +254,6 @@ static int bcma_hcd_probe(struct bcma_de
- 
- err_unregister_ohci_dev:
-       platform_device_unregister(usb_dev->ohci_dev);
--err_free_usb_dev:
--      kfree(usb_dev);
-       return err;
- }
- 

Deleted: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/183-USB-bcma-fix-error-handling-in-bcma_hcd_create_pdev.patch
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/183-USB-bcma-fix-error-handling-in-bcma_hcd_create_pdev.patch
       2016-05-05 14:56:57 UTC (rev 49296)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/183-USB-bcma-fix-error-handling-in-bcma_hcd_create_pdev.patch
       2016-05-08 21:09:12 UTC (rev 49297)
@@ -1,33 +0,0 @@
-From 232996d1ba3002e7e80b18075e2838fc86f21412 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <[email protected]>
-Date: Thu, 11 Jun 2015 22:57:38 +0200
-Subject: [PATCH] USB: bcma: fix error handling in bcma_hcd_create_pdev()
-
-This patch makes bcma_hcd_create_pdev() not return NULL, but a prober
-error code in case of an error.
-
-Signed-off-by: Hauke Mehrtens <[email protected]>
----
- drivers/usb/host/bcma-hcd.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/usb/host/bcma-hcd.c
-+++ b/drivers/usb/host/bcma-hcd.c
-@@ -169,7 +169,7 @@ static struct platform_device *bcma_hcd_
- {
-       struct platform_device *hci_dev;
-       struct resource hci_res[2];
--      int ret = -ENOMEM;
-+      int ret;
- 
-       memset(hci_res, 0, sizeof(hci_res));
- 
-@@ -183,7 +183,7 @@ static struct platform_device *bcma_hcd_
-       hci_dev = platform_device_alloc(ohci ? "ohci-platform" :
-                                       "ehci-platform" , 0);
-       if (!hci_dev)
--              return NULL;
-+              return ERR_PTR(-ENOMEM);
- 
-       hci_dev->dev.parent = &dev->dev;
-       hci_dev->dev.dma_mask = &hci_dev->dev.coherent_dma_mask;

Deleted: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/184-USB-bcma-add-bcm53xx-support.patch
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/184-USB-bcma-add-bcm53xx-support.patch
      2016-05-05 14:56:57 UTC (rev 49296)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/184-USB-bcma-add-bcm53xx-support.patch
      2016-05-08 21:09:12 UTC (rev 49297)
@@ -1,133 +0,0 @@
-From b65851f41c22b8c69b8fe9ca7782d19ed2155efc Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <[email protected]>
-Date: Thu, 11 Jun 2015 22:57:39 +0200
-Subject: [PATCH] USB: bcma: add bcm53xx support
-
-The Broadcom ARM SoCs with this usb core need a different
-initialization and they have a different core id. This patch adds
-support for these USB 2.0 core.
-
-Signed-off-by: Felix Fietkau <[email protected]>
-Signed-off-by: Hauke Mehrtens <[email protected]>
----
- drivers/usb/host/bcma-hcd.c | 81 +++++++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 78 insertions(+), 3 deletions(-)
-
---- a/drivers/usb/host/bcma-hcd.c
-+++ b/drivers/usb/host/bcma-hcd.c
-@@ -2,7 +2,8 @@
-  * Broadcom specific Advanced Microcontroller Bus
-  * Broadcom USB-core driver (BCMA bus glue)
-  *
-- * Copyright 2011-2012 Hauke Mehrtens <[email protected]>
-+ * Copyright 2011-2015 Hauke Mehrtens <[email protected]>
-+ * Copyright 2015 Felix Fietkau <[email protected]>
-  *
-  * Based on ssb-ohci driver
-  * Copyright 2007 Michael Buesch <[email protected]>
-@@ -88,7 +89,7 @@ static void bcma_hcd_4716wa(struct bcma_
- }
- 
- /* based on arch/mips/brcm-boards/bcm947xx/pcibios.c */
--static void bcma_hcd_init_chip(struct bcma_device *dev)
-+static void bcma_hcd_init_chip_mips(struct bcma_device *dev)
- {
-       u32 tmp;
- 
-@@ -159,6 +160,70 @@ static void bcma_hcd_init_chip(struct bc
-       }
- }
- 
-+static void bcma_hcd_init_chip_arm_phy(struct bcma_device *dev)
-+{
-+      struct bcma_device *arm_core;
-+      void __iomem *dmu;
-+
-+      arm_core = bcma_find_core(dev->bus, BCMA_CORE_ARMCA9);
-+      if (!arm_core) {
-+              dev_err(&dev->dev, "can not find ARM Cortex A9 ihost core\n");
-+              return;
-+      }
-+
-+      dmu = ioremap_nocache(arm_core->addr_s[0], 0x1000);
-+      if (!dmu) {
-+              dev_err(&dev->dev, "can not map ARM Cortex A9 ihost core\n");
-+              return;
-+      }
-+
-+      /* Unlock DMU PLL settings */
-+      iowrite32(0x0000ea68, dmu + 0x180);
-+
-+      /* Write USB 2.0 PLL control setting */
-+      iowrite32(0x00dd10c3, dmu + 0x164);
-+
-+      /* Lock DMU PLL settings */
-+      iowrite32(0x00000000, dmu + 0x180);
-+
-+      iounmap(dmu);
-+}
-+
-+static void bcma_hcd_init_chip_arm_hc(struct bcma_device *dev)
-+{
-+      u32 val;
-+
-+      /*
-+       * Delay after PHY initialized to ensure HC is ready to be configured
-+       */
-+      usleep_range(1000, 2000);
-+
-+      /* Set packet buffer OUT threshold */
-+      val = bcma_read32(dev, 0x94);
-+      val &= 0xffff;
-+      val |= 0x80 << 16;
-+      bcma_write32(dev, 0x94, val);
-+
-+      /* Enable break memory transfer */
-+      val = bcma_read32(dev, 0x9c);
-+      val |= 1;
-+      bcma_write32(dev, 0x9c, val);
-+}
-+
-+static void bcma_hcd_init_chip_arm(struct bcma_device *dev)
-+{
-+      bcma_core_enable(dev, 0);
-+
-+      if (dev->bus->chipinfo.id == BCMA_CHIP_ID_BCM4707 ||
-+          dev->bus->chipinfo.id == BCMA_CHIP_ID_BCM53018) {
-+              if (dev->bus->chipinfo.pkg == BCMA_PKG_ID_BCM4707 ||
-+                  dev->bus->chipinfo.pkg == BCMA_PKG_ID_BCM4708)
-+                      bcma_hcd_init_chip_arm_phy(dev);
-+
-+              bcma_hcd_init_chip_arm_hc(dev);
-+      }
-+}
-+
- static const struct usb_ehci_pdata ehci_pdata = {
- };
- 
-@@ -230,7 +295,16 @@ static int bcma_hcd_probe(struct bcma_de
-       if (!usb_dev)
-               return -ENOMEM;
- 
--      bcma_hcd_init_chip(dev);
-+      switch (dev->id.id) {
-+      case BCMA_CORE_NS_USB20:
-+              bcma_hcd_init_chip_arm(dev);
-+              break;
-+      case BCMA_CORE_USB20_HOST:
-+              bcma_hcd_init_chip_mips(dev);
-+              break;
-+      default:
-+              return -ENODEV;
-+      }
- 
-       /* In AI chips EHCI is addrspace 0, OHCI is 1 */
-       ohci_addr = dev->addr_s[0];
-@@ -299,6 +373,7 @@ static int bcma_hcd_resume(struct bcma_d
- 
- static const struct bcma_device_id bcma_hcd_table[] = {
-       BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_USB20_HOST, BCMA_ANY_REV, 
BCMA_ANY_CLASS),
-+      BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_NS_USB20, BCMA_ANY_REV, 
BCMA_ANY_CLASS),
-       BCMA_CORETABLE_END
- };
- MODULE_DEVICE_TABLE(bcma, bcma_hcd_table);

Deleted: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/185-USB-bcma-add-support-for-controlling-bus-power-throu.patch
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/185-USB-bcma-add-support-for-controlling-bus-power-throu.patch
      2016-05-05 14:56:57 UTC (rev 49296)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/185-USB-bcma-add-support-for-controlling-bus-power-throu.patch
      2016-05-08 21:09:12 UTC (rev 49297)
@@ -1,82 +0,0 @@
-From f3cf44a313b3687efd55ba091558e20a4d218c31 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <[email protected]>
-Date: Thu, 11 Jun 2015 22:57:40 +0200
-Subject: [PATCH] USB: bcma: add support for controlling bus power through GPIO
-
-On some boards a GPIO is needed to activate USB controller. Make it
-possible to specify such a GPIO in device tree.
-
-Signed-off-by: Felix Fietkau <[email protected]>
-Signed-off-by: Hauke Mehrtens <[email protected]>
----
- drivers/usb/host/bcma-hcd.c | 24 ++++++++++++++++++++++++
- 1 file changed, 24 insertions(+)
-
---- a/drivers/usb/host/bcma-hcd.c
-+++ b/drivers/usb/host/bcma-hcd.c
-@@ -24,6 +24,8 @@
- #include <linux/platform_device.h>
- #include <linux/module.h>
- #include <linux/slab.h>
-+#include <linux/of.h>
-+#include <linux/of_gpio.h>
- #include <linux/usb/ehci_pdriver.h>
- #include <linux/usb/ohci_pdriver.h>
- 
-@@ -224,6 +226,23 @@ static void bcma_hcd_init_chip_arm(struc
-       }
- }
- 
-+static void bcma_hci_platform_power_gpio(struct bcma_device *dev, bool val)
-+{
-+      int gpio;
-+
-+      gpio = of_get_named_gpio(dev->dev.of_node, "vcc-gpio", 0);
-+      if (!gpio_is_valid(gpio))
-+              return;
-+
-+      if (val) {
-+              gpio_request(gpio, "bcma-hcd-gpio");
-+              gpio_set_value(gpio, 1);
-+      } else {
-+              gpio_set_value(gpio, 0);
-+              gpio_free(gpio);
-+      }
-+}
-+
- static const struct usb_ehci_pdata ehci_pdata = {
- };
- 
-@@ -295,6 +314,8 @@ static int bcma_hcd_probe(struct bcma_de
-       if (!usb_dev)
-               return -ENOMEM;
- 
-+      bcma_hci_platform_power_gpio(dev, true);
-+
-       switch (dev->id.id) {
-       case BCMA_CORE_NS_USB20:
-               bcma_hcd_init_chip_arm(dev);
-@@ -347,6 +368,7 @@ static void bcma_hcd_remove(struct bcma_
- 
- static void bcma_hcd_shutdown(struct bcma_device *dev)
- {
-+      bcma_hci_platform_power_gpio(dev, false);
-       bcma_core_disable(dev, 0);
- }
- 
-@@ -354,6 +376,7 @@ static void bcma_hcd_shutdown(struct bcm
- 
- static int bcma_hcd_suspend(struct bcma_device *dev)
- {
-+      bcma_hci_platform_power_gpio(dev, false);
-       bcma_core_disable(dev, 0);
- 
-       return 0;
-@@ -361,6 +384,7 @@ static int bcma_hcd_suspend(struct bcma_
- 
- static int bcma_hcd_resume(struct bcma_device *dev)
- {
-+      bcma_hci_platform_power_gpio(dev, true);
-       bcma_core_enable(dev, 0);
- 
-       return 0;

Deleted: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/186-USB-bcma-switch-to-GPIO-descriptor-for-power-control.patch
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/186-USB-bcma-switch-to-GPIO-descriptor-for-power-control.patch
      2016-05-05 14:56:57 UTC (rev 49296)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/186-USB-bcma-switch-to-GPIO-descriptor-for-power-control.patch
      2016-05-08 21:09:12 UTC (rev 49297)
@@ -1,73 +0,0 @@
-From 0cb136f9882e4649ad6160bb7b48955ff728888c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
-Date: Sun, 1 Nov 2015 08:17:21 +0100
-Subject: [PATCH V2] USB: bcma: switch to GPIO descriptor for power control
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-So far we were using simple (legacy) GPIO functions & some poor logic to
-control power. It got many drawbacks: we were ignoring OF flags
-(GPIO_ACTIVE_LOW), we were not setting direction to output and we were
-assuming gpio_request success all the time.
-Fix it by switching to gpiod functions and adding appropriate checks.
-
-Signed-off-by: Rafał Miłecki <[email protected]>
----
- drivers/usb/host/bcma-hcd.c | 21 ++++++++++-----------
- 1 file changed, 10 insertions(+), 11 deletions(-)
-
---- a/drivers/usb/host/bcma-hcd.c
-+++ b/drivers/usb/host/bcma-hcd.c
-@@ -21,6 +21,7 @@
-  */
- #include <linux/bcma/bcma.h>
- #include <linux/delay.h>
-+#include <linux/gpio/consumer.h>
- #include <linux/platform_device.h>
- #include <linux/module.h>
- #include <linux/slab.h>
-@@ -36,6 +37,7 @@ MODULE_LICENSE("GPL");
- struct bcma_hcd_device {
-       struct platform_device *ehci_dev;
-       struct platform_device *ohci_dev;
-+      struct gpio_desc *gpio_desc;
- };
- 
- /* Wait for bitmask in a register to get set or cleared.
-@@ -228,19 +230,12 @@ static void bcma_hcd_init_chip_arm(struc
- 
- static void bcma_hci_platform_power_gpio(struct bcma_device *dev, bool val)
- {
--      int gpio;
-+      struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);
- 
--      gpio = of_get_named_gpio(dev->dev.of_node, "vcc-gpio", 0);
--      if (!gpio_is_valid(gpio))
-+      if (IS_ERR_OR_NULL(usb_dev->gpio_desc))
-               return;
- 
--      if (val) {
--              gpio_request(gpio, "bcma-hcd-gpio");
--              gpio_set_value(gpio, 1);
--      } else {
--              gpio_set_value(gpio, 0);
--              gpio_free(gpio);
--      }
-+      gpiod_set_value(usb_dev->gpio_desc, val);
- }
- 
- static const struct usb_ehci_pdata ehci_pdata = {
-@@ -314,7 +309,11 @@ static int bcma_hcd_probe(struct bcma_de
-       if (!usb_dev)
-               return -ENOMEM;
- 
--      bcma_hci_platform_power_gpio(dev, true);
-+      if (dev->dev.of_node)
-+              usb_dev->gpio_desc = devm_get_gpiod_from_child(&dev->dev, "vcc",
-+                                                             
&dev->dev.of_node->fwnode);
-+      if (!IS_ERR_OR_NULL(usb_dev->gpio_desc))
-+              gpiod_direction_output(usb_dev->gpio_desc, 1);
- 
-       switch (dev->id.id) {
-       case BCMA_CORE_NS_USB20:

Deleted: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/810-USB-bcma-make-helper-creating-platform-dev-more-gene.patch
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/810-USB-bcma-make-helper-creating-platform-dev-more-gene.patch
      2016-05-05 14:56:57 UTC (rev 49296)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/810-USB-bcma-make-helper-creating-platform-dev-more-gene.patch
      2016-05-08 21:09:12 UTC (rev 49297)
@@ -1,73 +0,0 @@
-From 5b4fed9fc917cc2bfc5297eeab03aeba5d340618 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
-Date: Tue, 16 Jun 2015 12:33:46 +0200
-Subject: [PATCH] USB: bcma: make helper creating platform dev more generic
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Having "bool ohci" argument bounded us to two cases only and didn't
-allow re-using this code for XHCI.
-
-Signed-off-by: Rafał Miłecki <[email protected]>
----
- drivers/usb/host/bcma-hcd.c | 24 +++++++++++++-----------
- 1 file changed, 13 insertions(+), 11 deletions(-)
-
---- a/drivers/usb/host/bcma-hcd.c
-+++ b/drivers/usb/host/bcma-hcd.c
-@@ -244,7 +244,10 @@ static const struct usb_ehci_pdata ehci_
- static const struct usb_ohci_pdata ohci_pdata = {
- };
- 
--static struct platform_device *bcma_hcd_create_pdev(struct bcma_device *dev, 
bool ohci, u32 addr)
-+static struct platform_device *bcma_hcd_create_pdev(struct bcma_device *dev,
-+                                                  const char *name, u32 addr,
-+                                                  const void *data,
-+                                                  size_t size)
- {
-       struct platform_device *hci_dev;
-       struct resource hci_res[2];
-@@ -259,8 +262,7 @@ static struct platform_device *bcma_hcd_
-       hci_res[1].start = dev->irq;
-       hci_res[1].flags = IORESOURCE_IRQ;
- 
--      hci_dev = platform_device_alloc(ohci ? "ohci-platform" :
--                                      "ehci-platform" , 0);
-+      hci_dev = platform_device_alloc(name, 0);
-       if (!hci_dev)
-               return ERR_PTR(-ENOMEM);
- 
-@@ -271,12 +273,8 @@ static struct platform_device *bcma_hcd_
-                                           ARRAY_SIZE(hci_res));
-       if (ret)
-               goto err_alloc;
--      if (ohci)
--              ret = platform_device_add_data(hci_dev, &ohci_pdata,
--                                             sizeof(ohci_pdata));
--      else
--              ret = platform_device_add_data(hci_dev, &ehci_pdata,
--                                             sizeof(ehci_pdata));
-+      if (data)
-+              ret = platform_device_add_data(hci_dev, data, size);
-       if (ret)
-               goto err_alloc;
-       ret = platform_device_add(hci_dev);
-@@ -333,11 +331,15 @@ static int bcma_hcd_probe(struct bcma_de
-           && chipinfo->rev == 0)
-               ohci_addr = 0x18009000;
- 
--      usb_dev->ohci_dev = bcma_hcd_create_pdev(dev, true, ohci_addr);
-+      usb_dev->ohci_dev = bcma_hcd_create_pdev(dev, "ohci-platform",
-+                                               ohci_addr, &ohci_pdata,
-+                                               sizeof(ohci_pdata));
-       if (IS_ERR(usb_dev->ohci_dev))
-               return PTR_ERR(usb_dev->ohci_dev);
- 
--      usb_dev->ehci_dev = bcma_hcd_create_pdev(dev, false, dev->addr);
-+      usb_dev->ehci_dev = bcma_hcd_create_pdev(dev, "ehci-platform",
-+                                               dev->addr, &ehci_pdata,
-+                                               sizeof(ehci_pdata));
-       if (IS_ERR(usb_dev->ehci_dev)) {
-               err = PTR_ERR(usb_dev->ehci_dev);
-               goto err_unregister_ohci_dev;

Deleted: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/811-USB-bcma-use-separated-function-for-USB-2.0-initiali.patch
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/811-USB-bcma-use-separated-function-for-USB-2.0-initiali.patch
      2016-05-05 14:56:57 UTC (rev 49296)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/811-USB-bcma-use-separated-function-for-USB-2.0-initiali.patch
      2016-05-08 21:09:12 UTC (rev 49297)
@@ -1,110 +0,0 @@
-From 4aed231f49954114d5ae23e97789e9aa540a0b70 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
-Date: Tue, 16 Jun 2015 12:52:07 +0200
-Subject: [PATCH] USB: bcma: use separated function for USB 2.0 initialization
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This will allow adding USB 3.0 (XHCI) support cleanly.
-
-Signed-off-by: Rafał Miłecki <[email protected]>
----
- drivers/usb/host/bcma-hcd.c | 51 +++++++++++++++++++++++++++++++--------------
- 1 file changed, 35 insertions(+), 16 deletions(-)
-
---- a/drivers/usb/host/bcma-hcd.c
-+++ b/drivers/usb/host/bcma-hcd.c
-@@ -35,6 +35,7 @@ MODULE_DESCRIPTION("Common USB driver fo
- MODULE_LICENSE("GPL");
- 
- struct bcma_hcd_device {
-+      struct bcma_device *core;
-       struct platform_device *ehci_dev;
-       struct platform_device *ohci_dev;
-       struct gpio_desc *gpio_desc;
-@@ -288,31 +289,16 @@ err_alloc:
-       return ERR_PTR(ret);
- }
- 
--static int bcma_hcd_probe(struct bcma_device *dev)
-+static int bcma_hcd_usb20_init(struct bcma_hcd_device *usb_dev)
- {
--      int err;
-+      struct bcma_device *dev = usb_dev->core;
-+      struct bcma_chipinfo *chipinfo = &dev->bus->chipinfo;
-       u32 ohci_addr;
--      struct bcma_hcd_device *usb_dev;
--      struct bcma_chipinfo *chipinfo;
--
--      chipinfo = &dev->bus->chipinfo;
--
--      /* TODO: Probably need checks here; is the core connected? */
-+      int err;
- 
-       if (dma_set_mask_and_coherent(dev->dma_dev, DMA_BIT_MASK(32)))
-               return -EOPNOTSUPP;
- 
--      usb_dev = devm_kzalloc(&dev->dev, sizeof(struct bcma_hcd_device),
--                             GFP_KERNEL);
--      if (!usb_dev)
--              return -ENOMEM;
--
--      if (dev->dev.of_node)
--              usb_dev->gpio_desc = devm_get_gpiod_from_child(&dev->dev, "vcc",
--                                                             
&dev->dev.of_node->fwnode);
--      if (!IS_ERR_OR_NULL(usb_dev->gpio_desc))
--              gpiod_direction_output(usb_dev->gpio_desc, 1);
--
-       switch (dev->id.id) {
-       case BCMA_CORE_NS_USB20:
-               bcma_hcd_init_chip_arm(dev);
-@@ -345,7 +331,6 @@ static int bcma_hcd_probe(struct bcma_de
-               goto err_unregister_ohci_dev;
-       }
- 
--      bcma_set_drvdata(dev, usb_dev);
-       return 0;
- 
- err_unregister_ohci_dev:
-@@ -353,6 +338,40 @@ err_unregister_ohci_dev:
-       return err;
- }
- 
-+static int bcma_hcd_probe(struct bcma_device *dev)
-+{
-+      int err;
-+      struct bcma_hcd_device *usb_dev;
-+
-+      /* TODO: Probably need checks here; is the core connected? */
-+
-+      usb_dev = devm_kzalloc(&dev->dev, sizeof(struct bcma_hcd_device),
-+                             GFP_KERNEL);
-+      if (!usb_dev)
-+              return -ENOMEM;
-+      usb_dev->core = dev;
-+
-+      if (dev->dev.of_node)
-+              usb_dev->gpio_desc = devm_get_gpiod_from_child(&dev->dev, "vcc",
-+                                                             
&dev->dev.of_node->fwnode);
-+      if (!IS_ERR_OR_NULL(usb_dev->gpio_desc))
-+              gpiod_direction_output(usb_dev->gpio_desc, 1);
-+
-+      switch (dev->id.id) {
-+      case BCMA_CORE_USB20_HOST:
-+      case BCMA_CORE_NS_USB20:
-+              err = bcma_hcd_usb20_init(usb_dev);
-+              if (err)
-+                      return err;
-+              break;
-+      default:
-+              return -ENODEV;
-+      }
-+
-+      bcma_set_drvdata(dev, usb_dev);
-+      return 0;
-+}
-+
- static void bcma_hcd_remove(struct bcma_device *dev)
- {
-       struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);

Modified: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/812-USB-bcma-add-USB-3.0-support.patch
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/812-USB-bcma-add-USB-3.0-support.patch
      2016-05-05 14:56:57 UTC (rev 49296)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/812-USB-bcma-add-USB-3.0-support.patch
      2016-05-08 21:09:12 UTC (rev 49297)
@@ -185,10 +185,10 @@
 +      return 0;
 +}
 +
- static int bcma_hcd_probe(struct bcma_device *dev)
+ static int bcma_hcd_probe(struct bcma_device *core)
  {
        int err;
-@@ -364,6 +525,11 @@ static int bcma_hcd_probe(struct bcma_de
+@@ -362,6 +523,11 @@ static int bcma_hcd_probe(struct bcma_de
                if (err)
                        return err;
                break;
@@ -200,7 +200,7 @@
        default:
                return -ENODEV;
        }
-@@ -377,11 +543,14 @@ static void bcma_hcd_remove(struct bcma_
+@@ -375,11 +541,14 @@ static void bcma_hcd_remove(struct bcma_
        struct bcma_hcd_device *usb_dev = bcma_get_drvdata(dev);
        struct platform_device *ohci_dev = usb_dev->ohci_dev;
        struct platform_device *ehci_dev = usb_dev->ehci_dev;
@@ -215,7 +215,7 @@
  
        bcma_core_disable(dev, 0);
  }
-@@ -418,6 +587,7 @@ static int bcma_hcd_resume(struct bcma_d
+@@ -416,6 +585,7 @@ static int bcma_hcd_resume(struct bcma_d
  static const struct bcma_device_id bcma_hcd_table[] = {
        BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_USB20_HOST, BCMA_ANY_REV, 
BCMA_ANY_CLASS),
        BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_NS_USB20, BCMA_ANY_REV, 
BCMA_ANY_CLASS),

Deleted: 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/813-USB-bcma-use-simpler-devm_gpiod_get.patch
===================================================================
--- 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/813-USB-bcma-use-simpler-devm_gpiod_get.patch
       2016-05-05 14:56:57 UTC (rev 49296)
+++ 
branches/chaos_calmer/target/linux/bcm53xx/patches-3.18/813-USB-bcma-use-simpler-devm_gpiod_get.patch
       2016-05-08 21:09:12 UTC (rev 49297)
@@ -1,24 +0,0 @@
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
-Date: Sat, 2 Jan 2016 11:26:28 +0100
-Subject: [PATCH] USB: bcma: use simpler devm_gpiod_get
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Rafał Miłecki <[email protected]>
----
- drivers/usb/host/bcma-hcd.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
---- a/drivers/usb/host/bcma-hcd.c
-+++ b/drivers/usb/host/bcma-hcd.c
-@@ -513,8 +513,7 @@ static int bcma_hcd_probe(struct bcma_de
-       usb_dev->core = dev;
- 
-       if (dev->dev.of_node)
--              usb_dev->gpio_desc = devm_get_gpiod_from_child(&dev->dev, "vcc",
--                                                             
&dev->dev.of_node->fwnode);
-+              usb_dev->gpio_desc = devm_gpiod_get(&dev->dev, "vcc");
-       if (!IS_ERR_OR_NULL(usb_dev->gpio_desc))
-               gpiod_direction_output(usb_dev->gpio_desc, 1);
- 
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to