vexpress: Check TC2 firmware support before defaulting to nonsec booting
[platform/kernel/u-boot.git] / arch / arm / lib / bootm.c
index f9ed7fe..53c3141 100644 (file)
@@ -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;