mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
net: execute "miiphy_init" if CONFIG_PHYLIB defined
In "common/Makefile" "miiphyutil.o" gets built if any of the following items enabled: * CONFIG_PHYLIB * CONFIG_MII * CONFIG_CMD_MII 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 <rob.herring@calxeda.com> Cc: Simon Glass <sjg@chromium.org> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
This commit is contained in:
parent
74cb708d58
commit
27ee59af28
1 changed files with 1 additions and 1 deletions
|
@ -279,7 +279,7 @@ int eth_initialize(bd_t *bis)
|
||||||
eth_current = NULL;
|
eth_current = NULL;
|
||||||
|
|
||||||
bootstage_mark(BOOTSTAGE_ID_NET_ETH_START);
|
bootstage_mark(BOOTSTAGE_ID_NET_ETH_START);
|
||||||
#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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue