diff options
author | Hauke Mehrtens <hauke@openwrt.org> | 2013-11-11 00:13:31 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@openwrt.org> | 2013-11-11 00:13:31 +0000 |
commit | 802c90ddcbd24add4f128103d0d2491412da0b22 (patch) | |
tree | 06181b96a85ae3e6267514c2aea0ae7f869b4b8a /target/linux/generic/patches-3.10/026-bcma-export-bcma_find_core_unit.patch | |
parent | 48bac91d7e7e377038ad51c697f9112817b9f849 (diff) | |
download | master-187ad058-802c90ddcbd24add4f128103d0d2491412da0b22.tar.gz master-187ad058-802c90ddcbd24add4f128103d0d2491412da0b22.tar.bz2 master-187ad058-802c90ddcbd24add4f128103d0d2491412da0b22.zip |
kernel: bgmac: make it send and receive some packages on BCM4708
This adds some more code for bgmac core rev 4 and it now restarts all
cores when initializing the first one on BCM4708. I am just able to
send under 100 packages and then DMA TX does not work any more.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38714 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.10/026-bcma-export-bcma_find_core_unit.patch')
-rw-r--r-- | target/linux/generic/patches-3.10/026-bcma-export-bcma_find_core_unit.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.10/026-bcma-export-bcma_find_core_unit.patch b/target/linux/generic/patches-3.10/026-bcma-export-bcma_find_core_unit.patch new file mode 100644 index 0000000000..86bce67fbf --- /dev/null +++ b/target/linux/generic/patches-3.10/026-bcma-export-bcma_find_core_unit.patch @@ -0,0 +1,69 @@ +From 0fc9d696e4855f1e03910c431499d68e75904929 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens <hauke@hauke-m.de> +Date: Sun, 10 Nov 2013 20:43:46 +0100 +Subject: [PATCH] bcma: export bcma_find_core_unit() + +--- + drivers/bcma/bcma_private.h | 2 -- + drivers/bcma/main.c | 13 +------------ + include/linux/bcma/bcma.h | 9 ++++++++- + 3 files changed, 9 insertions(+), 15 deletions(-) + +--- a/drivers/bcma/bcma_private.h ++++ b/drivers/bcma/bcma_private.h +@@ -33,8 +33,6 @@ int __init bcma_bus_early_register(struc + int bcma_bus_suspend(struct bcma_bus *bus); + int bcma_bus_resume(struct bcma_bus *bus); + #endif +-struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid, +- u8 unit); + + /* scan.c */ + int bcma_bus_scan(struct bcma_bus *bus); +--- a/drivers/bcma/main.c ++++ b/drivers/bcma/main.c +@@ -69,18 +69,6 @@ static u16 bcma_cc_core_id(struct bcma_b + return BCMA_CORE_CHIPCOMMON; + } + +-struct bcma_device *bcma_find_core(struct bcma_bus *bus, u16 coreid) +-{ +- struct bcma_device *core; +- +- list_for_each_entry(core, &bus->cores, list) { +- if (core->id.id == coreid) +- return core; +- } +- return NULL; +-} +-EXPORT_SYMBOL_GPL(bcma_find_core); +- + struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid, + u8 unit) + { +@@ -92,6 +80,7 @@ struct bcma_device *bcma_find_core_unit( + } + return NULL; + } ++EXPORT_SYMBOL_GPL(bcma_find_core_unit); + + bool bcma_wait_value(struct bcma_device *core, u16 reg, u32 mask, u32 value, + int timeout) +--- a/include/linux/bcma/bcma.h ++++ b/include/linux/bcma/bcma.h +@@ -418,7 +418,14 @@ static inline void bcma_maskset16(struct + bcma_write16(cc, offset, (bcma_read16(cc, offset) & mask) | set); + } + +-extern struct bcma_device *bcma_find_core(struct bcma_bus *bus, u16 coreid); ++extern struct bcma_device *bcma_find_core_unit(struct bcma_bus *bus, u16 coreid, ++ u8 unit); ++static inline struct bcma_device *bcma_find_core(struct bcma_bus *bus, ++ u16 coreid) ++{ ++ return bcma_find_core_unit(bus, coreid, 0); ++} ++ + extern bool bcma_core_is_enabled(struct bcma_device *core); + extern void bcma_core_disable(struct bcma_device *core, u32 flags); + extern int bcma_core_enable(struct bcma_device *core, u32 flags); |