diff options
author | zhang sanshan <sanshan.zhang@nxp.com> | 2017-05-10 10:14:27 +0800 |
---|---|---|
committer | Zhang Bo <bo.zhang@nxp.com> | 2017-06-21 12:21:03 +0800 |
commit | 81c9431f562bbeb2b6b1efb0f99e023ed818dc5d (patch) | |
tree | 8190ae0c64722f89dbcec4ad5c0874f41183b8e2 /arch/arm/cpu/armv7/mx6/soc.c | |
parent | 31da76c496511b3d640ac1008b630b3ec939e168 (diff) | |
download | u-boot-imx-81c9431f562bbeb2b6b1efb0f99e023ed818dc5d.zip u-boot-imx-81c9431f562bbeb2b6b1efb0f99e023ed818dc5d.tar.gz u-boot-imx-81c9431f562bbeb2b6b1efb0f99e023ed818dc5d.tar.bz2 |
MA-9375 [Android IMX] uboot: enable BCB and bootctrl
* Add API to read\write MISC partition.
* get the boot mode from BCB command when boot up.
* get the boot up tactics from bootctrl.
Change-Id: Icbba6340e10983dddc1b04804ecc012a3a3c57d0
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
Diffstat (limited to 'arch/arm/cpu/armv7/mx6/soc.c')
-rw-r--r-- | arch/arm/cpu/armv7/mx6/soc.c | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index be34786..f2a16e2 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -1055,55 +1055,3 @@ void finish_anatop_bypass(void) } #endif -#ifdef CONFIG_FSL_FASTBOOT - -#ifdef CONFIG_ANDROID_RECOVERY -#define ANDROID_RECOVERY_BOOT (1 << 7) -/* check if the recovery bit is set by kernel, it can be set by kernel - * issue a command '# reboot recovery' */ -int recovery_check_and_clean_flag(void) -{ - int flag_set = 0; - u32 reg; - reg = readl(SNVS_BASE_ADDR + SNVS_LPGPR); - - flag_set = !!(reg & ANDROID_RECOVERY_BOOT); - printf("check_and_clean: reg %x, flag_set %d\n", reg, flag_set); - /* clean it in case looping infinite here.... */ - if (flag_set) { - reg &= ~ANDROID_RECOVERY_BOOT; - writel(reg, SNVS_BASE_ADDR + SNVS_LPGPR); - } - - return flag_set; -} -#endif /*CONFIG_ANDROID_RECOVERY*/ - -#define ANDROID_FASTBOOT_BOOT (1 << 8) -/* check if the recovery bit is set by kernel, it can be set by kernel - * issue a command '# reboot fastboot' */ -int fastboot_check_and_clean_flag(void) -{ - int flag_set = 0; - u32 reg; - - reg = readl(SNVS_BASE_ADDR + SNVS_LPGPR); - - flag_set = !!(reg & ANDROID_FASTBOOT_BOOT); - - /* clean it in case looping infinite here.... */ - if (flag_set) { - reg &= ~ANDROID_FASTBOOT_BOOT; - writel(reg, SNVS_BASE_ADDR + SNVS_LPGPR); - } - - return flag_set; -} - -void fastboot_enable_flag(void) -{ - setbits_le32(SNVS_BASE_ADDR + SNVS_LPGPR, - ANDROID_FASTBOOT_BOOT); -} -#endif /*CONFIG_FSL_FASTBOOT*/ - |