]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: orion5x: only call into phylib when available
authorArnd Bergmann <arnd@arndb.de>
Tue, 28 Mar 2017 10:15:41 +0000 (12:15 +0200)
committerGregory CLEMENT <gregory.clement@free-electrons.com>
Thu, 30 Mar 2017 15:30:39 +0000 (17:30 +0200)
commita525888e4b5a82db720166bad4fbbd8ca926ae14
treefd4650737a18795b9da90e9c2c64afe1d860f4b6
parent8a17c7afe9fb246fbdf434a8c4a84cdc5bada8cb
ARM: orion5x: only call into phylib when available

Board code cannot call mdiobus_register_board_info() when phylib
or mdio_device is a loadable module:

arch/arm/plat-orion/common.o: In function `orion_ge00_switch_init':
:(.init.text+0x474): undefined reference to `mdiobus_register_board_info'

I had a number of ideas for how this could be solved, but after the MDIO
code got split out from PHYLIB it has gotten too hard, so I'm basically
giving up, and only call the mdiobus_register_board_info() function
if the MDIO layer is built-in to avoid the link error. This is similar
to how we handle PHY registration on other ARM platforms.

Fixes: 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs")
Fixes: da39768627f7 ("net: phy: Allow pre-declaration of MDIO devices")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
arch/arm/mach-orion5x/Kconfig
arch/arm/plat-orion/common.c