aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2018-07-14 17:45:14 -0400
committerOlof Johansson <olof@lixom.net>2018-07-14 17:45:14 -0400
commitedc07c0012c1b9a40f6dfd44d90f71717d97df50 (patch)
tree86d4494f4b1f608f5c35ca8910568ddc731aca8d /include/linux/platform_data
parent5306c6ad0e4b10748849e98679d8ff788695fb44 (diff)
parent8c5a916f4c8815196cc8a86b9582ca89422aac25 (diff)
Merge tag 'omap-for-v4.19/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/soc
SoC updates for omaps for v4.19 merge window These changes are mostly PM related changes for am335x and am437x to support RTC only suspend mode. Some of the clock and driver related chances are still pending so it's not yet fully functional. Also included is a change for PM debug sysfs entry to use DEFINE_SHOW_ATTRIBUTE. * tag 'omap-for-v4.19/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: sleep33/43xx: Add RTC-Mode support ARM: OMAP2+: sleep33/43xx: Make sleep actions configurable ARM: OMAP2+: reuse DEFINE_SHOW_ATTRIBUTE() macro ARM: hwmod: RTC: Don't assume lock/unlock will be called with irq enabled Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/pm33xx.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/include/linux/platform_data/pm33xx.h b/include/linux/platform_data/pm33xx.h
index f9bed2a0af9d..fbf5ed73c7cc 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);
@@ -19,12 +42,15 @@ struct am33xx_pm_sram_addr {
19 unsigned long *resume_offset; 42 unsigned long *resume_offset;
20 unsigned long *emif_sram_table; 43 unsigned long *emif_sram_table;
21 unsigned long *ro_sram_data; 44 unsigned long *ro_sram_data;
45 unsigned long resume_address;
22}; 46};
23 47
24struct am33xx_pm_platform_data { 48struct am33xx_pm_platform_data {
25 int (*init)(void); 49 int (*init)(void);
26 int (*soc_suspend)(unsigned int state, int (*fn)(unsigned long)); 50 int (*soc_suspend)(unsigned int state, int (*fn)(unsigned long),
51 unsigned long args);
27 struct am33xx_pm_sram_addr *(*get_sram_addrs)(void); 52 struct am33xx_pm_sram_addr *(*get_sram_addrs)(void);
53 void __iomem *(*get_rtc_base_addr)(void);
28}; 54};
29 55
30struct am33xx_pm_sram_data { 56struct am33xx_pm_sram_data {
@@ -36,6 +62,7 @@ struct am33xx_pm_sram_data {
36struct am33xx_pm_ro_sram_data { 62struct am33xx_pm_ro_sram_data {
37 u32 amx3_pm_sram_data_virt; 63 u32 amx3_pm_sram_data_virt;
38 u32 amx3_pm_sram_data_phys; 64 u32 amx3_pm_sram_data_phys;
65 void __iomem *rtc_base_virt;
39} __packed __aligned(8); 66} __packed __aligned(8);
40 67
41#endif /* __ASSEMBLER__ */ 68#endif /* __ASSEMBLER__ */