ARM: OMAP2+: Move most of plat/io.h into local iomap.h
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-omap2 / pm24xx.c
index b8822f8b289184c46332732bc20ebe2ea5605cb3..423a9a957b8472e90e862af1720e7b3c2d1ede6e 100644 (file)
 #include <asm/mach/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/irqs.h>
 #include <plat/clock.h>
 #include <plat/sram.h>
 #include <plat/dma.h>
 #include <plat/board.h>
 
+#include <mach/irqs.h>
+
+#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;