summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-01-02 14:00:00 +0000
committerwdenk <wdenk>2004-01-02 14:00:00 +0000
commitd4ca31c40e8888b36635967522ec7ea03fd7e70b (patch)
tree126385a917df4665532dc33cff5fee2977e8fc0e /net
parentc18960049f8ea9b0a8ad0a05c93e23fbab025da0 (diff)
* Cleanup lowboot code for MPC5200
* Minor code cleanup (coding style) * Patch by Reinhard Meyer, 30 Dec 2003: - cpu/mpc5xxx/fec.c: added CONFIG_PHY_ADDR, added CONFIG_PHY_TYPE, - added CONFIG_PHY_ADDR to include/configs/IceCube.h, - turned debug print of PHY registers into a function (called in two places) - added support for EMK MPC5200 based modules * Fix MPC8xx PLPRCR_MFD_SHIFT typo * Add support for TQM866M modules * Fixes for TQM855M with 4 MB flash (Am29DL163 = _no_ mirror bit flash) * Fix a few compiler warnings
Diffstat (limited to 'net')
-rw-r--r--net/eth.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/net/eth.c b/net/eth.c
index eabbf631b39..f295782e8ae 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2001, 2002
+ * (C) Copyright 2001-2004
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* See file CREDITS for list of people who contributed to this
@@ -217,9 +217,8 @@ void eth_set_enetaddr(int num, char *addr) {
char *end;
int i;
-#ifdef DEBUG
- printf("eth_set_enetaddr(num=%d, addr=%s)\n", num, addr);
-#endif
+ debug ("eth_set_enetaddr(num=%d, addr=%s)\n", num, addr);
+
if (!eth_devices)
return;
@@ -237,14 +236,12 @@ void eth_set_enetaddr(int num, char *addr) {
return;
}
-#ifdef DEBUG
- printf("Setting new HW address on %s\n", dev->name);
- printf("New Address is "
- "%02X:%02X:%02X:%02X:%02X:%02X\n",
- dev->enetaddr[0], dev->enetaddr[1],
- dev->enetaddr[2], dev->enetaddr[3],
- dev->enetaddr[4], dev->enetaddr[5]);
-#endif
+ debug ( "Setting new HW address on %s\n"
+ "New Address is %02X:%02X:%02X:%02X:%02X:%02X\n",
+ dev->name,
+ dev->enetaddr[0], dev->enetaddr[1],
+ dev->enetaddr[2], dev->enetaddr[3],
+ dev->enetaddr[4], dev->enetaddr[5]);
memcpy(dev->enetaddr, enetaddr, 6);
}
@@ -258,19 +255,14 @@ int eth_init(bd_t *bis)
old_current = eth_current;
do {
-#ifdef DEBUG
- printf("Trying %s\n", eth_current->name);
-#endif
+ debug ("Trying %s\n", eth_current->name);
if (eth_current->init(eth_current, bis)) {
eth_current->state = ETH_STATE_ACTIVE;
return 1;
}
-
-#ifdef DEBUG
- puts ("FAIL\n");
-#endif
+ debug ("FAIL\n");
eth_try_another(0);
} while (old_current != eth_current);