From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Hauke Mehrtens <hauke@hauke-m.de>, davem@davemloft.net
Cc: zajec5@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH v3 4/5] bgmac: reset all cores on Northstar SoC
Date: Sun, 05 Jan 2014 17:10:04 +0400 [thread overview]
Message-ID: <52C959AC.9000005@cogentembedded.com> (raw)
In-Reply-To: <1388880647-7611-5-git-send-email-hauke@hauke-m.de>
Hello.
On 05-01-2014 4:10, Hauke Mehrtens wrote:
> 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>
> ---
> drivers/net/ethernet/broadcom/bgmac.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
> diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
> index 88ec69e..2cdacb8 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)
>
> 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
Sorry for grammar nitpicking but s/GAMCs/GMACs/? And "northstar" probaby
should be capitalized.
> + * 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.
GMACs again?
> + */
> + 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);
> + }
> + }
> +
WBR, Sergei
next prev parent reply other threads:[~2014-01-05 13:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-05 0:10 [PATCH v3 0/5] bgmac: add initial support for core rev 4 on ARM BCM47xx Hauke Mehrtens
2014-01-05 0:10 ` [PATCH v3 1/5] bcma: export bcma_find_core_unit() Hauke Mehrtens
2014-01-05 0:10 ` [PATCH v3 2/5] bgmac: initialize the DMA controller of core rev >= 4 Hauke Mehrtens
2014-01-05 0:10 ` [PATCH v3 3/5] bgmac: add support for new BGMAC_CMDCFG_SR position on " Hauke Mehrtens
2014-01-05 0:10 ` [PATCH v3 4/5] bgmac: reset all cores on Northstar SoC Hauke Mehrtens
2014-01-05 13:10 ` Sergei Shtylyov [this message]
2014-01-05 0:10 ` [PATCH v3 5/5] bgmac: add support for Northstar SoC (BCM4707, BCM53018) Hauke Mehrtens
2014-01-05 1:26 ` [PATCH v3 0/5] bgmac: add initial support for core rev 4 on ARM BCM47xx David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52C959AC.9000005@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=davem@davemloft.net \
--cc=hauke@hauke-m.de \
--cc=netdev@vger.kernel.org \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).