فهرست منبع

powerpc/mpc85xx_mds: Select PHYLIB only if NETDEVICES is enabled

PHYLIB depends on NETDEVICES, so to avoid unmet dependencies warning
from Kconfig it needs to be selected conditionally.

Also add checks if PHYLIB is built-in to avoid undefined references to
PHYLIB's symbols.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Scott Wood <oss@buserror.net>
Andrey Smirnov 9 سال پیش
والد
کامیت
93c4ea38a1
2فایلهای تغییر یافته به همراه9 افزوده شده و 2 حذف شده
  1. 1 1
      arch/powerpc/platforms/85xx/Kconfig
  2. 8 1
      arch/powerpc/platforms/85xx/mpc85xx_mds.c

+ 1 - 1
arch/powerpc/platforms/85xx/Kconfig

@@ -72,7 +72,7 @@ config MPC85xx_CDS
 config MPC85xx_MDS
 config MPC85xx_MDS
 	bool "Freescale MPC85xx MDS"
 	bool "Freescale MPC85xx MDS"
 	select DEFAULT_UIMAGE
 	select DEFAULT_UIMAGE
-	select PHYLIB
+	select PHYLIB if NETDEVICES
 	select HAS_RAPIDIO
 	select HAS_RAPIDIO
 	select SWIOTLB
 	select SWIOTLB
 	help
 	help

+ 8 - 1
arch/powerpc/platforms/85xx/mpc85xx_mds.c

@@ -63,6 +63,8 @@
 #define DBG(fmt...)
 #define DBG(fmt...)
 #endif
 #endif
 
 
+#if IS_BUILTIN(CONFIG_PHYLIB)
+
 #define MV88E1111_SCR	0x10
 #define MV88E1111_SCR	0x10
 #define MV88E1111_SCR_125CLK	0x0010
 #define MV88E1111_SCR_125CLK	0x0010
 static int mpc8568_fixup_125_clock(struct phy_device *phydev)
 static int mpc8568_fixup_125_clock(struct phy_device *phydev)
@@ -152,6 +154,8 @@ static int mpc8568_mds_phy_fixups(struct phy_device *phydev)
 	return err;
 	return err;
 }
 }
 
 
+#endif
+
 /* ************************************************************************
 /* ************************************************************************
  *
  *
  * Setup the architecture
  * Setup the architecture
@@ -313,6 +317,7 @@ static void __init mpc85xx_mds_setup_arch(void)
 	swiotlb_detect_4g();
 	swiotlb_detect_4g();
 }
 }
 
 
+#if IS_BUILTIN(CONFIG_PHYLIB)
 
 
 static int __init board_fixups(void)
 static int __init board_fixups(void)
 {
 {
@@ -342,9 +347,12 @@ static int __init board_fixups(void)
 
 
 	return 0;
 	return 0;
 }
 }
+
 machine_arch_initcall(mpc8568_mds, board_fixups);
 machine_arch_initcall(mpc8568_mds, board_fixups);
 machine_arch_initcall(mpc8569_mds, board_fixups);
 machine_arch_initcall(mpc8569_mds, board_fixups);
 
 
+#endif
+
 static int __init mpc85xx_publish_devices(void)
 static int __init mpc85xx_publish_devices(void)
 {
 {
 	if (machine_is(mpc8568_mds))
 	if (machine_is(mpc8568_mds))
@@ -434,4 +442,3 @@ define_machine(p1021_mds) {
 	.pcibios_fixup_phb      = fsl_pcibios_fixup_phb,
 	.pcibios_fixup_phb      = fsl_pcibios_fixup_phb,
 #endif
 #endif
 };
 };
-