Merge branches 'topic/vsp1' and 'topic/adv76xx' of git://git.kernel.org/pub/scm/linux...
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-davinci / board-dm644x-evm.c
index 987605b78556f9e8fa16b1e9b1b278ad0abe4d1c..e583e58b5e1ee7e2f30d782ef133ce76d2935dbf 100644 (file)
@@ -778,6 +778,11 @@ static __init void davinci_evm_init(void)
                /* only one device will be jumpered and detected */
                if (HAS_NAND) {
                        platform_device_register(&davinci_evm_nandflash_device);
+
+                       if (davinci_aemif_setup(&davinci_evm_nandflash_device))
+                               pr_warn("%s: Cannot configure AEMIF.\n",
+                                       __func__);
+
                        evm_leds[7].default_trigger = "nand-disk";
                        if (HAS_NOR)
                                pr_warning("WARNING: both NAND and NOR flash "
@@ -799,11 +804,12 @@ static __init void davinci_evm_init(void)
        /* irlml6401 switches over 1A, in under 8 msec */
        davinci_setup_usb(1000, 8);
 
-       soc_info->emac_pdata->phy_id = DM644X_EVM_PHY_ID;
-       /* Register the fixup for PHY on DaVinci */
-       phy_register_fixup_for_uid(LXT971_PHY_ID, LXT971_PHY_MASK,
-                                       davinci_phy_fixup);
-
+       if (IS_BUILTIN(CONFIG_PHYLIB)) {
+               soc_info->emac_pdata->phy_id = DM644X_EVM_PHY_ID;
+               /* Register the fixup for PHY on DaVinci */
+               phy_register_fixup_for_uid(LXT971_PHY_ID, LXT971_PHY_MASK,
+                                               davinci_phy_fixup);
+       }
 }
 
 MACHINE_START(DAVINCI_EVM, "DaVinci DM644x EVM")