aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bgmac.c
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2014-01-04 19:10:46 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-04 20:25:19 -0500
commit622a521fa46b37d3a01f2b2d59df9299dbdba16f (patch)
tree9c1b6db29294252fb32b45324d9765f8c51b77fa /drivers/net/ethernet/broadcom/bgmac.c
parent48e07fbe073202beed60a734191f8341bfd18f73 (diff)
bgmac: reset all cores on Northstar SoC
On the Northstar SoC (BCM4707 and BCM53018) we have to enable all GMAC cores when we just want to use on. We iterate over all the cores and activate them. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bgmac.c')
-rw-r--r--drivers/net/ethernet/broadcom/bgmac.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index 88ec69e86d2f..2cdacb852e81 100644
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -1446,6 +1446,27 @@ static int bgmac_probe(struct bcma_device *core)
1446 1446
1447 bgmac_chip_reset(bgmac); 1447 bgmac_chip_reset(bgmac);
1448 1448
1449 /* For Northstar, we have to take all GMAC core out of reset */
1450 if (core->id.id == BCMA_CHIP_ID_BCM4707 ||
1451 core->id.id == BCMA_CHIP_ID_BCM53018) {
1452 struct bcma_device *ns_core;
1453 int ns_gmac;
1454
1455 /* Northstar has 4 GMAC cores */
1456 for (ns_gmac = 0; ns_gmac < 4; ns_gmac++) {
1457 /* As northstar requirement, we have to reset all GAMCs
1458 * before accessing one. bgmac_chip_reset() call
1459 * bcma_core_enable() for this core. Then the other
1460 * three GAMCs didn't reset. We do it here.
1461 */
1462 ns_core = bcma_find_core_unit(core->bus,
1463 BCMA_CORE_MAC_GBIT,
1464 ns_gmac);
1465 if (ns_core && !bcma_core_is_enabled(ns_core))
1466 bcma_core_enable(ns_core, 0);
1467 }
1468 }
1469
1449 err = bgmac_dma_alloc(bgmac); 1470 err = bgmac_dma_alloc(bgmac);
1450 if (err) { 1471 if (err) {
1451 bgmac_err(bgmac, "Unable to alloc memory for DMA\n"); 1472 bgmac_err(bgmac, "Unable to alloc memory for DMA\n");