diff options
author | Ye.Li <B37916@freescale.com> | 2014-07-16 13:53:34 +0800 |
---|---|---|
committer | Peng Fan <Peng.Fan@freescale.com> | 2015-04-29 14:43:08 +0800 |
commit | 701733cf4c70d152af5b22159a44069427f54752 (patch) | |
tree | c320efd0b60cc4b0937c90b62698c0e6f673c9eb /arch/arm | |
parent | 541c536fa416775ea2094f43b3241e12a49720c8 (diff) | |
download | u-boot-imx-701733cf4c70d152af5b22159a44069427f54752.zip u-boot-imx-701733cf4c70d152af5b22159a44069427f54752.tar.gz u-boot-imx-701733cf4c70d152af5b22159a44069427f54752.tar.bz2 |
ENGR00322860 iMX6SX: Add function to check M4 status before booting
Add new function "arch_auxiliary_core_check_up" to check whether M4
is already up. Therefore, avoid starting M4 again when it is running.
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 54a0803b29c5ab459bedfb2c68c1e94b89866aa1)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/cpu/armv7/mx6/soc.c | 13 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-mx6/sys_proto.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c index c809711..1e72212 100644 --- a/arch/arm/cpu/armv7/mx6/soc.c +++ b/arch/arm/cpu/armv7/mx6/soc.c @@ -565,6 +565,19 @@ int arch_auxiliary_core_up(u32 core_id, u32 boot_private_data) return 0; } + +int arch_auxiliary_core_check_up(u32 core_id) +{ + struct src *src_reg = (struct src *)SRC_BASE_ADDR; + unsigned val; + + val = readl(&src_reg->scr); + + if (val & 0x00000010) + return 0; /* assert in reset */ + + return 1; +} #endif void boot_mode_apply(unsigned cfg_val) diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h index b89faca..2fcdd63 100644 --- a/arch/arm/include/asm/arch-mx6/sys_proto.h +++ b/arch/arm/include/asm/arch-mx6/sys_proto.h @@ -40,6 +40,7 @@ void finish_anatop_bypass(void); #ifdef CONFIG_MX6SX int arch_auxiliary_core_up(u32 core_id, u32 boot_private_data); +int arch_auxiliary_core_check_up(u32 core_id); #endif /* |