]> git.sur5r.net Git - u-boot/commitdiff
AT91CAP9 support : MACB changes
authorStelian Pop <stelian at>
Thu, 3 Jan 2008 21:15:56 +0000 (21:15 +0000)
committerPeter Pearse <peter.pearse@arm.com>
Thu, 14 Feb 2008 09:37:58 +0000 (09:37 +0000)
Signed-off-by: Stelian Pop <stelian <at> popies.net>
Acked-by: Haavard Skinnemoen <hskinnemoen <at> atmel.com>
drivers/net/macb.c
drivers/net/macb.h

index 6657d22926b55f4000c03095bb9b87af53247056..9c98338f746000da0edb0aa562e682e3b7fa99c4 100644 (file)
@@ -417,10 +417,18 @@ 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 -1;
index c778e4ee493c94649180985546e1dbf889441e1e..f92a20c7015d04d496801ce7d9a5195095bbaac2 100644 (file)
 #define MACB_TX_PAUSE_ZERO_OFFSET              3
 #define MACB_TX_PAUSE_ZERO_SIZE                        1
 
+/* Bitfields in USRIO (AT91) */
+#define MACB_RMII_OFFSET                       0
+#define MACB_RMII_SIZE                         1
+#define MACB_CLKEN_OFFSET                      1
+#define MACB_CLKEN_SIZE                                1
+
 /* Bitfields in WOL */
 #define MACB_IP_OFFSET                         0
 #define MACB_IP_SIZE                           16