mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
arm64: zynqmp: Also support JTAG as alternative boot mode
if (reg >> BOOT_MODE_ALT_SHIFT) condition rules out alternative jtag boot mode which is 0. When 0 was used origin(HW) boot mode was used instead. That's why directly fill reg variable with requested boot mode and don't let code to read value back. "else" part of code remain unchanged. Reviewed-by: Sean Anderson <sean.anderson@linux.dev> Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/ed51a9d51948ab939a53e0b9dc6c2d2546f97a4f.1710933505.git.michal.simek@amd.com
This commit is contained in:
@@ -91,13 +91,14 @@ u32 spl_boot_device(void)
|
||||
|
||||
#if defined(CONFIG_SPL_ZYNQMP_ALT_BOOTMODE_ENABLED)
|
||||
/* Change default boot mode at run-time */
|
||||
reg = CONFIG_SPL_ZYNQMP_ALT_BOOTMODE;
|
||||
writel(CONFIG_SPL_ZYNQMP_ALT_BOOTMODE << BOOT_MODE_ALT_SHIFT,
|
||||
&crlapb_base->boot_mode);
|
||||
#endif
|
||||
|
||||
#else
|
||||
reg = readl(&crlapb_base->boot_mode);
|
||||
if (reg >> BOOT_MODE_ALT_SHIFT)
|
||||
reg >>= BOOT_MODE_ALT_SHIFT;
|
||||
#endif
|
||||
|
||||
bootmode = reg & BOOT_MODES_MASK;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user