From 7444a626e2edd01e2bbab97d9aa78e98cc604bf4 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 11 Nov 2013 00:13:31 +0000 Subject: 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 SVN-Revision: 38714 --- .../772-bgmac-add-supprot-for-BCM4707.patch | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'target/linux/generic/patches-3.10/772-bgmac-add-supprot-for-BCM4707.patch') 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 } /* 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 @@ -- cgit v1.2.3