0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef _LINUX_PLATFORM_DATA_PM33XX_H
0010 #define _LINUX_PLATFORM_DATA_PM33XX_H
0011
0012 #include <linux/kbuild.h>
0013 #include <linux/types.h>
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 #define WFI_FLAG_FLUSH_CACHE BIT(0)
0033 #define WFI_FLAG_SELF_REFRESH BIT(1)
0034 #define WFI_FLAG_SAVE_EMIF BIT(2)
0035 #define WFI_FLAG_WAKE_M3 BIT(3)
0036 #define WFI_FLAG_RTC_ONLY BIT(4)
0037
0038 #ifndef __ASSEMBLER__
0039 struct am33xx_pm_sram_addr {
0040 void (*do_wfi)(void);
0041 unsigned long *do_wfi_sz;
0042 unsigned long *resume_offset;
0043 unsigned long *emif_sram_table;
0044 unsigned long *ro_sram_data;
0045 unsigned long resume_address;
0046 };
0047
0048 struct am33xx_pm_platform_data {
0049 int (*init)(int (*idle)(u32 wfi_flags));
0050 int (*deinit)(void);
0051 int (*soc_suspend)(unsigned int state, int (*fn)(unsigned long),
0052 unsigned long args);
0053 int (*cpu_suspend)(int (*fn)(unsigned long), unsigned long args);
0054 void (*begin_suspend)(void);
0055 void (*finish_suspend)(void);
0056 struct am33xx_pm_sram_addr *(*get_sram_addrs)(void);
0057 void (*save_context)(void);
0058 void (*restore_context)(void);
0059 int (*check_off_mode_enable)(void);
0060 };
0061
0062 struct am33xx_pm_sram_data {
0063 u32 wfi_flags;
0064 u32 l2_aux_ctrl_val;
0065 u32 l2_prefetch_ctrl_val;
0066 } __packed __aligned(8);
0067
0068 struct am33xx_pm_ro_sram_data {
0069 u32 amx3_pm_sram_data_virt;
0070 u32 amx3_pm_sram_data_phys;
0071 void __iomem *rtc_base_virt;
0072 } __packed __aligned(8);
0073
0074 #endif
0075 #endif