X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=arch%2Farm%2Fmach-omap2%2Fpm24xx.c;h=423a9a957b8472e90e862af1720e7b3c2d1ede6e;hb=ee0839c22cdda7f2e5f06e2d0351e2b49e0975ff;hp=b8822f8b289184c46332732bc20ebe2ea5605cb3;hpb=6296e5d3c067df41980a5fd09ad4cc6765f79bb9;p=firefly-linux-kernel-4.4.55.git diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index b8822f8b2891..423a9a957b84 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c @@ -35,12 +35,14 @@ #include #include -#include #include #include #include #include +#include + +#include "iomap.h" #include "common.h" #include "prm2xxx_3xxx.h" #include "prm-regbits-24xx.h" @@ -49,7 +51,6 @@ #include "sdrc.h" #include "pm.h" #include "control.h" - #include "powerdomain.h" #include "clockdomain.h" @@ -260,26 +261,6 @@ static int omap2_pm_begin(suspend_state_t state) return 0; } -static int omap2_pm_suspend(void) -{ - u32 wken_wkup, mir1; - - wken_wkup = omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN); - wken_wkup &= ~OMAP24XX_EN_GPT1_MASK; - omap2_prm_write_mod_reg(wken_wkup, WKUP_MOD, PM_WKEN); - - /* Mask GPT1 */ - mir1 = omap_readl(0x480fe0a4); - omap_writel(1 << 5, 0x480fe0ac); - - omap2_enter_full_retention(); - - omap_writel(mir1, 0x480fe0a4); - omap2_prm_write_mod_reg(wken_wkup, WKUP_MOD, PM_WKEN); - - return 0; -} - static int omap2_pm_enter(suspend_state_t state) { int ret = 0; @@ -287,7 +268,7 @@ static int omap2_pm_enter(suspend_state_t state) switch (state) { case PM_SUSPEND_STANDBY: case PM_SUSPEND_MEM: - ret = omap2_pm_suspend(); + omap2_enter_full_retention(); break; default: ret = -EINVAL;