aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm53xx/patches-3.18/122-bcma-fill-core-details-for-every-device.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2014-10-27 23:02:08 +0000
committerHauke Mehrtens <hauke@openwrt.org>2014-10-27 23:02:08 +0000
commitc45a73ac33a699b8bd851b52f681b1ceddf6d3c0 (patch)
tree8b2c252e425f24f3a0b9d04ae7be4cf314cd7a24 /target/linux/bcm53xx/patches-3.18/122-bcma-fill-core-details-for-every-device.patch
parent9a6776f829619ffda5511ed8772cdddbfde4d295 (diff)
downloadupstream-c45a73ac33a699b8bd851b52f681b1ceddf6d3c0.tar.gz
upstream-c45a73ac33a699b8bd851b52f681b1ceddf6d3c0.tar.bz2
upstream-c45a73ac33a699b8bd851b52f681b1ceddf6d3c0.zip
bcm53xx: initial support for kernel 3.18
This adds initial support for kernel 3.18. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43097 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/bcm53xx/patches-3.18/122-bcma-fill-core-details-for-every-device.patch')
-rw-r--r--target/linux/bcm53xx/patches-3.18/122-bcma-fill-core-details-for-every-device.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/target/linux/bcm53xx/patches-3.18/122-bcma-fill-core-details-for-every-device.patch b/target/linux/bcm53xx/patches-3.18/122-bcma-fill-core-details-for-every-device.patch
new file mode 100644
index 0000000000..fadf03cbcd
--- /dev/null
+++ b/target/linux/bcm53xx/patches-3.18/122-bcma-fill-core-details-for-every-device.patch
@@ -0,0 +1,65 @@
+From 487b997353e2e3afe9c452b20ff5e4320d76e9c3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
+Date: Thu, 2 Oct 2014 12:28:54 +0200
+Subject: [PATCH][RFC] bcma: fill core details for every device
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+We were setting things like dma_dev, IRQ, etc. during core registration
+only. We need such info for cores handled internally (e.g. ChipCommon)
+as well.
+
+Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
+---
+ drivers/bcma/bcma_private.h | 1 +
+ drivers/bcma/main.c | 9 ++++++---
+ drivers/bcma/scan.c | 1 +
+ 3 files changed, 8 insertions(+), 3 deletions(-)
+
+--- a/drivers/bcma/bcma_private.h
++++ b/drivers/bcma/bcma_private.h
+@@ -24,6 +24,7 @@ struct bcma_bus;
+ /* main.c */
+ bool bcma_wait_value(struct bcma_device *core, u16 reg, u32 mask, u32 value,
+ int timeout);
++void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core);
+ int bcma_bus_register(struct bcma_bus *bus);
+ void bcma_bus_unregister(struct bcma_bus *bus);
+ int __init bcma_bus_early_register(struct bcma_bus *bus,
+--- a/drivers/bcma/main.c
++++ b/drivers/bcma/main.c
+@@ -172,10 +172,8 @@ static void bcma_of_fill_device(struct p
+ }
+ #endif /* CONFIG_OF */
+
+-static void bcma_register_core(struct bcma_bus *bus, struct bcma_device *core)
++void bcma_prepare_core(struct bcma_bus *bus, struct bcma_device *core)
+ {
+- int err;
+-
+ 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);
+@@ -199,6 +197,11 @@ static void bcma_register_core(struct bc
+ case BCMA_HOSTTYPE_SDIO:
+ break;
+ }
++}
++
++static void bcma_register_core(struct bcma_bus *bus, struct bcma_device *core)
++{
++ int err;
+
+ err = device_register(&core->dev);
+ if (err) {
+--- a/drivers/bcma/scan.c
++++ b/drivers/bcma/scan.c
+@@ -505,6 +505,7 @@ int bcma_bus_scan(struct bcma_bus *bus)
+ bus->nr_cores++;
+ other_core = bcma_find_core_reverse(bus, core->id.id);
+ core->core_unit = (other_core == NULL) ? 0 : other_core->core_unit + 1;
++ bcma_prepare_core(bus, core);
+
+ bcma_info(bus, "Core %d found: %s (manuf 0x%03X, id 0x%03X, rev 0x%02X, class 0x%X)\n",
+ core->core_index, bcma_device_name(&core->id),