[PATCH 1/4] arm: mach-k3: Fix MMC macros
Judith Mendez
jm at ti.com
Mon Sep 15 20:09:16 CEST 2025
On 9/15/25 9:22 AM, Wadim Egorov wrote:
> Hi Judith,
>
> On 9/11/25 12:45 AM, 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>
>> ---
>
> <snip>
>
>> +++ b/arch/arm/mach-k3/include/mach/am62_spl.h
>> @@ -17,7 +17,7 @@
>> #define BOOT_DEVICE_ETHERNET_RMII 0x05
>> #define BOOT_DEVICE_I2C 0x06
>> #define BOOT_DEVICE_UART 0x07
>> -#define BOOT_DEVICE_MMC 0x08
>> +#define BOOT_DEVICE_MMCSD 0x08
>> #define BOOT_DEVICE_EMMC 0x09
>> #define BOOT_DEVICE_USB 0x2A
>> @@ -29,16 +29,16 @@
>> /* U-Boot used aliases */
>> #define BOOT_DEVICE_ETHERNET 0x04
>> -#define BOOT_DEVICE_MMC2 0x08
>> -#define BOOT_DEVICE_MMC1 0x09
>> +#define BOOT_DEVICE_MMC1 0xFF0
>> +#define BOOT_DEVICE_MMC2 0xFF1
>
> How did you end up using 0xFF0? Is it simply to make the difference
> between modes more clear? It probably does not matter because it is a u-
> boot-only representation.
Yes to differentiate. So it it does not matter then why does it matter
to change to 0xFF0? My opinion here is that switching to 0xFF0 helps\
when debugging.
This method is the same way we were doing with BOOT_DEVICE_MMC2_2 which
also had an arbitrary number because the macro is required by u-boot.
But now::
BOOT_DEVICE_MMC2 -> 0xFF0 instead of using MMCSD boot value
BOOT_DEVICE_MMC1 -> 0xFF1 instead of using eMMC boot value
and just modified:
BOOT_DEVICE_MMC2_2 -> 0xFF2 instead of 0xFF or other arbitrary numbers.
~ Judith
More information about the U-Boot
mailing list