diff options
Diffstat (limited to 'cpu/arm920t/at91rm9200/ether.c')
-rw-r--r-- | cpu/arm920t/at91rm9200/ether.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cpu/arm920t/at91rm9200/ether.c b/cpu/arm920t/at91rm9200/ether.c index f20e070..b00b948 100644 --- a/cpu/arm920t/at91rm9200/ether.c +++ b/cpu/arm920t/at91rm9200/ether.c @@ -155,6 +155,7 @@ int eth_init (bd_t * bd) { int ret; int i; + uchar enetaddr[6]; p_mac = AT91C_BASE_EMAC; @@ -190,9 +191,10 @@ int eth_init (bd_t * bd) rbfdt[RBF_FRAMEMAX - 1].addr |= RBF_WRAP; rbfp = &rbfdt[0]; - p_mac->EMAC_SA2L = (bd->bi_enetaddr[3] << 24) | (bd->bi_enetaddr[2] << 16) - | (bd->bi_enetaddr[1] << 8) | (bd->bi_enetaddr[0]); - p_mac->EMAC_SA2H = (bd->bi_enetaddr[5] << 8) | (bd->bi_enetaddr[4]); + eth_getenv_enetaddr("ethaddr", enetaddr); + p_mac->EMAC_SA2L = (enetaddr[3] << 24) | (enetaddr[2] << 16) + | (enetaddr[1] << 8) | (enetaddr[0]); + p_mac->EMAC_SA2H = (enetaddr[5] << 8) | (enetaddr[4]); p_mac->EMAC_RBQP = (long) (&rbfdt[0]); p_mac->EMAC_RSR &= ~(AT91C_EMAC_RSR_OVR | AT91C_EMAC_REC | AT91C_EMAC_BNA); |