summaryrefslogtreecommitdiff
path: root/arch/arm/mach-msm/smd.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-10-01 14:15:02 -0700
committerOlof Johansson <olof@lixom.net>2012-10-01 14:15:02 -0700
commited0a0ed0a4e0e6eeebfa154f97ebb41abc5bbee8 (patch)
tree3ca115b6580b70b20d21da179f004b14f54edc8e /arch/arm/mach-msm/smd.c
parent17a505edb09495510ac8998450980472c412455b (diff)
parent9cf1c871526cf6bfec2a653e1e068ee72592542c (diff)
downloadlinux-3.10-ed0a0ed0a4e0e6eeebfa154f97ebb41abc5bbee8.tar.gz
linux-3.10-ed0a0ed0a4e0e6eeebfa154f97ebb41abc5bbee8.tar.bz2
linux-3.10-ed0a0ed0a4e0e6eeebfa154f97ebb41abc5bbee8.zip
Merge branch 'next/cleanup' into HEAD
Conflicts: drivers/staging/tidspbridge/core/wdt.c drivers/usb/host/Kconfig drivers/w1/masters/omap_hdq.c
Diffstat (limited to 'arch/arm/mach-msm/smd.c')
-rw-r--r--arch/arm/mach-msm/smd.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
index 657be73297d..c5a2eddc6cd 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -30,7 +30,6 @@
#include <linux/delay.h>
#include <mach/msm_smd.h>
-#include <mach/system.h>
#include "smd_private.h"
#include "proc_comm.h"
@@ -39,8 +38,6 @@
#define CONFIG_QDSP6 1
#endif
-void (*msm_hw_reset_hook)(void);
-
#define MODULE_NAME "msm_smd"
enum {
@@ -52,13 +49,14 @@ static int msm_smd_debug_mask;
struct shared_info {
int ready;
- unsigned state;
+ void __iomem *state;
};
static unsigned dummy_state[SMSM_STATE_COUNT];
static struct shared_info smd_info = {
- .state = (unsigned) &dummy_state,
+ /* FIXME: not a real __iomem pointer */
+ .state = &dummy_state,
};
module_param_named(debug_mask, msm_smd_debug_mask,
@@ -101,10 +99,6 @@ static void handle_modem_crash(void)
pr_err("ARM9 has CRASHED\n");
smd_diag();
- /* hard reboot if possible */
- if (msm_hw_reset_hook)
- msm_hw_reset_hook();
-
/* in this case the modem or watchdog should reboot us */
for (;;)
;
@@ -796,22 +790,22 @@ void *smem_alloc(unsigned id, unsigned size)
return smem_find(id, size);
}
-void *smem_item(unsigned id, unsigned *size)
+void __iomem *smem_item(unsigned id, unsigned *size)
{
struct smem_shared *shared = (void *) MSM_SHARED_RAM_BASE;
struct smem_heap_entry *toc = shared->heap_toc;
if (id >= SMEM_NUM_ITEMS)
- return 0;
+ return NULL;
if (toc[id].allocated) {
*size = toc[id].size;
- return (void *) (MSM_SHARED_RAM_BASE + toc[id].offset);
+ return (MSM_SHARED_RAM_BASE + toc[id].offset);
} else {
*size = 0;
}
- return 0;
+ return NULL;
}
void *smem_find(unsigned id, unsigned size_in)
@@ -857,7 +851,7 @@ static irqreturn_t smsm_irq_handler(int irq, void *data)
int smsm_change_state(enum smsm_state_item item,
uint32_t clear_mask, uint32_t set_mask)
{
- unsigned long addr = smd_info.state + item * 4;
+ void __iomem *addr = smd_info.state + item * 4;
unsigned long flags;
unsigned state;
@@ -943,10 +937,10 @@ int smd_core_init(void)
/* wait for essential items to be initialized */
for (;;) {
unsigned size;
- void *state;
+ void __iomem *state;
state = smem_item(SMEM_SMSM_SHARED_STATE, &size);
if (size == SMSM_V1_SIZE || size == SMSM_V2_SIZE) {
- smd_info.state = (unsigned)state;
+ smd_info.state = state;
break;
}
}