diff options
author | Tom Rini <trini@konsulko.com> | 2020-08-25 23:12:43 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-25 23:12:43 -0400 |
commit | 7a1a01c6029039e4fa6aa185cdbbf9a357eecba7 (patch) | |
tree | f145f655379b2298dc58ef11aa03742c159e7f56 /arch/arm/mach-imx/mx7/soc.c | |
parent | 9f9ecd3e4d7839e24c182fb7b24937e19b670f1b (diff) | |
parent | acbc1d86f16cc8372cccb7b862a0b9dc242f8fe5 (diff) |
Merge tag 'u-boot-imx-20200825' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
For 2020.10
-----------
- mx6: SOCs user selectable
Fix for imx6q_logic
Some DM conversion
- mx7: introduce secondary boot device
Travis: https://travis-ci.org/github/sbabic/u-boot-imx/builds/720918010
Signed-off-by: Tom Rini <trini@konsulko.com>
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 |