diff mbox

[U-Boot,v4,2/3] net: macb: enable GMAC IP without GE feature support

Message ID 1415604242-29685-3-git-send-email-voice.shen@atmel.com
State Accepted, archived
Delegated to: Andreas Bießmann
Headers show

Commit Message

Bo Shen Nov. 10, 2014, 7:24 a.m. UTC
The User Register in GMAC IP is used to select interface type.
When with GE feature, it is used to select interface between
RGMII and GMII. If without GE feature, it is used to select
interface between MII and RMII.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---

Changes in v4: None
Changes in v2: None

 drivers/net/macb.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Andreas Bießmann Nov. 17, 2014, 12:17 p.m. UTC | #1
Dear Bo Shen,

Bo Shen <voice.shen@atmel.com> writes:
>The User Register in GMAC IP is used to select interface type.
>When with GE feature, it is used to select interface between
>RGMII and GMII. If without GE feature, it is used to select
>interface between MII and RMII.
>
>Signed-off-by: Bo Shen <voice.shen@atmel.com>
>---
>
>Changes in v4: None
>Changes in v2: None
>
> drivers/net/macb.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
diff mbox

Patch

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 375c8a4..6d48252 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -565,7 +565,13 @@  static int macb_init(struct eth_device *netdev, bd_t *bd)
 	macb_writel(macb, TBQP, macb->tx_ring_dma);
 
 	if (macb_is_gem(macb)) {
-#ifdef CONFIG_RGMII
+		/*
+		 * When the GMAC IP with GE feature, this bit is used to
+		 * select interface between RGMII and GMII.
+		 * When the GMAC IP without GE feature, this bit is used
+		 * to select interface between RMII and MII.
+		 */
+#if defined(CONFIG_RGMII) || defined(CONFIG_RMII)
 		gem_writel(macb, UR, GEM_BIT(RGMII));
 #else
 		gem_writel(macb, UR, 0);