projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AX88180: switch to common mii.h header
[oweals/u-boot.git]
/
drivers
/
net
/
3c589.c
diff --git
a/drivers/net/3c589.c
b/drivers/net/3c589.c
index 080b686e211ccb155d6a2bafed4dd8b6c5cd1992..f2c7d326b40dd7d309f0d01d497312d476dc46c9 100644
(file)
--- a/
drivers/net/3c589.c
+++ b/
drivers/net/3c589.c
@@
-26,8
+26,6
@@
#include <command.h>
#include <net.h>
#include <command.h>
#include <net.h>
-#ifdef CONFIG_DRIVER_3C589
-
#include "3c589.h"
#include "3c589.h"
@@
-99,7
+97,7
@@
typedef unsigned long int dword;
})
#define insw(args...) mmio_insw(args)
})
#define insw(args...) mmio_insw(args)
-#define mmio_insw(r,b,l) ({ int __i ; \
+#define mmio_insw(r,b,l) ({ int __i ; \
word *__b2; \
__b2 = (word *) b; \
for (__i = 0; __i < l; __i++) { \
word *__b2; \
__b2 = (word *) b; \
for (__i = 0; __i < l; __i++) { \
@@
-154,8
+152,8
@@
enum RxFilter {
/* Register window 1 offsets, the window used in normal operation. */
#define TX_FIFO 0x00
#define RX_FIFO 0x00
/* Register window 1 offsets, the window used in normal operation. */
#define TX_FIFO 0x00
#define RX_FIFO 0x00
-#define RX_STATUS 0x08
-#define TX_STATUS 0x0B
+#define RX_STATUS 0x08
+#define TX_STATUS 0x0B
#define TX_FREE 0x0C /* Remaining free bytes in Tx buffer. */
#define TX_FREE 0x0C /* Remaining free bytes in Tx buffer. */
@@
-261,10
+259,13
@@
static void el_reset(bd_t *bd)
/* set mac addr */
{
/* set mac addr */
{
- u
nsigned char *mac_addr = bd->bi_enetaddr
;
+ u
char mac_addr[6]
;
int i;
int i;
- el_get_mac_addr( mac_addr );
+ if (!eth_getenv_enetaddr("ethaddr", mac_addr)) {
+ el_get_mac_addr(mac_addr);
+ eth_setenv_enetaddr("ethaddr", mac_addr);
+ }
GO_WINDOW(2);
VX_BUSY_WAIT;
GO_WINDOW(2);
VX_BUSY_WAIT;
@@
-514,6
+515,3
@@
int eth_send(volatile void *packet, int length) {
return length;
}
return length;
}
-
-
-#endif /* CONFIG_DRIVER_3C589 */