ARM: rockchip: convert to regmap and use pmu syscon if available
authorHeiko Stuebner <heiko@sntech.de>
Wed, 15 Oct 2014 17:23:00 +0000 (10:23 -0700)
committerHeiko Stuebner <heiko@sntech.de>
Wed, 5 Nov 2014 21:18:33 +0000 (22:18 +0100)
commitd003b58c8389d596e9fc6a131fc2901e3d039343
tree6d1d574d71b28f6a0d5a94a2c101c3c397dd53a4
parent9576d3e622f325e617b272172dd68e329e742f77
ARM: rockchip: convert to regmap and use pmu syscon if available

The pmu register space is - like the GRF - shared by quite some peripherals.
On the rk3188 and rk3288 even parts of the pinctrl are living there.
Therefore we normally shouldn't map it a second time when the syscon
does this already.

Therefore convert the cpu power-domain handling to access the pmu via a
regmap and at first try to get it via the syscon interface.
Getting this syscon will only fail if the pmu node does not have the
"syscon" compatible and thus does not get shared with other drivers.

In this case we map it like before and create the necessary regmap on
top of it.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm/mach-rockchip/platsmp.c