Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 1 | /* arch/arm/mach-msm/io.c |
| 2 | * |
Daniel Walker | cf62ffa | 2010-05-04 15:12:27 -0700 | [diff] [blame] | 3 | * MSM7K, QSD io support |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 4 | * |
| 5 | * Copyright (C) 2007 Google, Inc. |
Syed Rameez Mustafa | 3971c14 | 2013-01-09 19:04:53 -0800 | [diff] [blame] | 6 | * Copyright (c) 2008-2013, The Linux Foundation. All rights reserved. |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 7 | * Author: Brian Swetland <swetland@google.com> |
| 8 | * |
| 9 | * This software is licensed under the terms of the GNU General Public |
| 10 | * License version 2, as published by the Free Software Foundation, and |
| 11 | * may be copied, distributed, and modified under those terms. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | */ |
| 19 | |
| 20 | #include <linux/kernel.h> |
| 21 | #include <linux/init.h> |
Russell King | fced80c | 2008-09-06 12:10:45 +0100 | [diff] [blame] | 22 | #include <linux/io.h> |
Paul Gortmaker | dc28094 | 2011-07-31 16:17:29 -0400 | [diff] [blame] | 23 | #include <linux/export.h> |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 24 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 25 | #include <mach/hardware.h> |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 26 | #include <asm/page.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 27 | #include <mach/msm_iomap.h> |
Trilok Soni | 80c1936 | 2012-10-15 00:55:00 +0530 | [diff] [blame] | 28 | #include <mach/memory.h> |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 29 | #include <asm/mach/map.h> |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 30 | #include <linux/dma-mapping.h> |
Abhimanyu Kapur | 032b1f4 | 2013-01-18 00:10:50 -0800 | [diff] [blame] | 31 | #include <linux/of_fdt.h> |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 32 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 33 | #include <mach/board.h> |
Abhimanyu Kapur | 032b1f4 | 2013-01-18 00:10:50 -0800 | [diff] [blame] | 34 | #include "board-dt.h" |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 35 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 36 | #define MSM_CHIP_DEVICE(name, chip) { \ |
Brian Swetland | bcc0f6a | 2008-09-10 14:00:53 -0700 | [diff] [blame] | 37 | .virtual = (unsigned long) MSM_##name##_BASE, \ |
David Brown | 8c27e6f | 2011-01-07 10:20:49 -0800 | [diff] [blame] | 38 | .pfn = __phys_to_pfn(chip##_##name##_PHYS), \ |
| 39 | .length = chip##_##name##_SIZE, \ |
Rohit Vaswani | dba530e | 2012-06-12 20:04:28 -0700 | [diff] [blame] | 40 | .type = MT_DEVICE, \ |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 41 | } |
| 42 | |
David Brown | 8c27e6f | 2011-01-07 10:20:49 -0800 | [diff] [blame] | 43 | #define MSM_DEVICE(name) MSM_CHIP_DEVICE(name, MSM) |
| 44 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 45 | /* msm_shared_ram_phys default value of 0x00100000 is the most common value |
| 46 | * and should work as-is for any target without stacked memory. |
| 47 | */ |
Eric Holmberg | 51edef7 | 2013-04-11 14:28:33 -0600 | [diff] [blame] | 48 | phys_addr_t msm_shared_ram_phys = 0x00100000; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 49 | |
Stephen Boyd | 552e429 | 2012-02-21 01:27:20 -0800 | [diff] [blame] | 50 | static void __init msm_map_io(struct map_desc *io_desc, int size) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 51 | { |
| 52 | int i; |
| 53 | |
| 54 | BUG_ON(!size); |
| 55 | for (i = 0; i < size; i++) |
| 56 | if (io_desc[i].virtual == (unsigned long)MSM_SHARED_RAM_BASE) |
| 57 | io_desc[i].pfn = __phys_to_pfn(msm_shared_ram_phys); |
| 58 | |
| 59 | iotable_init(io_desc, size); |
| 60 | } |
| 61 | |
| 62 | #if defined(CONFIG_ARCH_MSM7X01A) || defined(CONFIG_ARCH_MSM7X27) \ |
Daniel Walker | cf62ffa | 2010-05-04 15:12:27 -0700 | [diff] [blame] | 63 | || defined(CONFIG_ARCH_MSM7X25) |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 64 | static struct map_desc msm_io_desc[] __initdata = { |
Taniya Das | 13b811a | 2011-12-09 18:33:45 +0530 | [diff] [blame] | 65 | MSM_CHIP_DEVICE(VIC, MSM7XXX), |
| 66 | MSM_CHIP_DEVICE(CSR, MSM7XXX), |
| 67 | MSM_CHIP_DEVICE(TMR, MSM7XXX), |
| 68 | MSM_CHIP_DEVICE(GPIO1, MSM7XXX), |
| 69 | MSM_CHIP_DEVICE(GPIO2, MSM7XXX), |
| 70 | MSM_CHIP_DEVICE(CLK_CTL, MSM7XXX), |
| 71 | MSM_CHIP_DEVICE(AD5, MSM7XXX), |
Stephen Boyd | 650e3f0 | 2011-11-08 10:33:03 -0800 | [diff] [blame] | 72 | #if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \ |
| 73 | defined(CONFIG_DEBUG_MSM_UART3) |
Pavel Machek | 6339f66 | 2009-11-02 11:48:29 +0100 | [diff] [blame] | 74 | MSM_DEVICE(DEBUG_UART), |
| 75 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 76 | #ifdef CONFIG_CACHE_L2X0 |
| 77 | { |
| 78 | .virtual = (unsigned long) MSM_L2CC_BASE, |
Taniya Das | 13b811a | 2011-12-09 18:33:45 +0530 | [diff] [blame] | 79 | .pfn = __phys_to_pfn(MSM7XXX_L2CC_PHYS), |
| 80 | .length = MSM7XXX_L2CC_SIZE, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 81 | .type = MT_DEVICE, |
| 82 | }, |
Dima Zavin | b42dc44 | 2010-01-29 11:43:42 -0800 | [diff] [blame] | 83 | #endif |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 84 | { |
Brian Swetland | bcc0f6a | 2008-09-10 14:00:53 -0700 | [diff] [blame] | 85 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 86 | .length = MSM_SHARED_RAM_SIZE, |
| 87 | .type = MT_DEVICE, |
| 88 | }, |
| 89 | }; |
| 90 | |
| 91 | void __init msm_map_common_io(void) |
| 92 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 93 | /*Peripheral port memory remap, nothing looks to be there for |
| 94 | * cortex a5. |
| 95 | */ |
| 96 | #ifndef CONFIG_ARCH_MSM_CORTEX_A5 |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 97 | /* Make sure the peripheral register window is closed, since |
| 98 | * we will use PTE flags (TEX[1]=1,B=0,C=1) to determine which |
| 99 | * pages are peripheral interface or not. |
| 100 | */ |
| 101 | asm("mcr p15, 0, %0, c15, c2, 4" : : "r" (0)); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 102 | #endif |
| 103 | msm_map_io(msm_io_desc, ARRAY_SIZE(msm_io_desc)); |
Trilok Soni | 80c1936 | 2012-10-15 00:55:00 +0530 | [diff] [blame] | 104 | map_page_strongly_ordered(); |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 105 | } |
Daniel Walker | cf62ffa | 2010-05-04 15:12:27 -0700 | [diff] [blame] | 106 | #endif |
| 107 | |
| 108 | #ifdef CONFIG_ARCH_QSD8X50 |
| 109 | static struct map_desc qsd8x50_io_desc[] __initdata = { |
| 110 | MSM_DEVICE(VIC), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 111 | MSM_DEVICE(CSR), |
| 112 | MSM_DEVICE(TMR), |
Daniel Walker | cf62ffa | 2010-05-04 15:12:27 -0700 | [diff] [blame] | 113 | MSM_DEVICE(GPIO1), |
| 114 | MSM_DEVICE(GPIO2), |
| 115 | MSM_DEVICE(CLK_CTL), |
| 116 | MSM_DEVICE(SIRC), |
| 117 | MSM_DEVICE(SCPLL), |
| 118 | MSM_DEVICE(AD5), |
Daniel Walker | c83b2bf | 2010-05-04 15:26:13 -0700 | [diff] [blame] | 119 | MSM_DEVICE(TCSR), |
Stephen Boyd | 650e3f0 | 2011-11-08 10:33:03 -0800 | [diff] [blame] | 120 | #if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \ |
| 121 | defined(CONFIG_DEBUG_MSM_UART3) |
Daniel Walker | c83b2bf | 2010-05-04 15:26:13 -0700 | [diff] [blame] | 122 | MSM_DEVICE(DEBUG_UART), |
| 123 | #endif |
| 124 | { |
| 125 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
Daniel Walker | cf62ffa | 2010-05-04 15:12:27 -0700 | [diff] [blame] | 126 | .length = MSM_SHARED_RAM_SIZE, |
| 127 | .type = MT_DEVICE, |
| 128 | }, |
| 129 | }; |
| 130 | |
| 131 | void __init msm_map_qsd8x50_io(void) |
| 132 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 133 | msm_map_io(qsd8x50_io_desc, ARRAY_SIZE(qsd8x50_io_desc)); |
Daniel Walker | cf62ffa | 2010-05-04 15:12:27 -0700 | [diff] [blame] | 134 | } |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 135 | #endif /* CONFIG_ARCH_QSD8X50 */ |
Daniel Walker | c83b2bf | 2010-05-04 15:26:13 -0700 | [diff] [blame] | 136 | |
| 137 | #ifdef CONFIG_ARCH_MSM8X60 |
| 138 | static struct map_desc msm8x60_io_desc[] __initdata = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 139 | MSM_DEVICE(QGIC_DIST), |
| 140 | MSM_DEVICE(QGIC_CPU), |
| 141 | MSM_DEVICE(TMR), |
| 142 | MSM_DEVICE(TMR0), |
| 143 | MSM_DEVICE(RPM_MPM), |
Daniel Walker | c83b2bf | 2010-05-04 15:26:13 -0700 | [diff] [blame] | 144 | MSM_DEVICE(ACC), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 145 | MSM_DEVICE(ACC0), |
| 146 | MSM_DEVICE(ACC1), |
| 147 | MSM_DEVICE(SAW0), |
| 148 | MSM_DEVICE(SAW1), |
Daniel Walker | c83b2bf | 2010-05-04 15:26:13 -0700 | [diff] [blame] | 149 | MSM_DEVICE(GCC), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 150 | MSM_DEVICE(TLMM), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 151 | MSM_DEVICE(SCPLL), |
| 152 | MSM_DEVICE(RPM), |
| 153 | MSM_DEVICE(CLK_CTL), |
| 154 | MSM_DEVICE(MMSS_CLK_CTL), |
| 155 | MSM_DEVICE(LPASS_CLK_CTL), |
| 156 | MSM_DEVICE(TCSR), |
| 157 | MSM_DEVICE(IMEM), |
| 158 | MSM_DEVICE(HDMI), |
Sathish Ambley | bb87d5f | 2011-11-08 15:14:01 -0800 | [diff] [blame] | 159 | #ifdef CONFIG_DEBUG_MSM8660_UART |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 160 | MSM_DEVICE(DEBUG_UART), |
| 161 | #endif |
| 162 | MSM_DEVICE(SIC_NON_SECURE), |
| 163 | { |
| 164 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 165 | .length = MSM_SHARED_RAM_SIZE, |
| 166 | .type = MT_DEVICE, |
| 167 | }, |
| 168 | MSM_DEVICE(QFPROM), |
Daniel Walker | c83b2bf | 2010-05-04 15:26:13 -0700 | [diff] [blame] | 169 | }; |
| 170 | |
| 171 | void __init msm_map_msm8x60_io(void) |
| 172 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 173 | msm_map_io(msm8x60_io_desc, ARRAY_SIZE(msm8x60_io_desc)); |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 174 | init_consistent_dma_size(14*SZ_1M); |
Daniel Walker | c83b2bf | 2010-05-04 15:26:13 -0700 | [diff] [blame] | 175 | } |
| 176 | #endif /* CONFIG_ARCH_MSM8X60 */ |
| 177 | |
| 178 | #ifdef CONFIG_ARCH_MSM8960 |
| 179 | static struct map_desc msm8960_io_desc[] __initdata = { |
| 180 | MSM_CHIP_DEVICE(QGIC_DIST, MSM8960), |
| 181 | MSM_CHIP_DEVICE(QGIC_CPU, MSM8960), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 182 | MSM_CHIP_DEVICE(ACC0, MSM8960), |
| 183 | MSM_CHIP_DEVICE(ACC1, MSM8960), |
Daniel Walker | c83b2bf | 2010-05-04 15:26:13 -0700 | [diff] [blame] | 184 | MSM_CHIP_DEVICE(TMR, MSM8960), |
| 185 | MSM_CHIP_DEVICE(TMR0, MSM8960), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 186 | MSM_CHIP_DEVICE(RPM_MPM, MSM8960), |
| 187 | MSM_CHIP_DEVICE(CLK_CTL, MSM8960), |
| 188 | MSM_CHIP_DEVICE(MMSS_CLK_CTL, MSM8960), |
| 189 | MSM_CHIP_DEVICE(LPASS_CLK_CTL, MSM8960), |
| 190 | MSM_CHIP_DEVICE(RPM, MSM8960), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 191 | MSM_CHIP_DEVICE(TLMM, MSM8960), |
| 192 | MSM_CHIP_DEVICE(HFPLL, MSM8960), |
| 193 | MSM_CHIP_DEVICE(SAW0, MSM8960), |
| 194 | MSM_CHIP_DEVICE(SAW1, MSM8960), |
| 195 | MSM_CHIP_DEVICE(SAW_L2, MSM8960), |
| 196 | MSM_CHIP_DEVICE(SIC_NON_SECURE, MSM8960), |
| 197 | MSM_CHIP_DEVICE(APCS_GCC, MSM8960), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 198 | MSM_CHIP_DEVICE(IMEM, MSM8960), |
| 199 | MSM_CHIP_DEVICE(HDMI, MSM8960), |
| 200 | { |
| 201 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 202 | .length = MSM_SHARED_RAM_SIZE, |
| 203 | .type = MT_DEVICE, |
| 204 | }, |
Sathish Ambley | bb87d5f | 2011-11-08 15:14:01 -0800 | [diff] [blame] | 205 | #ifdef CONFIG_DEBUG_MSM8960_UART |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 206 | MSM_DEVICE(DEBUG_UART), |
| 207 | #endif |
Siddartha Mohanadoss | ce1315a | 2011-04-21 15:25:55 -0700 | [diff] [blame] | 208 | MSM_CHIP_DEVICE(QFPROM, MSM8960), |
Daniel Walker | c83b2bf | 2010-05-04 15:26:13 -0700 | [diff] [blame] | 209 | }; |
| 210 | |
| 211 | void __init msm_map_msm8960_io(void) |
| 212 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 213 | msm_map_io(msm8960_io_desc, ARRAY_SIZE(msm8960_io_desc)); |
Daniel Walker | c83b2bf | 2010-05-04 15:26:13 -0700 | [diff] [blame] | 214 | } |
| 215 | #endif /* CONFIG_ARCH_MSM8960 */ |
| 216 | |
Stepan Moskovchenko | 2b992ad | 2011-10-18 17:24:18 -0700 | [diff] [blame] | 217 | #ifdef CONFIG_ARCH_MSM8930 |
| 218 | static struct map_desc msm8930_io_desc[] __initdata = { |
| 219 | MSM_CHIP_DEVICE(QGIC_DIST, MSM8930), |
| 220 | MSM_CHIP_DEVICE(QGIC_CPU, MSM8930), |
| 221 | MSM_CHIP_DEVICE(ACC0, MSM8930), |
| 222 | MSM_CHIP_DEVICE(ACC1, MSM8930), |
| 223 | MSM_CHIP_DEVICE(TMR, MSM8930), |
| 224 | MSM_CHIP_DEVICE(TMR0, MSM8930), |
| 225 | MSM_CHIP_DEVICE(RPM_MPM, MSM8930), |
| 226 | MSM_CHIP_DEVICE(CLK_CTL, MSM8930), |
| 227 | MSM_CHIP_DEVICE(MMSS_CLK_CTL, MSM8930), |
| 228 | MSM_CHIP_DEVICE(LPASS_CLK_CTL, MSM8930), |
| 229 | MSM_CHIP_DEVICE(RPM, MSM8930), |
| 230 | MSM_CHIP_DEVICE(TLMM, MSM8930), |
| 231 | MSM_CHIP_DEVICE(HFPLL, MSM8930), |
| 232 | MSM_CHIP_DEVICE(SAW0, MSM8930), |
| 233 | MSM_CHIP_DEVICE(SAW1, MSM8930), |
| 234 | MSM_CHIP_DEVICE(SAW_L2, MSM8930), |
| 235 | MSM_CHIP_DEVICE(SIC_NON_SECURE, MSM8930), |
| 236 | MSM_CHIP_DEVICE(APCS_GCC, MSM8930), |
| 237 | MSM_CHIP_DEVICE(IMEM, MSM8930), |
| 238 | MSM_CHIP_DEVICE(HDMI, MSM8930), |
| 239 | { |
| 240 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 241 | .length = MSM_SHARED_RAM_SIZE, |
| 242 | .type = MT_DEVICE, |
| 243 | }, |
Sathish Ambley | bb87d5f | 2011-11-08 15:14:01 -0800 | [diff] [blame] | 244 | #ifdef CONFIG_DEBUG_MSM8930_UART |
Stepan Moskovchenko | 2b992ad | 2011-10-18 17:24:18 -0700 | [diff] [blame] | 245 | MSM_DEVICE(DEBUG_UART), |
| 246 | #endif |
| 247 | MSM_CHIP_DEVICE(QFPROM, MSM8930), |
| 248 | }; |
| 249 | |
| 250 | void __init msm_map_msm8930_io(void) |
| 251 | { |
| 252 | msm_map_io(msm8930_io_desc, ARRAY_SIZE(msm8930_io_desc)); |
| 253 | } |
| 254 | #endif /* CONFIG_ARCH_MSM8930 */ |
| 255 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 256 | #ifdef CONFIG_ARCH_APQ8064 |
| 257 | static struct map_desc apq8064_io_desc[] __initdata = { |
| 258 | MSM_CHIP_DEVICE(QGIC_DIST, APQ8064), |
| 259 | MSM_CHIP_DEVICE(QGIC_CPU, APQ8064), |
| 260 | MSM_CHIP_DEVICE(TMR, APQ8064), |
| 261 | MSM_CHIP_DEVICE(TMR0, APQ8064), |
Joel King | 4ebccc6 | 2011-07-22 09:43:22 -0700 | [diff] [blame] | 262 | MSM_CHIP_DEVICE(TLMM, APQ8064), |
Vikram Mulukutla | bb408eb | 2011-08-04 09:28:56 -0700 | [diff] [blame] | 263 | MSM_CHIP_DEVICE(ACC0, APQ8064), |
| 264 | MSM_CHIP_DEVICE(ACC1, APQ8064), |
| 265 | MSM_CHIP_DEVICE(ACC2, APQ8064), |
| 266 | MSM_CHIP_DEVICE(ACC3, APQ8064), |
| 267 | MSM_CHIP_DEVICE(HFPLL, APQ8064), |
Tianyi Gou | 3343041 | 2011-09-07 21:50:42 -0700 | [diff] [blame] | 268 | MSM_CHIP_DEVICE(CLK_CTL, APQ8064), |
| 269 | MSM_CHIP_DEVICE(MMSS_CLK_CTL, APQ8064), |
| 270 | MSM_CHIP_DEVICE(LPASS_CLK_CTL, APQ8064), |
Vikram Mulukutla | bb408eb | 2011-08-04 09:28:56 -0700 | [diff] [blame] | 271 | MSM_CHIP_DEVICE(APCS_GCC, APQ8064), |
Praveen Chidambaram | d9a4173 | 2011-10-17 09:41:05 -0600 | [diff] [blame] | 272 | MSM_CHIP_DEVICE(RPM, APQ8064), |
| 273 | MSM_CHIP_DEVICE(RPM_MPM, APQ8064), |
| 274 | MSM_CHIP_DEVICE(SAW0, APQ8064), |
| 275 | MSM_CHIP_DEVICE(SAW1, APQ8064), |
| 276 | MSM_CHIP_DEVICE(SAW2, APQ8064), |
| 277 | MSM_CHIP_DEVICE(SAW3, APQ8064), |
| 278 | MSM_CHIP_DEVICE(SAW_L2, APQ8064), |
Stepan Moskovchenko | 3e444e5 | 2011-08-05 17:59:48 -0700 | [diff] [blame] | 279 | MSM_CHIP_DEVICE(IMEM, APQ8064), |
Aravind Venkateswaran | 7eb05da | 2012-02-16 14:23:03 -0800 | [diff] [blame] | 280 | MSM_CHIP_DEVICE(HDMI, APQ8064), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 281 | { |
| 282 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 283 | .length = MSM_SHARED_RAM_SIZE, |
| 284 | .type = MT_DEVICE, |
| 285 | }, |
Vijayakumar Muthuvel Manickam | f35fd73 | 2012-01-13 16:17:52 -0800 | [diff] [blame] | 286 | MSM_CHIP_DEVICE(QFPROM, APQ8064), |
Jeff Hugo | 85bfed4 | 2012-01-31 10:10:14 -0700 | [diff] [blame] | 287 | MSM_CHIP_DEVICE(SIC_NON_SECURE, APQ8064), |
Stepan Moskovchenko | 824db17 | 2012-05-29 18:05:09 -0700 | [diff] [blame] | 288 | #ifdef CONFIG_DEBUG_APQ8064_UART |
| 289 | MSM_DEVICE(DEBUG_UART), |
| 290 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 291 | }; |
| 292 | |
| 293 | void __init msm_map_apq8064_io(void) |
| 294 | { |
| 295 | msm_map_io(apq8064_io_desc, ARRAY_SIZE(apq8064_io_desc)); |
| 296 | } |
| 297 | #endif /* CONFIG_ARCH_APQ8064 */ |
| 298 | |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 299 | #ifdef CONFIG_ARCH_MSM8974 |
| 300 | static struct map_desc msm_8974_io_desc[] __initdata = { |
| 301 | MSM_CHIP_DEVICE(QGIC_DIST, MSM8974), |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 302 | MSM_CHIP_DEVICE(TLMM, MSM8974), |
Stepan Moskovchenko | da7ce9c | 2012-08-14 21:02:21 -0700 | [diff] [blame] | 303 | MSM_CHIP_DEVICE(MPM2_PSHOLD, MSM8974), |
Jeff Hugo | 7094609 | 2012-02-10 11:30:43 -0700 | [diff] [blame] | 304 | { |
| 305 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 306 | .length = MSM_SHARED_RAM_SIZE, |
| 307 | .type = MT_DEVICE, |
| 308 | }, |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 309 | #ifdef CONFIG_DEBUG_MSM8974_UART |
Sathish Ambley | f5bebd6 | 2011-11-03 23:36:36 -0700 | [diff] [blame] | 310 | MSM_DEVICE(DEBUG_UART), |
| 311 | #endif |
Sathish Ambley | 6829db1 | 2011-10-08 22:41:23 -0700 | [diff] [blame] | 312 | }; |
| 313 | |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 314 | void __init msm_map_8974_io(void) |
Sathish Ambley | 6829db1 | 2011-10-08 22:41:23 -0700 | [diff] [blame] | 315 | { |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 316 | msm_shared_ram_phys = MSM8974_MSM_SHARED_RAM_PHYS; |
| 317 | msm_map_io(msm_8974_io_desc, ARRAY_SIZE(msm_8974_io_desc)); |
Abhimanyu Kapur | 032b1f4 | 2013-01-18 00:10:50 -0800 | [diff] [blame] | 318 | of_scan_flat_dt(msm_scan_dt_map_imem, NULL); |
Sathish Ambley | 6829db1 | 2011-10-08 22:41:23 -0700 | [diff] [blame] | 319 | } |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 320 | #endif /* CONFIG_ARCH_MSM8974 */ |
Sathish Ambley | 6829db1 | 2011-10-08 22:41:23 -0700 | [diff] [blame] | 321 | |
Stepan Moskovchenko | e90cd65 | 2013-04-18 12:54:47 -0700 | [diff] [blame] | 322 | #ifdef CONFIG_ARCH_APQ8084 |
| 323 | static struct map_desc msm_8084_io_desc[] __initdata = { |
| 324 | MSM_CHIP_DEVICE(QGIC_DIST, APQ8084), |
| 325 | MSM_CHIP_DEVICE(TLMM, APQ8084), |
Stepan Moskovchenko | b6bd0bb | 2013-01-24 15:55:35 -0800 | [diff] [blame] | 326 | { |
| 327 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 328 | .length = MSM_SHARED_RAM_SIZE, |
| 329 | .type = MT_DEVICE, |
| 330 | }, |
Stepan Moskovchenko | e90cd65 | 2013-04-18 12:54:47 -0700 | [diff] [blame] | 331 | #ifdef CONFIG_DEBUG_APQ8084_UART |
Stepan Moskovchenko | 80064f3 | 2013-03-05 16:58:39 -0800 | [diff] [blame] | 332 | MSM_DEVICE(DEBUG_UART), |
| 333 | #endif |
Stepan Moskovchenko | b6bd0bb | 2013-01-24 15:55:35 -0800 | [diff] [blame] | 334 | }; |
| 335 | |
Stepan Moskovchenko | e90cd65 | 2013-04-18 12:54:47 -0700 | [diff] [blame] | 336 | void __init msm_map_8084_io(void) |
Stepan Moskovchenko | b6bd0bb | 2013-01-24 15:55:35 -0800 | [diff] [blame] | 337 | { |
Stepan Moskovchenko | e90cd65 | 2013-04-18 12:54:47 -0700 | [diff] [blame] | 338 | msm_shared_ram_phys = APQ8084_SHARED_RAM_PHYS; |
| 339 | msm_map_io(msm_8084_io_desc, ARRAY_SIZE(msm_8084_io_desc)); |
Stepan Moskovchenko | b8dd6a9 | 2013-03-18 18:53:34 -0700 | [diff] [blame] | 340 | of_scan_flat_dt(msm_scan_dt_map_imem, NULL); |
Stepan Moskovchenko | b6bd0bb | 2013-01-24 15:55:35 -0800 | [diff] [blame] | 341 | } |
Stepan Moskovchenko | e90cd65 | 2013-04-18 12:54:47 -0700 | [diff] [blame] | 342 | #endif /* CONFIG_ARCH_APQ8084 */ |
Stepan Moskovchenko | b6bd0bb | 2013-01-24 15:55:35 -0800 | [diff] [blame] | 343 | |
Daniel Walker | c83b2bf | 2010-05-04 15:26:13 -0700 | [diff] [blame] | 344 | #ifdef CONFIG_ARCH_MSM7X30 |
| 345 | static struct map_desc msm7x30_io_desc[] __initdata = { |
Taniya Das | 298de8c | 2012-02-16 11:45:31 +0530 | [diff] [blame] | 346 | MSM_CHIP_DEVICE(VIC, MSM7X30), |
| 347 | MSM_CHIP_DEVICE(CSR, MSM7X30), |
| 348 | MSM_CHIP_DEVICE(TMR, MSM7X30), |
| 349 | MSM_CHIP_DEVICE(GPIO1, MSM7X30), |
| 350 | MSM_CHIP_DEVICE(GPIO2, MSM7X30), |
| 351 | MSM_CHIP_DEVICE(CLK_CTL, MSM7X30), |
| 352 | MSM_CHIP_DEVICE(CLK_CTL_SH2, MSM7X30), |
| 353 | MSM_CHIP_DEVICE(AD5, MSM7X30), |
Taniya Das | 298de8c | 2012-02-16 11:45:31 +0530 | [diff] [blame] | 354 | MSM_CHIP_DEVICE(ACC0, MSM7X30), |
| 355 | MSM_CHIP_DEVICE(SAW0, MSM7X30), |
| 356 | MSM_CHIP_DEVICE(APCS_GCC, MSM7X30), |
| 357 | MSM_CHIP_DEVICE(TCSR, MSM7X30), |
Sathish Ambley | bb87d5f | 2011-11-08 15:14:01 -0800 | [diff] [blame] | 358 | #if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \ |
| 359 | defined(CONFIG_DEBUG_MSM_UART3) |
Daniel Walker | c83b2bf | 2010-05-04 15:26:13 -0700 | [diff] [blame] | 360 | MSM_DEVICE(DEBUG_UART), |
| 361 | #endif |
| 362 | { |
| 363 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
Daniel Walker | c83b2bf | 2010-05-04 15:26:13 -0700 | [diff] [blame] | 364 | .length = MSM_SHARED_RAM_SIZE, |
| 365 | .type = MT_DEVICE, |
| 366 | }, |
| 367 | }; |
| 368 | |
| 369 | void __init msm_map_msm7x30_io(void) |
| 370 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 371 | msm_map_io(msm7x30_io_desc, ARRAY_SIZE(msm7x30_io_desc)); |
Daniel Walker | c83b2bf | 2010-05-04 15:26:13 -0700 | [diff] [blame] | 372 | } |
| 373 | #endif /* CONFIG_ARCH_MSM7X30 */ |
| 374 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 375 | #ifdef CONFIG_ARCH_FSM9XXX |
| 376 | static struct map_desc fsm9xxx_io_desc[] __initdata = { |
| 377 | MSM_DEVICE(VIC), |
| 378 | MSM_DEVICE(SIRC), |
| 379 | MSM_DEVICE(CSR), |
| 380 | MSM_DEVICE(TLMM), |
| 381 | MSM_DEVICE(TCSR), |
| 382 | MSM_DEVICE(CLK_CTL), |
| 383 | MSM_DEVICE(ACC), |
| 384 | MSM_DEVICE(SAW), |
| 385 | MSM_DEVICE(GCC), |
| 386 | MSM_DEVICE(GRFC), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 387 | MSM_DEVICE(QFP_FUSE), |
| 388 | MSM_DEVICE(HH), |
Sathish Ambley | bb87d5f | 2011-11-08 15:14:01 -0800 | [diff] [blame] | 389 | #if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \ |
| 390 | defined(CONFIG_DEBUG_MSM_UART3) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 391 | MSM_DEVICE(DEBUG_UART), |
| 392 | #endif |
| 393 | { |
| 394 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 395 | .length = MSM_SHARED_RAM_SIZE, |
| 396 | .type = MT_DEVICE, |
| 397 | }, |
| 398 | }; |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 399 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 400 | void __init msm_map_fsm9xxx_io(void) |
| 401 | { |
| 402 | msm_map_io(fsm9xxx_io_desc, ARRAY_SIZE(fsm9xxx_io_desc)); |
Brian Swetland | 3042102 | 2007-11-26 04:11:43 -0800 | [diff] [blame] | 403 | } |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 404 | #endif /* CONFIG_ARCH_FSM9XXX */ |
| 405 | |
Rohit Vaswani | 695d223 | 2013-03-20 19:12:59 -0700 | [diff] [blame] | 406 | #ifdef CONFIG_ARCH_FSM9900 |
| 407 | static struct map_desc fsm9900_io_desc[] __initdata = { |
| 408 | MSM_CHIP_DEVICE(QGIC_DIST, FSM9900), |
| 409 | MSM_CHIP_DEVICE(TLMM, FSM9900), |
| 410 | { |
| 411 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 412 | .length = MSM_SHARED_RAM_SIZE, |
| 413 | .type = MT_DEVICE, |
| 414 | }, |
| 415 | #ifdef CONFIG_DEBUG_FSM9900_UART |
| 416 | MSM_DEVICE(DEBUG_UART), |
| 417 | #endif |
| 418 | }; |
| 419 | |
| 420 | void __init msm_map_fsm9900_io(void) |
| 421 | { |
| 422 | msm_shared_ram_phys = FSM9900_SHARED_RAM_PHYS; |
| 423 | msm_map_io(fsm9900_io_desc, ARRAY_SIZE(fsm9900_io_desc)); |
| 424 | of_scan_flat_dt(msm_scan_dt_map_imem, NULL); |
| 425 | } |
| 426 | #endif /* CONFIG_ARCH_FSM9900 */ |
| 427 | |
Rohit Vaswani | 99fb6f2 | 2011-08-15 13:37:32 -0700 | [diff] [blame] | 428 | #ifdef CONFIG_ARCH_MSM9615 |
| 429 | static struct map_desc msm9615_io_desc[] __initdata = { |
| 430 | MSM_CHIP_DEVICE(QGIC_DIST, MSM9615), |
| 431 | MSM_CHIP_DEVICE(QGIC_CPU, MSM9615), |
| 432 | MSM_CHIP_DEVICE(ACC0, MSM9615), |
| 433 | MSM_CHIP_DEVICE(TMR, MSM9615), |
Rohit Vaswani | 99fb6f2 | 2011-08-15 13:37:32 -0700 | [diff] [blame] | 434 | MSM_CHIP_DEVICE(TLMM, MSM9615), |
| 435 | MSM_CHIP_DEVICE(SAW0, MSM9615), |
| 436 | MSM_CHIP_DEVICE(APCS_GCC, MSM9615), |
| 437 | MSM_CHIP_DEVICE(TCSR, MSM9615), |
Vikram Mulukutla | 489e39e | 2011-08-31 18:04:05 -0700 | [diff] [blame] | 438 | MSM_CHIP_DEVICE(L2CC, MSM9615), |
| 439 | MSM_CHIP_DEVICE(CLK_CTL, MSM9615), |
| 440 | MSM_CHIP_DEVICE(LPASS_CLK_CTL, MSM9615), |
Rohit Vaswani | 71c86b7 | 2011-09-09 16:51:46 -0700 | [diff] [blame] | 441 | MSM_CHIP_DEVICE(RPM, MSM9615), |
| 442 | MSM_CHIP_DEVICE(RPM_MPM, MSM9615), |
| 443 | MSM_CHIP_DEVICE(APCS_GLB, MSM9615), |
Rohit Vaswani | 4f96570c | 2011-10-13 18:14:37 -0700 | [diff] [blame] | 444 | MSM_CHIP_DEVICE(IMEM, MSM9615), |
Rohit Vaswani | 99fb6f2 | 2011-08-15 13:37:32 -0700 | [diff] [blame] | 445 | { |
| 446 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 447 | .length = MSM_SHARED_RAM_SIZE, |
| 448 | .type = MT_DEVICE, |
| 449 | }, |
Siddartha Mohanadoss | 5d49cec | 2011-09-21 10:26:15 -0700 | [diff] [blame] | 450 | MSM_CHIP_DEVICE(QFPROM, MSM9615), |
Rohit Vaswani | 99fb6f2 | 2011-08-15 13:37:32 -0700 | [diff] [blame] | 451 | }; |
| 452 | |
| 453 | void __init msm_map_msm9615_io(void) |
| 454 | { |
| 455 | msm_map_io(msm9615_io_desc, ARRAY_SIZE(msm9615_io_desc)); |
| 456 | } |
| 457 | #endif /* CONFIG_ARCH_MSM9615 */ |
| 458 | |
Taniya Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 459 | #ifdef CONFIG_ARCH_MSM8625 |
| 460 | static struct map_desc msm8625_io_desc[] __initdata = { |
Taniya Das | 13b811a | 2011-12-09 18:33:45 +0530 | [diff] [blame] | 461 | MSM_CHIP_DEVICE(CSR, MSM7XXX), |
| 462 | MSM_CHIP_DEVICE(GPIO1, MSM7XXX), |
| 463 | MSM_CHIP_DEVICE(GPIO2, MSM7XXX), |
| 464 | MSM_CHIP_DEVICE(QGIC_DIST, MSM8625), |
| 465 | MSM_CHIP_DEVICE(QGIC_CPU, MSM8625), |
| 466 | MSM_CHIP_DEVICE(TMR, MSM8625), |
| 467 | MSM_CHIP_DEVICE(TMR0, MSM8625), |
| 468 | MSM_CHIP_DEVICE(SCU, MSM8625), |
| 469 | MSM_CHIP_DEVICE(CFG_CTL, MSM8625), |
| 470 | MSM_CHIP_DEVICE(CLK_CTL, MSM8625), |
Taniya Das | 12df7bf | 2012-02-15 11:36:19 +0530 | [diff] [blame] | 471 | MSM_CHIP_DEVICE(SAW0, MSM8625), |
| 472 | MSM_CHIP_DEVICE(SAW1, MSM8625), |
Murali Nalajala | 1d1df9c | 2012-10-31 14:15:52 +0530 | [diff] [blame] | 473 | MSM_CHIP_DEVICE(SAW2, MSM8625), |
| 474 | MSM_CHIP_DEVICE(SAW3, MSM8625), |
Manish Dewangan | 504430a | 2012-02-29 17:34:38 +0530 | [diff] [blame] | 475 | MSM_CHIP_DEVICE(AD5, MSM7XXX), |
Taniya Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 476 | #if defined(CONFIG_DEBUG_MSM_UART1) || defined(CONFIG_DEBUG_MSM_UART2) || \ |
| 477 | defined(CONFIG_DEBUG_MSM_UART3) |
Taniya Das | fa4ee7f | 2012-02-21 15:04:51 +0530 | [diff] [blame] | 478 | MSM_DEVICE(DEBUG_UART), |
Taniya Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 479 | #endif |
| 480 | #ifdef CONFIG_CACHE_L2X0 |
| 481 | { |
| 482 | .virtual = (unsigned long) MSM_L2CC_BASE, |
Taniya Das | 13b811a | 2011-12-09 18:33:45 +0530 | [diff] [blame] | 483 | .pfn = __phys_to_pfn(MSM7XXX_L2CC_PHYS), |
| 484 | .length = MSM7XXX_L2CC_SIZE, |
Taniya Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 485 | .type = MT_DEVICE, |
| 486 | }, |
| 487 | #endif |
| 488 | { |
| 489 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 490 | .length = MSM_SHARED_RAM_SIZE, |
| 491 | .type = MT_DEVICE, |
| 492 | }, |
| 493 | }; |
| 494 | |
| 495 | void __init msm_map_msm8625_io(void) |
| 496 | { |
| 497 | msm_map_io(msm8625_io_desc, ARRAY_SIZE(msm8625_io_desc)); |
Trilok Soni | 80c1936 | 2012-10-15 00:55:00 +0530 | [diff] [blame] | 498 | map_page_strongly_ordered(); |
Taniya Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 499 | } |
| 500 | #else |
| 501 | void __init msm_map_msm8625_io(void) { return; } |
| 502 | #endif /* CONFIG_ARCH_MSM8625 */ |
| 503 | |
Rohit Vaswani | 58fc0c6 | 2012-04-23 18:50:26 -0700 | [diff] [blame] | 504 | #ifdef CONFIG_ARCH_MSM9625 |
| 505 | static struct map_desc msm9625_io_desc[] __initdata = { |
Girish Mahadevan | 8817071 | 2012-10-09 15:27:06 -0700 | [diff] [blame] | 506 | MSM_CHIP_DEVICE(QGIC_DIST, MSM9625), |
Rohit Vaswani | 58fc0c6 | 2012-04-23 18:50:26 -0700 | [diff] [blame] | 507 | MSM_CHIP_DEVICE(TLMM, MSM9625), |
Abhimanyu Kapur | 46e5e2b | 2012-10-02 20:45:37 -0700 | [diff] [blame] | 508 | MSM_CHIP_DEVICE(MPM2_PSHOLD, MSM9625), |
Rohit Vaswani | 58fc0c6 | 2012-04-23 18:50:26 -0700 | [diff] [blame] | 509 | MSM_CHIP_DEVICE(TMR, MSM9625), |
| 510 | { |
| 511 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 512 | .length = MSM_SHARED_RAM_SIZE, |
| 513 | .type = MT_DEVICE, |
| 514 | }, |
| 515 | #ifdef CONFIG_DEBUG_MSM9625_UART |
| 516 | MSM_DEVICE(DEBUG_UART), |
| 517 | #endif |
| 518 | }; |
| 519 | |
| 520 | void __init msm_map_msm9625_io(void) |
| 521 | { |
| 522 | msm_shared_ram_phys = MSM9625_SHARED_RAM_PHYS; |
| 523 | msm_map_io(msm9625_io_desc, ARRAY_SIZE(msm9625_io_desc)); |
Abhimanyu Kapur | 032b1f4 | 2013-01-18 00:10:50 -0800 | [diff] [blame] | 524 | of_scan_flat_dt(msm_scan_dt_map_imem, NULL); |
Rohit Vaswani | 58fc0c6 | 2012-04-23 18:50:26 -0700 | [diff] [blame] | 525 | } |
| 526 | #endif /* CONFIG_ARCH_MSM9625 */ |
Ravi Kumar V | 8834dad | 2012-08-31 22:49:55 +0530 | [diff] [blame] | 527 | |
Abhimanyu Kapur | b2e8914 | 2013-03-18 15:59:57 -0700 | [diff] [blame] | 528 | #ifdef CONFIG_ARCH_MSMKRYPTON |
| 529 | static struct map_desc msmkrypton_io_desc[] __initdata = { |
| 530 | MSM_CHIP_DEVICE(TLMM, MSMKRYPTON), |
| 531 | MSM_CHIP_DEVICE(MPM2_PSHOLD, MSMKRYPTON), |
| 532 | { |
| 533 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 534 | .length = MSM_SHARED_RAM_SIZE, |
| 535 | .type = MT_DEVICE, |
| 536 | }, |
| 537 | }; |
| 538 | |
| 539 | void __init msm_map_msmkrypton_io(void) |
| 540 | { |
| 541 | msm_shared_ram_phys = MSMKRYPTON_SHARED_RAM_PHYS; |
| 542 | msm_map_io(msmkrypton_io_desc, ARRAY_SIZE(msmkrypton_io_desc)); |
| 543 | of_scan_flat_dt(msm_scan_dt_map_imem, NULL); |
| 544 | } |
| 545 | #endif /* CONFIG_ARCH_MSMKRYPTON */ |
| 546 | |
Ravi Kumar V | 8834dad | 2012-08-31 22:49:55 +0530 | [diff] [blame] | 547 | #ifdef CONFIG_ARCH_MPQ8092 |
| 548 | static struct map_desc mpq8092_io_desc[] __initdata = { |
| 549 | MSM_CHIP_DEVICE(QGIC_DIST, MPQ8092), |
Ravi Kumar V | 8834dad | 2012-08-31 22:49:55 +0530 | [diff] [blame] | 550 | MSM_CHIP_DEVICE(TLMM, MPQ8092), |
| 551 | { |
| 552 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 553 | .length = MSM_SHARED_RAM_SIZE, |
| 554 | .type = MT_DEVICE, |
| 555 | }, |
| 556 | #ifdef CONFIG_DEBUG_MPQ8092_UART |
| 557 | MSM_DEVICE(DEBUG_UART), |
| 558 | #endif |
| 559 | }; |
| 560 | |
| 561 | void __init msm_map_mpq8092_io(void) |
| 562 | { |
Ravi Kumar V | 8485af6 | 2012-09-21 13:15:17 +0530 | [diff] [blame] | 563 | msm_shared_ram_phys = MPQ8092_MSM_SHARED_RAM_PHYS; |
Ravi Kumar V | 8834dad | 2012-08-31 22:49:55 +0530 | [diff] [blame] | 564 | msm_map_io(mpq8092_io_desc, ARRAY_SIZE(mpq8092_io_desc)); |
Srinivas Ramana | 2a28d52 | 2013-05-22 13:05:22 +0530 | [diff] [blame] | 565 | of_scan_flat_dt(msm_scan_dt_map_imem, NULL); |
Ravi Kumar V | 8834dad | 2012-08-31 22:49:55 +0530 | [diff] [blame] | 566 | } |
| 567 | #endif /* CONFIG_ARCH_MPQ8092 */ |
Syed Rameez Mustafa | 61c9a57 | 2012-08-23 16:10:07 -0700 | [diff] [blame] | 568 | |
| 569 | #ifdef CONFIG_ARCH_MSM8226 |
| 570 | static struct map_desc msm_8226_io_desc[] __initdata = { |
| 571 | MSM_CHIP_DEVICE(QGIC_DIST, MSM8226), |
Syed Rameez Mustafa | 61c9a57 | 2012-08-23 16:10:07 -0700 | [diff] [blame] | 572 | MSM_CHIP_DEVICE(APCS_GCC, MSM8226), |
| 573 | MSM_CHIP_DEVICE(TLMM, MSM8226), |
Syed Rameez Mustafa | 1783819 | 2012-11-19 16:42:29 -0800 | [diff] [blame] | 574 | MSM_CHIP_DEVICE(MPM2_PSHOLD, MSM8226), |
Syed Rameez Mustafa | 61c9a57 | 2012-08-23 16:10:07 -0700 | [diff] [blame] | 575 | { |
| 576 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 577 | .length = MSM_SHARED_RAM_SIZE, |
| 578 | .type = MT_DEVICE, |
| 579 | }, |
Syed Rameez Mustafa | 16b1bf3 | 2012-09-10 19:21:45 -0700 | [diff] [blame] | 580 | #ifdef CONFIG_DEBUG_MSM8226_UART |
Syed Rameez Mustafa | 61c9a57 | 2012-08-23 16:10:07 -0700 | [diff] [blame] | 581 | MSM_DEVICE(DEBUG_UART), |
| 582 | #endif |
| 583 | }; |
| 584 | |
| 585 | |
| 586 | void __init msm_map_msm8226_io(void) |
| 587 | { |
| 588 | msm_shared_ram_phys = MSM8226_MSM_SHARED_RAM_PHYS; |
| 589 | msm_map_io(msm_8226_io_desc, ARRAY_SIZE(msm_8226_io_desc)); |
Abhimanyu Kapur | 032b1f4 | 2013-01-18 00:10:50 -0800 | [diff] [blame] | 590 | of_scan_flat_dt(msm_scan_dt_map_imem, NULL); |
Syed Rameez Mustafa | 61c9a57 | 2012-08-23 16:10:07 -0700 | [diff] [blame] | 591 | } |
| 592 | #endif /* CONFIG_ARCH_MSM8226 */ |
Syed Rameez Mustafa | 8f21005 | 2012-09-21 18:28:31 -0700 | [diff] [blame] | 593 | |
Syed Rameez Mustafa | 3971c14 | 2013-01-09 19:04:53 -0800 | [diff] [blame] | 594 | #ifdef CONFIG_ARCH_MSM8610 |
| 595 | static struct map_desc msm8610_io_desc[] __initdata = { |
Priyanka Mathur | 5ea448f | 2013-04-30 15:33:19 -0700 | [diff] [blame] | 596 | MSM_CHIP_DEVICE(QGIC_DIST, MSM8610), |
Syed Rameez Mustafa | 3971c14 | 2013-01-09 19:04:53 -0800 | [diff] [blame] | 597 | MSM_CHIP_DEVICE(APCS_GCC, MSM8610), |
| 598 | MSM_CHIP_DEVICE(TLMM, MSM8610), |
| 599 | MSM_CHIP_DEVICE(MPM2_PSHOLD, MSM8610), |
Syed Rameez Mustafa | 8f21005 | 2012-09-21 18:28:31 -0700 | [diff] [blame] | 600 | { |
| 601 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 602 | .length = MSM_SHARED_RAM_SIZE, |
| 603 | .type = MT_DEVICE, |
| 604 | }, |
| 605 | }; |
| 606 | |
Syed Rameez Mustafa | 3971c14 | 2013-01-09 19:04:53 -0800 | [diff] [blame] | 607 | void __init msm_map_msm8610_io(void) |
Syed Rameez Mustafa | 8f21005 | 2012-09-21 18:28:31 -0700 | [diff] [blame] | 608 | { |
Syed Rameez Mustafa | 3971c14 | 2013-01-09 19:04:53 -0800 | [diff] [blame] | 609 | msm_shared_ram_phys = MSM8610_MSM_SHARED_RAM_PHYS; |
| 610 | msm_map_io(msm8610_io_desc, ARRAY_SIZE(msm8610_io_desc)); |
Abhimanyu Kapur | 032b1f4 | 2013-01-18 00:10:50 -0800 | [diff] [blame] | 611 | of_scan_flat_dt(msm_scan_dt_map_imem, NULL); |
Syed Rameez Mustafa | 8f21005 | 2012-09-21 18:28:31 -0700 | [diff] [blame] | 612 | } |
Syed Rameez Mustafa | 3971c14 | 2013-01-09 19:04:53 -0800 | [diff] [blame] | 613 | #endif /* CONFIG_ARCH_MSM8610 */ |
Jay Chokshi | 184a7df | 2013-05-10 17:35:59 -0700 | [diff] [blame] | 614 | |
| 615 | #ifdef CONFIG_ARCH_MSMSAMARIUM |
| 616 | static struct map_desc msmsamarium_io_desc[] __initdata = { |
| 617 | MSM_CHIP_DEVICE(QGIC_DIST, MSMSAMARIUM), |
| 618 | MSM_CHIP_DEVICE(TLMM, MSMSAMARIUM), |
| 619 | MSM_CHIP_DEVICE(MPM2_PSHOLD, MSMSAMARIUM), |
| 620 | { |
| 621 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 622 | .length = MSM_SHARED_RAM_SIZE, |
| 623 | .type = MT_DEVICE, |
| 624 | }, |
| 625 | #if defined(CONFIG_DEBUG_MSMSAMARIUM_UART) || defined(CONFIG_DEBUG_MSM8974_UART) |
| 626 | MSM_DEVICE(DEBUG_UART), |
| 627 | #endif |
| 628 | }; |
| 629 | |
| 630 | void __init msm_map_msmsamarium_io(void) |
| 631 | { |
| 632 | msm_shared_ram_phys = MSMSAMARIUM_SHARED_RAM_PHYS; |
| 633 | msm_map_io(msmsamarium_io_desc, ARRAY_SIZE(msmsamarium_io_desc)); |
| 634 | of_scan_flat_dt(msm_scan_dt_map_imem, NULL); |
| 635 | } |
| 636 | #endif /* CONFIG_ARCH_MSMSAMARIUM */ |