From: Udit Kumar <u-kumar1@ti.com>
Date: Thu, 11 May 2023 09:17:50 +0000 (+0530)
Subject: arch: arm: mach-k3: j721e: add support for UDA FS
X-Git-Tag: v2025.01-rc5-pxa1908~950^2~24^2~6
X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-logo.png?a=commitdiff_plain;h=5019170970ad;p=u-boot.git

arch: arm: mach-k3: j721e: add support for UDA FS

When selecting UDA partition for booting. MMC read
mode was selected as RAW.

Due to growing/changing size of u-boot and tispl
images.
It will be better change to FS in case of UDA FS instead of
adjusting offsets with new change.

Signed-off-by: Udit Kumar <u-kumar1@ti.com>
---

diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
index 0c5d41a77e..b6164575b7 100644
--- a/arch/arm/mach-k3/j721e_init.c
+++ b/arch/arm/mach-k3/j721e_init.c
@@ -294,7 +294,7 @@ u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)
 {
 	switch (boot_device) {
 	case BOOT_DEVICE_MMC1:
-		return MMCSD_MODE_EMMCBOOT;
+		return (spl_mmc_emmc_boot_partition(mmc) ? MMCSD_MODE_EMMCBOOT : MMCSD_MODE_FS);
 	case BOOT_DEVICE_MMC2:
 		return MMCSD_MODE_FS;
 	default: