diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-09-14 16:20:43 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-09-19 09:19:14 -0400 |
commit | a1b478e829cb3e80021b5e2839d90275310d9eae (patch) | |
tree | 47a502ccc5d9712a06d66d48202dd78e16049eba /arch/arm/mach-msm/smd.c | |
parent | df38b24fa87ba4c386e50b83befd93d0518b7ea8 (diff) |
ARM: msm: use __iomem pointers for MMIO
ARM is moving to stricter checks on readl/write functions,
so we need to use the correct types everywhere.
Acked-by: David Brown <davidb@codeaurora.org>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Daniel Walker <dwalker@fifo99.com>
Cc: Bryan Huntsman <bryanh@codeaurora.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-msm/smd.c')
-rw-r--r-- | arch/arm/mach-msm/smd.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c index 657be73297db..f4e475c49302 100644 --- a/arch/arm/mach-msm/smd.c +++ b/arch/arm/mach-msm/smd.c | |||
@@ -52,13 +52,14 @@ static int msm_smd_debug_mask; | |||
52 | 52 | ||
53 | struct shared_info { | 53 | struct shared_info { |
54 | int ready; | 54 | int ready; |
55 | unsigned state; | 55 | void __iomem *state; |
56 | }; | 56 | }; |
57 | 57 | ||
58 | static unsigned dummy_state[SMSM_STATE_COUNT]; | 58 | static unsigned dummy_state[SMSM_STATE_COUNT]; |
59 | 59 | ||
60 | static struct shared_info smd_info = { | 60 | static struct shared_info smd_info = { |
61 | .state = (unsigned) &dummy_state, | 61 | /* FIXME: not a real __iomem pointer */ |
62 | .state = &dummy_state, | ||
62 | }; | 63 | }; |
63 | 64 | ||
64 | module_param_named(debug_mask, msm_smd_debug_mask, | 65 | module_param_named(debug_mask, msm_smd_debug_mask, |
@@ -796,22 +797,22 @@ void *smem_alloc(unsigned id, unsigned size) | |||
796 | return smem_find(id, size); | 797 | return smem_find(id, size); |
797 | } | 798 | } |
798 | 799 | ||
799 | void *smem_item(unsigned id, unsigned *size) | 800 | void __iomem *smem_item(unsigned id, unsigned *size) |
800 | { | 801 | { |
801 | struct smem_shared *shared = (void *) MSM_SHARED_RAM_BASE; | 802 | struct smem_shared *shared = (void *) MSM_SHARED_RAM_BASE; |
802 | struct smem_heap_entry *toc = shared->heap_toc; | 803 | struct smem_heap_entry *toc = shared->heap_toc; |
803 | 804 | ||
804 | if (id >= SMEM_NUM_ITEMS) | 805 | if (id >= SMEM_NUM_ITEMS) |
805 | return 0; | 806 | return NULL; |
806 | 807 | ||
807 | if (toc[id].allocated) { | 808 | if (toc[id].allocated) { |
808 | *size = toc[id].size; | 809 | *size = toc[id].size; |
809 | return (void *) (MSM_SHARED_RAM_BASE + toc[id].offset); | 810 | return (MSM_SHARED_RAM_BASE + toc[id].offset); |
810 | } else { | 811 | } else { |
811 | *size = 0; | 812 | *size = 0; |
812 | } | 813 | } |
813 | 814 | ||
814 | return 0; | 815 | return NULL; |
815 | } | 816 | } |
816 | 817 | ||
817 | void *smem_find(unsigned id, unsigned size_in) | 818 | void *smem_find(unsigned id, unsigned size_in) |
@@ -857,7 +858,7 @@ static irqreturn_t smsm_irq_handler(int irq, void *data) | |||
857 | int smsm_change_state(enum smsm_state_item item, | 858 | int smsm_change_state(enum smsm_state_item item, |
858 | uint32_t clear_mask, uint32_t set_mask) | 859 | uint32_t clear_mask, uint32_t set_mask) |
859 | { | 860 | { |
860 | unsigned long addr = smd_info.state + item * 4; | 861 | void __iomem *addr = smd_info.state + item * 4; |
861 | unsigned long flags; | 862 | unsigned long flags; |
862 | unsigned state; | 863 | unsigned state; |
863 | 864 | ||
@@ -943,10 +944,10 @@ int smd_core_init(void) | |||
943 | /* wait for essential items to be initialized */ | 944 | /* wait for essential items to be initialized */ |
944 | for (;;) { | 945 | for (;;) { |
945 | unsigned size; | 946 | unsigned size; |
946 | void *state; | 947 | void __iomem *state; |
947 | state = smem_item(SMEM_SMSM_SHARED_STATE, &size); | 948 | state = smem_item(SMEM_SMSM_SHARED_STATE, &size); |
948 | if (size == SMSM_V1_SIZE || size == SMSM_V2_SIZE) { | 949 | if (size == SMSM_V1_SIZE || size == SMSM_V2_SIZE) { |
949 | smd_info.state = (unsigned)state; | 950 | smd_info.state = state; |
950 | break; | 951 | break; |
951 | } | 952 | } |
952 | } | 953 | } |