ARM: smp_scu: allow the platform code to read the SCU CPU status
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sun, 17 Sep 2017 16:45:20 +0000 (18:45 +0200)
committerKevin Hilman <khilman@baylibre.com>
Sun, 29 Oct 2017 15:29:30 +0000 (08:29 -0700)
commit936a4174435b376557ee2610eae03592baeb9016
treeb8d99a90ee1526defb468a57775f679dd4efa2b4
parent0606326effc66201223de26d71c2779a108ee452
ARM: smp_scu: allow the platform code to read the SCU CPU status

On Amlogic Meson8 / Meson8m2 (both Cortex-A9) and Meson8b (Cortex-A5)
the CPU hotplug code needs to wait until the SCU status of the CPU that
is being taken offline is SCU_PM_POWEROFF.
Provide a utility function (which can be invoked for example from
.cpu_kill()) which allows reading the SCU status of a CPU.

While here, replace the magic number 0x3 with a preprocessor macro
(SCU_CPU_STATUS_MASK) so we don't have to duplicate this magic number in
the new function.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
arch/arm/include/asm/smp_scu.h
arch/arm/kernel/smp_scu.c