diff options
author | Peter Pearse <peter.pearse@arm.com> | 2008-02-15 12:59:15 +0000 |
---|---|---|
committer | Peter Pearse <peter.pearse@arm.com> | 2008-02-15 12:59:15 +0000 |
commit | ae92069abecc278d7b8de88ffa62de0c2c0ed2bf (patch) | |
tree | 2509461053fa9e58c6d2b4750727f07b646965d8 /drivers/net | |
parent | e42d2b0479ff5fd9f041e8dfa52105d521fa9264 (diff) | |
parent | 9604b6e53ddae4fe00a488cbcd6b0e6cb344bccc (diff) | |
download | u-boot-imx-ae92069abecc278d7b8de88ffa62de0c2c0ed2bf.zip u-boot-imx-ae92069abecc278d7b8de88ffa62de0c2c0ed2bf.tar.gz u-boot-imx-ae92069abecc278d7b8de88ffa62de0c2c0ed2bf.tar.bz2 |
Merge branch '080116_at91cap9' of git://linux-arm.org/u-boot-armdev
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/macb.c | 8 | ||||
-rw-r--r-- | drivers/net/macb.h | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 6657d22..9c98338 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -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; diff --git a/drivers/net/macb.h b/drivers/net/macb.h index c778e4e..f92a20c 100644 --- a/drivers/net/macb.h +++ b/drivers/net/macb.h @@ -222,6 +222,12 @@ #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 |