aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-msm/smd_private.h
diff options
context:
space:
mode:
authorArve Hjønnevåg <arve@android.com>2009-05-20 19:52:36 -0400
committerDaniel Walker <dwalker@codeaurora.org>2010-05-12 12:15:03 -0400
commit283794100d2b1c1645b2949273aa4be29929812d (patch)
tree30c371ec32ff2d8767ec3b3fb72c7a0b32c0e513 /arch/arm/mach-msm/smd_private.h
parent5b0f5a3f6084397194a8b556cdca572ad8e14f05 (diff)
[ARM] msm: Add item argument to smsm_change_state and smsm_get_state
The new protocol require writing to two state fields, and reading several fields. Signed-off-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
Diffstat (limited to 'arch/arm/mach-msm/smd_private.h')
-rw-r--r--arch/arm/mach-msm/smd_private.h30
1 files changed, 22 insertions, 8 deletions
diff --git a/arch/arm/mach-msm/smd_private.h b/arch/arm/mach-msm/smd_private.h
index 732147c2f992..35e08359bbdb 100644
--- a/arch/arm/mach-msm/smd_private.h
+++ b/arch/arm/mach-msm/smd_private.h
@@ -59,13 +59,7 @@ struct smem_shared
59}; 59};
60 60
61#define SMSM_V1_SIZE (sizeof(unsigned) * 8) 61#define SMSM_V1_SIZE (sizeof(unsigned) * 8)
62#define SMSM_V1_STATE_APPS 0x0000
63#define SMSM_V1_STATE_MODEM 0x0004
64#define SMSM_V1_STATE_DSP 0x0008
65
66#define SMSM_V2_SIZE (sizeof(unsigned) * 4) 62#define SMSM_V2_SIZE (sizeof(unsigned) * 4)
67#define SMSM_V2_STATE_APPS 0x0004
68#define SMSM_V2_STATE_MODEM 0x000C
69 63
70struct smsm_interrupt_info 64struct smsm_interrupt_info
71{ 65{
@@ -113,9 +107,29 @@ struct smsm_interrupt_info
113#define SMSM_WKUP_REASON_ALARM 0x00000010 107#define SMSM_WKUP_REASON_ALARM 0x00000010
114#define SMSM_WKUP_REASON_RESET 0x00000020 108#define SMSM_WKUP_REASON_RESET 0x00000020
115 109
110#ifndef CONFIG_ARCH_MSM_SCORPION
111enum smsm_state_item {
112 SMSM_STATE_APPS = 1,
113 SMSM_STATE_MODEM = 3,
114 SMSM_STATE_COUNT,
115};
116#else
117enum smsm_state_item {
118 SMSM_STATE_APPS,
119 SMSM_STATE_MODEM,
120 SMSM_STATE_HEXAGON,
121 SMSM_STATE_APPS_DEM,
122 SMSM_STATE_MODEM_DEM,
123 SMSM_STATE_QDSP6_DEM,
124 SMSM_STATE_POWER_MASTER_DEM,
125 SMSM_STATE_TIME_MASTER_DEM,
126 SMSM_STATE_COUNT,
127};
128#endif
129
116void *smem_alloc(unsigned id, unsigned size); 130void *smem_alloc(unsigned id, unsigned size);
117int smsm_change_state(uint32_t clear_mask, uint32_t set_mask); 131int smsm_change_state(enum smsm_state_item item, uint32_t clear_mask, uint32_t set_mask);
118uint32_t smsm_get_state(void); 132uint32_t smsm_get_state(enum smsm_state_item item);
119int smsm_set_sleep_duration(uint32_t delay); 133int smsm_set_sleep_duration(uint32_t delay);
120int smsm_set_interrupt_info(struct smsm_interrupt_info *info); 134int smsm_set_interrupt_info(struct smsm_interrupt_info *info);
121void smsm_print_sleep_info(void); 135void smsm_print_sleep_info(void);