Commit 622a521f authored by Hauke Mehrtens's avatar Hauke Mehrtens Committed by David S. Miller

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: default avatarHauke Mehrtens <hauke@hauke-m.de>
Acked-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 48e07fbe
...@@ -1446,6 +1446,27 @@ static int bgmac_probe(struct bcma_device *core) ...@@ -1446,6 +1446,27 @@ static int bgmac_probe(struct bcma_device *core)
bgmac_chip_reset(bgmac); bgmac_chip_reset(bgmac);
/* For Northstar, we have to take all GMAC core 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;
/* Northstar has 4 GMAC cores */
for (ns_gmac = 0; ns_gmac < 4; ns_gmac++) {
/* As northstar requirement, we have to reset all GAMCs
* before accessing one. bgmac_chip_reset() call
* bcma_core_enable() for this core. 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 (ns_core && !bcma_core_is_enabled(ns_core))
bcma_core_enable(ns_core, 0);
}
}
err = bgmac_dma_alloc(bgmac); err = bgmac_dma_alloc(bgmac);
if (err) { if (err) {
bgmac_err(bgmac, "Unable to alloc memory for DMA\n"); bgmac_err(bgmac, "Unable to alloc memory for DMA\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment