projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
efi_loader: correctly render MAC address device path nodes
[oweals/u-boot.git]
/
drivers
/
net
/
ne2000_base.c
diff --git
a/drivers/net/ne2000_base.c
b/drivers/net/ne2000_base.c
index 887cfd957b3e11cce0afcda349275511c4e35331..a240d06ad45454ea123551a00a7652f5fd0e6eea 100644
(file)
--- a/
drivers/net/ne2000_base.c
+++ b/
drivers/net/ne2000_base.c
@@
-74,6
+74,7
@@
Add SNMP
#include <common.h>
#include <command.h>
#include <common.h>
#include <command.h>
+#include <env.h>
#include <net.h>
#include <malloc.h>
#include <linux/compiler.h>
#include <net.h>
#include <malloc.h>
#include <linux/compiler.h>
@@
-495,7
+496,7
@@
dp83902a_recv(u8 *data, int len)
printf(" %02x", tmp);
if (0 == (++dx % 16)) printf("\n ");
#endif
printf(" %02x", tmp);
if (0 == (++dx % 16)) printf("\n ");
#endif
- *data++ = tmp;
;
+ *data++ = tmp;
mlen--;
}
}
mlen--;
}
}
@@
-582,7
+583,7
@@
dp83902a_Overflow(void)
/*
* Read in as many packets as we can and acknowledge any and receive
* interrupts. Since the buffer has overflowed, a receive event of
/*
* Read in as many packets as we can and acknowledge any and receive
* interrupts. Since the buffer has overflowed, a receive event of
- * some kind will have occured.
+ * some kind will have occur
r
ed.
*/
dp83902a_RxEvent();
DP_OUT(base, DP_ISR, DP_ISR_RxP|DP_ISR_RxE);
*/
dp83902a_RxEvent();
DP_OUT(base, DP_ISR, DP_ISR_RxP|DP_ISR_RxE);
@@
-592,7
+593,7
@@
dp83902a_Overflow(void)
DP_OUT(base, DP_TCR, DP_TCR_NORMAL);
/*
DP_OUT(base, DP_TCR, DP_TCR_NORMAL);
/*
- * If a transmit command was issued, but no transmit event has occured,
+ * If a transmit command was issued, but no transmit event has occur
r
ed,
* restart it here.
*/
DP_IN(base, DP_ISR, isr);
* restart it here.
*/
DP_IN(base, DP_ISR, isr);
@@
-650,7
+651,7
@@
dp83902a_poll(void)
}
}
-/* U-
b
oot specific routines */
+/* U-
B
oot specific routines */
static u8 *pbuf = NULL;
static int pkey = -1;
static u8 *pbuf = NULL;
static int pkey = -1;
@@
-692,16
+693,6
@@
static int ne2k_setup_driver(struct eth_device *dev)
}
}
}
}
-#ifdef CONFIG_DRIVER_NE2000_CCR
- {
- vu_char *p = (vu_char *) CONFIG_DRIVER_NE2000_CCR;
-
- PRINTK("CCR before is %x\n", *p);
- *p = CONFIG_DRIVER_NE2000_VAL;
- PRINTK("CCR after is %x\n", *p);
- }
-#endif
-
nic.base = (u8 *) CONFIG_DRIVER_NE2000_BASE;
nic.data = nic.base + DP_DATA;
nic.base = (u8 *) CONFIG_DRIVER_NE2000_BASE;
nic.data = nic.base + DP_DATA;
@@
-715,15
+706,15
@@
static int ne2k_setup_driver(struct eth_device *dev)
* to the MAC address value in the environment, so we do not read
* it from the prom or eeprom if it is specified in the environment.
*/
* to the MAC address value in the environment, so we do not read
* it from the prom or eeprom if it is specified in the environment.
*/
- if (!eth_
getenv
_enetaddr("ethaddr", dev->enetaddr)) {
+ if (!eth_
env_get
_enetaddr("ethaddr", dev->enetaddr)) {
/* If the MAC address is not in the environment, get it: */
if (!get_prom(dev->enetaddr, nic.base)) /* get MAC from prom */
dp83902a_init(dev->enetaddr); /* fallback: seeprom */
/* And write it into the environment otherwise eth_write_hwaddr
/* If the MAC address is not in the environment, get it: */
if (!get_prom(dev->enetaddr, nic.base)) /* get MAC from prom */
dp83902a_init(dev->enetaddr); /* fallback: seeprom */
/* And write it into the environment otherwise eth_write_hwaddr
- * returns -1 due to eth_
getenv
_enetaddr_by_index() failing,
+ * returns -1 due to eth_
env_get
_enetaddr_by_index() failing,
* and this causes "Warning: failed to set MAC address", and
* cmd_bdinfo has no ethaddr value which it can show: */
* and this causes "Warning: failed to set MAC address", and
* cmd_bdinfo has no ethaddr value which it can show: */
- eth_
setenv
_enetaddr("ethaddr", dev->enetaddr);
+ eth_
env_set
_enetaddr("ethaddr", dev->enetaddr);
}
return 0;
}
}
return 0;
}