]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: at91: Fix link breakage when !CONFIG_PHYLIB
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Wed, 5 Jun 2013 09:50:43 +0000 (09:50 +0000)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Tue, 18 Jun 2013 08:20:22 +0000 (10:20 +0200)
Fixes:
arch/arm/mach-at91/built-in.o: In function `ksz9021rn_phy_fixup':
:(.text+0x1174): undefined reference to `mdiobus_write'
:(.text+0x1188): undefined reference to `mdiobus_write'
:(.text+0x119c): undefined reference to `mdiobus_write'
:(.text+0x11b0): undefined reference to `mdiobus_write'
arch/arm/mach-at91/built-in.o: In function `sama5_dt_device_init':
:(.init.text+0x1e34): undefined reference to `phy_register_fixup_for_uid'

when CONFIG_PHYLIB is not selected.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
arch/arm/mach-at91/Kconfig
arch/arm/mach-at91/board-dt-sama5.c

index 02802386b894e99dc074a16bd44fb15d508efd82..699b71e7f7ecffb0e978a8387af33699c19233ca 100644 (file)
@@ -163,6 +163,7 @@ config MACH_SAMA5_DT
        bool "Atmel SAMA5 Evaluation Kits with device-tree support"
        depends on SOC_SAMA5
        select USE_OF
+       select PHYLIB if NETDEVICES
        help
          Select this if you want to experiment device-tree with
          an Atmel Evaluation Kit.
index 705305e62bbc2928826c7d989468fbe56f55bcc1..ad95f6a23a2877b4aa917a0fecb8f72aeb4f9c00 100644 (file)
@@ -62,7 +62,8 @@ static int ksz9021rn_phy_fixup(struct phy_device *phy)
 
 static void __init sama5_dt_device_init(void)
 {
-       if (of_machine_is_compatible("atmel,sama5d3xcm"))
+       if (of_machine_is_compatible("atmel,sama5d3xcm") &&
+           IS_ENABLED(CONFIG_PHYLIB))
                phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK,
                        ksz9021rn_phy_fixup);