aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.10/772-bgmac-add-supprot-for-BCM4707.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-11-11 00:13:31 +0000
committerHauke Mehrtens <hauke@hauke-m.de>2013-11-11 00:13:31 +0000
commit7444a626e2edd01e2bbab97d9aa78e98cc604bf4 (patch)
treee6dff12cb00ea72180bba655cd903fa996cc09bd /target/linux/generic/patches-3.10/772-bgmac-add-supprot-for-BCM4707.patch
parentb4a01fc85436d64a056f8d767aeda1471dca8b0d (diff)
downloadupstream-7444a626e2edd01e2bbab97d9aa78e98cc604bf4.tar.gz
upstream-7444a626e2edd01e2bbab97d9aa78e98cc604bf4.tar.bz2
upstream-7444a626e2edd01e2bbab97d9aa78e98cc604bf4.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> SVN-Revision: 38714
Diffstat (limited to 'target/linux/generic/patches-3.10/772-bgmac-add-supprot-for-BCM4707.patch')
-rw-r--r--target/linux/generic/patches-3.10/772-bgmac-add-supprot-for-BCM4707.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.10/772-bgmac-add-supprot-for-BCM4707.patch b/target/linux/generic/patches-3.10/772-bgmac-add-supprot-for-BCM4707.patch
index eb1708a2c4..a4e51774d5 100644
--- a/target/linux/generic/patches-3.10/772-bgmac-add-supprot-for-BCM4707.patch
+++ b/target/linux/generic/patches-3.10/772-bgmac-add-supprot-for-BCM4707.patch
@@ -97,6 +97,32 @@ Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
}
/* http://bcm-v4.sipsolutions.net/mac-gbit/gmac/chipinit */
+@@ -1488,6 +1512,25 @@ static int bgmac_probe(struct bcma_devic
+ goto err_netdev_free;
+ }
+
++ /* Northstar, take all GMAC cores out of reset */
++ if (core->id.id == BCMA_CHIP_ID_BCM4707 ||
++ core->id.id == BCMA_CHIP_ID_BCM53018) {
++ struct bcma_device *ns_core;
++ int ns_gmac;
++
++ for (ns_gmac = 0; ns_gmac < 4; ns_gmac++) {
++ /* As northstar requirement, we have to reset all GAMCs before
++ * accessing them. et_probe() call pci_enable_device() for etx
++ * and do si_core_reset for GAMCx only. Then the other three
++ * GAMCs didn't reset. We do it here.
++ */
++ ns_core = bcma_find_core_unit(core->bus, BCMA_CORE_MAC_GBIT, ns_gmac);
++ if (!bcma_core_is_enabled(ns_core)) {
++ bcma_core_enable(ns_core, 0);
++ }
++ }
++ }
++
+ bgmac_chip_reset(bgmac);
+
+ err = bgmac_dma_alloc(bgmac);
--- a/drivers/net/ethernet/broadcom/bgmac.h
+++ b/drivers/net/ethernet/broadcom/bgmac.h
@@ -185,6 +185,7 @@