summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMarian Balakowicz <m8@semihalf.com>2005-11-30 18:06:04 +0100
committerMarian Balakowicz <m8@semihalf.com>2005-11-30 18:06:04 +0100
commitd9785c14bf489908b8e39b1e20f0c14cb8fcda76 (patch)
treec5105eb907ce0cb7b353619007f34b4c86879f30 /net
parent0a69b26ed6fe3184cab86872589c27b076e6cb8e (diff)
downloadu-boot-imx-d9785c14bf489908b8e39b1e20f0c14cb8fcda76.zip
u-boot-imx-d9785c14bf489908b8e39b1e20f0c14cb8fcda76.tar.gz
u-boot-imx-d9785c14bf489908b8e39b1e20f0c14cb8fcda76.tar.bz2
Fix miiphy global data initialization (problem on 4xx boards when no
ethaddr is assigned). Initialization moved from miiphy_register() to eth_initialize(). Based on initial patch for 4xx platform by Matthias Fuchs.
Diffstat (limited to 'net')
-rw-r--r--net/eth.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/eth.c b/net/eth.c
index b4ff5ef..1646111 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -24,6 +24,7 @@
#include <common.h>
#include <command.h>
#include <net.h>
+#include <miiphy.h>
#if (CONFIG_COMMANDS & CFG_CMD_NET) && defined(CONFIG_NET_MULTI)
@@ -136,6 +137,10 @@ int eth_initialize(bd_t *bis)
eth_devices = NULL;
eth_current = NULL;
+#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII)
+ miiphy_init();
+#endif
+
#ifdef CONFIG_DB64360
mv6436x_eth_initialize(bis);
#endif
@@ -442,6 +447,10 @@ extern int ns7520_miiphy_initialize(bd_t *bis);
int eth_initialize(bd_t *bis)
{
+#if defined(CONFIG_MII) || (CONFIG_COMMANDS & CFG_CMD_MII)
+ miiphy_init();
+#endif
+
#if defined(CONFIG_AT91RM9200)
at91rm9200_miiphy_initialize(bis);
#endif