summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Simek <[email protected]>2026-06-23 14:53:42 +0200
committerMichal Simek <[email protected]>2026-07-08 08:55:51 +0200
commitd18ebbf33950d33d2292bd26b597493b66a2a991 (patch)
treefb9a45e7259d81d49c91f4fd0e6176c38e1d8924
parente8f4248fc344b60a153b6163fcdd1c5f6aeb740b (diff)
arm64: versal-net: Look up eMMC device in boot_targets_setup()
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@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 <[email protected]> Link: https://patch.msgid.link/bf779dcdd30c900d7614c0fa8382cb3f4cb57c20.1782219202.git.michal.simek@amd.com
-rw-r--r--board/xilinx/versal-net/board.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/board/xilinx/versal-net/board.c b/board/xilinx/versal-net/board.c
index 687d042d106..9c0490cba98 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@f1050000", &dev)) {
+ debug("eMMC driver for eMMC device is not present\n");
+ break;
+ }
mode = "mmc";
bootseq = dev_seq(dev);
break;