ARM: mvebu: Low level functions to enable/disbale cache snooping

When going to deep idle we need to disable (and later enable) the SoC
snooping by "hand". Playing with the coherency fabric requires to use
assembly code to be sure that the compiler doesn't reorder the
instructions nor do wrong optimization.

These functions will be called by the low level (in assembly) part of
the CPU idle functions.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
ARM: mvebu: Add a new set of registers for pmsu

The Power Management Unit Service block also controls the Coherency
Fabric subsystem. This new set of registers is needed for the CPU idle
implementation for the Armada 370/XP, it allows to enter a deep CPU
idle state where the Coherency Fabric and the L2 cache are power down.

This patch also adds warnings if one of the base registers set can't
be ioremapped.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
ARM: mvebu: Allow to power down L2 cache controller in idle mode

This commit adds an exported function which allows to power down the
L2 cache controller and the Coherency Fabric when the CPU goes into
deep idle mode.

This feature is part of the Power Management Service Unit of the
Armada 370 and Armada XP SoCs.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
ARM: mvebu: Add the PMSU related part of the cpu idle functions

The cpu idle support will need to acces to the Power Mangement Service
Unit. This commit adds and exports the prepare and restore functions
that will be used by the CPU idle.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
ARM: mvebu: Set the start address of a CPU in a separate function

Setting the start (or boot) address of A CPU is no more used only
during SMP bring up, but will also be used by the CPU idle functions
or later by the CPU hot plug ones.

This commit moves it in a separate function and exports it.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
cpuidle: mvebu: Add initial cpu idle support for Armada 370/XP SoC

Add wfi/cpu idle/cpu deep idle power states support for Armada XP SoC.

All the latencies and the power consumption values used at the
"armada_370_xp_idle_driver" structure are preliminary and will be
modified in the future after running some measurements and analysis.

Based on the work of Nadav Haklai.

Signed-off-by: Nadav Haklai <nadavh@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
ARM: dts: mvebu: Add a new set of registers to the PMSU node

The Power Management Unit Service block also controls the Coherency
Fabric subsystem. This new set of registers is needed for the CPU idle
implementation for the Armada XP, it allows to enter in a deep CPU
idle state where the Coherency Fabric and the L2 cache are powerdown.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
DEBUG: add the pm_level=idle paramter on the kernel command line

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>