public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ian Campbell <ijc@hellion.org.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] sunxi: Fix gmac not working reliable on the Bananapi
Date: Tue, 30 Sep 2014 08:06:17 +0100	[thread overview]
Message-ID: <1412060777.17796.21.camel@hellion.org.uk> (raw)
In-Reply-To: <1411928001-3455-1-git-send-email-hdegoede@redhat.com>

On Sun, 2014-09-28 at 20:13 +0200, Hans de Goede wrote:
> In order for the gmac nic to work reliable on the Bananapi, we need to poke
> these 2 undocumented bits in the gmac clk register. Since these are
> undocumented, this commit only sets these bits on the Bananapi for now.
> 
> I'll contact Allwinner to try and get these bits documented, once they
> are documented we can hopefully replace this hack with a better patch.
> 
> Reported-by: Karsten Merker <merker@debian.org>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

It would be good to include some of Karsten's more detailed explanation
(see his reply downthread) of what's going on, but other than that:

Acked-by: Ian Campbell <ijc@hellion.org.uk>

and ack to pushing it for v2014.10.

> ---
>  board/sunxi/gmac.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/board/sunxi/gmac.c b/board/sunxi/gmac.c
> index e7ff952..f58c963 100644
> --- a/board/sunxi/gmac.c
> +++ b/board/sunxi/gmac.c
> @@ -24,6 +24,15 @@ int sunxi_gmac_initialize(bd_t *bis)
>  		CCM_GMAC_CTRL_GPIT_MII);
>  #endif
>  
> +	/*
> +	 * HdG: this is necessary to get GMAC to work reliable on the
> +	 * Bananapi. We don't know what these undocumented bits do, so this
> +	 * is a Bananapi specific hack for now.
> +	 */
> +#ifdef CONFIG_BANANAPI
> +	setbits_le32(&ccm->gmac_clk_cfg, 0x3 << 10);
> +#endif
> +
>  	/* Configure pin mux settings for GMAC */
>  	for (pin = SUNXI_GPA(0); pin <= SUNXI_GPA(16); pin++) {
>  #ifdef CONFIG_RGMII

      parent reply	other threads:[~2014-09-30  7:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-28 18:13 [U-Boot] [PATCH] sunxi: Fix gmac not working reliable on the Bananapi Hans de Goede
     [not found] ` <20140928195818.GC4584@excalibur.cnev.de>
2014-09-28 20:54   ` [U-Boot] [linux-sunxi] " Zoltan HERPAI
2014-09-29  6:13 ` [U-Boot] [linux-sunxi] " Siarhei Siamashka
     [not found]   ` <20140929181635.GA4587@excalibur.cnev.de>
2014-09-29 18:35     ` [U-Boot] [linux-sunxi] " jonsmirl at gmail.com
2014-09-30 12:02       ` Hans de Goede
2014-09-30 12:26         ` jonsmirl at gmail.com
2014-09-30 14:04         ` [U-Boot] [linux-sunxi] " Koen Kooi
2014-09-29 21:37     ` [U-Boot] [linux-sunxi] " Siarhei Siamashka
2014-09-30  7:06 ` Ian Campbell [this message]

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=1412060777.17796.21.camel@hellion.org.uk \
    --to=ijc@hellion.org.uk \
    --cc=u-boot@lists.denx.de \
    /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