aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-3.2/045-bcma-add-bus-num-counter.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2012-03-14 21:48:23 +0000
committerHauke Mehrtens <hauke@openwrt.org>2012-03-14 21:48:23 +0000
commit316189c9ac9a0daa8689932b1f2aa0f467010210 (patch)
treeea0f71e80c2d63dbcc574a5c6d2eff2e123eafb5 /target/linux/brcm47xx/patches-3.2/045-bcma-add-bus-num-counter.patch
parenta93230e20244a64660d3eb73f05131afbe1f5dbb (diff)
downloadmaster-187ad058-316189c9ac9a0daa8689932b1f2aa0f467010210.tar.gz
master-187ad058-316189c9ac9a0daa8689932b1f2aa0f467010210.tar.bz2
master-187ad058-316189c9ac9a0daa8689932b1f2aa0f467010210.zip
brcm47xx: move and rename the patches
The patches are now grouped by the part what they are doing and are using three digest numbers. This does not remove or adds anything git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30942 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-3.2/045-bcma-add-bus-num-counter.patch')
-rw-r--r--target/linux/brcm47xx/patches-3.2/045-bcma-add-bus-num-counter.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/target/linux/brcm47xx/patches-3.2/045-bcma-add-bus-num-counter.patch b/target/linux/brcm47xx/patches-3.2/045-bcma-add-bus-num-counter.patch
new file mode 100644
index 0000000000..14d112746a
--- /dev/null
+++ b/target/linux/brcm47xx/patches-3.2/045-bcma-add-bus-num-counter.patch
@@ -0,0 +1,59 @@
+From eecd733c14952b074d7488934a4f3dc83c9c426b Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke@hauke-m.de>
+Date: Sat, 14 Jan 2012 16:29:51 +0100
+Subject: [PATCH 28/32] bcma: add bus num counter
+
+If we have two bcma buses on one computer the second will not work
+without this patch. Now each bus gets an own number.
+
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
+---
+ drivers/bcma/main.c | 12 +++++++++++-
+ include/linux/bcma/bcma.h | 1 +
+ 2 files changed, 12 insertions(+), 1 deletions(-)
+
+--- a/drivers/bcma/main.c
++++ b/drivers/bcma/main.c
+@@ -13,6 +13,12 @@
+ MODULE_DESCRIPTION("Broadcom's specific AMBA driver");
+ MODULE_LICENSE("GPL");
+
++/* contains the number the next bus should get. */
++static unsigned int bcma_bus_next_num = 0;
++
++/* bcma_buses_mutex locks the bcma_bus_next_num */
++static DEFINE_MUTEX(bcma_buses_mutex);
++
+ static int bcma_bus_match(struct device *dev, struct device_driver *drv);
+ static int bcma_device_probe(struct device *dev);
+ static int bcma_device_remove(struct device *dev);
+@@ -93,7 +99,7 @@ static int bcma_register_cores(struct bc
+
+ core->dev.release = bcma_release_core_dev;
+ core->dev.bus = &bcma_bus_type;
+- dev_set_name(&core->dev, "bcma%d:%d", 0/*bus->num*/, dev_id);
++ dev_set_name(&core->dev, "bcma%d:%d", bus->num, dev_id);
+
+ switch (bus->hosttype) {
+ case BCMA_HOSTTYPE_PCI:
+@@ -137,6 +143,10 @@ int __devinit bcma_bus_register(struct b
+ int err;
+ struct bcma_device *core;
+
++ mutex_lock(&bcma_buses_mutex);
++ bus->num = bcma_bus_next_num++;
++ mutex_unlock(&bcma_buses_mutex);
++
+ /* Scan for devices (cores) */
+ err = bcma_bus_scan(bus);
+ if (err) {
+--- a/include/linux/bcma/bcma.h
++++ b/include/linux/bcma/bcma.h
+@@ -196,6 +196,7 @@ struct bcma_bus {
+ struct list_head cores;
+ u8 nr_cores;
+ u8 init_done:1;
++ u8 num;
+
+ struct bcma_drv_cc drv_cc;
+ struct bcma_drv_pci drv_pci;