diff options
author | Tero Kristo <t-kristo@ti.com> | 2014-02-26 14:31:05 +0100 |
---|---|---|
committer | Tero Kristo <t-kristo@ti.com> | 2014-07-04 16:02:16 +0200 |
commit | 6bdc4b44b3acc95655b061a88c951c6d9742d8e3 (patch) | |
tree | 025428926f739a7fcc448581706fb63d44ed8614 /arch/arm/mach-omap2/prm2xxx.c | |
parent | ARM: OMAP3: PRM: add API for saving PRM scratchpad contents (diff) | |
download | linux-6bdc4b44b3acc95655b061a88c951c6d9742d8e3.tar.xz linux-6bdc4b44b3acc95655b061a88c951c6d9742d8e3.zip |
ARM: OMAP24xx: PRM: add API for clearing wakeup status bits
This helps to isolate the PRM into its own driver.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/prm2xxx.c')
-rw-r--r-- | arch/arm/mach-omap2/prm2xxx.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/prm2xxx.c b/arch/arm/mach-omap2/prm2xxx.c index a3a3cca2bcc4..86958050547a 100644 --- a/arch/arm/mach-omap2/prm2xxx.c +++ b/arch/arm/mach-omap2/prm2xxx.c @@ -114,6 +114,24 @@ void omap2xxx_prm_dpll_reset(void) omap2_prm_read_mod_reg(WKUP_MOD, OMAP2_RM_RSTCTRL); } +/** + * omap2xxx_prm_clear_mod_irqs - clear wakeup status bits for a module + * @module: PRM module to clear wakeups from + * @regs: register offset to clear + * @wkst_mask: wakeup status mask to clear + * + * Clears wakeup status bits for a given module, so that the device can + * re-enter idle. + */ +void omap2xxx_prm_clear_mod_irqs(s16 module, u8 regs, u32 wkst_mask) +{ + u32 wkst; + + wkst = omap2_prm_read_mod_reg(module, regs); + wkst &= wkst_mask; + omap2_prm_write_mod_reg(wkst, module, regs); +} + int omap2xxx_clkdm_sleep(struct clockdomain *clkdm) { omap2_prm_set_mod_reg_bits(OMAP24XX_FORCESTATE_MASK, |