imx: mx7: psci: improve cpu hotplug flow
authorAnson Huang <Anson.Huang@nxp.com>
Wed, 8 Aug 2018 01:17:48 +0000 (09:17 +0800)
committerStefano Babic <sbabic@denx.de>
Tue, 4 Sep 2018 06:47:23 +0000 (08:47 +0200)
commit11e52bca84e65a35d10830c306dab37dc5621a3d
tree847c37bb9b2f68bab19fa22e5d9fcf3d315c4db4
parent41b7b4b936a08ad0b7dac333bf2071a3bcf3407c
imx: mx7: psci: improve cpu hotplug flow

This patch improves cpu hotplug, previous cpu_off
implementation is NOT safe, a CPU can NOT power down
itself in runtime, it will cause system bus hang due
to pending transaction. So need to use other online
CPU to kill it when it is ready for killed.

Here use SRC parameter register and a magic number
of ~0 as handshake for killing a offline CPU,
when the online CPU checks the psci_affinity_info,
it will help kill the offline CPU according to
the magic number stored in SRC parameter register.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
arch/arm/mach-imx/mx7/psci-mx7.c