diff options
Diffstat (limited to 'arch/arm/mach-msm/io.c')
-rw-r--r-- | arch/arm/mach-msm/io.c | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c index 1260007a9dd1..cec6ed1c91d3 100644 --- a/arch/arm/mach-msm/io.c +++ b/arch/arm/mach-msm/io.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * MSM7K, QSD io support | 3 | * MSM7K, QSD io support |
4 | * | 4 | * |
5 | * Copyright (C) 2007 Google, Inc. | 5 | * Copyright (C) 2007 Google, Inc. |
6 | * Copyright (c) 2008-2010, Code Aurora Forum. All rights reserved. | 6 | * Copyright (c) 2008-2011, Code Aurora Forum. All rights reserved. |
7 | * Author: Brian Swetland <swetland@google.com> | 7 | * Author: Brian Swetland <swetland@google.com> |
8 | * | 8 | * |
9 | * This software is licensed under the terms of the GNU General Public | 9 | * This software is licensed under the terms of the GNU General Public |
@@ -28,19 +28,20 @@ | |||
28 | 28 | ||
29 | #include <mach/board.h> | 29 | #include <mach/board.h> |
30 | 30 | ||
31 | #define MSM_DEVICE(name) { \ | 31 | #define MSM_CHIP_DEVICE(name, chip) { \ |
32 | .virtual = (unsigned long) MSM_##name##_BASE, \ | 32 | .virtual = (unsigned long) MSM_##name##_BASE, \ |
33 | .pfn = __phys_to_pfn(MSM_##name##_PHYS), \ | 33 | .pfn = __phys_to_pfn(chip##_##name##_PHYS), \ |
34 | .length = MSM_##name##_SIZE, \ | 34 | .length = chip##_##name##_SIZE, \ |
35 | .type = MT_DEVICE_NONSHARED, \ | 35 | .type = MT_DEVICE_NONSHARED, \ |
36 | } | 36 | } |
37 | 37 | ||
38 | #define MSM_DEVICE(name) MSM_CHIP_DEVICE(name, MSM) | ||
39 | |||
38 | #if defined(CONFIG_ARCH_MSM7X00A) || defined(CONFIG_ARCH_MSM7X27) \ | 40 | #if defined(CONFIG_ARCH_MSM7X00A) || defined(CONFIG_ARCH_MSM7X27) \ |
39 | || defined(CONFIG_ARCH_MSM7X25) | 41 | || defined(CONFIG_ARCH_MSM7X25) |
40 | static struct map_desc msm_io_desc[] __initdata = { | 42 | static struct map_desc msm_io_desc[] __initdata = { |
41 | MSM_DEVICE(VIC), | 43 | MSM_DEVICE(VIC), |
42 | MSM_DEVICE(CSR), | 44 | MSM_CHIP_DEVICE(CSR, MSM7X00), |
43 | MSM_DEVICE(GPT), | ||
44 | MSM_DEVICE(DMOV), | 45 | MSM_DEVICE(DMOV), |
45 | MSM_DEVICE(GPIO1), | 46 | MSM_DEVICE(GPIO1), |
46 | MSM_DEVICE(GPIO2), | 47 | MSM_DEVICE(GPIO2), |
@@ -73,8 +74,7 @@ void __init msm_map_common_io(void) | |||
73 | #ifdef CONFIG_ARCH_QSD8X50 | 74 | #ifdef CONFIG_ARCH_QSD8X50 |
74 | static struct map_desc qsd8x50_io_desc[] __initdata = { | 75 | static struct map_desc qsd8x50_io_desc[] __initdata = { |
75 | MSM_DEVICE(VIC), | 76 | MSM_DEVICE(VIC), |
76 | MSM_DEVICE(CSR), | 77 | MSM_CHIP_DEVICE(CSR, QSD8X50), |
77 | MSM_DEVICE(TMR), | ||
78 | MSM_DEVICE(DMOV), | 78 | MSM_DEVICE(DMOV), |
79 | MSM_DEVICE(GPIO1), | 79 | MSM_DEVICE(GPIO1), |
80 | MSM_DEVICE(GPIO2), | 80 | MSM_DEVICE(GPIO2), |
@@ -102,10 +102,10 @@ void __init msm_map_qsd8x50_io(void) | |||
102 | 102 | ||
103 | #ifdef CONFIG_ARCH_MSM8X60 | 103 | #ifdef CONFIG_ARCH_MSM8X60 |
104 | static struct map_desc msm8x60_io_desc[] __initdata = { | 104 | static struct map_desc msm8x60_io_desc[] __initdata = { |
105 | MSM_DEVICE(QGIC_DIST), | 105 | MSM_CHIP_DEVICE(QGIC_DIST, MSM8X60), |
106 | MSM_DEVICE(QGIC_CPU), | 106 | MSM_CHIP_DEVICE(QGIC_CPU, MSM8X60), |
107 | MSM_DEVICE(TMR), | 107 | MSM_CHIP_DEVICE(TMR, MSM8X60), |
108 | MSM_DEVICE(TMR0), | 108 | MSM_CHIP_DEVICE(TMR0, MSM8X60), |
109 | MSM_DEVICE(ACC), | 109 | MSM_DEVICE(ACC), |
110 | MSM_DEVICE(GCC), | 110 | MSM_DEVICE(GCC), |
111 | }; | 111 | }; |
@@ -116,11 +116,24 @@ void __init msm_map_msm8x60_io(void) | |||
116 | } | 116 | } |
117 | #endif /* CONFIG_ARCH_MSM8X60 */ | 117 | #endif /* CONFIG_ARCH_MSM8X60 */ |
118 | 118 | ||
119 | #ifdef CONFIG_ARCH_MSM8960 | ||
120 | static struct map_desc msm8960_io_desc[] __initdata = { | ||
121 | MSM_CHIP_DEVICE(QGIC_DIST, MSM8960), | ||
122 | MSM_CHIP_DEVICE(QGIC_CPU, MSM8960), | ||
123 | MSM_CHIP_DEVICE(TMR, MSM8960), | ||
124 | MSM_CHIP_DEVICE(TMR0, MSM8960), | ||
125 | }; | ||
126 | |||
127 | void __init msm_map_msm8960_io(void) | ||
128 | { | ||
129 | iotable_init(msm8960_io_desc, ARRAY_SIZE(msm8960_io_desc)); | ||
130 | } | ||
131 | #endif /* CONFIG_ARCH_MSM8960 */ | ||
132 | |||
119 | #ifdef CONFIG_ARCH_MSM7X30 | 133 | #ifdef CONFIG_ARCH_MSM7X30 |
120 | static struct map_desc msm7x30_io_desc[] __initdata = { | 134 | static struct map_desc msm7x30_io_desc[] __initdata = { |
121 | MSM_DEVICE(VIC), | 135 | MSM_DEVICE(VIC), |
122 | MSM_DEVICE(CSR), | 136 | MSM_CHIP_DEVICE(CSR, MSM7X30), |
123 | MSM_DEVICE(TMR), | ||
124 | MSM_DEVICE(DMOV), | 137 | MSM_DEVICE(DMOV), |
125 | MSM_DEVICE(GPIO1), | 138 | MSM_DEVICE(GPIO1), |
126 | MSM_DEVICE(GPIO2), | 139 | MSM_DEVICE(GPIO2), |