Even when CONFIG_NO_NET is selected there is still need for a definition of ft_board_setup(). Thus move the checks for CONFIG_DM_ETH and CONFIG_DRIVER_TI_CPSW inside the function.
Signed-off-by: Maarten Brock <[email protected]> --- board/ti/am335x/board.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 739b23b8554..2b7ab68e83c 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -616,8 +616,7 @@ static struct clk_synth cdce913_data = { }; #endif -#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_CONTROL) && \ - defined(CONFIG_DM_ETH) && defined(CONFIG_DRIVER_TI_CPSW) +#if defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_CONTROL) #define MAX_CPSW_SLAVES 2 @@ -632,6 +631,9 @@ int ft_board_setup(void *fdt, struct bd_info *bd) int phy_addr; int i, ret; + if (!IS_ENABLED(CONFIG_DM_ETH) || !IS_ENABLED(CONFIG_DRIVER_TI_CPSW)) + goto done; + /* phy address fixup needed only on beagle bone family */ if (!board_is_beaglebonex()) goto done; -- 2.34.1 base-commit: e4c8b32d03d7ecffd586b7d33336603ad639d7c0 branch: am335x-no-net

