mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-27 16:01:27 +00:00
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>
This commit is contained in:
parent
e008e5132f
commit
47ca7b574f
1 changed files with 1 additions and 1 deletions
|
@ -153,7 +153,7 @@ static void __secure sunxi_cpu_set_power(int cpu, bool on)
|
||||||
|
|
||||||
sunxi_power_switch((void *)cpucfg + SUN8I_R40_PWR_CLAMP(cpu),
|
sunxi_power_switch((void *)cpucfg + SUN8I_R40_PWR_CLAMP(cpu),
|
||||||
(void *)cpucfg + SUN8I_R40_PWROFF,
|
(void *)cpucfg + SUN8I_R40_PWROFF,
|
||||||
on, 0);
|
on, cpu);
|
||||||
}
|
}
|
||||||
#else /* ! CONFIG_MACH_SUN7I && ! CONFIG_MACH_SUN8I_R40 */
|
#else /* ! CONFIG_MACH_SUN7I && ! CONFIG_MACH_SUN8I_R40 */
|
||||||
static void __secure sunxi_cpu_set_power(int cpu, bool on)
|
static void __secure sunxi_cpu_set_power(int cpu, bool on)
|
||||||
|
|
Loading…
Add table
Reference in a new issue