aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDave Gerlach <d-gerlach@ti.com>2018-07-09 03:33:16 -0400
committerTony Lindgren <tony@atomide.com>2018-07-10 02:01:34 -0400
commit74655749a58405e259eaaba66bfc391fdbe1e34e (patch)
tree236b3f2e858af9d8649d1794dd37321f37153547 /include/linux
parenteb07fe9f9f28d4ce441c5b51653d421725b0c998 (diff)
ARM: OMAP2+: sleep33/43xx: Make sleep actions configurable
Add an argument to the sleep33xx and sleep43xx code to allow us to set flags to determine which portions of the code get called in order to use the same code for multiple power saving modes. This patch allows us to decide whether or not we flush and disable caches, save EMIF context, put the memory into self refresh and disable the EMIF, and/or invoke the wkup_m3 when entering into WFI. Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/platform_data/pm33xx.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/include/linux/platform_data/pm33xx.h b/include/linux/platform_data/pm33xx.h
index f9bed2a0af9d..d231265c135c 100644
--- a/include/linux/platform_data/pm33xx.h
+++ b/include/linux/platform_data/pm33xx.h
@@ -12,6 +12,29 @@
12#include <linux/kbuild.h> 12#include <linux/kbuild.h>
13#include <linux/types.h> 13#include <linux/types.h>
14 14
15/*
16 * WFI Flags for sleep code control
17 *
18 * These flags allow PM code to exclude certain operations from happening
19 * in the low level ASM code found in sleep33xx.S and sleep43xx.S
20 *
21 * WFI_FLAG_FLUSH_CACHE: Flush the ARM caches and disable caching. Only
22 * needed when MPU will lose context.
23 * WFI_FLAG_SELF_REFRESH: Let EMIF place DDR memory into self-refresh and
24 * disable EMIF.
25 * WFI_FLAG_SAVE_EMIF: Save context of all EMIF registers and restore in
26 * resume path. Only needed if PER domain loses context
27 * and must also have WFI_FLAG_SELF_REFRESH set.
28 * WFI_FLAG_WAKE_M3: Disable MPU clock or clockdomain to cause wkup_m3 to
29 * execute when WFI instruction executes.
30 * WFI_FLAG_RTC_ONLY: Configure the RTC to enter RTC+DDR mode.
31 */
32#define WFI_FLAG_FLUSH_CACHE BIT(0)
33#define WFI_FLAG_SELF_REFRESH BIT(1)
34#define WFI_FLAG_SAVE_EMIF BIT(2)
35#define WFI_FLAG_WAKE_M3 BIT(3)
36#define WFI_FLAG_RTC_ONLY BIT(4)
37
15#ifndef __ASSEMBLER__ 38#ifndef __ASSEMBLER__
16struct am33xx_pm_sram_addr { 39struct am33xx_pm_sram_addr {
17 void (*do_wfi)(void); 40 void (*do_wfi)(void);
@@ -23,7 +46,8 @@ struct am33xx_pm_sram_addr {
23 46
24struct am33xx_pm_platform_data { 47struct am33xx_pm_platform_data {
25 int (*init)(void); 48 int (*init)(void);
26 int (*soc_suspend)(unsigned int state, int (*fn)(unsigned long)); 49 int (*soc_suspend)(unsigned int state, int (*fn)(unsigned long),
50 unsigned long args);
27 struct am33xx_pm_sram_addr *(*get_sram_addrs)(void); 51 struct am33xx_pm_sram_addr *(*get_sram_addrs)(void);
28}; 52};
29 53