[PATCH 17/18] arm64: versal-net: Look up eMMC device in boot_targets_setup()
Michal Simek
michal.simek at amd.com
Tue Jun 23 14:53:42 CEST 2026
The EMMC_MODE case set bootseq from dev_seq(dev) without ever assigning
dev, so it used an uninitialized pointer and produced a bogus device
sequence in boot_targets.
eMMC is wired to the SD1 controller (mmc at f1050000, see
versal-net-mini-emmc.dts). Look that device up like the SD cases do
before using its sequence number.
Signed-off-by: Michal Simek <michal.simek at amd.com>
---
board/xilinx/versal-net/board.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/board/xilinx/versal-net/board.c b/board/xilinx/versal-net/board.c
index 687d042d1062..9c0490cba980 100644
--- a/board/xilinx/versal-net/board.c
+++ b/board/xilinx/versal-net/board.c
@@ -145,6 +145,11 @@ static int boot_targets_setup(void)
break;
case EMMC_MODE:
puts("EMMC_MODE\n");
+ if (uclass_get_device_by_name(UCLASS_MMC,
+ "mmc at f1050000", &dev)) {
+ debug("eMMC driver for eMMC device is not present\n");
+ break;
+ }
mode = "mmc";
bootseq = dev_seq(dev);
break;
--
2.43.0
More information about the U-Boot
mailing list