Skip to content

Commit 93c4ea3

Browse files
ndreysScott Wood
authored andcommitted
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 <[email protected]> Signed-off-by: Scott Wood <[email protected]>
1 parent ddc6cd0 commit 93c4ea3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

arch/powerpc/platforms/85xx/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ config MPC85xx_CDS
7272
config MPC85xx_MDS
7373
bool "Freescale MPC85xx MDS"
7474
select DEFAULT_UIMAGE
75-
select PHYLIB
75+
select PHYLIB if NETDEVICES
7676
select HAS_RAPIDIO
7777
select SWIOTLB
7878
help

arch/powerpc/platforms/85xx/mpc85xx_mds.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@
6363
#define DBG(fmt...)
6464
#endif
6565

66+
#if IS_BUILTIN(CONFIG_PHYLIB)
67+
6668
#define MV88E1111_SCR 0x10
6769
#define MV88E1111_SCR_125CLK 0x0010
6870
static int mpc8568_fixup_125_clock(struct phy_device *phydev)
@@ -152,6 +154,8 @@ static int mpc8568_mds_phy_fixups(struct phy_device *phydev)
152154
return err;
153155
}
154156

157+
#endif
158+
155159
/* ************************************************************************
156160
*
157161
* Setup the architecture
@@ -313,6 +317,7 @@ static void __init mpc85xx_mds_setup_arch(void)
313317
swiotlb_detect_4g();
314318
}
315319

320+
#if IS_BUILTIN(CONFIG_PHYLIB)
316321

317322
static int __init board_fixups(void)
318323
{
@@ -342,9 +347,12 @@ static int __init board_fixups(void)
342347

343348
return 0;
344349
}
350+
345351
machine_arch_initcall(mpc8568_mds, board_fixups);
346352
machine_arch_initcall(mpc8569_mds, board_fixups);
347353

354+
#endif
355+
348356
static int __init mpc85xx_publish_devices(void)
349357
{
350358
if (machine_is(mpc8568_mds))
@@ -434,4 +442,3 @@ define_machine(p1021_mds) {
434442
.pcibios_fixup_phb = fsl_pcibios_fixup_phb,
435443
#endif
436444
};
437-

0 commit comments

Comments
 (0)