diff options
author | Lin Huang <hl@rock-chips.com> | 2017-05-12 10:26:32 +0800 |
---|---|---|
committer | Caesar Wang <wxt@rock-chips.com> | 2017-06-08 10:01:19 +0800 |
commit | 84597b57f98233989ef44ee0ccdf67b8ecea97b3 (patch) | |
tree | d43a67cd16e694b81cb586851a8d7225dbe0911b /plat/rockchip | |
parent | 4e836d3578a6817756a320022f0595ec2ee50f3f (diff) |
rockchip: check wakeup cpu when resume
unlike rk3399 and rk3368, there are some rockchip 64bit SOC
do not have CPUPD, and pmu_cpuson_entrypoint() is common
function for rockchip platform, so we need to check wakeup
cpu when resume.
Change-Id: I6313e8a9d7c16b03e033414f0cb281646c2159ff
Signed-off-by: Lin Huang <hl@rock-chips.com>
Diffstat (limited to 'plat/rockchip')
-rw-r--r-- | plat/rockchip/common/pmusram/pmu_sram_cpus_on.S | 22 | ||||
-rw-r--r-- | plat/rockchip/rk3328/include/platform_def.h | 1 | ||||
-rw-r--r-- | plat/rockchip/rk3368/include/platform_def.h | 1 | ||||
-rw-r--r-- | plat/rockchip/rk3399/include/platform_def.h | 2 |
4 files changed, 26 insertions, 0 deletions
diff --git a/plat/rockchip/common/pmusram/pmu_sram_cpus_on.S b/plat/rockchip/common/pmusram/pmu_sram_cpus_on.S index 06dfea95..22bdffca 100644 --- a/plat/rockchip/common/pmusram/pmu_sram_cpus_on.S +++ b/plat/rockchip/common/pmusram/pmu_sram_cpus_on.S @@ -19,6 +19,28 @@ pmusram_entry_func pmu_cpuson_entrypoint +#if PSRAM_CHECK_WAKEUP_CPU +check_wake_cpus: + mrs x0, MPIDR_EL1 + and x1, x0, #MPIDR_CPU_MASK + and x0, x0, #MPIDR_CLUSTER_MASK + orr x0, x0, x1 + + /* primary_cpu */ + ldr w1, boot_mpidr + cmp w0, w1 + b.eq sys_wakeup + + /* + * If the core is not the primary cpu, + * force the core into wfe. + */ +wfe_loop: + wfe + b wfe_loop +sys_wakeup: +#endif + #if PSRAM_DO_DDR_RESUME ddr_resume: ldr x2, =__bl31_sram_stack_end diff --git a/plat/rockchip/rk3328/include/platform_def.h b/plat/rockchip/rk3328/include/platform_def.h index 9b192884..7304dcfa 100644 --- a/plat/rockchip/rk3328/include/platform_def.h +++ b/plat/rockchip/rk3328/include/platform_def.h @@ -121,5 +121,6 @@ #define PLAT_RK_PRIMARY_CPU 0x0 #define PSRAM_DO_DDR_RESUME 0 +#define PSRAM_CHECK_WAKEUP_CPU 0 #endif /* __PLATFORM_DEF_H__ */ diff --git a/plat/rockchip/rk3368/include/platform_def.h b/plat/rockchip/rk3368/include/platform_def.h index 4ad3445d..07b91e26 100644 --- a/plat/rockchip/rk3368/include/platform_def.h +++ b/plat/rockchip/rk3368/include/platform_def.h @@ -123,5 +123,6 @@ #define PLAT_RK_PRIMARY_CPU 0x0 #define PSRAM_DO_DDR_RESUME 0 +#define PSRAM_CHECK_WAKEUP_CPU 0 #endif /* __PLATFORM_DEF_H__ */ diff --git a/plat/rockchip/rk3399/include/platform_def.h b/plat/rockchip/rk3399/include/platform_def.h index 49372298..3df2f7dc 100644 --- a/plat/rockchip/rk3399/include/platform_def.h +++ b/plat/rockchip/rk3399/include/platform_def.h @@ -108,4 +108,6 @@ #define PLAT_RK_PRIMARY_CPU 0x0 #define PSRAM_DO_DDR_RESUME 1 +#define PSRAM_CHECK_WAKEUP_CPU 0 + #endif /* __PLATFORM_DEF_H__ */ |