diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-30 08:45:49 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-30 08:47:35 +0100 |
commit | cbe263497def23befb6f475977661bae5d1f82e4 (patch) | |
tree | 61d94af049ab285f0067c4a8e8a92c5763f1bd6f /arch/arm/mach-omap2/pm34xx.c | |
parent | 46e130d298a384b677426e19faec311749ff2677 (diff) |
ARM: pm: omap3: move saving of the auxiliary control registers to C
Move the saving of the auxiliary control registers into C; there's
no need for this to be in assembly code. This results in less
assembly code to deal with in OMAP.
Kevin tested full-chip retention and off on 3430/n900, 3530/Overo and
3630/Zoom3.
Tested-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap2/pm34xx.c')
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index e1c79bae7670..7238a63e24e2 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -306,9 +306,24 @@ static irqreturn_t prcm_interrupt_handler (int irq, void *dev_id) return IRQ_HANDLED; } +static void omap34xx_save_context(u32 *save) +{ + u32 val; + + /* Read Auxiliary Control Register */ + asm("mrc p15, 0, %0, c1, c0, 1" : "=r" (val)); + *save++ = 1; + *save++ = val; + + /* Read L2 AUX ctrl register */ + asm("mrc p15, 1, %0, c9, c0, 2" : "=r" (val)); + *save++ = 1; + *save++ = val; +} + static void omap34xx_do_sram_idle(unsigned long save_state) { - omap34xx_cpu_suspend(omap3_arm_context, save_state); + omap34xx_cpu_suspend(save_state); } void omap_sram_idle(void) @@ -408,6 +423,8 @@ void omap_sram_idle(void) * get saved. The rest is placed on the stack, and restored * from there before resuming. */ + if (save_state) + omap34xx_save_context(omap3_arm_context); if (save_state == 1 || save_state == 3) cpu_suspend(save_state, omap34xx_do_sram_idle); else |