mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: narmstrong@baylibre.com (Neil Armstrong)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH u-boot v3 2/5] board: odroid-c2: use common ethernet init function
Date: Mon, 27 Nov 2017 10:16:17 +0100	[thread overview]
Message-ID: <1511774180-22672-3-git-send-email-narmstrong@baylibre.com> (raw)
In-Reply-To: <1511774180-22672-1-git-send-email-narmstrong@baylibre.com>

Switch Odroid-C2 Ethernet init to the common Ethernet init function.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 board/amlogic/odroid-c2/odroid-c2.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/board/amlogic/odroid-c2/odroid-c2.c b/board/amlogic/odroid-c2/odroid-c2.c
index a5ea8dc..d68d0f1 100644
--- a/board/amlogic/odroid-c2/odroid-c2.c
+++ b/board/amlogic/odroid-c2/odroid-c2.c
@@ -9,7 +9,7 @@
 #include <asm/io.h>
 #include <asm/arch/gxbb.h>
 #include <asm/arch/sm.h>
-#include <phy.h>
+#include <asm/arch/eth.h>
 
 #define EFUSE_SN_OFFSET		20
 #define EFUSE_SN_SIZE		16
@@ -27,17 +27,10 @@ int misc_init_r(void)
 	char serial[EFUSE_SN_SIZE];
 	ssize_t len;
 
-	/* Set RGMII mode */
-	setbits_le32(GXBB_ETH_REG_0, GXBB_ETH_REG_0_PHY_INTF |
-				     GXBB_ETH_REG_0_TX_PHASE(1) |
-				     GXBB_ETH_REG_0_TX_RATIO(4) |
-				     GXBB_ETH_REG_0_PHY_CLK_EN |
-				     GXBB_ETH_REG_0_CLK_EN);
+	meson_gx_eth_init(PHY_INTERFACE_MODE_RGMII, 0);
 
 	/* Enable power and clock gate */
 	setbits_le32(GXBB_GCLK_MPEG_0, GXBB_GCLK_MPEG_0_I2C);
-	setbits_le32(GXBB_GCLK_MPEG_1, GXBB_GCLK_MPEG_1_ETH);
-	clrbits_le32(GXBB_MEM_PD_REG_0, GXBB_MEM_PD_REG_0_ETH_MASK);
 
 	/* Reset PHY on GPIOZ_14 */
 	clrbits_le32(GXBB_GPIO_EN(3), BIT(14));
-- 
2.7.4

  parent reply	other threads:[~2017-11-27  9:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27  9:16 [PATCH u-boot v3 0/5] Add support for Amlogic GXL Based SBCs Neil Armstrong
2017-11-27  9:16 ` [PATCH u-boot v3 1/5] ARM: arch-meson: add ethernet common init function Neil Armstrong
2017-12-04 18:36   ` [U-Boot, u-boot, v3, " Tom Rini
2017-11-27  9:16 ` Neil Armstrong [this message]
2017-12-04 18:36   ` [U-Boot, u-boot, v3, 2/5] board: odroid-c2: use common ethernet " Tom Rini
2017-11-27  9:16 ` [PATCH u-boot v3 3/5] board: p212: " Neil Armstrong
2017-12-04 18:36   ` [U-Boot, u-boot, v3, " Tom Rini
2017-11-27  9:16 ` [PATCH u-boot v3 4/5] arm: Add LibreTech CC support based on Meson GXL family Neil Armstrong
2017-12-04 18:36   ` [U-Boot, u-boot, v3, " Tom Rini
2017-11-27  9:16 ` [PATCH u-boot v3 5/5] arm: Add Khadas VIM " Neil Armstrong
2017-12-04 18:36   ` [U-Boot, u-boot, v3, " Tom Rini

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=1511774180-22672-3-git-send-email-narmstrong@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=linus-amlogic@lists.infradead.org \
    /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

all inboxes | Powered by JetHome®