diff options
author | Arnab Basu <arnab.basu@freescale.com> | 2015-01-06 21:18:41 (GMT) |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2015-02-24 21:08:28 (GMT) |
commit | 60385d94e56513b50b87724fb9a3878ee5086da9 (patch) | |
tree | ed3cfc5ed8010de1ddafbf286d85bf535beda228 /arch/arm/cpu/armv8/fsl-lsch3/mp.c | |
parent | 6c747f4ad4eef87152f8d6de2169efe0a6a7a57f (diff) | |
download | u-boot-60385d94e56513b50b87724fb9a3878ee5086da9.tar.xz |
ARMv8/fsl-lsch3: Patch cpu node properties in DT for online cores
U-Boot should only add "enable-method" and "cpu-release-address"
properties to the "cpu" node of the online cores.
Signed-off-by: Arnab Basu <arnab.basu@freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'arch/arm/cpu/armv8/fsl-lsch3/mp.c')
-rw-r--r-- | arch/arm/cpu/armv8/fsl-lsch3/mp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/fsl-lsch3/mp.c b/arch/arm/cpu/armv8/fsl-lsch3/mp.c index 94998bf..ce9c0c1 100644 --- a/arch/arm/cpu/armv8/fsl-lsch3/mp.c +++ b/arch/arm/cpu/armv8/fsl-lsch3/mp.c @@ -83,6 +83,14 @@ int is_core_valid(unsigned int core) return !!((1 << core) & cpu_mask()); } +int is_core_online(u64 cpu_id) +{ + u64 *table; + int pos = id_to_core(cpu_id); + table = (u64 *)get_spin_tbl_addr() + pos * WORDS_PER_SPIN_TABLE_ENTRY; + return table[SPIN_TABLE_ELEM_STATUS_IDX] == 1; +} + int cpu_reset(int nr) { puts("Feature is not implemented.\n"); |