summaryrefslogtreecommitdiff
path: root/drivers/dm9000x.c
diff options
context:
space:
mode:
authorstefano babic <sbabic@denx.de>2007-08-21 15:50:33 +0200
committerWolfgang Denk <wd@denx.de>2007-08-29 02:13:09 +0200
commit5f470948570526e9186f053a3003da7719604e90 (patch)
tree040bd2412a7e5497b4c55eaf5e24a1bac03ff5ff /drivers/dm9000x.c
parent4a8527ef086ec7c89f40674ef024ae6f988a614a (diff)
downloadu-boot-imx-5f470948570526e9186f053a3003da7719604e90.zip
u-boot-imx-5f470948570526e9186f053a3003da7719604e90.tar.gz
u-boot-imx-5f470948570526e9186f053a3003da7719604e90.tar.bz2
Fix MAC address setting in DM9000 driver.
The logic to check if there is a correct MAC address in the DM9000 EEPROM, added in the last patch, is wrong. Now the MAC address is always taken from the environment, even if a suitable MAC is present in the EEPROM. Signed-off-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers/dm9000x.c')
-rw-r--r--drivers/dm9000x.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/dm9000x.c b/drivers/dm9000x.c
index 78acb09..e0d531b 100644
--- a/drivers/dm9000x.c
+++ b/drivers/dm9000x.c
@@ -303,8 +303,8 @@ eth_init(bd_t * bd)
for (i = 0; i < 6; i++)
((u16 *) bd->bi_enetaddr)[i] = read_srom_word(i);
- if (!is_zero_ether_addr(bd->bi_enetaddr) &&
- !is_mutlicast_ether_addr(bd->bi_enetaddr)) {
+ if (is_zero_ether_addr(bd->bi_enetaddr) ||
+ is_multicast_ether_addr(bd->bi_enetaddr)) {
/* try reading from environment */
u8 i;
char *s, *e;
@@ -542,7 +542,7 @@ read_srom_word(int offset)
{
DM9000_iow(DM9000_EPAR, offset);
DM9000_iow(DM9000_EPCR, 0x4);
- udelay(200);
+ udelay(8000);
DM9000_iow(DM9000_EPCR, 0x0);
return (DM9000_ior(DM9000_EPDRL) + (DM9000_ior(DM9000_EPDRH) << 8));
}