ARM: mvebu: introduce CPU reset code
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 14 Apr 2014 13:50:28 +0000 (15:50 +0200)
committerJason Cooper <jason@lakedaemon.net>
Thu, 24 Apr 2014 05:24:02 +0000 (05:24 +0000)
commit3f20fb1153b374737acd40d42cb3cab2ae5dae35
tree10206bbab49c62b3a66fa5e8d8f7989fce3658fe
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5
ARM: mvebu: introduce CPU reset code

The Armada 370 and Armada XP have registers that allow to reset the
CPUs, which is particularly useful to take the secondary CPUs out of
reset in the context of the SMP support.

Unfortunately, an implementation mistake was originally made and the
support for these registers was integrated into the PMSU driver, which
is in fact completely unrelated. And it turns out that the Armada 375
has the same CPU reset registers, but does not have the PMSU
registers.

Therefore, this commit creates a small CPU reset driver. All it does
is provide a simple mvebu_cpu_reset_deassert() function that the SMP
support code can call to take secondary CPUs out of reset. As of this
commit, the driver isn't being used, it will be used through changes
in the following commits.

Note that we initially planned to use the 'reset controller'
framework, but it requires the addition of "resets" properties in the
Device Tree, which are causing too many problems if we want to keep
the Device Tree backward compatibility. Moreover, the 'reset
controller' framework is mainly useful when a device driver needs to
request a reset of its device from a separate reset controller. In our
case, the CPU reset handling and the SMP core code are both located in
arch/arm/mach-mvebu/ and are tightly linked together, so there's no
real benefit in going through a separate framework.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1397483433-25836-2-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Documentation/devicetree/bindings/arm/armada-cpu-reset.txt [new file with mode: 0644]
arch/arm/mach-mvebu/Makefile
arch/arm/mach-mvebu/common.h
arch/arm/mach-mvebu/cpu-reset.c [new file with mode: 0644]