Hi,

On 7/6/21 5:19 PM, Patrick Delaunay wrote:
Use the device sequence number in boot_instance variable
and no more the SDMMC instance provided by ROM code/TF-A.

After this patch we don't need to define the mmc alias in
device tree, for example:
   mmc0 = &sdmmc1;
   mmc1 = &sdmmc2;
   mmc2 = &sdmmc3;
to have a correct mapping between the ROM code boot device =
"${boot_device}${boot_instance}" and the MMC device in U-Boot.

With this patch the 'mmc0' device (used in mmc commands) is
always used when only one instance sdmmc is activated in device
tree, even if it is only the sdmmc2 or sdmmc3.

Signed-off-by: Patrick Delaunay <patrick.delau...@foss.st.com>
---
Dependancy with [1] to have correct 'mmc' node name (sdmmc@ => mmc@)
from kernel "ARM: dts: stm32: Rename mmc controller nodes to mmc@"

[1] "arm: dts: stm32mp15: alignment with v5.13"
     http://patchwork.ozlabs.org/project/uboot/list/?series=251100&state=*


  arch/arm/mach-stm32mp/cpu.c                | 16 +++++++++-
  arch/arm/mach-stm32mp/include/mach/stm32.h |  4 +++
  board/st/stm32mp1/stm32mp1.c               | 35 +++++++++++++++++-----
  3 files changed, 46 insertions(+), 9 deletions(-)


Applied to u-boot-stm/master, thanks!

Regards
Patrick

Reply via email to