Commit Graph

4 Commits

Author SHA1 Message Date
Geert Uytterhoeven 2173fc7cb6 ARM: shmobile: R-Mobile: Add DT support for PM domains
Populate the PM domains from DT, and provide support to hook up devices
to their respective PM domain.

The always-on power area (e.g. C5 on r8a7740) is created as a PM domain
without software control, to allow Run-Time management of module clocks
for hardware blocks inside this area.

Special cases like PM domains containing CPUs, the console device, or
Coresight-ETM, are handled by scanning the DT topology.

As long as the ARM debug/perf code doesn't use resource management with
runtime PM support, the power area containing Coresight-ETM (e.g. D4 on
r8a7740) must be kept powered to avoid a crash during resume from s2ram
(dbg_cpu_pm_notify() calls reset_ctrl_regs() unconditionally, causing an
undefined instruction oops).

Initialization is done from core_initcall(), as the
"renesas,intc-irqpin" driver uses postcore_initcall().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-01-15 08:38:14 +09:00
Geert Uytterhoeven 25717b8573 ARM: shmobile: R-Mobile: Store SYSC base address in rmobile_pm_domain
Replace the hardcoded addresses for accessing the SYSC PM domain
registers by register offsets, relative to the SYSC base address stored
in struct rmobile_pm_domain.

In the future, the SYSC base address will come from DT.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2015-01-13 09:33:19 +09:00
Magnus Damm abebbc4a02 ARM: shmobile: Cleanup pm-rmobile.o build using Kconfig
Add a CONFIG_PM_RMOBILE entry and enable it for R-Mobile
SoCs in case CONFIG_PM is set. Consolidate Makefile power
management objects and get rid of #ifdefs in the C code.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-09-02 09:32:06 +09:00
Magnus Damm 6b8b0cb477 ARM: shmobile: Move pm-rmobile.h, cleanup sh73xx.h
Change location of pm-rmobile.h so it can be used as #include "pm-rmobile.h"
instead of the old style #include <mach/pm-rmobile.h>. Also clean up
the sh7372 and sh73a0 header files to get rid of unused include files.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-06-17 17:09:39 +09:00