Thread (3 messages) flat view 3 messages, 2 authors, 2012-08-18

Re: [PATCH] ARM: shmobile: Add A4S cpuidle state on sh7372

From: Magnus Damm <magnus.damm@gmail.com>
Date: 2012-08-17 09:10:15
Also in: lkml

Hi Rafael,

Thanks for your patch. Please see below for my comment.

On Fri, Aug 17, 2012 at 5:10 AM, Rafael J. Wysocki [off-list ref] wrote:
Add a "C5" cpuidle state to the SH7372 SoC connected to the A4S power
domain in such a way that A4S may be turned off by cpuidle if all
I/O devices in that domain have been suspended (or do not have
attached drivers).

This requires some reorganization of the initialization of SH7372
power management which affects the the boards based on it, Mackerel
and AP4EVB.

Signed-off-by: Rafael J. Wysocki <redacted>
---
[snip]
quoted hunk ↗ jump to hunk
--- linux.orig/arch/arm/mach-shmobile/pm-sh7372.c
+++ linux/arch/arm/mach-shmobile/pm-sh7372.c
@@ -339,6 +339,21 @@ static void sh7372_enter_a3sm_common(int
        sh7372_set_reset_vector(__pa(sh7372_resume_core_standby_sysc));
        sh7372_enter_sysc(pllc0_on, 1 << 12);
 }
+
+static void sh7372_enter_a4s_common(int pllc0_on)
+{
+       sh7372_intca_suspend();
+       sh7372_enter_sysc(pllc0_on, 1 << 10);
+       sh7372_intca_resume();
+}
+
+static void sh7372_pm_setup_smfram(void)
+{
+       memcpy((void *)SMFRAM, sh7372_resume_core_standby_sysc, 0x100);
+       sh7372_set_reset_vector(SMFRAM);
+}
I believe the reset vector is being setup dynamically depending on the
sleep mode, so you probably want to move sh7372_set_reset_vector()
into sh7372_enter_a4s_common().

Cheers,

/ magnus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help