aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-msm/include/mach/msm_smd.h5
-rw-r--r--arch/arm/mach-msm/proc_comm.h4
-rw-r--r--arch/arm/mach-msm/smd.c8
-rw-r--r--arch/arm/mach-msm/smd_private.h24
4 files changed, 17 insertions, 24 deletions
diff --git a/arch/arm/mach-msm/include/mach/msm_smd.h b/arch/arm/mach-msm/include/mach/msm_smd.h
index aa076e466e4c..029463ec8756 100644
--- a/arch/arm/mach-msm/include/mach/msm_smd.h
+++ b/arch/arm/mach-msm/include/mach/msm_smd.h
@@ -19,6 +19,8 @@
19 19
20typedef struct smd_channel smd_channel_t; 20typedef struct smd_channel smd_channel_t;
21 21
22extern int (*msm_check_for_modem_crash)(void);
23
22/* warning: notify() may be called before open returns */ 24/* warning: notify() may be called before open returns */
23int smd_open(const char *name, smd_channel_t **ch, void *priv, 25int smd_open(const char *name, smd_channel_t **ch, void *priv,
24 void (*notify)(void *priv, unsigned event)); 26 void (*notify)(void *priv, unsigned event));
@@ -63,8 +65,7 @@ int smd_wait_until_readable(smd_channel_t *ch, int bytes);
63int smd_wait_until_writable(smd_channel_t *ch, int bytes); 65int smd_wait_until_writable(smd_channel_t *ch, int bytes);
64#endif 66#endif
65 67
66typedef enum 68typedef enum {
67{
68 SMD_PORT_DS = 0, 69 SMD_PORT_DS = 0,
69 SMD_PORT_DIAG, 70 SMD_PORT_DIAG,
70 SMD_PORT_RPC_CALL, 71 SMD_PORT_RPC_CALL,
diff --git a/arch/arm/mach-msm/proc_comm.h b/arch/arm/mach-msm/proc_comm.h
index 235076533c03..0f5cdd345eb7 100644
--- a/arch/arm/mach-msm/proc_comm.h
+++ b/arch/arm/mach-msm/proc_comm.h
@@ -217,8 +217,8 @@ enum vreg_pdown_id {
217}; 217};
218 218
219enum { 219enum {
220 PCOM_CLKRGM_APPS_RESET_USB_PHY = 34, 220 PCOM_CLKRGM_APPS_RESET_USB_PHY = 34,
221 PCOM_CLKRGM_APPS_RESET_USBH = 37, 221 PCOM_CLKRGM_APPS_RESET_USBH = 37,
222}; 222};
223 223
224/* gpio info for PCOM_RPC_GPIO_TLMM_CONFIG_EX */ 224/* gpio info for PCOM_RPC_GPIO_TLMM_CONFIG_EX */
diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
index b6966680a2d8..b864592cbe05 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -123,8 +123,6 @@ static void handle_modem_crash(void)
123 ; 123 ;
124} 124}
125 125
126extern int (*msm_check_for_modem_crash)(void);
127
128uint32_t raw_smsm_get_state(enum smsm_state_item item) 126uint32_t raw_smsm_get_state(enum smsm_state_item item)
129{ 127{
130 return readl(smd_info.state + item * 4); 128 return readl(smd_info.state + item * 4);
@@ -904,9 +902,9 @@ static irqreturn_t smsm_irq_handler(int irq, void *data)
904 902
905 if (msm_smd_debug_mask & MSM_SMSM_DEBUG) 903 if (msm_smd_debug_mask & MSM_SMSM_DEBUG)
906 pr_info("<SM %08x %08x>\n", apps, modm); 904 pr_info("<SM %08x %08x>\n", apps, modm);
907 if (modm & SMSM_RESET) { 905 if (modm & SMSM_RESET)
908 handle_modem_crash(); 906 handle_modem_crash();
909 } 907
910 do_smd_probe(); 908 do_smd_probe();
911 909
912 spin_unlock_irqrestore(&smem_lock, flags); 910 spin_unlock_irqrestore(&smem_lock, flags);
@@ -1056,8 +1054,6 @@ int smd_core_init(void)
1056 return 0; 1054 return 0;
1057} 1055}
1058 1056
1059extern void msm_init_last_radio_log(struct module *);
1060
1061static int __init msm_smd_probe(struct platform_device *pdev) 1057static int __init msm_smd_probe(struct platform_device *pdev)
1062{ 1058{
1063 pr_info("smd_init()\n"); 1059 pr_info("smd_init()\n");
diff --git a/arch/arm/mach-msm/smd_private.h b/arch/arm/mach-msm/smd_private.h
index 2da758e65025..33a33f1b01f8 100644
--- a/arch/arm/mach-msm/smd_private.h
+++ b/arch/arm/mach-msm/smd_private.h
@@ -20,24 +20,21 @@
20#include <linux/spinlock.h> 20#include <linux/spinlock.h>
21#include <linux/list.h> 21#include <linux/list.h>
22 22
23struct smem_heap_info 23struct smem_heap_info {
24{
25 unsigned initialized; 24 unsigned initialized;
26 unsigned free_offset; 25 unsigned free_offset;
27 unsigned heap_remaining; 26 unsigned heap_remaining;
28 unsigned reserved; 27 unsigned reserved;
29}; 28};
30 29
31struct smem_heap_entry 30struct smem_heap_entry {
32{
33 unsigned allocated; 31 unsigned allocated;
34 unsigned offset; 32 unsigned offset;
35 unsigned size; 33 unsigned size;
36 unsigned reserved; 34 unsigned reserved;
37}; 35};
38 36
39struct smem_proc_comm 37struct smem_proc_comm {
40{
41 unsigned command; 38 unsigned command;
42 unsigned status; 39 unsigned status;
43 unsigned data1; 40 unsigned data1;
@@ -54,8 +51,7 @@ struct smem_proc_comm
54#define VERSION_APPS 8 51#define VERSION_APPS 8
55#define VERSION_MODEM 9 52#define VERSION_MODEM 9
56 53
57struct smem_shared 54struct smem_shared {
58{
59 struct smem_proc_comm proc_comm[4]; 55 struct smem_proc_comm proc_comm[4];
60 unsigned version[32]; 56 unsigned version[32];
61 struct smem_heap_info heap_info; 57 struct smem_heap_info heap_info;
@@ -66,8 +62,7 @@ struct smem_shared
66#define SMSM_V2_SIZE (sizeof(unsigned) * 4) 62#define SMSM_V2_SIZE (sizeof(unsigned) * 4)
67 63
68#ifndef CONFIG_ARCH_MSM_SCORPION 64#ifndef CONFIG_ARCH_MSM_SCORPION
69struct smsm_interrupt_info 65struct smsm_interrupt_info {
70{
71 uint32_t interrupt_mask; 66 uint32_t interrupt_mask;
72 uint32_t pending_interrupts; 67 uint32_t pending_interrupts;
73 uint32_t wakeup_reason; 68 uint32_t wakeup_reason;
@@ -156,8 +151,7 @@ void smsm_print_sleep_info(void);
156 151
157#define SMEM_NUM_SMD_CHANNELS 64 152#define SMEM_NUM_SMD_CHANNELS 64
158 153
159typedef enum 154typedef enum {
160{
161 /* fixed items */ 155 /* fixed items */
162 SMEM_PROC_COMM = 0, 156 SMEM_PROC_COMM = 0,
163 SMEM_HEAP_INFO, 157 SMEM_HEAP_INFO,
@@ -232,7 +226,7 @@ typedef enum
232 SMEM_SMEM_LOG_POWER_WRAP, 226 SMEM_SMEM_LOG_POWER_WRAP,
233 SMEM_SMEM_LOG_POWER_EVENTS, 227 SMEM_SMEM_LOG_POWER_EVENTS,
234 SMEM_ERR_CRASH_LOG, 228 SMEM_ERR_CRASH_LOG,
235 SMEM_ERR_F3_TRACE_LOG, 229 SMEM_ERR_F3_TRACE_LOG,
236 SMEM_NUM_ITEMS, 230 SMEM_NUM_ITEMS,
237} smem_mem_type; 231} smem_mem_type;
238 232
@@ -281,7 +275,7 @@ struct smd_shared_v1 {
281struct smd_shared_v2 { 275struct smd_shared_v2 {
282 struct smd_half_channel ch0; 276 struct smd_half_channel ch0;
283 struct smd_half_channel ch1; 277 struct smd_half_channel ch1;
284}; 278};
285 279
286struct smd_channel { 280struct smd_channel {
287 volatile struct smd_half_channel *send; 281 volatile struct smd_half_channel *send;
@@ -334,4 +328,6 @@ void *smem_find(unsigned id, unsigned size);
334void *smem_item(unsigned id, unsigned *size); 328void *smem_item(unsigned id, unsigned *size);
335uint32_t raw_smsm_get_state(enum smsm_state_item item); 329uint32_t raw_smsm_get_state(enum smsm_state_item item);
336 330
331extern void msm_init_last_radio_log(struct module *);
332
337#endif 333#endif