diff options
author | Rohit Vaswani <rvaswani@codeaurora.org> | 2012-09-07 16:05:56 -0400 |
---|---|---|
committer | David Brown <davidb@codeaurora.org> | 2012-09-13 13:42:55 -0400 |
commit | 90eb385fd1bad5d4b7ad419d29763b28dd9d05a6 (patch) | |
tree | 1af9bc08290353aaef217e2a989b3bf83cd6684a /arch/arm/mach-msm/io.c | |
parent | 460709a6f12cced5c7a7e675521812e63ba1e1be (diff) |
ARM: msm: io: Change the default static iomappings to be shared
With 3.4 kernel the static iomappings can be shared with the ioremap
mappings. If ioremap is called with an address for which a static
mapping already exists, then that mapping should be used instead
of creating a new one.
However, the MT_DEVICE_NONSHARED flag prevents this. Hence, get rid
of this flag. Some targets (7X00) that require the static iomappings
to be NONSHARED use the MSM_DEVICE_TYPE and MSM_CHIP_DEVICE_TYPE macros.
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
Diffstat (limited to 'arch/arm/mach-msm/io.c')
-rw-r--r-- | arch/arm/mach-msm/io.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c index 2409c0b299f0..af43f6acd7fc 100644 --- a/arch/arm/mach-msm/io.c +++ b/arch/arm/mach-msm/io.c | |||
@@ -29,27 +29,31 @@ | |||
29 | 29 | ||
30 | #include <mach/board.h> | 30 | #include <mach/board.h> |
31 | 31 | ||
32 | #define MSM_CHIP_DEVICE(name, chip) { \ | 32 | #define MSM_CHIP_DEVICE_TYPE(name, chip, mem_type) { \ |
33 | .virtual = (unsigned long) MSM_##name##_BASE, \ | 33 | .virtual = (unsigned long) MSM_##name##_BASE, \ |
34 | .pfn = __phys_to_pfn(chip##_##name##_PHYS), \ | 34 | .pfn = __phys_to_pfn(chip##_##name##_PHYS), \ |
35 | .length = chip##_##name##_SIZE, \ | 35 | .length = chip##_##name##_SIZE, \ |
36 | .type = MT_DEVICE_NONSHARED, \ | 36 | .type = mem_type, \ |
37 | } | 37 | } |
38 | 38 | ||
39 | #define MSM_DEVICE_TYPE(name, mem_type) \ | ||
40 | MSM_CHIP_DEVICE_TYPE(name, MSM, mem_type) | ||
41 | #define MSM_CHIP_DEVICE(name, chip) \ | ||
42 | MSM_CHIP_DEVICE_TYPE(name, chip, MT_DEVICE) | ||
39 | #define MSM_DEVICE(name) MSM_CHIP_DEVICE(name, MSM) | 43 | #define MSM_DEVICE(name) MSM_CHIP_DEVICE(name, MSM) |
40 | 44 | ||
41 | #if defined(CONFIG_ARCH_MSM7X00A) || defined(CONFIG_ARCH_MSM7X27) \ | 45 | #if defined(CONFIG_ARCH_MSM7X00A) || defined(CONFIG_ARCH_MSM7X27) \ |
42 | || defined(CONFIG_ARCH_MSM7X25) | 46 | || defined(CONFIG_ARCH_MSM7X25) |
43 | static struct map_desc msm_io_desc[] __initdata = { | 47 | static struct map_desc msm_io_desc[] __initdata = { |
44 | MSM_DEVICE(VIC), | 48 | MSM_DEVICE_TYPE(VIC, MT_DEVICE_NONSHARED), |
45 | MSM_CHIP_DEVICE(CSR, MSM7X00), | 49 | MSM_CHIP_DEVICE_TYPE(CSR, MSM7X00, MT_DEVICE_NONSHARED), |
46 | MSM_DEVICE(DMOV), | 50 | MSM_DEVICE_TYPE(DMOV, MT_DEVICE_NONSHARED), |
47 | MSM_CHIP_DEVICE(GPIO1, MSM7X00), | 51 | MSM_CHIP_DEVICE_TYPE(GPIO1, MSM7X00, MT_DEVICE_NONSHARED), |
48 | MSM_CHIP_DEVICE(GPIO2, MSM7X00), | 52 | MSM_CHIP_DEVICE_TYPE(GPIO2, MSM7X00, MT_DEVICE_NONSHARED), |
49 | MSM_DEVICE(CLK_CTL), | 53 | MSM_DEVICE_TYPE(CLK_CTL, MT_DEVICE_NONSHARED), |
50 | #if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \ | 54 | #if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \ |
51 | defined(CONFIG_DEBUG_MSM_UART3) | 55 | defined(CONFIG_DEBUG_MSM_UART3) |
52 | MSM_DEVICE(DEBUG_UART), | 56 | MSM_DEVICE_TYPE(DEBUG_UART, MT_DEVICE_NONSHARED), |
53 | #endif | 57 | #endif |
54 | { | 58 | { |
55 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, | 59 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |