diff options
author | Michal Simek <michal.simek@xilinx.com> | 2016-10-25 11:43:02 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2016-11-15 15:28:05 +0100 |
commit | 47359a0394b28802c60c9381ac7bab31cb065146 (patch) | |
tree | daa71cebae149079356986f87f194c1f91d6047a /arch/arm | |
parent | e1992276c30f18207de6df3bf058449806b6cc5e (diff) | |
download | u-boot-imx-47359a0394b28802c60c9381ac7bab31cb065146.zip u-boot-imx-47359a0394b28802c60c9381ac7bab31cb065146.tar.gz u-boot-imx-47359a0394b28802c60c9381ac7bab31cb065146.tar.bz2 |
ARM64: zynqmp: Fix secondary bootmode enabling
Do not setup use_alt bit which copy alternative boot mode to
boot mode. The reason is that this bit is cleared after POR
but not after any software reset which will cause
that after SW reset bootrom will look for different boot image.
This patch setups alternative boot mode selection (purely SW
handling) and extends code to read this alternative boot mode first and
use it if it is setup.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/cpu/armv8/zynqmp/spl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv8/zynqmp/spl.c b/arch/arm/cpu/armv8/zynqmp/spl.c index 04e1905..bdbd613 100644 --- a/arch/arm/cpu/armv8/zynqmp/spl.c +++ b/arch/arm/cpu/armv8/zynqmp/spl.c @@ -69,12 +69,14 @@ u32 spl_boot_device(void) #if defined(CONFIG_SPL_ZYNQMP_ALT_BOOTMODE_ENABLED) /* Change default boot mode at run-time */ - writel(BOOT_MODE_USE_ALT | - CONFIG_SPL_ZYNQMP_ALT_BOOTMODE << BOOT_MODE_ALT_SHIFT, + writel(CONFIG_SPL_ZYNQMP_ALT_BOOTMODE << BOOT_MODE_ALT_SHIFT, &crlapb_base->boot_mode); #endif reg = readl(&crlapb_base->boot_mode); + if (reg >> BOOT_MODE_ALT_SHIFT) + reg >>= BOOT_MODE_ALT_SHIFT; + bootmode = reg & BOOT_MODES_MASK; switch (bootmode) { |