diff options
author | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-11-11 00:13:31 +0000 |
---|---|---|
committer | hauke <hauke@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-11-11 00:13:31 +0000 |
commit | 4fe774867cfb5f5fef48dedef035ac7c411e8f4b (patch) | |
tree | 06181b96a85ae3e6267514c2aea0ae7f869b4b8a /target/linux/generic/patches-3.12/772-bgmac-add-supprot-for-BCM4707.patch | |
parent | 6c3e6ee83f7afbafd2ed7576dbd6ce37a779760b (diff) |
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.12/772-bgmac-add-supprot-for-BCM4707.patch')
-rw-r--r-- | target/linux/generic/patches-3.12/772-bgmac-add-supprot-for-BCM4707.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.12/772-bgmac-add-supprot-for-BCM4707.patch b/target/linux/generic/patches-3.12/772-bgmac-add-supprot-for-BCM4707.patch index eb1708a2c4..a4e51774d5 100644 --- a/target/linux/generic/patches-3.12/772-bgmac-add-supprot-for-BCM4707.patch +++ b/target/linux/generic/patches-3.12/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 @@ |