diff options
author | Brian Swetland <swetland@google.com> | 2009-04-26 21:38:49 -0400 |
---|---|---|
committer | Daniel Walker <dwalker@codeaurora.org> | 2010-05-12 12:15:01 -0400 |
commit | 5b0f5a3f6084397194a8b556cdca572ad8e14f05 (patch) | |
tree | 1835a38df270d648ab55af164885389ec9579581 /arch/arm/mach-msm/smd_private.h | |
parent | 4d4fb2660ddd2d8131ebc3314e4c648fc0f4b8dd (diff) |
msm: smd: initial support for smd v2
- support both v2 and v1 style smd channels
- support both v2 and v1 smsm shared state
- update smsm state defines and smem item enum
- prep work for dealing with smd to qdsp6
- simplify some smem access to minimize use of smem_alloc() at runtime
Signed-off-by: Brian Swetland <swetland@google.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.h | 76 |
1 files changed, 55 insertions, 21 deletions
diff --git a/arch/arm/mach-msm/smd_private.h b/arch/arm/mach-msm/smd_private.h index c0eb3de1be54..732147c2f992 100644 --- a/arch/arm/mach-msm/smd_private.h +++ b/arch/arm/mach-msm/smd_private.h | |||
@@ -43,6 +43,7 @@ struct smem_proc_comm | |||
43 | #define PC_APPS 0 | 43 | #define PC_APPS 0 |
44 | #define PC_MODEM 1 | 44 | #define PC_MODEM 1 |
45 | 45 | ||
46 | #define VERSION_SMD 0 | ||
46 | #define VERSION_QDSP6 4 | 47 | #define VERSION_QDSP6 4 |
47 | #define VERSION_APPS_SBL 6 | 48 | #define VERSION_APPS_SBL 6 |
48 | #define VERSION_MODEM_SBL 7 | 49 | #define VERSION_MODEM_SBL 7 |
@@ -54,14 +55,17 @@ struct smem_shared | |||
54 | struct smem_proc_comm proc_comm[4]; | 55 | struct smem_proc_comm proc_comm[4]; |
55 | unsigned version[32]; | 56 | unsigned version[32]; |
56 | struct smem_heap_info heap_info; | 57 | struct smem_heap_info heap_info; |
57 | struct smem_heap_entry heap_toc[128]; | 58 | struct smem_heap_entry heap_toc[512]; |
58 | }; | 59 | }; |
59 | 60 | ||
60 | struct smsm_shared | 61 | #define SMSM_V1_SIZE (sizeof(unsigned) * 8) |
61 | { | 62 | #define SMSM_V1_STATE_APPS 0x0000 |
62 | unsigned host; | 63 | #define SMSM_V1_STATE_MODEM 0x0004 |
63 | unsigned state; | 64 | #define SMSM_V1_STATE_DSP 0x0008 |
64 | }; | 65 | |
66 | #define SMSM_V2_SIZE (sizeof(unsigned) * 4) | ||
67 | #define SMSM_V2_STATE_APPS 0x0004 | ||
68 | #define SMSM_V2_STATE_MODEM 0x000C | ||
65 | 69 | ||
66 | struct smsm_interrupt_info | 70 | struct smsm_interrupt_info |
67 | { | 71 | { |
@@ -76,21 +80,31 @@ struct smsm_interrupt_info | |||
76 | #define ID_SHARED_STATE SMEM_SMSM_SHARED_STATE | 80 | #define ID_SHARED_STATE SMEM_SMSM_SHARED_STATE |
77 | #define ID_CH_ALLOC_TBL SMEM_CHANNEL_ALLOC_TBL | 81 | #define ID_CH_ALLOC_TBL SMEM_CHANNEL_ALLOC_TBL |
78 | 82 | ||
79 | #define SMSM_INIT 0x000001 | 83 | #define SMSM_INIT 0x00000001 |
80 | #define SMSM_SMDINIT 0x000008 | 84 | #define SMSM_SMDINIT 0x00000008 |
81 | #define SMSM_RPCINIT 0x000020 | 85 | #define SMSM_RPCINIT 0x00000020 |
82 | #define SMSM_RESET 0x000040 | 86 | #define SMSM_RESET 0x00000040 |
83 | #define SMSM_RSA 0x0080 | 87 | #define SMSM_RSA 0x00000080 |
84 | #define SMSM_RUN 0x000100 | 88 | #define SMSM_RUN 0x00000100 |
85 | #define SMSM_PWRC 0x0200 | 89 | #define SMSM_PWRC 0x00000200 |
86 | #define SMSM_TIMEWAIT 0x0400 | 90 | #define SMSM_TIMEWAIT 0x00000400 |
87 | #define SMSM_TIMEINIT 0x0800 | 91 | #define SMSM_TIMEINIT 0x00000800 |
88 | #define SMSM_PWRC_EARLY_EXIT 0x1000 | 92 | #define SMSM_PWRC_EARLY_EXIT 0x00001000 |
89 | #define SMSM_WFPI 0x2000 | 93 | #define SMSM_WFPI 0x00002000 |
90 | #define SMSM_SLEEP 0x4000 | 94 | #define SMSM_SLEEP 0x00004000 |
91 | #define SMSM_SLEEPEXIT 0x8000 | 95 | #define SMSM_SLEEPEXIT 0x00008000 |
92 | #define SMSM_OEMSBL_RELEASE 0x10000 | 96 | #define SMSM_APPS_REBOOT 0x00020000 |
93 | #define SMSM_PWRC_SUSPEND 0x200000 | 97 | #define SMSM_SYSTEM_POWER_DOWN 0x00040000 |
98 | #define SMSM_SYSTEM_REBOOT 0x00080000 | ||
99 | #define SMSM_SYSTEM_DOWNLOAD 0x00100000 | ||
100 | #define SMSM_PWRC_SUSPEND 0x00200000 | ||
101 | #define SMSM_APPS_SHUTDOWN 0x00400000 | ||
102 | #define SMSM_SMD_LOOPBACK 0x00800000 | ||
103 | #define SMSM_RUN_QUIET 0x01000000 | ||
104 | #define SMSM_MODEM_WAIT 0x02000000 | ||
105 | #define SMSM_MODEM_BREAK 0x04000000 | ||
106 | #define SMSM_MODEM_CONTINUE 0x08000000 | ||
107 | #define SMSM_UNKNOWN 0x80000000 | ||
94 | 108 | ||
95 | #define SMSM_WKUP_REASON_RPC 0x00000001 | 109 | #define SMSM_WKUP_REASON_RPC 0x00000001 |
96 | #define SMSM_WKUP_REASON_INT 0x00000002 | 110 | #define SMSM_WKUP_REASON_INT 0x00000002 |
@@ -165,6 +179,26 @@ typedef enum | |||
165 | SMEM_ID_VENDOR1, | 179 | SMEM_ID_VENDOR1, |
166 | SMEM_ID_VENDOR2, | 180 | SMEM_ID_VENDOR2, |
167 | SMEM_HW_SW_BUILD_ID, | 181 | SMEM_HW_SW_BUILD_ID, |
182 | SMEM_SMD_BLOCK_PORT_BASE_ID, | ||
183 | SMEM_SMD_BLOCK_PORT_PROC0_HEAP = SMEM_SMD_BLOCK_PORT_BASE_ID + SMEM_NUM_SMD_CHANNELS, | ||
184 | SMEM_SMD_BLOCK_PORT_PROC1_HEAP = SMEM_SMD_BLOCK_PORT_PROC0_HEAP + SMEM_NUM_SMD_CHANNELS, | ||
185 | SMEM_I2C_MUTEX = SMEM_SMD_BLOCK_PORT_PROC1_HEAP + SMEM_NUM_SMD_CHANNELS, | ||
186 | SMEM_SCLK_CONVERSION, | ||
187 | SMEM_SMD_SMSM_INTR_MUX, | ||
188 | SMEM_SMSM_CPU_INTR_MASK, | ||
189 | SMEM_APPS_DEM_SLAVE_DATA, | ||
190 | SMEM_QDSP6_DEM_SLAVE_DATA, | ||
191 | SMEM_CLKREGIM_BSP, | ||
192 | SMEM_CLKREGIM_SOURCES, | ||
193 | SMEM_SMD_FIFO_BASE_ID, | ||
194 | SMEM_USABLE_RAM_PARTITION_TABLE = SMEM_SMD_FIFO_BASE_ID + SMEM_NUM_SMD_CHANNELS, | ||
195 | SMEM_POWER_ON_STATUS_INFO, | ||
196 | SMEM_DAL_AREA, | ||
197 | SMEM_SMEM_LOG_POWER_IDX, | ||
198 | SMEM_SMEM_LOG_POWER_WRAP, | ||
199 | SMEM_SMEM_LOG_POWER_EVENTS, | ||
200 | SMEM_ERR_CRASH_LOG, | ||
201 | SMEM_ERR_F3_TRACE_LOG, | ||
168 | SMEM_NUM_ITEMS, | 202 | SMEM_NUM_ITEMS, |
169 | } smem_mem_type; | 203 | } smem_mem_type; |
170 | 204 | ||