arm: mach-k3: am6_init: Gate mmc related configurations with the appropriate config
authorFaiz Abbas <faiz_abbas@ti.com>
Mon, 3 Aug 2020 06:05:08 +0000 (11:35 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Tue, 11 Aug 2020 15:04:46 +0000 (20:34 +0530)
Gate mmc related system related configurations with DM_MMC to avoid build
errors when MMC is not enabled

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
arch/arm/mach-k3/am6_init.c

index 74557c4..42d13a3 100644 (file)
@@ -90,7 +90,7 @@ static void store_boot_index_from_rom(void)
        bootindex = *(u32 *)(CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX);
 }
 
-#if defined(CONFIG_K3_LOAD_SYSFW)
+#if defined(CONFIG_K3_LOAD_SYSFW) && CONFIG_IS_ENABLED(DM_MMC)
 void k3_mmc_stop_clock(void)
 {
        if (spl_boot_device() == BOOT_DEVICE_MMC1) {
@@ -115,6 +115,9 @@ void k3_mmc_restart_clock(void)
                mmc_set_clock(mmc, mmc->saved_clock, false);
        }
 }
+#else
+void k3_mmc_stop_clock(void) {}
+void k3_mmc_restart_clock(void) {}
 #endif
 
 void board_init_f(ulong dummy)