mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-28 10:01:32 +00:00
AT91CAP9 support : MACB changes
Signed-off-by: Stelian Pop <stelian <at> popies.net> Acked-by: Haavard Skinnemoen <hskinnemoen <at> atmel.com>
This commit is contained in:
parent
6afcabf11d
commit
7263ef191b
2 changed files with 14 additions and 0 deletions
|
@ -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 */
|
/* choose RMII or MII mode. This depends on the board */
|
||||||
#ifdef CONFIG_RMII
|
#ifdef CONFIG_RMII
|
||||||
|
#ifdef CONFIG_AT91CAP9ADK
|
||||||
|
macb_writel(macb, USRIO, MACB_BIT(RMII) | MACB_BIT(CLKEN));
|
||||||
|
#else
|
||||||
macb_writel(macb, USRIO, 0);
|
macb_writel(macb, USRIO, 0);
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifdef CONFIG_AT91CAP9ADK
|
||||||
|
macb_writel(macb, USRIO, MACB_BIT(CLKEN));
|
||||||
#else
|
#else
|
||||||
macb_writel(macb, USRIO, MACB_BIT(MII));
|
macb_writel(macb, USRIO, MACB_BIT(MII));
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* CONFIG_RMII */
|
||||||
|
|
||||||
if (!macb_phy_init(macb))
|
if (!macb_phy_init(macb))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -222,6 +222,12 @@
|
||||||
#define MACB_TX_PAUSE_ZERO_OFFSET 3
|
#define MACB_TX_PAUSE_ZERO_OFFSET 3
|
||||||
#define MACB_TX_PAUSE_ZERO_SIZE 1
|
#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 */
|
/* Bitfields in WOL */
|
||||||
#define MACB_IP_OFFSET 0
|
#define MACB_IP_OFFSET 0
|
||||||
#define MACB_IP_SIZE 16
|
#define MACB_IP_SIZE 16
|
||||||
|
|
Loading…
Add table
Reference in a new issue