kernel: update bcma including recent changes for 4.12
authorRafał Miłecki <rafal@milecki.pl>
Tue, 21 Mar 2017 08:26:02 +0000 (09:26 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Tue, 21 Mar 2017 08:58:05 +0000 (09:58 +0100)
This adds support for describing GPIO chips placed on PCIe cards. Thanks
to this we get working 2.4 GHz LED on Tenda AC9.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
target/linux/bcm53xx/patches-4.4/905-BCM53573-minor-hacks.patch
target/linux/bcm53xx/patches-4.9/905-BCM53573-minor-hacks.patch
target/linux/generic/patches-4.4/026-bcma-from-4.12.patch
target/linux/generic/patches-4.9/072-bcma-from-4.12.patch

index e48d3aa6789d4a6887afde09409ac43a8bf5a0ef..52a32a00c258c9ca49614dc9646f541b54ce0e27 100644 (file)
@@ -29,7 +29,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
                #size-cells = <1>;
 --- a/drivers/bcma/main.c
 +++ b/drivers/bcma/main.c
-@@ -352,14 +352,6 @@ static int bcma_register_devices(struct
+@@ -348,14 +348,6 @@ static int bcma_register_devices(struct
        }
  #endif
  
@@ -44,7 +44,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
  #ifdef CONFIG_BCMA_NFLASH
        if (bus->drv_cc.nflash.present) {
                err = platform_device_register(&bcma_nflash_dev);
-@@ -440,6 +432,14 @@ int bcma_bus_register(struct bcma_bus *b
+@@ -436,6 +428,14 @@ int bcma_bus_register(struct bcma_bus *b
                        bcma_register_core(bus, core);
        }
  
index fad36a6655adaf845e22940371f30d408e4a20c6..a2f15e56b2077ad861aac517b9a2238e02524f3b 100644 (file)
@@ -29,7 +29,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
                #size-cells = <1>;
 --- a/drivers/bcma/main.c
 +++ b/drivers/bcma/main.c
-@@ -352,14 +352,6 @@ static int bcma_register_devices(struct
+@@ -348,14 +348,6 @@ static int bcma_register_devices(struct
        }
  #endif
  
@@ -44,7 +44,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
  #ifdef CONFIG_BCMA_NFLASH
        if (bus->drv_cc.nflash.present) {
                err = platform_device_register(&bcma_nflash_dev);
-@@ -440,6 +432,14 @@ int bcma_bus_register(struct bcma_bus *b
+@@ -436,6 +428,14 @@ int bcma_bus_register(struct bcma_bus *b
                        bcma_register_core(bus, core);
        }
  
index ab8a212940fec1cb3ee1c88d411bb761f20a39ec..bd7d643cbb7b25387323372683b03da6b0e52f07 100644 (file)
  #endif
        switch (bus->chipinfo.id) {
        case BCMA_CHIP_ID_BCM4707:
+--- a/drivers/bcma/main.c
++++ b/drivers/bcma/main.c
+@@ -201,9 +201,6 @@ static void bcma_of_fill_device(struct d
+ {
+       struct device_node *node;
+-      if (!IS_ENABLED(CONFIG_OF_IRQ))
+-              return;
+-
+       node = bcma_of_find_child_device(parent, core);
+       if (node)
+               core->dev.of_node = node;
+@@ -242,19 +239,18 @@ void bcma_prepare_core(struct bcma_bus *
+       core->dev.release = bcma_release_core_dev;
+       core->dev.bus = &bcma_bus_type;
+       dev_set_name(&core->dev, "bcma%d:%d", bus->num, core->core_index);
++      core->dev.parent = bcma_bus_get_host_dev(bus);
++      if (core->dev.parent)
++              bcma_of_fill_device(core->dev.parent, core);
+       switch (bus->hosttype) {
+       case BCMA_HOSTTYPE_PCI:
+-              core->dev.parent = &bus->host_pci->dev;
+               core->dma_dev = &bus->host_pci->dev;
+               core->irq = bus->host_pci->irq;
+               break;
+       case BCMA_HOSTTYPE_SOC:
+               if (IS_ENABLED(CONFIG_OF) && bus->host_pdev) {
+                       core->dma_dev = &bus->host_pdev->dev;
+-                      core->dev.parent = &bus->host_pdev->dev;
+-                      if (core->dev.parent)
+-                              bcma_of_fill_device(core->dev.parent, core);
+               } else {
+                       core->dev.dma_mask = &core->dev.coherent_dma_mask;
+                       core->dma_dev = &core->dev;
index 1c3efea1720fe1c3c0c04936928b9bf789a1c1e7..23f2656ab5fc8482cbb7cf7d407b1384fe4d2408 100644 (file)
  #endif
        switch (bus->chipinfo.id) {
        case BCMA_CHIP_ID_BCM4707:
+--- a/drivers/bcma/main.c
++++ b/drivers/bcma/main.c
+@@ -201,9 +201,6 @@ static void bcma_of_fill_device(struct d
+ {
+       struct device_node *node;
+-      if (!IS_ENABLED(CONFIG_OF_IRQ))
+-              return;
+-
+       node = bcma_of_find_child_device(parent, core);
+       if (node)
+               core->dev.of_node = node;
+@@ -242,19 +239,18 @@ void bcma_prepare_core(struct bcma_bus *
+       core->dev.release = bcma_release_core_dev;
+       core->dev.bus = &bcma_bus_type;
+       dev_set_name(&core->dev, "bcma%d:%d", bus->num, core->core_index);
++      core->dev.parent = bcma_bus_get_host_dev(bus);
++      if (core->dev.parent)
++              bcma_of_fill_device(core->dev.parent, core);
+       switch (bus->hosttype) {
+       case BCMA_HOSTTYPE_PCI:
+-              core->dev.parent = &bus->host_pci->dev;
+               core->dma_dev = &bus->host_pci->dev;
+               core->irq = bus->host_pci->irq;
+               break;
+       case BCMA_HOSTTYPE_SOC:
+               if (IS_ENABLED(CONFIG_OF) && bus->host_pdev) {
+                       core->dma_dev = &bus->host_pdev->dev;
+-                      core->dev.parent = &bus->host_pdev->dev;
+-                      if (core->dev.parent)
+-                              bcma_of_fill_device(core->dev.parent, core);
+               } else {
+                       core->dev.dma_mask = &core->dev.coherent_dma_mask;
+                       core->dma_dev = &core->dev;