]> git.sur5r.net Git - u-boot/commitdiff
net: macb: enable GMAC IP without GE feature support
authorBo Shen <voice.shen@atmel.com>
Mon, 10 Nov 2014 07:24:01 +0000 (15:24 +0800)
committerTom Rini <trini@ti.com>
Mon, 17 Nov 2014 13:47:18 +0000 (08:47 -0500)
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>
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
drivers/net/macb.c

index 4616f369ca8b79484d2f072b5b98ed88863223cb..9c2ff487a709f57eae7caa6df51a8dce7292f2cd 100644 (file)
@@ -566,7 +566,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);