diff options
Diffstat (limited to 'arch/arm/mach-imx/mx7/soc.c')
-rw-r--r-- | arch/arm/mach-imx/mx7/soc.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mx7/soc.c b/arch/arm/mach-imx/mx7/soc.c index 9cb61f5c34..d0385b36e4 100644 --- a/arch/arm/mach-imx/mx7/soc.c +++ b/arch/arm/mach-imx/mx7/soc.c @@ -13,6 +13,7 @@ #include <asm/mach-imx/hab.h> #include <asm/mach-imx/rdc-sema.h> #include <asm/arch/imx-rdc.h> +#include <asm/mach-imx/boot_mode.h> #include <asm/arch/crm_regs.h> #include <dm.h> #include <env.h> @@ -410,6 +411,22 @@ void s_init(void) return; } +#ifndef CONFIG_SPL_BUILD +const struct boot_mode soc_boot_modes[] = { + {"normal", MAKE_CFGVAL(0x00, 0x00, 0x00, 0x00)}, + {"primary", MAKE_CFGVAL_PRIMARY_BOOT}, + {"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) { #ifndef CONFIG_SPL_BUILD |