From 9f6649209f09adcdcec4f194cbca9bdcf9c43bef Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 8 Aug 2021 12:20:31 -0600 Subject: net: Move network rules to drivers/net The code under drivers/net is related to ethernet networking drivers, in some fashion or another. Drop these from the top-level Makefile and also move the phy rule into drivers/net/Makefile which is where it belongs. Make the new rule for drivers/net check for the build-stage relevant ETH symbol. Fix up some Kconfig dependencies while we're here to mirror how the Makefile logic now works. Signed-off-by: Simon Glass [trini: Introduce ETH, Kconfig dependency changes, am43xx fix] Signed-off-by: Tom Rini --- net/eth_common.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'net') diff --git a/net/eth_common.c b/net/eth_common.c index 58f899a0240..82d527abba6 100644 --- a/net/eth_common.c +++ b/net/eth_common.c @@ -32,6 +32,7 @@ int eth_env_set_enetaddr_by_index(const char *base_name, int index, void eth_common_init(void) { bootstage_mark(BOOTSTAGE_ID_NET_ETH_START); +#if CONFIG_IS_ENABLED(ETH) #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) || defined(CONFIG_PHYLIB) miiphy_init(); #endif @@ -39,6 +40,7 @@ void eth_common_init(void) #ifdef CONFIG_PHYLIB phy_init(); #endif +#endif } int eth_mac_skip(int index) -- cgit v1.2.3