summaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile/pm-r8a7740.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2014-10-23 13:18:58 +0200
committerSimon Horman <horms+renesas@verge.net.au>2014-10-28 08:40:17 +0900
commit7e81f5434db5bbef3ac55d3f44f702566c0323c6 (patch)
tree8c555387b2353fac9331b490ae606cb1186216da /arch/arm/mach-shmobile/pm-r8a7740.c
parent77192e1e25a57a519df30015b29c046bd6a769fc (diff)
ARM: shmobile: r8a7740: Add D4 pm domain support
Add support for the D4 power domain. This domain contains the Coresight-ETM hardware block. As long as the ARM debug/perf code doesn't use resource management with runtime PM support, the D4 power domain 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). Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile/pm-r8a7740.c')
-rw-r--r--arch/arm/mach-shmobile/pm-r8a7740.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/pm-r8a7740.c b/arch/arm/mach-shmobile/pm-r8a7740.c
index 081a4f9726a0..8b1af2a585ab 100644
--- a/arch/arm/mach-shmobile/pm-r8a7740.c
+++ b/arch/arm/mach-shmobile/pm-r8a7740.c
@@ -32,6 +32,16 @@ static int r8a7740_pd_a3sp_suspend(void)
return console_suspend_enabled ? 0 : -EBUSY;
}
+static int r8a7740_pd_d4_suspend(void)
+{
+ /*
+ * The D4 domain contains the Coresight-ETM hardware block and
+ * therefore it should only be turned off if the debug module is
+ * not in use.
+ */
+ return -EBUSY;
+}
+
static struct rmobile_pm_domain r8a7740_pm_domains[] = {
{
.genpd.name = "A4LC",
@@ -40,6 +50,11 @@ static struct rmobile_pm_domain r8a7740_pm_domains[] = {
.genpd.name = "A4MP",
.bit_shift = 2,
}, {
+ .genpd.name = "D4",
+ .bit_shift = 3,
+ .gov = &pm_domain_always_on_gov,
+ .suspend = r8a7740_pd_d4_suspend,
+ }, {
.genpd.name = "A3RV",
.bit_shift = 6,
}, {