aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2016-07-26 00:30:09 -0400
committerScott Wood <oss@buserror.net>2016-09-25 00:59:41 -0400
commit93c4ea38a19815d59f2f2afe8414ba27288b8b70 (patch)
tree661b4b3235e876933b1b55220e4e5fdf35265f81
parentddc6cd0d70a6f958b2c01758ee53279d36db2234 (diff)
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>
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index df25a3ed489d..9dc1d28975b9 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -72,7 +72,7 @@ config MPC85xx_CDS
72config MPC85xx_MDS 72config MPC85xx_MDS
73 bool "Freescale MPC85xx MDS" 73 bool "Freescale MPC85xx MDS"
74 select DEFAULT_UIMAGE 74 select DEFAULT_UIMAGE
75 select PHYLIB 75 select PHYLIB if NETDEVICES
76 select HAS_RAPIDIO 76 select HAS_RAPIDIO
77 select SWIOTLB 77 select SWIOTLB
78 help 78 help
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index fa9cd710d2ae..48fbd7bea968 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -63,6 +63,8 @@
63#define DBG(fmt...) 63#define DBG(fmt...)
64#endif 64#endif
65 65
66#if IS_BUILTIN(CONFIG_PHYLIB)
67
66#define MV88E1111_SCR 0x10 68#define MV88E1111_SCR 0x10
67#define MV88E1111_SCR_125CLK 0x0010 69#define MV88E1111_SCR_125CLK 0x0010
68static int mpc8568_fixup_125_clock(struct phy_device *phydev) 70static int mpc8568_fixup_125_clock(struct phy_device *phydev)
@@ -152,6 +154,8 @@ static int mpc8568_mds_phy_fixups(struct phy_device *phydev)
152 return err; 154 return err;
153} 155}
154 156
157#endif
158
155/* ************************************************************************ 159/* ************************************************************************
156 * 160 *
157 * Setup the architecture 161 * Setup the architecture
@@ -313,6 +317,7 @@ static void __init mpc85xx_mds_setup_arch(void)
313 swiotlb_detect_4g(); 317 swiotlb_detect_4g();
314} 318}
315 319
320#if IS_BUILTIN(CONFIG_PHYLIB)
316 321
317static int __init board_fixups(void) 322static int __init board_fixups(void)
318{ 323{
@@ -342,9 +347,12 @@ static int __init board_fixups(void)
342 347
343 return 0; 348 return 0;
344} 349}
350
345machine_arch_initcall(mpc8568_mds, board_fixups); 351machine_arch_initcall(mpc8568_mds, board_fixups);
346machine_arch_initcall(mpc8569_mds, board_fixups); 352machine_arch_initcall(mpc8569_mds, board_fixups);
347 353
354#endif
355
348static int __init mpc85xx_publish_devices(void) 356static int __init mpc85xx_publish_devices(void)
349{ 357{
350 if (machine_is(mpc8568_mds)) 358 if (machine_is(mpc8568_mds))
@@ -434,4 +442,3 @@ define_machine(p1021_mds) {
434 .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 442 .pcibios_fixup_phb = fsl_pcibios_fixup_phb,
435#endif 443#endif
436}; 444};
437