summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-imx/mx7/soc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c
index b70ef80131..d0385b36e4 100644
--- a/arch/arm/mach-imx/mx7/soc.c
+++ b/arch/arm/mach-imx/mx7/soc.c
@@ -418,6 +418,13 @@ const struct boot_mode soc_boot_modes[] = {
{"secondary", MAKE_CFGVAL_SECONDARY_BOOT},
{NULL, 0},
};
+
+int boot_mode_getprisec(void)
+{
+ struct src *psrc = (struct src *)SRC_BASE_ADDR;
+
+ return !!(readl(&psrc->gpr10) & IMX7_SRC_GPR10_PERSIST_SECONDARY_BOOT);
+}
#endif
void reset_misc(void)