summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/mx6/soc.c
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2014-07-16 13:53:34 +0800
committerYe.Li <B37916@freescale.com>2014-07-17 13:09:40 +0800
commit54a0803b29c5ab459bedfb2c68c1e94b89866aa1 (patch)
tree62e0cda8d1b5950b9719fd266e829bc7272cb094 /arch/arm/cpu/armv7/mx6/soc.c
parentd74815051120adcad041f4480db49402db4f9823 (diff)
downloadu-boot-imx-54a0803b29c5ab459bedfb2c68c1e94b89866aa1.zip
u-boot-imx-54a0803b29c5ab459bedfb2c68c1e94b89866aa1.tar.gz
u-boot-imx-54a0803b29c5ab459bedfb2c68c1e94b89866aa1.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>
Diffstat (limited to 'arch/arm/cpu/armv7/mx6/soc.c')
-rw-r--r--arch/arm/cpu/armv7/mx6/soc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index 001b9ab..e4393b3 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -628,6 +628,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)