From 2110ca7a2ec7920dba28515398f1419bc9d56354 Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Mon, 15 May 2023 09:48:59 +0200 Subject: arm: mach-k3: fix raw emmc boot mode detection Fix raw eMMC boot mode detection. Patch from TI [1]. [1] https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1204131/faq-a53-boot-binary-tispl-bin-loading-error-when-bootmode-7-0-in-emmc-boot-mode-on-am62x Upstream-Status: Pending Initial U-Boot to be used for bring-up and validation of the V1.0 design, we'll decide on the step forward to mainline this once the bring-up and validation will be done. Signed-off-by: Marcel Ziswiler --- arch/arm/mach-k3/am625_init.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c index d103c73770..2505cdc82a 100644 --- a/arch/arm/mach-k3/am625_init.c +++ b/arch/arm/mach-k3/am625_init.c @@ -243,6 +243,12 @@ u32 spl_mmc_boot_mode(const u32 boot_device) u32 bootmode_cfg = (devstat & MAIN_DEVSTAT_PRIMARY_BOOTMODE_CFG_MASK) >> MAIN_DEVSTAT_PRIMARY_BOOTMODE_CFG_SHIFT; + u32 bootmode = (devstat & MAIN_DEVSTAT_PRIMARY_BOOTMODE_MASK) >> + MAIN_DEVSTAT_PRIMARY_BOOTMODE_SHIFT; + + if (bootmode == BOOT_DEVICE_EMMC) + return MMCSD_MODE_EMMCBOOT; + switch (boot_device) { case BOOT_DEVICE_MMC1: if ((bootmode_cfg & MAIN_DEVSTAT_PRIMARY_MMC_FS_RAW_MASK) >> -- cgit v1.2.3