From 7e28b465fdea3f0601a1c76e47c50d05c7c603e2 Mon Sep 17 00:00:00 2001 From: Tero Kristo Date: Wed, 26 Feb 2014 12:00:16 +0200 Subject: ARM: OMAP3: PRM: add API for saving PRM scratchpad contents This isolates the PRM register access within the PRM driver. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/prm3xxx.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'arch/arm/mach-omap2/prm3xxx.c') diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c index 4733c28d9d64..4d93b844bcc4 100644 --- a/arch/arm/mach-omap2/prm3xxx.c +++ b/arch/arm/mach-omap2/prm3xxx.c @@ -409,6 +409,15 @@ int omap3xxx_prm_clear_global_cold_reset(void) return 0; } +void omap3_prm_save_scratchpad_contents(u32 *ptr) +{ + *ptr++ = omap2_prm_read_mod_reg(OMAP3430_GR_MOD, + OMAP3_PRM_CLKSRC_CTRL_OFFSET); + + *ptr++ = omap2_prm_read_mod_reg(OMAP3430_GR_MOD, + OMAP3_PRM_CLKSEL_OFFSET); +} + /* Powerdomain low-level functions */ static int omap3_pwrdm_set_next_pwrst(struct powerdomain *pwrdm, u8 pwrst) -- cgit v1.2.3