public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lothar Felten <lothar.felten@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/5] sunxi: R40: add gigabit ethernet reset
Date: Tue, 17 Apr 2018 15:42:32 +0200	[thread overview]
Message-ID: <20180417134235.10502-2-lothar.felten@gmail.com> (raw)
In-Reply-To: <20180417134235.10502-1-lothar.felten@gmail.com>

Add reset control for the gigabit interface of the Allwinner R40/V40 CPU

Signed-off-by: Lothar Felten <lothar.felten@gmail.com>
---
 board/sunxi/gmac.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/board/sunxi/gmac.c b/board/sunxi/gmac.c
index 826650c89b..b2ede37dc3 100644
--- a/board/sunxi/gmac.c
+++ b/board/sunxi/gmac.c
@@ -13,7 +13,10 @@ void eth_init_board(void)
 		(struct sunxi_ccm_reg *)SUNXI_CCM_BASE;
 
 	/* Set up clock gating */
-#ifdef CONFIG_SUNXI_GEN_SUN6I
+#if defined(CONFIG_MACH_SUN8I_R40)
+	setbits_le32(&ccm->ahb_reset1_cfg, 0x1 << AHB_RESET_OFFSET_GMAC);
+	setbits_le32(&ccm->ahb_gate1, 0x1 << AHB_GATE_OFFSET_GMAC);
+#elif defined(CONFIG_SUNXI_GEN_SUN6I)
 	setbits_le32(&ccm->ahb_reset0_cfg, 0x1 << AHB_RESET_OFFSET_GMAC);
 	setbits_le32(&ccm->ahb_gate0, 0x1 << AHB_GATE_OFFSET_GMAC);
 #else
-- 
2.14.1

  reply	other threads:[~2018-04-17 13:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17 13:42 [U-Boot] [PATCH v2 1/5] sunxi: R40: add gigabit ethernet clocks Lothar Felten
2018-04-17 13:42 ` Lothar Felten [this message]
2018-04-19  8:35   ` [U-Boot] [PATCH v2 2/5] sunxi: R40: add gigabit ethernet reset Maxime Ripard
2018-04-17 13:42 ` [U-Boot] [PATCH v2 3/5] sunxi: R40: add gigabit ethernet gpio pinmux Lothar Felten
2018-04-19  8:35   ` Maxime Ripard
2018-04-17 13:42 ` [U-Boot] [PATCH v2 4/5] sunxi: R40: add gigabit ethernet devicetree node Lothar Felten
2018-04-19  8:40   ` Maxime Ripard
2018-04-17 13:42 ` [U-Boot] [PATCH v2 5/5] configs: Bananapi_M2_Ultra: enable gigabit on the Bananapi M2U Lothar Felten
2018-04-19  8:41   ` Maxime Ripard
2018-04-23 17:39     ` Lothar Felten
2018-04-19  8:34 ` [U-Boot] [PATCH v2 1/5] sunxi: R40: add gigabit ethernet clocks Maxime Ripard

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=20180417134235.10502-2-lothar.felten@gmail.com \
    --to=lothar.felten@gmail.com \
    --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