]> git.ipfire.org Git - thirdparty/u-boot.git/commit
arm64: versal2: Fix emmc boot mode boot_target issue
authorPranav Tilak <pranav.vinaytilak@amd.com>
Tue, 13 Jan 2026 06:01:07 +0000 (11:31 +0530)
committerMichal Simek <michal.simek@amd.com>
Fri, 16 Jan 2026 07:56:51 +0000 (08:56 +0100)
commitaf5c2b759e71e152576597e44151abca97979d33
treeee2f2a32d26b5bf935d252b40d0e8c70430f4f65
parent6f58580391d9457c0dc1a47bc2c9dd3fde7d8d4d
arm64: versal2: Fix emmc boot mode boot_target issue

The eMMC boot device controller on Versal2 requires device pointer
initialization before accessing its sequence number. The EMMC_MODE case
was using dev_seq(dev) on an uninitialized pointer, causing corrupted
boot_targets entries (mmc7f7fbfbf instead of mmc0/mmc1).

Add uclass_get_device_by_name() call to properly initialize the device
pointer before reading the sequence number. The dev sequence number is
determined at runtime based on DT aliases.

Fix boot_targets corruption in eMMC boot mode, allowing proper boot
device selection instead of falling back to JTAG mode.

Signed-off-by: Pranav Tilak <pranav.vinaytilak@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20260113060107.1136297-1-pranav.vinaytilak@amd.com
board/amd/versal2/board.c