]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/net/macb.c
Merge branch 'master' of git://www.denx.de/git/u-boot into new-image
[karo-tx-uboot.git] / drivers / net / macb.c
index 95cdc496cbac384e28c3a4b8ab090073a73248d7..9c98338f746000da0edb0aa562e682e3b7fa99c4 100644 (file)
@@ -417,18 +417,26 @@ static int macb_init(struct eth_device *netdev, bd_t *bd)
 
        /* choose RMII or MII mode. This depends on the board */
 #ifdef CONFIG_RMII
+#ifdef CONFIG_AT91CAP9ADK
+       macb_writel(macb, USRIO, MACB_BIT(RMII) | MACB_BIT(CLKEN));
+#else
        macb_writel(macb, USRIO, 0);
+#endif
+#else
+#ifdef CONFIG_AT91CAP9ADK
+       macb_writel(macb, USRIO, MACB_BIT(CLKEN));
 #else
        macb_writel(macb, USRIO, MACB_BIT(MII));
 #endif
+#endif /* CONFIG_RMII */
 
        if (!macb_phy_init(macb))
-               return 0;
+               return -1;
 
        /* Enable TX and RX */
        macb_writel(macb, NCR, MACB_BIT(TE) | MACB_BIT(RE));
 
-       return 1;
+       return 0;
 }
 
 static void macb_halt(struct eth_device *netdev)