1
2
3
4
5
6
7
8
9 #ifndef _LINUX_PLATFORM_DATA_PM33XX_H
10 #define _LINUX_PLATFORM_DATA_PM33XX_H
11
12 #include <linux/kbuild.h>
13 #include <linux/types.h>
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
38 #ifndef __ASSEMBLER__
39 struct am33xx_pm_sram_addr {
40 void (*do_wfi)(void);
41 unsigned long *do_wfi_sz;
42 unsigned long *resume_offset;
43 unsigned long *emif_sram_table;
44 unsigned long *ro_sram_data;
45 unsigned long resume_address;
46 };
47
48 struct am33xx_pm_platform_data {
49 int (*init)(void);
50 int (*soc_suspend)(unsigned int state, int (*fn)(unsigned long),
51 unsigned long args);
52 struct am33xx_pm_sram_addr *(*get_sram_addrs)(void);
53 void __iomem *(*get_rtc_base_addr)(void);
54 void (*save_context)(void);
55 void (*restore_context)(void);
56 void (*prepare_rtc_suspend)(void);
57 void (*prepare_rtc_resume)(void);
58 int (*check_off_mode_enable)(void);
59 };
60
61 struct am33xx_pm_sram_data {
62 u32 wfi_flags;
63 u32 l2_aux_ctrl_val;
64 u32 l2_prefetch_ctrl_val;
65 } __packed __aligned(8);
66
67 struct am33xx_pm_ro_sram_data {
68 u32 amx3_pm_sram_data_virt;
69 u32 amx3_pm_sram_data_phys;
70 void __iomem *rtc_base_virt;
71 } __packed __aligned(8);
72
73 #endif
74 #endif