]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: fm: call dtsec_init_phy() only when it is defined
authorJerome Forissier <jerome.forissier@linaro.org>
Wed, 11 Sep 2024 09:58:18 +0000 (11:58 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 24 Sep 2024 19:41:21 +0000 (13:41 -0600)
dtsec_init_phy() is defined only with MII so add the proper conditional
in the caller code.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/net/fm/eth.c

index 19f3f0fef0737353accc0fb6281a2d7b5b6722ce..63fe4b2d33c46020c3aa34b0ac0bd79d0629e783 100644 (file)
@@ -26,7 +26,8 @@
 
 #include "fm.h"
 
-#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) && !defined(BITBANGMII)
+#if ((defined(CONFIG_MII) || defined(CONFIG_CMD_MII)) && \
+     !defined(CONFIG_BITBANGMII))
 
 #define TBIANA_SETTINGS (TBIANA_ASYMMETRIC_PAUSE | TBIANA_SYMMETRIC_PAUSE | \
                         TBIANA_FULL_DUPLEX)
@@ -701,8 +702,11 @@ static int init_phy(struct fm_eth *fm_eth)
                supported |= SUPPORTED_2500baseX_Full;
 #endif
 
+#if (CONFIG_IS_ENABLED(MII) || CONFIG_IS_ENABLED(CMD_MII)) && \
+       !CONFIG_IS_ENABLED(BITBANGMII)
        if (fm_eth->type == FM_ETH_1G_E)
                dtsec_init_phy(fm_eth);
+#endif
 
 #ifdef CONFIG_PHYLIB
 #ifdef CONFIG_DM_MDIO