diff options
author | Heiko Stuebner <heiko@sntech.de> | 2019-03-07 08:01:37 +0100 |
---|---|---|
committer | Heiko Stuebner <heiko@sntech.de> | 2019-04-25 13:37:56 +0200 |
commit | 3b5b888d1b33fe9978cea7131f0177cc5e8a4fbc (patch) | |
tree | 3300ce823c8595018e2249e5e18fda08efa79a69 /plat | |
parent | c3aaabaf7e66e56323167d282fd6848b7ade8ae2 (diff) |
rockchip: Allow socs with undefined wfe check bits
Some older socs like the rk3288 do not have the necessary registers
to check the wfi/wfe state of the cpu cores. Allow this case an "just"
do an additional delay similar to how the Linux kernel handles smp
right now.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Change-Id: I0f67af388b06b8bfb4a9bac411b4900ac266a77a
Diffstat (limited to 'plat')
-rw-r--r-- | plat/rockchip/common/drivers/pmu/pmu_com.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plat/rockchip/common/drivers/pmu/pmu_com.h b/plat/rockchip/common/drivers/pmu/pmu_com.h index 4b4b00fd..5359f73b 100644 --- a/plat/rockchip/common/drivers/pmu/pmu_com.h +++ b/plat/rockchip/common/drivers/pmu/pmu_com.h @@ -88,6 +88,17 @@ static int check_cpu_wfie(uint32_t cpu_id, uint32_t wfie_msk) cluster_id = 0; } + /* + * wfe/wfi tracking not possible, hopefully the host + * was sucessful in enabling wfe/wfi. + * We'll give a bit of additional time, like the kernel does. + */ + if ((cluster_id && clstb_cpu_wfe < 0) || + (!cluster_id && clstl_cpu_wfe < 0)) { + mdelay(1); + return 0; + } + if (cluster_id) wfie_msk <<= (clstb_cpu_wfe + cpu_id); else |