ARM: davinci: omal138_lcdk: fix MMC boot breakage due to driver model conversion
authorSekhar Nori <nsekhar@ti.com>
Thu, 30 May 2019 13:34:54 +0000 (19:04 +0530)
committerTom Rini <trini@konsulko.com>
Wed, 5 Jun 2019 16:13:46 +0000 (12:13 -0400)
commit 21af33ed0319 ("ARM: davinci: omapl138_lcdk: Enable DM_MMC")
wanted to enable DM_MMC only for U-Boot and not for SPL.

But CONFIG_DM_MMC is defined for SPL build too. Because of this
MMC device was not getting registered for SPL causing MMC/SD
boot breakage.

Instead use CONFIG_IS_ENABLED(DM_MMC) which will remain false until
CONFIG_SPL_DM_MMC is defined.

Tested-by: Adam Ford <aford173@gmail.com> #da850evm
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Tested-by: Peter Howard <phoward@gme.net.au> #omapl138_lcdk
board/davinci/da8xxevm/omapl138_lcdk.c

index 2c2f885d43e4536a0280833f37c5d047b11490a6..fe1bf4410145b98da241300f6d45019247729e09 100644 (file)
@@ -353,7 +353,7 @@ int misc_init_r(void)
        return 0;
 }
 
-#ifndef CONFIG_DM_MMC
+#if !CONFIG_IS_ENABLED(DM_MMC)
 #ifdef CONFIG_MMC_DAVINCI
 static struct davinci_mmc mmc_sd0 = {
        .reg_base = (struct davinci_mmc_regs *)DAVINCI_MMC_SD0_BASE,