summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-10-13 15:06:25 -0400
committerWolfgang Denk <wd@denx.de>2009-03-20 22:39:09 +0100
commit500b6c51e4c41f4562cb48344af98deb7e342731 (patch)
treec58ff4d58fb5a26e5a034877631ab7afc27e77c8 /drivers/net
parent6ff4137f2ad640e4fc8ea1b0455161ddff1f6730 (diff)
downloadu-boot-imx-500b6c51e4c41f4562cb48344af98deb7e342731.zip
u-boot-imx-500b6c51e4c41f4562cb48344af98deb7e342731.tar.gz
u-boot-imx-500b6c51e4c41f4562cb48344af98deb7e342731.tar.bz2
Blackfin: bfin_mac: force boards to setup the MAC themselves
Since the on-chip MAC does not have an eeprom or similar interface, force all Blackfin boards that use this driver to setup the board data with a proper MAC. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bfin_mac.c16
-rw-r--r--drivers/net/bfin_mac.h2
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index 23f934a..12d98c2 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -315,7 +315,7 @@ static int bfin_EMAC_init(struct eth_device *dev, bd_t *bd)
return -1;
/* Initialize EMAC address */
- bfin_EMAC_setup_addr(bd);
+ bfin_EMAC_setup_addr(dev->enetaddr);
/* Initialize TX and RX buffer */
for (i = 0; i < PKTBUFSRX; i++) {
@@ -373,16 +373,16 @@ static void bfin_EMAC_halt(struct eth_device *dev)
}
-void bfin_EMAC_setup_addr(bd_t *bd)
+void bfin_EMAC_setup_addr(uchar *enetaddr)
{
*pEMAC_ADDRLO =
- bd->bi_enetaddr[0] |
- bd->bi_enetaddr[1] << 8 |
- bd->bi_enetaddr[2] << 16 |
- bd->bi_enetaddr[3] << 24;
+ enetaddr[0] |
+ enetaddr[1] << 8 |
+ enetaddr[2] << 16 |
+ enetaddr[3] << 24;
*pEMAC_ADDRHI =
- bd->bi_enetaddr[4] |
- bd->bi_enetaddr[5] << 8;
+ enetaddr[4] |
+ enetaddr[5] << 8;
}
ADI_ETHER_BUFFER *SetupRxBuffer(int no)
diff --git a/drivers/net/bfin_mac.h b/drivers/net/bfin_mac.h
index 084f533..8f467a3 100644
--- a/drivers/net/bfin_mac.h
+++ b/drivers/net/bfin_mac.h
@@ -61,6 +61,6 @@ static void bfin_EMAC_halt(struct eth_device *dev);
static int bfin_EMAC_send(struct eth_device *dev, volatile void *packet, int length);
static int bfin_EMAC_recv(struct eth_device *dev);
-static void bfin_EMAC_setup_addr(bd_t *bd);
+void bfin_EMAC_setup_addr(uchar *enetaddr);
#endif