• Arnd Bergmann's avatar
    ARM: orion5x: only call into phylib when available · d43e85b7
    Arnd Bergmann authored
    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: 90eff909 ("net: phy: Allow splitting MDIO bus/device support from PHYs")
    Fixes: 648ea013 ("net: phy: Allow pre-declaration of MDIO devices")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
    d43e85b7
Kconfig 4.44 KB