From patchwork Thu Jul 2 08:02:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Faiz Abbas X-Patchwork-Id: 240605 List-Id: U-Boot discussion From: faiz_abbas at ti.com (Faiz Abbas) Date: Thu, 2 Jul 2020 13:32:25 +0530 Subject: [PATCH 05/13] arm: mach-k3: am6_init: Gate mmc related configurations with the appropriate config In-Reply-To: <20200702080233.27582-1-faiz_abbas@ti.com> References: <20200702080233.27582-1-faiz_abbas@ti.com> Message-ID: <20200702080233.27582-6-faiz_abbas@ti.com> Gate mmc related system related configurations with DM_MMC to avoid build errors when MMC is not enabled Signed-off-by: Faiz Abbas --- arch/arm/mach-k3/am6_init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-k3/am6_init.c b/arch/arm/mach-k3/am6_init.c index 74557c4bb7..42d13a39f8 100644 --- a/arch/arm/mach-k3/am6_init.c +++ b/arch/arm/mach-k3/am6_init.c @@ -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)