]> Pileus Git - ~andy/linux/blobdiff - include/asm-arm/arch-omap/pm.h
fix file specification in comments
[~andy/linux] / include / asm-arm / arch-omap / pm.h
index fbd742d0c49997fc46e5ddc1299dd9d399242389..14588059981f99cf8f8f299d5f79292c1b8e9fb0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/include/asm/arch-omap/pm.h
+ * linux/include/asm-arm/arch-omap/pm.h
  *
  * Header file for OMAP Power Management Routines
  *
@@ -49,7 +49,7 @@
 
 /*
  * ----------------------------------------------------------------------------
- * Powermanagement bitmasks
+ * Power management bitmasks
  * ----------------------------------------------------------------------------
  */
 #define IDLE_WAIT_CYCLES               0x00000fff
 #define OMAP1610_IDLECT3               0xfffece24
 #define OMAP1610_IDLE_LOOP_REQUEST     0x0400
 
-#if     !defined(CONFIG_ARCH_OMAP1510) && \
+#define OMAP730_IDLECT1_SLEEP_VAL      0x16c7
+#define OMAP730_IDLECT2_SLEEP_VAL      0x09c7
+#define OMAP730_IDLECT3_VAL            0x3f
+#define OMAP730_IDLECT3                0xfffece24
+#define OMAP730_IDLE_LOOP_REQUEST      0x0C00
+
+#if     !defined(CONFIG_ARCH_OMAP730) && \
+       !defined(CONFIG_ARCH_OMAP15XX) && \
        !defined(CONFIG_ARCH_OMAP16XX) && \
        !defined(CONFIG_ARCH_OMAP24XX)
 #error "Power management for this processor not implemented yet"
 #endif
 
 #ifndef __ASSEMBLER__
+
+#include <linux/clk.h>
+
+extern void prevent_idle_sleep(void);
+extern void allow_idle_sleep(void);
+
+/**
+ * clk_deny_idle - Prevents the clock from being idled during MPU idle
+ * @clk: clock signal handle
+ */
+void clk_deny_idle(struct clk *clk);
+
+/**
+ * clk_allow_idle - Counters previous clk_deny_idle
+ * @clk: clock signal handle
+ */
+void clk_deny_idle(struct clk *clk);
+
 extern void omap_pm_idle(void);
 extern void omap_pm_suspend(void);
+extern void omap730_cpu_suspend(unsigned short, unsigned short);
 extern void omap1510_cpu_suspend(unsigned short, unsigned short);
 extern void omap1610_cpu_suspend(unsigned short, unsigned short);
+extern void omap24xx_cpu_suspend(u32 dll_ctrl, u32 cpu_revision);
+extern void omap730_idle_loop_suspend(void);
 extern void omap1510_idle_loop_suspend(void);
 extern void omap1610_idle_loop_suspend(void);
+extern void omap24xx_idle_loop_suspend(void);
+
+extern unsigned int omap730_cpu_suspend_sz;
+extern unsigned int omap1510_cpu_suspend_sz;
+extern unsigned int omap1610_cpu_suspend_sz;
+extern unsigned int omap24xx_cpu_suspend_sz;
+extern unsigned int omap730_idle_loop_suspend_sz;
+extern unsigned int omap1510_idle_loop_suspend_sz;
+extern unsigned int omap1610_idle_loop_suspend_sz;
+extern unsigned int omap24xx_idle_loop_suspend_sz;
 
 #ifdef CONFIG_OMAP_SERIAL_WAKE
 extern void omap_serial_wake_trigger(int enable);
 #else
+#define omap_serial_wakeup_init()      {}
 #define omap_serial_wake_trigger(x)    {}
 #endif /* CONFIG_OMAP_SERIAL_WAKE */
 
-extern unsigned int omap1510_cpu_suspend_sz;
-extern unsigned int omap1510_idle_loop_suspend_sz;
-extern unsigned int omap1610_cpu_suspend_sz;
-extern unsigned int omap1610_idle_loop_suspend_sz;
-
 #define ARM_SAVE(x) arm_sleep_save[ARM_SLEEP_SAVE_##x] = omap_readl(x)
 #define ARM_RESTORE(x) omap_writel((arm_sleep_save[ARM_SLEEP_SAVE_##x]), (x))
 #define ARM_SHOW(x) arm_sleep_save[ARM_SLEEP_SAVE_##x]
 
+#define DSP_SAVE(x) dsp_sleep_save[DSP_SLEEP_SAVE_##x] = __raw_readw(x)
+#define DSP_RESTORE(x) __raw_writew((dsp_sleep_save[DSP_SLEEP_SAVE_##x]), (x))
+#define DSP_SHOW(x) dsp_sleep_save[DSP_SLEEP_SAVE_##x]
+
 #define ULPD_SAVE(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x] = omap_readw(x)
 #define ULPD_RESTORE(x) omap_writew((ulpd_sleep_save[ULPD_SLEEP_SAVE_##x]), (x))
 #define ULPD_SHOW(x) ulpd_sleep_save[ULPD_SLEEP_SAVE_##x]
 
+#define MPUI730_SAVE(x) mpui730_sleep_save[MPUI730_SLEEP_SAVE_##x] = omap_readl(x)
+#define MPUI730_RESTORE(x) omap_writel((mpui730_sleep_save[MPUI730_SLEEP_SAVE_##x]), (x))
+#define MPUI730_SHOW(x) mpui730_sleep_save[MPUI730_SLEEP_SAVE_##x]
+
 #define MPUI1510_SAVE(x) mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x] = omap_readl(x)
 #define MPUI1510_RESTORE(x) omap_writel((mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x]), (x))
 #define MPUI1510_SHOW(x) mpui1510_sleep_save[MPUI1510_SLEEP_SAVE_##x]
@@ -139,6 +181,10 @@ extern unsigned int omap1610_idle_loop_suspend_sz;
 #define MPUI1610_RESTORE(x) omap_writel((mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x]), (x))
 #define MPUI1610_SHOW(x) mpui1610_sleep_save[MPUI1610_SLEEP_SAVE_##x]
 
+#define OMAP24XX_SAVE(x) omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x] = x
+#define OMAP24XX_RESTORE(x) x = omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x]
+#define OMAP24XX_SHOW(x) omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_##x]
+
 /*
  * List of global OMAP registers to preserve.
  * More ones like CP and general purpose register values are preserved
@@ -161,6 +207,15 @@ enum arm_save_state {
        ARM_SLEEP_SAVE_SIZE
 };
 
+enum dsp_save_state {
+       DSP_SLEEP_SAVE_START = 0,
+       /*
+        * DSP registers 16 bits
+        */
+       DSP_SLEEP_SAVE_DSP_IDLECT2,
+       DSP_SLEEP_SAVE_SIZE
+};
+
 enum ulpd_save_state {
        ULPD_SLEEP_SAVE_START = 0,
        /*
@@ -188,13 +243,34 @@ enum mpui1510_save_state {
        MPUI1510_SLEEP_SAVE_EMIFS_CONFIG,
        MPUI1510_SLEEP_SAVE_OMAP_IH1_MIR,
        MPUI1510_SLEEP_SAVE_OMAP_IH2_MIR,
-#if defined(CONFIG_ARCH_OMAP1510)
+#if defined(CONFIG_ARCH_OMAP15XX)
        MPUI1510_SLEEP_SAVE_SIZE
 #else
        MPUI1510_SLEEP_SAVE_SIZE = 0
 #endif
 };
 
+enum mpui730_save_state {
+       MPUI730_SLEEP_SAVE_START = 0,
+       /*
+        * MPUI registers 32 bits
+        */
+       MPUI730_SLEEP_SAVE_MPUI_CTRL,
+       MPUI730_SLEEP_SAVE_MPUI_DSP_BOOT_CONFIG,
+       MPUI730_SLEEP_SAVE_MPUI_DSP_API_CONFIG,
+       MPUI730_SLEEP_SAVE_MPUI_DSP_STATUS,
+       MPUI730_SLEEP_SAVE_EMIFF_SDRAM_CONFIG,
+       MPUI730_SLEEP_SAVE_EMIFS_CONFIG,
+       MPUI730_SLEEP_SAVE_OMAP_IH1_MIR,
+       MPUI730_SLEEP_SAVE_OMAP_IH2_0_MIR,
+       MPUI730_SLEEP_SAVE_OMAP_IH2_1_MIR,
+#if defined(CONFIG_ARCH_OMAP730)
+       MPUI730_SLEEP_SAVE_SIZE
+#else
+       MPUI730_SLEEP_SAVE_SIZE = 0
+#endif
+};
+
 enum mpui1610_save_state {
        MPUI1610_SLEEP_SAVE_START = 0,
        /*
@@ -218,5 +294,63 @@ enum mpui1610_save_state {
 #endif
 };
 
+enum omap24xx_save_state {
+       OMAP24XX_SLEEP_SAVE_START = 0,
+       OMAP24XX_SLEEP_SAVE_INTC_MIR0,
+       OMAP24XX_SLEEP_SAVE_INTC_MIR1,
+       OMAP24XX_SLEEP_SAVE_INTC_MIR2,
+
+       OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_MPU,
+       OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_CORE,
+       OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_GFX,
+       OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_DSP,
+       OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_MDM,
+
+       OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_MPU,
+       OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_CORE,
+       OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_GFX,
+       OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_DSP,
+       OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_MDM,
+
+       OMAP24XX_SLEEP_SAVE_CM_IDLEST1_CORE,
+       OMAP24XX_SLEEP_SAVE_CM_IDLEST2_CORE,
+       OMAP24XX_SLEEP_SAVE_CM_IDLEST3_CORE,
+       OMAP24XX_SLEEP_SAVE_CM_IDLEST4_CORE,
+       OMAP24XX_SLEEP_SAVE_CM_IDLEST_GFX,
+       OMAP24XX_SLEEP_SAVE_CM_IDLEST_WKUP,
+       OMAP24XX_SLEEP_SAVE_CM_IDLEST_CKGEN,
+       OMAP24XX_SLEEP_SAVE_CM_IDLEST_DSP,
+       OMAP24XX_SLEEP_SAVE_CM_IDLEST_MDM,
+
+       OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE1_CORE,
+       OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE2_CORE,
+       OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE3_CORE,
+       OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE4_CORE,
+       OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_WKUP,
+       OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_PLL,
+       OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_DSP,
+       OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_MDM,
+
+       OMAP24XX_SLEEP_SAVE_CM_FCLKEN1_CORE,
+       OMAP24XX_SLEEP_SAVE_CM_FCLKEN2_CORE,
+       OMAP24XX_SLEEP_SAVE_CM_ICLKEN1_CORE,
+       OMAP24XX_SLEEP_SAVE_CM_ICLKEN2_CORE,
+       OMAP24XX_SLEEP_SAVE_CM_ICLKEN3_CORE,
+       OMAP24XX_SLEEP_SAVE_CM_ICLKEN4_CORE,
+       OMAP24XX_SLEEP_SAVE_GPIO1_IRQENABLE1,
+       OMAP24XX_SLEEP_SAVE_GPIO2_IRQENABLE1,
+       OMAP24XX_SLEEP_SAVE_GPIO3_IRQENABLE1,
+       OMAP24XX_SLEEP_SAVE_GPIO4_IRQENABLE1,
+       OMAP24XX_SLEEP_SAVE_GPIO3_OE,
+       OMAP24XX_SLEEP_SAVE_GPIO4_OE,
+       OMAP24XX_SLEEP_SAVE_GPIO3_RISINGDETECT,
+       OMAP24XX_SLEEP_SAVE_GPIO3_FALLINGDETECT,
+       OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SPI1_NCS2,
+       OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_MCBSP1_DX,
+       OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SSI1_FLAG_TX,
+       OMAP24XX_SLEEP_SAVE_CONTROL_PADCONF_SYS_NIRQW0,
+       OMAP24XX_SLEEP_SAVE_SIZE
+};
+
 #endif /* ASSEMBLER */
 #endif /* __ASM_ARCH_OMAP_PM_H */