mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-09 20:18:54 -04:00
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>
This commit is contained in:
parent
4a8527ef08
commit
5f47094857
@ -303,8 +303,8 @@ eth_init(bd_t * bd)
|
|||||||
for (i = 0; i < 6; i++)
|
for (i = 0; i < 6; i++)
|
||||||
((u16 *) bd->bi_enetaddr)[i] = read_srom_word(i);
|
((u16 *) bd->bi_enetaddr)[i] = read_srom_word(i);
|
||||||
|
|
||||||
if (!is_zero_ether_addr(bd->bi_enetaddr) &&
|
if (is_zero_ether_addr(bd->bi_enetaddr) ||
|
||||||
!is_mutlicast_ether_addr(bd->bi_enetaddr)) {
|
is_multicast_ether_addr(bd->bi_enetaddr)) {
|
||||||
/* try reading from environment */
|
/* try reading from environment */
|
||||||
u8 i;
|
u8 i;
|
||||||
char *s, *e;
|
char *s, *e;
|
||||||
@ -542,7 +542,7 @@ read_srom_word(int offset)
|
|||||||
{
|
{
|
||||||
DM9000_iow(DM9000_EPAR, offset);
|
DM9000_iow(DM9000_EPAR, offset);
|
||||||
DM9000_iow(DM9000_EPCR, 0x4);
|
DM9000_iow(DM9000_EPCR, 0x4);
|
||||||
udelay(200);
|
udelay(8000);
|
||||||
DM9000_iow(DM9000_EPCR, 0x0);
|
DM9000_iow(DM9000_EPCR, 0x0);
|
||||||
return (DM9000_ior(DM9000_EPDRL) + (DM9000_ior(DM9000_EPDRH) << 8));
|
return (DM9000_ior(DM9000_EPDRL) + (DM9000_ior(DM9000_EPDRH) << 8));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user