Commit 27ee59af authored by Alexey Brodkin's avatar Alexey Brodkin Committed by Tom Rini
Browse files

net: execute "miiphy_init" if CONFIG_PHYLIB defined

In "common/Makefile" "miiphyutil.o" gets built if any of the following
items enabled:

So it's possible to not define CONFIG_MII or CONFIG_CMD_MII and still
use functions like "miiphy_get_dev_by_name".

In its turn "miiphy_get_dev_by_name" traverses "mii_devs" list which is
not initialized because "miiphy_init" never got called.

Cc: Rob Herring <>
Cc: Simon Glass <>
Cc: Wolfgang Denk <>
Acked-by: default avatarJoe Hershberger <>
Signed-off-by: default avatarAlexey Brodkin <>
parent 74cb708d
...@@ -279,7 +279,7 @@ int eth_initialize(bd_t *bis) ...@@ -279,7 +279,7 @@ int eth_initialize(bd_t *bis)
eth_current = NULL; eth_current = NULL;
#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) || defined(CONFIG_PHYLIB)
miiphy_init(); miiphy_init();
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment