[PATCH 1/4] arm: mach-k3: Fix MMC macros
Judith Mendez
jm at ti.com
Thu Sep 11 16:59:13 CEST 2025
Hi Anshul,
On 9/11/25 12:11 AM, Anshul Dalal wrote:
> On Thu Sep 11, 2025 at 3:15 AM IST, Judith Mendez wrote:
>> For all K3 SoC's eMMC boot and MMCSD boot modes are supported. The macros
>> however, mix MMC device with the two bootmodes. Decouple the two types
>> of macros so that bootmodes can be identified with:
>> - BOOT_DEVICE_MMCSD
>> - BOOT_DEVICE_EMMC
>> according to devstat parsed boot mode values and on-board devices can be
>> identified with:
>> - BOOT_DEVICE_MMC1
>> - BOOT_DEVICE_MMC2
>> - BOOT_DEVICE_MMC2_2
>> according to arbitrary numbers mainly used to differentiate between eMMC
>> and SD card.
>>
>> Signed-off-by: Judith Mendez <jm at ti.com>
>> ---
>
> I guess the confusion here is how we are calling boot modes from devstat
> as well as the boot device as BOOT_DEVICE_*. Perhaps we should rename
> the former to DEVSTAT_BOOT_MODE_* or something along those lines.
>
> That would make the difference between a boot *mode* and a boot *device*
> more clear, DEVSTAT_BOOT_MODE_MMCSD or DEVSTATE_BOOT_MODE_EMMC would
> distinguish between SD or EMMC boot modes with BOOT_DEVICE_MMC*
> indicating the MMC port used.
>
> This would also allow use to only have the respective
> DEVSTAT_BOOT_MODE_* defined in each soc's headers with BOOT_DEVICE_*
> coming from arch/arm/include/asm/spl.h.
Right, I guess if
BOOT_DEVICE_MMCSD
BOOT_DEVICE_EMMC
Is still not clear enough, it would be a good idea to use:
DEVSTAT_BOOT_MODE_MMCSD
DEVSTAT_BOOT_MODE_EMMC
Its only a real problem for MMC since we have the confusion with eMMC
boot and MMCSD boot and we mix the two as a result in
spl_mmc_boot_mode() and spl_boot_device().
Its not really an issue for other boot modes to warrant renaming all the
bootmodes, but I would like to make these macros as clear as possible in
this series since I plan to refactor spl_mmc_boot_mode() next.
So lets hear if any one else has a strong opinion on this before
deciding on:
DEVSTAT_BOOT_MODE_MMCSD
DEVSTAT_BOOT_MODE_EMMC
~ Judith
...
More information about the U-Boot
mailing list