summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorJon Medhurst \(Tixy\) <tixy@linaro.org>2016-06-23 13:37:32 +0100
committerTom Rini <trini@konsulko.com>2016-08-15 18:46:38 -0400
commitf225d39d30935c3d27271bee676ef554fa9b0f3c (patch)
tree1da31f4225fc2a561cdac9df27a81f905cc7a854 /arch/arm
parent0fcb9f07a1d086fc6951c08d2fc1cf6048bd54e2 (diff)
downloadu-boot-imx-f225d39d30935c3d27271bee676ef554fa9b0f3c.zip
u-boot-imx-f225d39d30935c3d27271bee676ef554fa9b0f3c.tar.gz
u-boot-imx-f225d39d30935c3d27271bee676ef554fa9b0f3c.tar.bz2
vexpress: Check TC2 firmware support before defaulting to nonsec booting
The firmware on TC2 needs to be configured appropriately before booting in nonsec mode will work as expected, so test for this and fall back to sec mode if required. Signed-off-by: Jon Medhurst <tixy@linaro.org> Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org> Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/lib/bootm.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index f9ed7fe..53c3141 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -248,15 +248,20 @@ static void boot_prep_linux(bootm_headers_t *images)
}
}
-#ifdef CONFIG_ARMV7_NONSEC
-bool armv7_boot_nonsec(void)
+__weak bool armv7_boot_nonsec_default(void)
{
- char *s = getenv("bootm_boot_mode");
#ifdef CONFIG_ARMV7_BOOT_SEC_DEFAULT
- bool nonsec = false;
+ return false;
#else
- bool nonsec = true;
+ return true;
#endif
+}
+
+#ifdef CONFIG_ARMV7_NONSEC
+bool armv7_boot_nonsec(void)
+{
+ char *s = getenv("bootm_boot_mode");
+ bool nonsec = armv7_boot_nonsec_default();
if (s && !strcmp(s, "sec"))
nonsec = false;