]> git.baikalelectronics.ru Git - uboot.git/commit
sunxi: psci: Fix sunxi_power_switch on sun8i-r40 platform
authorqianfan Zhao <qianfanguijin@163.com>
Sat, 14 May 2022 03:19:23 +0000 (11:19 +0800)
committerAndre Przywara <andre.przywara@arm.com>
Sun, 26 Jun 2022 10:22:54 +0000 (11:22 +0100)
commit2042ecf9bfdbcd6c7e3254111c72032290beba82
treeb492619b4e75d8ca69242444a5eefe4c73c03eb8
parent8192c9216b04ef69f6c881d3c6132849366d4e0d
sunxi: psci: Fix sunxi_power_switch on sun8i-r40 platform

linux system will die if we offline one of the cpu on R40 based board:
eg: echo 0 > /sys/devices/system/cpu/cpu3/online

The reason is that the R40 version of sunxi_cpu_set_power always passes
0 for the CPU number, so we turn off CPU0, regardless of what CPU the
CPU_OFF request came for.

Fix this by passing the proper CPU number, as there are proper power
clamp registers for every of the four cores.

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
arch/arm/cpu/armv7/sunxi/psci.c