diff options
author | Olof Johansson <olof@lixom.net> | 2012-09-22 13:24:06 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-09-22 13:24:29 -0400 |
commit | 268aebe4d04bf2ac1e839eff2c83519768460189 (patch) | |
tree | b456d91c8e495e0fb0aa84bd8708bed62b1e8dc4 /arch/arm/mach-msm | |
parent | 60e59920152c7bafc8a2eb3031a62f22c2bc9e95 (diff) | |
parent | a019c5e25190107a88377cde8918c169d15a7add (diff) |
Merge branch 'cleanup/__iomem' into next/cleanup
__iomem annotation cleanup branch from Arnd.
* cleanup/__iomem: (21 commits)
net: seeq: use __iomem pointers for MMIO
video: da8xx-fb: use __iomem pointers for MMIO
scsi: eesox: use __iomem pointers for MMIO
serial: ks8695: use __iomem pointers for MMIO
input: rpcmouse: use __iomem pointers for MMIO
ARM: samsung: use __iomem pointers for MMIO
ARM: spear13xx: use __iomem pointers for MMIO
ARM: sa1100: use __iomem pointers for MMIO
ARM: prima2: use __iomem pointers for MMIO
ARM: nomadik: use __iomem pointers for MMIO
ARM: msm: use __iomem pointers for MMIO
ARM: lpc32xx: use __iomem pointers for MMIO
ARM: ks8695: use __iomem pointers for MMIO
ARM: ixp4xx: use __iomem pointers for MMIO
ARM: iop32x: use __iomem pointers for MMIO
ARM: iop13xx: use __iomem pointers for MMIO
ARM: integrator: use __iomem pointers for MMIO
ARM: imx: use __iomem pointers for MMIO
ARM: ebsa110: use __iomem pointers for MMIO
ARM: at91: use __iomem pointers for MMIO
...
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-msm')
-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 84183ed2ef79..c5a2eddc6cdc 100644 --- a/arch/arm/mach-msm/smd.c +++ b/arch/arm/mach-msm/smd.c | |||
@@ -49,13 +49,14 @@ static int msm_smd_debug_mask; | |||
49 | 49 | ||
50 | struct shared_info { | 50 | struct shared_info { |
51 | int ready; | 51 | int ready; |
52 | unsigned state; | 52 | void __iomem *state; |
53 | }; | 53 | }; |
54 | 54 | ||
55 | static unsigned dummy_state[SMSM_STATE_COUNT]; | 55 | static unsigned dummy_state[SMSM_STATE_COUNT]; |
56 | 56 | ||
57 | static struct shared_info smd_info = { | 57 | static struct shared_info smd_info = { |
58 | .state = (unsigned) &dummy_state, | 58 | /* FIXME: not a real __iomem pointer */ |
59 | .state = &dummy_state, | ||
59 | }; | 60 | }; |
60 | 61 | ||
61 | module_param_named(debug_mask, msm_smd_debug_mask, | 62 | module_param_named(debug_mask, msm_smd_debug_mask, |
@@ -789,22 +790,22 @@ void *smem_alloc(unsigned id, unsigned size) | |||
789 | return smem_find(id, size); | 790 | return smem_find(id, size); |
790 | } | 791 | } |
791 | 792 | ||
792 | void *smem_item(unsigned id, unsigned *size) | 793 | void __iomem *smem_item(unsigned id, unsigned *size) |
793 | { | 794 | { |
794 | struct smem_shared *shared = (void *) MSM_SHARED_RAM_BASE; | 795 | struct smem_shared *shared = (void *) MSM_SHARED_RAM_BASE; |
795 | struct smem_heap_entry *toc = shared->heap_toc; | 796 | struct smem_heap_entry *toc = shared->heap_toc; |
796 | 797 | ||
797 | if (id >= SMEM_NUM_ITEMS) | 798 | if (id >= SMEM_NUM_ITEMS) |
798 | return 0; | 799 | return NULL; |
799 | 800 | ||
800 | if (toc[id].allocated) { | 801 | if (toc[id].allocated) { |
801 | *size = toc[id].size; | 802 | *size = toc[id].size; |
802 | return (void *) (MSM_SHARED_RAM_BASE + toc[id].offset); | 803 | return (MSM_SHARED_RAM_BASE + toc[id].offset); |
803 | } else { | 804 | } else { |
804 | *size = 0; | 805 | *size = 0; |
805 | } | 806 | } |
806 | 807 | ||
807 | return 0; | 808 | return NULL; |
808 | } | 809 | } |
809 | 810 | ||
810 | void *smem_find(unsigned id, unsigned size_in) | 811 | void *smem_find(unsigned id, unsigned size_in) |
@@ -850,7 +851,7 @@ static irqreturn_t smsm_irq_handler(int irq, void *data) | |||
850 | int smsm_change_state(enum smsm_state_item item, | 851 | int smsm_change_state(enum smsm_state_item item, |
851 | uint32_t clear_mask, uint32_t set_mask) | 852 | uint32_t clear_mask, uint32_t set_mask) |
852 | { | 853 | { |
853 | unsigned long addr = smd_info.state + item * 4; | 854 | void __iomem *addr = smd_info.state + item * 4; |
854 | unsigned long flags; | 855 | unsigned long flags; |
855 | unsigned state; | 856 | unsigned state; |
856 | 857 | ||
@@ -936,10 +937,10 @@ int smd_core_init(void) | |||
936 | /* wait for essential items to be initialized */ | 937 | /* wait for essential items to be initialized */ |
937 | for (;;) { | 938 | for (;;) { |
938 | unsigned size; | 939 | unsigned size; |
939 | void *state; | 940 | void __iomem *state; |
940 | state = smem_item(SMEM_SMSM_SHARED_STATE, &size); | 941 | state = smem_item(SMEM_SMSM_SHARED_STATE, &size); |
941 | if (size == SMSM_V1_SIZE || size == SMSM_V2_SIZE) { | 942 | if (size == SMSM_V1_SIZE || size == SMSM_V2_SIZE) { |
942 | smd_info.state = (unsigned)state; | 943 | smd_info.state = state; |
943 | break; | 944 | break; |
944 | } | 945 | } |
945 | } | 946 | } |