From: Nishanth Menon <nm@ti.com>
To: Tom Rini <trini@konsulko.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>,
Sinthu Raja <sinthu.raja@ti.com>,
Manorit Chawdhry <m-chawdhry@ti.com>, Reid Tonking <reidt@ti.com>,
Neha Malcom Francis <n-francis@ti.com>, Andrew Davis <afd@ti.com>,
Simon Glass <sjg@chromium.org>,
Robert Nelson <robertcnelson@gmail.com>,
Jason Kridner <jkridner@beagleboard.org>,
Nishanth Menon <nm@ti.com>, <u-boot@lists.denx.de>
Subject: [PATCH V2 09/12] arm: mach-k3: j721e: Improve support for UDA FS
Date: Sat, 4 Nov 2023 02:21:47 -0500 [thread overview]
Message-ID: <20231104072150.3339-10-nm@ti.com> (raw)
In-Reply-To: <20231104072150.3339-1-nm@ti.com>
Commit 5019170970ad ("arch: arm: mach-k3: j721e: add support for UDA
FS") introduced basic UDA FS support, however, we can Take approach
similar to commit 0f1c1e8b368b ("arm: mach-k3: am625: Add support for
UDA FS"). While boot partition support with EMMC boot is useful, it is
constrained by the size of boot hardware partition itself.
In the case of K3 devices, tispl images can contain OP-TEE images that
can substantially vary in size and the u-boot image itself can vary over
time as we enable various features.
So use the CSD information in the case of EMMC_BOOT configuration being
enabled to pick boot partition or UDA FS mode operation to pick.
If EMMC_BOOT is disabled, then depend on filesystem configuration to
pick data from UDA.
Signed-off-by: Nishanth Menon <nm@ti.com>
---
arch/arm/mach-k3/j721e_init.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
index b1f7e25ed092..bcdfbfc79c4a 100644
--- a/arch/arm/mach-k3/j721e_init.c
+++ b/arch/arm/mach-k3/j721e_init.c
@@ -294,7 +294,14 @@ u32 spl_mmc_boot_mode(struct mmc *mmc, const u32 boot_device)
{
switch (boot_device) {
case BOOT_DEVICE_MMC1:
- return (spl_mmc_emmc_boot_partition(mmc) ? MMCSD_MODE_EMMCBOOT : MMCSD_MODE_FS);
+ if (IS_ENABLED(CONFIG_SUPPORT_EMMC_BOOT)) {
+ if (spl_mmc_emmc_boot_partition(mmc))
+ return MMCSD_MODE_EMMCBOOT;
+ return MMCSD_MODE_FS;
+ }
+ if (IS_ENABLED(CONFIG_SPL_FS_FAT) || IS_ENABLED(CONFIG_SPL_FS_EXT4))
+ return MMCSD_MODE_FS;
+ return MMCSD_MODE_EMMCBOOT;
case BOOT_DEVICE_MMC2:
return MMCSD_MODE_FS;
default:
--
2.37.2
next prev parent reply other threads:[~2023-11-04 7:25 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-04 7:21 [PATCH V2 00/12] board: ti: j721e: cleanup Nishanth Menon
2023-11-04 7:21 ` [PATCH V2 01/12] board: ti: j721e: evm: Drop unused headers Nishanth Menon
2023-11-07 7:02 ` Neha Malcom Francis
2023-11-22 20:49 ` Tom Rini
2023-11-04 7:21 ` [PATCH V2 02/12] board: ti: j721e: evm: Drop board check for ESM Nishanth Menon
2023-11-07 7:06 ` Neha Malcom Francis
2023-11-04 7:21 ` [PATCH V2 03/12] board: ti: j721e: evm: Switch to using IS_ENABLED Nishanth Menon
2023-11-07 7:08 ` Neha Malcom Francis
2023-11-04 7:21 ` [PATCH V2 04/12] board: ti: j721e: j721e.env: Add explicit boot_targets Nishanth Menon
2023-11-07 7:09 ` Neha Malcom Francis
2023-11-04 7:21 ` [PATCH V2 05/12] configs: j721e_evm_a72_defconfig: Switch to bootstd Nishanth Menon
2023-11-07 7:09 ` Neha Malcom Francis
2023-11-04 7:21 ` [PATCH V2 06/12] arm: mach-k3: Kconfig: Introduce a symbol to indicate J7200 Nishanth Menon
2023-11-06 16:45 ` Andrew Davis
2023-11-06 16:50 ` Nishanth Menon
2023-11-04 7:21 ` [PATCH V2 07/12] board: ti: j721e: Select SOC_K3_J721E_J7200 for J7200evm Nishanth Menon
2023-11-04 7:21 ` [PATCH V2 08/12] arm: mach-k3: arm64-mmu: Refactor to be independent of board Nishanth Menon
2023-11-06 16:54 ` Andrew Davis
2023-11-04 7:21 ` Nishanth Menon [this message]
2023-11-04 7:21 ` [PATCH V2 10/12] configs: j7200: Remove HBMC_AM654 config Nishanth Menon
2023-11-07 7:11 ` Neha Malcom Francis
2023-11-04 7:21 ` [PATCH V2 11/12] configs: j7200_evm_a72_defconfig: Switch to bootstd Nishanth Menon
2023-11-07 7:12 ` Neha Malcom Francis
2023-11-04 7:21 ` [PATCH V2 12/12] doc: board: ti: j721e_evm: Use board relative path for include directives Nishanth Menon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231104072150.3339-10-nm@ti.com \
--to=nm@ti.com \
--cc=afd@ti.com \
--cc=jkridner@beagleboard.org \
--cc=m-chawdhry@ti.com \
--cc=n-francis@ti.com \
--cc=reidt@ti.com \
--cc=robertcnelson@gmail.com \
--cc=sinthu.raja@ti.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox