Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | #include <linux/kernel.h> |
| 15 | #include <linux/list.h> |
| 16 | #include <linux/platform_device.h> |
| 17 | #include <linux/msm_rotator.h> |
| 18 | #include <linux/clkdev.h> |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 19 | #include <linux/dma-mapping.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 20 | #include <mach/irqs-8064.h> |
| 21 | #include <mach/board.h> |
| 22 | #include <mach/msm_iomap.h> |
Yan He | 06913ce | 2011-08-26 16:33:46 -0700 | [diff] [blame] | 23 | #include <mach/usbdiag.h> |
| 24 | #include <mach/msm_sps.h> |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 25 | #include <mach/dma.h> |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 26 | #include <sound/msm-dai-q6.h> |
| 27 | #include <sound/apr_audio.h> |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 28 | #include <mach/msm_bus_board.h> |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 29 | #include <mach/rpm.h> |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 30 | #include <mach/mdm2.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 31 | #include "clock.h" |
| 32 | #include "devices.h" |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 33 | #include "msm_watchdog.h" |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 34 | #include "rpm_stats.h" |
| 35 | #include "rpm_log.h" |
| 36 | #include "mpm.h" |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 37 | |
| 38 | /* Address of GSBI blocks */ |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 39 | #define MSM_GSBI1_PHYS 0x12440000 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 40 | #define MSM_GSBI3_PHYS 0x16200000 |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 41 | #define MSM_GSBI4_PHYS 0x16300000 |
| 42 | #define MSM_GSBI5_PHYS 0x1A200000 |
| 43 | #define MSM_GSBI6_PHYS 0x16500000 |
| 44 | #define MSM_GSBI7_PHYS 0x16600000 |
| 45 | |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 46 | /* GSBI UART devices */ |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 47 | #define MSM_UART1DM_PHYS (MSM_GSBI1_PHYS + 0x10000) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 48 | #define MSM_UART3DM_PHYS (MSM_GSBI3_PHYS + 0x40000) |
| 49 | |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 50 | /* GSBI QUP devices */ |
| 51 | #define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000) |
| 52 | #define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000) |
| 53 | #define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000) |
| 54 | #define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000) |
| 55 | #define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000) |
| 56 | #define MSM_QUP_SIZE SZ_4K |
| 57 | |
Kenneth Heitke | 36920d3 | 2011-07-20 16:44:30 -0600 | [diff] [blame] | 58 | /* Address of SSBI CMD */ |
| 59 | #define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000 |
| 60 | #define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000 |
| 61 | #define MSM_PMIC_SSBI_SIZE SZ_4K |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 62 | |
Hemant Kumar | caa0909 | 2011-07-30 00:26:33 -0700 | [diff] [blame] | 63 | /* Address of HS USBOTG1 */ |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 64 | #define MSM_HSUSB1_PHYS 0x12500000 |
| 65 | #define MSM_HSUSB1_SIZE SZ_4K |
Hemant Kumar | caa0909 | 2011-07-30 00:26:33 -0700 | [diff] [blame] | 66 | |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 67 | static struct msm_watchdog_pdata msm_watchdog_pdata = { |
| 68 | .pet_time = 10000, |
| 69 | .bark_time = 11000, |
| 70 | .has_secure = true, |
| 71 | }; |
| 72 | |
| 73 | struct platform_device msm8064_device_watchdog = { |
| 74 | .name = "msm_watchdog", |
| 75 | .id = -1, |
| 76 | .dev = { |
| 77 | .platform_data = &msm_watchdog_pdata, |
| 78 | }, |
| 79 | }; |
| 80 | |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 81 | static struct resource msm_dmov_resource[] = { |
| 82 | { |
Jeff Ohlstein | 4af7269 | 2011-11-07 15:59:17 -0800 | [diff] [blame] | 83 | .start = ADM_0_SCSS_1_IRQ, |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 84 | .flags = IORESOURCE_IRQ, |
| 85 | }, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 86 | { |
Jeff Ohlstein | 4af7269 | 2011-11-07 15:59:17 -0800 | [diff] [blame] | 87 | .start = 0x18320000, |
| 88 | .end = 0x18320000 + SZ_1M - 1, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 89 | .flags = IORESOURCE_MEM, |
| 90 | }, |
| 91 | }; |
| 92 | |
| 93 | static struct msm_dmov_pdata msm_dmov_pdata = { |
Jeff Ohlstein | 4af7269 | 2011-11-07 15:59:17 -0800 | [diff] [blame] | 94 | .sd = 1, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 95 | .sd_size = 0x800, |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 96 | }; |
| 97 | |
Stepan Moskovchenko | df13d34 | 2011-08-03 19:01:25 -0700 | [diff] [blame] | 98 | struct platform_device apq8064_device_dmov = { |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 99 | .name = "msm_dmov", |
| 100 | .id = -1, |
| 101 | .resource = msm_dmov_resource, |
| 102 | .num_resources = ARRAY_SIZE(msm_dmov_resource), |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 103 | .dev = { |
| 104 | .platform_data = &msm_dmov_pdata, |
| 105 | }, |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 106 | }; |
| 107 | |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 108 | static struct resource resources_uart_gsbi1[] = { |
| 109 | { |
| 110 | .start = APQ8064_GSBI1_UARTDM_IRQ, |
| 111 | .end = APQ8064_GSBI1_UARTDM_IRQ, |
| 112 | .flags = IORESOURCE_IRQ, |
| 113 | }, |
| 114 | { |
| 115 | .start = MSM_UART1DM_PHYS, |
| 116 | .end = MSM_UART1DM_PHYS + PAGE_SIZE - 1, |
| 117 | .name = "uartdm_resource", |
| 118 | .flags = IORESOURCE_MEM, |
| 119 | }, |
| 120 | { |
| 121 | .start = MSM_GSBI1_PHYS, |
| 122 | .end = MSM_GSBI1_PHYS + PAGE_SIZE - 1, |
| 123 | .name = "gsbi_resource", |
| 124 | .flags = IORESOURCE_MEM, |
| 125 | }, |
| 126 | }; |
| 127 | |
| 128 | struct platform_device apq8064_device_uart_gsbi1 = { |
| 129 | .name = "msm_serial_hsl", |
| 130 | .id = 0, |
| 131 | .num_resources = ARRAY_SIZE(resources_uart_gsbi1), |
| 132 | .resource = resources_uart_gsbi1, |
| 133 | }; |
| 134 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 135 | static struct resource resources_uart_gsbi3[] = { |
| 136 | { |
| 137 | .start = GSBI3_UARTDM_IRQ, |
| 138 | .end = GSBI3_UARTDM_IRQ, |
| 139 | .flags = IORESOURCE_IRQ, |
| 140 | }, |
| 141 | { |
| 142 | .start = MSM_UART3DM_PHYS, |
| 143 | .end = MSM_UART3DM_PHYS + PAGE_SIZE - 1, |
| 144 | .name = "uartdm_resource", |
| 145 | .flags = IORESOURCE_MEM, |
| 146 | }, |
| 147 | { |
| 148 | .start = MSM_GSBI3_PHYS, |
| 149 | .end = MSM_GSBI3_PHYS + PAGE_SIZE - 1, |
| 150 | .name = "gsbi_resource", |
| 151 | .flags = IORESOURCE_MEM, |
| 152 | }, |
| 153 | }; |
| 154 | |
| 155 | struct platform_device apq8064_device_uart_gsbi3 = { |
| 156 | .name = "msm_serial_hsl", |
| 157 | .id = 0, |
| 158 | .num_resources = ARRAY_SIZE(resources_uart_gsbi3), |
| 159 | .resource = resources_uart_gsbi3, |
| 160 | }; |
| 161 | |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 162 | static struct resource resources_qup_i2c_gsbi4[] = { |
| 163 | { |
| 164 | .name = "gsbi_qup_i2c_addr", |
| 165 | .start = MSM_GSBI4_PHYS, |
Harini Jayaraman | e1554a9 | 2011-09-15 14:43:02 -0600 | [diff] [blame] | 166 | .end = MSM_GSBI4_PHYS + 4 - 1, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 167 | .flags = IORESOURCE_MEM, |
| 168 | }, |
| 169 | { |
| 170 | .name = "qup_phys_addr", |
| 171 | .start = MSM_GSBI4_QUP_PHYS, |
Harini Jayaraman | e1554a9 | 2011-09-15 14:43:02 -0600 | [diff] [blame] | 172 | .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 173 | .flags = IORESOURCE_MEM, |
| 174 | }, |
| 175 | { |
| 176 | .name = "qup_err_intr", |
| 177 | .start = GSBI4_QUP_IRQ, |
| 178 | .end = GSBI4_QUP_IRQ, |
| 179 | .flags = IORESOURCE_IRQ, |
| 180 | }, |
| 181 | }; |
| 182 | |
| 183 | struct platform_device apq8064_device_qup_i2c_gsbi4 = { |
| 184 | .name = "qup_i2c", |
| 185 | .id = 4, |
| 186 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4), |
| 187 | .resource = resources_qup_i2c_gsbi4, |
| 188 | }; |
| 189 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 190 | static struct resource resources_qup_spi_gsbi5[] = { |
| 191 | { |
| 192 | .name = "spi_base", |
| 193 | .start = MSM_GSBI5_QUP_PHYS, |
| 194 | .end = MSM_GSBI5_QUP_PHYS + SZ_4K - 1, |
| 195 | .flags = IORESOURCE_MEM, |
| 196 | }, |
| 197 | { |
| 198 | .name = "gsbi_base", |
| 199 | .start = MSM_GSBI5_PHYS, |
| 200 | .end = MSM_GSBI5_PHYS + 4 - 1, |
| 201 | .flags = IORESOURCE_MEM, |
| 202 | }, |
| 203 | { |
| 204 | .name = "spi_irq_in", |
| 205 | .start = GSBI5_QUP_IRQ, |
| 206 | .end = GSBI5_QUP_IRQ, |
| 207 | .flags = IORESOURCE_IRQ, |
| 208 | }, |
| 209 | }; |
| 210 | |
| 211 | struct platform_device apq8064_device_qup_spi_gsbi5 = { |
| 212 | .name = "spi_qsd", |
| 213 | .id = 0, |
| 214 | .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi5), |
| 215 | .resource = resources_qup_spi_gsbi5, |
| 216 | }; |
| 217 | |
Bharath Ramachandramurthy | b8e797f | 2011-11-30 12:08:42 -0800 | [diff] [blame] | 218 | struct platform_device apq_pcm = { |
| 219 | .name = "msm-pcm-dsp", |
| 220 | .id = -1, |
| 221 | }; |
| 222 | |
| 223 | struct platform_device apq_pcm_routing = { |
| 224 | .name = "msm-pcm-routing", |
| 225 | .id = -1, |
| 226 | }; |
| 227 | |
| 228 | struct platform_device apq_cpudai0 = { |
| 229 | .name = "msm-dai-q6", |
| 230 | .id = 0x4000, |
| 231 | }; |
| 232 | |
| 233 | struct platform_device apq_cpudai1 = { |
| 234 | .name = "msm-dai-q6", |
| 235 | .id = 0x4001, |
| 236 | }; |
| 237 | |
| 238 | struct platform_device apq_cpudai_hdmi_rx = { |
| 239 | .name = "msm-dai-q6", |
| 240 | .id = 8, |
| 241 | }; |
| 242 | |
| 243 | struct platform_device apq_cpudai_bt_rx = { |
| 244 | .name = "msm-dai-q6", |
| 245 | .id = 0x3000, |
| 246 | }; |
| 247 | |
| 248 | struct platform_device apq_cpudai_bt_tx = { |
| 249 | .name = "msm-dai-q6", |
| 250 | .id = 0x3001, |
| 251 | }; |
| 252 | |
| 253 | struct platform_device apq_cpudai_fm_rx = { |
| 254 | .name = "msm-dai-q6", |
| 255 | .id = 0x3004, |
| 256 | }; |
| 257 | |
| 258 | struct platform_device apq_cpudai_fm_tx = { |
| 259 | .name = "msm-dai-q6", |
| 260 | .id = 0x3005, |
| 261 | }; |
| 262 | |
| 263 | /* |
| 264 | * Machine specific data for AUX PCM Interface |
| 265 | * which the driver will be unware of. |
| 266 | */ |
| 267 | struct msm_dai_auxpcm_pdata apq_auxpcm_rx_pdata = { |
| 268 | .clk = "pcm_clk", |
| 269 | .mode = AFE_PCM_CFG_MODE_PCM, |
| 270 | .sync = AFE_PCM_CFG_SYNC_INT, |
| 271 | .frame = AFE_PCM_CFG_FRM_256BPF, |
| 272 | .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD, |
| 273 | .slot = 0, |
| 274 | .data = AFE_PCM_CFG_CDATAOE_MASTER, |
| 275 | .pcm_clk_rate = 2048000, |
| 276 | }; |
| 277 | |
| 278 | struct platform_device apq_cpudai_auxpcm_rx = { |
| 279 | .name = "msm-dai-q6", |
| 280 | .id = 2, |
| 281 | .dev = { |
| 282 | .platform_data = &apq_auxpcm_rx_pdata, |
| 283 | }, |
| 284 | }; |
| 285 | |
| 286 | struct platform_device apq_cpudai_auxpcm_tx = { |
| 287 | .name = "msm-dai-q6", |
| 288 | .id = 3, |
| 289 | }; |
| 290 | |
| 291 | struct platform_device apq_cpu_fe = { |
| 292 | .name = "msm-dai-fe", |
| 293 | .id = -1, |
| 294 | }; |
| 295 | |
| 296 | struct platform_device apq_stub_codec = { |
| 297 | .name = "msm-stub-codec", |
| 298 | .id = 1, |
| 299 | }; |
| 300 | |
| 301 | struct platform_device apq_voice = { |
| 302 | .name = "msm-pcm-voice", |
| 303 | .id = -1, |
| 304 | }; |
| 305 | |
| 306 | struct platform_device apq_voip = { |
| 307 | .name = "msm-voip-dsp", |
| 308 | .id = -1, |
| 309 | }; |
| 310 | |
| 311 | struct platform_device apq_lpa_pcm = { |
| 312 | .name = "msm-pcm-lpa", |
| 313 | .id = -1, |
| 314 | }; |
| 315 | |
| 316 | struct platform_device apq_pcm_hostless = { |
| 317 | .name = "msm-pcm-hostless", |
| 318 | .id = -1, |
| 319 | }; |
| 320 | |
| 321 | struct platform_device apq_cpudai_afe_01_rx = { |
| 322 | .name = "msm-dai-q6", |
| 323 | .id = 0xE0, |
| 324 | }; |
| 325 | |
| 326 | struct platform_device apq_cpudai_afe_01_tx = { |
| 327 | .name = "msm-dai-q6", |
| 328 | .id = 0xF0, |
| 329 | }; |
| 330 | |
| 331 | struct platform_device apq_cpudai_afe_02_rx = { |
| 332 | .name = "msm-dai-q6", |
| 333 | .id = 0xF1, |
| 334 | }; |
| 335 | |
| 336 | struct platform_device apq_cpudai_afe_02_tx = { |
| 337 | .name = "msm-dai-q6", |
| 338 | .id = 0xE1, |
| 339 | }; |
| 340 | |
| 341 | struct platform_device apq_pcm_afe = { |
| 342 | .name = "msm-pcm-afe", |
| 343 | .id = -1, |
| 344 | }; |
| 345 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 346 | static struct resource resources_ssbi_pmic1[] = { |
| 347 | { |
| 348 | .start = MSM_PMIC1_SSBI_CMD_PHYS, |
| 349 | .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1, |
| 350 | .flags = IORESOURCE_MEM, |
| 351 | }, |
| 352 | }; |
| 353 | |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 354 | #define LPASS_SLIMBUS_PHYS 0x28080000 |
| 355 | #define LPASS_SLIMBUS_BAM_PHYS 0x28084000 |
| 356 | /* Board info for the slimbus slave device */ |
| 357 | static struct resource slimbus_res[] = { |
| 358 | { |
| 359 | .start = LPASS_SLIMBUS_PHYS, |
| 360 | .end = LPASS_SLIMBUS_PHYS + 8191, |
| 361 | .flags = IORESOURCE_MEM, |
| 362 | .name = "slimbus_physical", |
| 363 | }, |
| 364 | { |
| 365 | .start = LPASS_SLIMBUS_BAM_PHYS, |
| 366 | .end = LPASS_SLIMBUS_BAM_PHYS + 8191, |
| 367 | .flags = IORESOURCE_MEM, |
| 368 | .name = "slimbus_bam_physical", |
| 369 | }, |
| 370 | { |
| 371 | .start = SLIMBUS0_CORE_EE1_IRQ, |
| 372 | .end = SLIMBUS0_CORE_EE1_IRQ, |
| 373 | .flags = IORESOURCE_IRQ, |
| 374 | .name = "slimbus_irq", |
| 375 | }, |
| 376 | { |
| 377 | .start = SLIMBUS0_BAM_EE1_IRQ, |
| 378 | .end = SLIMBUS0_BAM_EE1_IRQ, |
| 379 | .flags = IORESOURCE_IRQ, |
| 380 | .name = "slimbus_bam_irq", |
| 381 | }, |
| 382 | }; |
| 383 | |
| 384 | struct platform_device apq8064_slim_ctrl = { |
| 385 | .name = "msm_slim_ctrl", |
| 386 | .id = 1, |
| 387 | .num_resources = ARRAY_SIZE(slimbus_res), |
| 388 | .resource = slimbus_res, |
| 389 | .dev = { |
| 390 | .coherent_dma_mask = 0xffffffffULL, |
| 391 | }, |
| 392 | }; |
| 393 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 394 | struct platform_device apq8064_device_ssbi_pmic1 = { |
| 395 | .name = "msm_ssbi", |
| 396 | .id = 0, |
| 397 | .resource = resources_ssbi_pmic1, |
| 398 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic1), |
| 399 | }; |
| 400 | |
| 401 | static struct resource resources_ssbi_pmic2[] = { |
| 402 | { |
| 403 | .start = MSM_PMIC2_SSBI_CMD_PHYS, |
| 404 | .end = MSM_PMIC2_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1, |
| 405 | .flags = IORESOURCE_MEM, |
| 406 | }, |
| 407 | }; |
| 408 | |
| 409 | struct platform_device apq8064_device_ssbi_pmic2 = { |
| 410 | .name = "msm_ssbi", |
| 411 | .id = 1, |
| 412 | .resource = resources_ssbi_pmic2, |
| 413 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic2), |
| 414 | }; |
| 415 | |
| 416 | static struct resource resources_otg[] = { |
| 417 | { |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 418 | .start = MSM_HSUSB1_PHYS, |
| 419 | .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 420 | .flags = IORESOURCE_MEM, |
| 421 | }, |
| 422 | { |
| 423 | .start = USB1_HS_IRQ, |
| 424 | .end = USB1_HS_IRQ, |
| 425 | .flags = IORESOURCE_IRQ, |
| 426 | }, |
| 427 | }; |
| 428 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 429 | struct platform_device apq8064_device_otg = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 430 | .name = "msm_otg", |
| 431 | .id = -1, |
| 432 | .num_resources = ARRAY_SIZE(resources_otg), |
| 433 | .resource = resources_otg, |
| 434 | .dev = { |
| 435 | .coherent_dma_mask = 0xffffffff, |
| 436 | }, |
| 437 | }; |
| 438 | |
| 439 | static struct resource resources_hsusb[] = { |
| 440 | { |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 441 | .start = MSM_HSUSB1_PHYS, |
| 442 | .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 443 | .flags = IORESOURCE_MEM, |
| 444 | }, |
| 445 | { |
| 446 | .start = USB1_HS_IRQ, |
| 447 | .end = USB1_HS_IRQ, |
| 448 | .flags = IORESOURCE_IRQ, |
| 449 | }, |
| 450 | }; |
| 451 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 452 | struct platform_device apq8064_device_gadget_peripheral = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 453 | .name = "msm_hsusb", |
| 454 | .id = -1, |
| 455 | .num_resources = ARRAY_SIZE(resources_hsusb), |
| 456 | .resource = resources_hsusb, |
| 457 | .dev = { |
| 458 | .coherent_dma_mask = 0xffffffff, |
| 459 | }, |
| 460 | }; |
| 461 | |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 462 | static struct resource resources_hsusb_host[] = { |
| 463 | { |
| 464 | .start = MSM_HSUSB1_PHYS, |
| 465 | .end = MSM_HSUSB1_PHYS + MSM_HSUSB1_SIZE - 1, |
| 466 | .flags = IORESOURCE_MEM, |
| 467 | }, |
| 468 | { |
| 469 | .start = USB1_HS_IRQ, |
| 470 | .end = USB1_HS_IRQ, |
| 471 | .flags = IORESOURCE_IRQ, |
| 472 | }, |
| 473 | }; |
| 474 | |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 475 | static struct resource resources_hsic_host[] = { |
| 476 | { |
| 477 | .start = 0x12510000, |
| 478 | .end = 0x12510000 + SZ_4K - 1, |
| 479 | .flags = IORESOURCE_MEM, |
| 480 | }, |
| 481 | { |
| 482 | .start = USB2_HSIC_IRQ, |
| 483 | .end = USB2_HSIC_IRQ, |
| 484 | .flags = IORESOURCE_IRQ, |
| 485 | }, |
| 486 | { |
| 487 | .start = MSM_GPIO_TO_INT(49), |
| 488 | .end = MSM_GPIO_TO_INT(49), |
| 489 | .name = "peripheral_status_irq", |
| 490 | .flags = IORESOURCE_IRQ, |
| 491 | }, |
| 492 | }; |
| 493 | |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 494 | static u64 dma_mask = DMA_BIT_MASK(32); |
| 495 | struct platform_device apq8064_device_hsusb_host = { |
| 496 | .name = "msm_hsusb_host", |
| 497 | .id = -1, |
| 498 | .num_resources = ARRAY_SIZE(resources_hsusb_host), |
| 499 | .resource = resources_hsusb_host, |
| 500 | .dev = { |
| 501 | .dma_mask = &dma_mask, |
| 502 | .coherent_dma_mask = 0xffffffff, |
| 503 | }, |
| 504 | }; |
| 505 | |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 506 | struct platform_device apq8064_device_hsic_host = { |
| 507 | .name = "msm_hsic_host", |
| 508 | .id = -1, |
| 509 | .num_resources = ARRAY_SIZE(resources_hsic_host), |
| 510 | .resource = resources_hsic_host, |
| 511 | .dev = { |
| 512 | .dma_mask = &dma_mask, |
| 513 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 514 | }, |
| 515 | }; |
| 516 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 517 | #define MSM_SDC1_BASE 0x12400000 |
| 518 | #define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800) |
| 519 | #define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000) |
| 520 | #define MSM_SDC2_BASE 0x12140000 |
| 521 | #define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800) |
| 522 | #define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000) |
| 523 | #define MSM_SDC3_BASE 0x12180000 |
| 524 | #define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800) |
| 525 | #define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000) |
| 526 | #define MSM_SDC4_BASE 0x121C0000 |
| 527 | #define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800) |
| 528 | #define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000) |
| 529 | |
| 530 | static struct resource resources_sdc1[] = { |
| 531 | { |
| 532 | .name = "core_mem", |
| 533 | .flags = IORESOURCE_MEM, |
| 534 | .start = MSM_SDC1_BASE, |
| 535 | .end = MSM_SDC1_DML_BASE - 1, |
| 536 | }, |
| 537 | { |
| 538 | .name = "core_irq", |
| 539 | .flags = IORESOURCE_IRQ, |
| 540 | .start = SDC1_IRQ_0, |
| 541 | .end = SDC1_IRQ_0 |
| 542 | }, |
| 543 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 544 | { |
| 545 | .name = "sdcc_dml_addr", |
| 546 | .start = MSM_SDC1_DML_BASE, |
| 547 | .end = MSM_SDC1_BAM_BASE - 1, |
| 548 | .flags = IORESOURCE_MEM, |
| 549 | }, |
| 550 | { |
| 551 | .name = "sdcc_bam_addr", |
| 552 | .start = MSM_SDC1_BAM_BASE, |
| 553 | .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1, |
| 554 | .flags = IORESOURCE_MEM, |
| 555 | }, |
| 556 | { |
| 557 | .name = "sdcc_bam_irq", |
| 558 | .start = SDC1_BAM_IRQ, |
| 559 | .end = SDC1_BAM_IRQ, |
| 560 | .flags = IORESOURCE_IRQ, |
| 561 | }, |
| 562 | #endif |
| 563 | }; |
| 564 | |
| 565 | static struct resource resources_sdc2[] = { |
| 566 | { |
| 567 | .name = "core_mem", |
| 568 | .flags = IORESOURCE_MEM, |
| 569 | .start = MSM_SDC2_BASE, |
| 570 | .end = MSM_SDC2_DML_BASE - 1, |
| 571 | }, |
| 572 | { |
| 573 | .name = "core_irq", |
| 574 | .flags = IORESOURCE_IRQ, |
| 575 | .start = SDC2_IRQ_0, |
| 576 | .end = SDC2_IRQ_0 |
| 577 | }, |
| 578 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 579 | { |
| 580 | .name = "sdcc_dml_addr", |
| 581 | .start = MSM_SDC2_DML_BASE, |
| 582 | .end = MSM_SDC2_BAM_BASE - 1, |
| 583 | .flags = IORESOURCE_MEM, |
| 584 | }, |
| 585 | { |
| 586 | .name = "sdcc_bam_addr", |
| 587 | .start = MSM_SDC2_BAM_BASE, |
| 588 | .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1, |
| 589 | .flags = IORESOURCE_MEM, |
| 590 | }, |
| 591 | { |
| 592 | .name = "sdcc_bam_irq", |
| 593 | .start = SDC2_BAM_IRQ, |
| 594 | .end = SDC2_BAM_IRQ, |
| 595 | .flags = IORESOURCE_IRQ, |
| 596 | }, |
| 597 | #endif |
| 598 | }; |
| 599 | |
| 600 | static struct resource resources_sdc3[] = { |
| 601 | { |
| 602 | .name = "core_mem", |
| 603 | .flags = IORESOURCE_MEM, |
| 604 | .start = MSM_SDC3_BASE, |
| 605 | .end = MSM_SDC3_DML_BASE - 1, |
| 606 | }, |
| 607 | { |
| 608 | .name = "core_irq", |
| 609 | .flags = IORESOURCE_IRQ, |
| 610 | .start = SDC3_IRQ_0, |
| 611 | .end = SDC3_IRQ_0 |
| 612 | }, |
| 613 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 614 | { |
| 615 | .name = "sdcc_dml_addr", |
| 616 | .start = MSM_SDC3_DML_BASE, |
| 617 | .end = MSM_SDC3_BAM_BASE - 1, |
| 618 | .flags = IORESOURCE_MEM, |
| 619 | }, |
| 620 | { |
| 621 | .name = "sdcc_bam_addr", |
| 622 | .start = MSM_SDC3_BAM_BASE, |
| 623 | .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1, |
| 624 | .flags = IORESOURCE_MEM, |
| 625 | }, |
| 626 | { |
| 627 | .name = "sdcc_bam_irq", |
| 628 | .start = SDC3_BAM_IRQ, |
| 629 | .end = SDC3_BAM_IRQ, |
| 630 | .flags = IORESOURCE_IRQ, |
| 631 | }, |
| 632 | #endif |
| 633 | }; |
| 634 | |
| 635 | static struct resource resources_sdc4[] = { |
| 636 | { |
| 637 | .name = "core_mem", |
| 638 | .flags = IORESOURCE_MEM, |
| 639 | .start = MSM_SDC4_BASE, |
| 640 | .end = MSM_SDC4_DML_BASE - 1, |
| 641 | }, |
| 642 | { |
| 643 | .name = "core_irq", |
| 644 | .flags = IORESOURCE_IRQ, |
| 645 | .start = SDC4_IRQ_0, |
| 646 | .end = SDC4_IRQ_0 |
| 647 | }, |
| 648 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 649 | { |
| 650 | .name = "sdcc_dml_addr", |
| 651 | .start = MSM_SDC4_DML_BASE, |
| 652 | .end = MSM_SDC4_BAM_BASE - 1, |
| 653 | .flags = IORESOURCE_MEM, |
| 654 | }, |
| 655 | { |
| 656 | .name = "sdcc_bam_addr", |
| 657 | .start = MSM_SDC4_BAM_BASE, |
| 658 | .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1, |
| 659 | .flags = IORESOURCE_MEM, |
| 660 | }, |
| 661 | { |
| 662 | .name = "sdcc_bam_irq", |
| 663 | .start = SDC4_BAM_IRQ, |
| 664 | .end = SDC4_BAM_IRQ, |
| 665 | .flags = IORESOURCE_IRQ, |
| 666 | }, |
| 667 | #endif |
| 668 | }; |
| 669 | |
| 670 | struct platform_device apq8064_device_sdc1 = { |
| 671 | .name = "msm_sdcc", |
| 672 | .id = 1, |
| 673 | .num_resources = ARRAY_SIZE(resources_sdc1), |
| 674 | .resource = resources_sdc1, |
| 675 | .dev = { |
| 676 | .coherent_dma_mask = 0xffffffff, |
| 677 | }, |
| 678 | }; |
| 679 | |
| 680 | struct platform_device apq8064_device_sdc2 = { |
| 681 | .name = "msm_sdcc", |
| 682 | .id = 2, |
| 683 | .num_resources = ARRAY_SIZE(resources_sdc2), |
| 684 | .resource = resources_sdc2, |
| 685 | .dev = { |
| 686 | .coherent_dma_mask = 0xffffffff, |
| 687 | }, |
| 688 | }; |
| 689 | |
| 690 | struct platform_device apq8064_device_sdc3 = { |
| 691 | .name = "msm_sdcc", |
| 692 | .id = 3, |
| 693 | .num_resources = ARRAY_SIZE(resources_sdc3), |
| 694 | .resource = resources_sdc3, |
| 695 | .dev = { |
| 696 | .coherent_dma_mask = 0xffffffff, |
| 697 | }, |
| 698 | }; |
| 699 | |
| 700 | struct platform_device apq8064_device_sdc4 = { |
| 701 | .name = "msm_sdcc", |
| 702 | .id = 4, |
| 703 | .num_resources = ARRAY_SIZE(resources_sdc4), |
| 704 | .resource = resources_sdc4, |
| 705 | .dev = { |
| 706 | .coherent_dma_mask = 0xffffffff, |
| 707 | }, |
| 708 | }; |
| 709 | |
| 710 | static struct platform_device *apq8064_sdcc_devices[] __initdata = { |
| 711 | &apq8064_device_sdc1, |
| 712 | &apq8064_device_sdc2, |
| 713 | &apq8064_device_sdc3, |
| 714 | &apq8064_device_sdc4, |
| 715 | }; |
| 716 | |
| 717 | int __init apq8064_add_sdcc(unsigned int controller, |
| 718 | struct mmc_platform_data *plat) |
| 719 | { |
| 720 | struct platform_device *pdev; |
| 721 | |
| 722 | if (!plat) |
| 723 | return 0; |
| 724 | if (controller < 1 || controller > 4) |
| 725 | return -EINVAL; |
| 726 | |
| 727 | pdev = apq8064_sdcc_devices[controller-1]; |
| 728 | pdev->dev.platform_data = plat; |
| 729 | return platform_device_register(pdev); |
| 730 | } |
| 731 | |
Yan He | 06913ce | 2011-08-26 16:33:46 -0700 | [diff] [blame] | 732 | static struct resource resources_sps[] = { |
| 733 | { |
| 734 | .name = "pipe_mem", |
| 735 | .start = 0x12800000, |
| 736 | .end = 0x12800000 + 0x4000 - 1, |
| 737 | .flags = IORESOURCE_MEM, |
| 738 | }, |
| 739 | { |
| 740 | .name = "bamdma_dma", |
| 741 | .start = 0x12240000, |
| 742 | .end = 0x12240000 + 0x1000 - 1, |
| 743 | .flags = IORESOURCE_MEM, |
| 744 | }, |
| 745 | { |
| 746 | .name = "bamdma_bam", |
| 747 | .start = 0x12244000, |
| 748 | .end = 0x12244000 + 0x4000 - 1, |
| 749 | .flags = IORESOURCE_MEM, |
| 750 | }, |
| 751 | { |
| 752 | .name = "bamdma_irq", |
| 753 | .start = SPS_BAM_DMA_IRQ, |
| 754 | .end = SPS_BAM_DMA_IRQ, |
| 755 | .flags = IORESOURCE_IRQ, |
| 756 | }, |
| 757 | }; |
| 758 | |
Gagan Mac | 8a7a5d3 | 2011-11-11 16:43:06 -0700 | [diff] [blame] | 759 | struct platform_device msm_bus_8064_sys_fabric = { |
| 760 | .name = "msm_bus_fabric", |
| 761 | .id = MSM_BUS_FAB_SYSTEM, |
| 762 | }; |
| 763 | struct platform_device msm_bus_8064_apps_fabric = { |
| 764 | .name = "msm_bus_fabric", |
| 765 | .id = MSM_BUS_FAB_APPSS, |
| 766 | }; |
| 767 | struct platform_device msm_bus_8064_mm_fabric = { |
| 768 | .name = "msm_bus_fabric", |
| 769 | .id = MSM_BUS_FAB_MMSS, |
| 770 | }; |
| 771 | struct platform_device msm_bus_8064_sys_fpb = { |
| 772 | .name = "msm_bus_fabric", |
| 773 | .id = MSM_BUS_FAB_SYSTEM_FPB, |
| 774 | }; |
| 775 | struct platform_device msm_bus_8064_cpss_fpb = { |
| 776 | .name = "msm_bus_fabric", |
| 777 | .id = MSM_BUS_FAB_CPSS_FPB, |
| 778 | }; |
| 779 | |
Yan He | 06913ce | 2011-08-26 16:33:46 -0700 | [diff] [blame] | 780 | static struct msm_sps_platform_data msm_sps_pdata = { |
| 781 | .bamdma_restricted_pipes = 0x06, |
| 782 | }; |
| 783 | |
| 784 | struct platform_device msm_device_sps_apq8064 = { |
| 785 | .name = "msm_sps", |
| 786 | .id = -1, |
| 787 | .num_resources = ARRAY_SIZE(resources_sps), |
| 788 | .resource = resources_sps, |
| 789 | .dev.platform_data = &msm_sps_pdata, |
| 790 | }; |
| 791 | |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 792 | struct platform_device msm_device_smd_apq8064 = { |
| 793 | .name = "msm_smd", |
| 794 | .id = -1, |
| 795 | }; |
| 796 | |
Ramesh Masavarapu | f46be1b | 2011-11-03 11:13:41 -0700 | [diff] [blame] | 797 | #ifdef CONFIG_HW_RANDOM_MSM |
| 798 | /* PRNG device */ |
| 799 | #define MSM_PRNG_PHYS 0x1A500000 |
| 800 | static struct resource rng_resources = { |
| 801 | .flags = IORESOURCE_MEM, |
| 802 | .start = MSM_PRNG_PHYS, |
| 803 | .end = MSM_PRNG_PHYS + SZ_512 - 1, |
| 804 | }; |
| 805 | |
| 806 | struct platform_device apq8064_device_rng = { |
| 807 | .name = "msm_rng", |
| 808 | .id = 0, |
| 809 | .num_resources = 1, |
| 810 | .resource = &rng_resources, |
| 811 | }; |
| 812 | #endif |
| 813 | |
Matt Wagantall | 292aace | 2012-01-26 19:12:34 -0800 | [diff] [blame^] | 814 | static struct resource msm_gss_resources[] = { |
| 815 | { |
| 816 | .start = 0x10000000, |
| 817 | .end = 0x10000000 + SZ_256 - 1, |
| 818 | .flags = IORESOURCE_MEM, |
| 819 | }, |
| 820 | }; |
| 821 | |
| 822 | struct platform_device msm_gss = { |
| 823 | .name = "pil_gss", |
| 824 | .id = -1, |
| 825 | .num_resources = ARRAY_SIZE(msm_gss_resources), |
| 826 | .resource = msm_gss_resources, |
| 827 | }; |
| 828 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 829 | static struct clk_lookup msm_clocks_8064_dummy[] = { |
| 830 | CLK_DUMMY("pll2", PLL2, NULL, 0), |
| 831 | CLK_DUMMY("pll8", PLL8, NULL, 0), |
| 832 | CLK_DUMMY("pll4", PLL4, NULL, 0), |
| 833 | |
| 834 | CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0), |
| 835 | CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0), |
| 836 | CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0), |
| 837 | CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0), |
| 838 | CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0), |
| 839 | CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0), |
| 840 | CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0), |
| 841 | CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0), |
| 842 | CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0), |
| 843 | CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0), |
| 844 | CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0), |
| 845 | CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0), |
| 846 | CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0), |
| 847 | CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0), |
| 848 | CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0), |
| 849 | CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0), |
| 850 | |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 851 | CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF), |
| 852 | CLK_DUMMY("core_clk", GSBI2_UART_CLK, NULL, OFF), |
| 853 | CLK_DUMMY("core_clk", GSBI3_UART_CLK, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 854 | "msm_serial_hsl.0", OFF), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 855 | CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF), |
| 856 | CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF), |
| 857 | CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF), |
| 858 | CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF), |
| 859 | CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF), |
| 860 | CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF), |
| 861 | CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF), |
| 862 | CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF), |
| 863 | CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 864 | CLK_DUMMY("core_clk", GSBI1_QUP_CLK, NULL, OFF), |
| 865 | CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF), |
| 866 | CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 867 | CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF), |
| 868 | CLK_DUMMY("core_clk", GSBI5_QUP_CLK, "spi_qsd.0", OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 869 | CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF), |
| 870 | CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 871 | CLK_DUMMY("core_clk", PDM_CLK, NULL, OFF), |
Matt Wagantall | d86d683 | 2011-08-17 14:06:55 -0700 | [diff] [blame] | 872 | CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF), |
Ramesh Masavarapu | f46be1b | 2011-11-03 11:13:41 -0700 | [diff] [blame] | 873 | CLK_DUMMY("core_clk", PRNG_CLK, "msm_rng.0", OFF), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 874 | CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF), |
| 875 | CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF), |
| 876 | CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF), |
| 877 | CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 878 | CLK_DUMMY("ref_clk", TSIF_REF_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 879 | CLK_DUMMY("core_clk", TSSC_CLK, NULL, OFF), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 880 | CLK_DUMMY("alt_core_clk", USB_HS1_XCVR_CLK, NULL, OFF), |
| 881 | CLK_DUMMY("alt_core_clk", USB_HS3_XCVR_CLK, NULL, OFF), |
| 882 | CLK_DUMMY("alt_core_clk", USB_HS4_XCVR_CLK, NULL, OFF), |
| 883 | CLK_DUMMY("phy_clk", USB_PHY0_CLK, NULL, OFF), |
| 884 | CLK_DUMMY("src_clk", USB_FS1_SRC_CLK, NULL, OFF), |
| 885 | CLK_DUMMY("alt_core_clk", USB_FS1_XCVR_CLK, NULL, OFF), |
| 886 | CLK_DUMMY("sys_clk", USB_FS1_SYS_CLK, NULL, OFF), |
Matt Wagantall | c4b3a4d | 2011-08-17 16:58:39 -0700 | [diff] [blame] | 887 | CLK_DUMMY("core_clk", CE2_CLK, NULL, OFF), |
| 888 | CLK_DUMMY("core_clk", CE1_CORE_CLK, NULL, OFF), |
| 889 | CLK_DUMMY("core_clk", CE3_CORE_CLK, NULL, OFF), |
| 890 | CLK_DUMMY("iface_clk", CE3_P_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 891 | CLK_DUMMY("pcie_pclk", PCIE_P_CLK, NULL, OFF), |
| 892 | CLK_DUMMY("pcie_alt_ref_clk", PCIE_ALT_REF_CLK, NULL, OFF), |
| 893 | CLK_DUMMY("sata_rxoob_clk", SATA_RXOOB_CLK, NULL, OFF), |
| 894 | CLK_DUMMY("sata_pmalive_clk", SATA_PMALIVE_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 895 | CLK_DUMMY("ref_clk", SATA_PHY_REF_CLK, NULL, OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 896 | CLK_DUMMY("iface_clk", GSBI1_P_CLK, NULL, OFF), |
| 897 | CLK_DUMMY("iface_clk", GSBI2_P_CLK, NULL, OFF), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 898 | CLK_DUMMY("iface_clk", GSBI3_P_CLK, "msm_serial_hsl.0", OFF), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 899 | CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF), |
| 900 | CLK_DUMMY("iface_clk", GSBI5_P_CLK, "spi_qsd.0", OFF), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 901 | CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 902 | CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 903 | CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 904 | CLK_DUMMY("iface_clk", USB_FS1_P_CLK, NULL, OFF), |
| 905 | CLK_DUMMY("iface_clk", USB_HS1_P_CLK, NULL, OFF), |
| 906 | CLK_DUMMY("iface_clk", USB_HS3_P_CLK, NULL, OFF), |
| 907 | CLK_DUMMY("iface_clk", USB_HS4_P_CLK, NULL, OFF), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 908 | CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF), |
| 909 | CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF), |
| 910 | CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF), |
| 911 | CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF), |
Jin Hong | 01f2dbb | 2011-11-03 22:13:51 -0700 | [diff] [blame] | 912 | CLK_DUMMY("core_clk", ADM0_CLK, "msm_dmov", OFF), |
| 913 | CLK_DUMMY("iface_clk", ADM0_P_CLK, "msm_dmov", OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 914 | CLK_DUMMY("iface_clk", PMIC_ARB0_P_CLK, NULL, OFF), |
| 915 | CLK_DUMMY("iface_clk", PMIC_ARB1_P_CLK, NULL, OFF), |
| 916 | CLK_DUMMY("core_clk", PMIC_SSBI2_CLK, NULL, OFF), |
| 917 | CLK_DUMMY("mem_clk", RPM_MSG_RAM_P_CLK, NULL, OFF), |
| 918 | CLK_DUMMY("core_clk", AMP_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 919 | CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF), |
| 920 | CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF), |
| 921 | CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF), |
| 922 | CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF), |
| 923 | CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF), |
| 924 | CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF), |
| 925 | CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF), |
| 926 | CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF), |
| 927 | CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF), |
| 928 | CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF), |
| 929 | CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF), |
| 930 | CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, NULL, OFF), |
| 931 | CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, NULL, OFF), |
| 932 | CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, NULL, OFF), |
| 933 | CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, NULL, OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 934 | CLK_DUMMY("core_clk", VCAP_CLK, NULL, OFF), |
| 935 | CLK_DUMMY("npl_clk", VCAP_NPL_CLK, NULL, OFF), |
Pu Chen | 86b4be9 | 2011-11-03 17:27:57 -0700 | [diff] [blame] | 936 | CLK_DUMMY("core_clk", GFX3D_CLK, "kgsl-3d0.0", OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 937 | CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 938 | CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 939 | CLK_DUMMY("core_clk", JPEGD_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 940 | CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF), |
| 941 | CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF), |
| 942 | CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF), |
Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 943 | CLK_DUMMY("core_clk", ROT_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 944 | CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF), |
Matt Wagantall | b86ad26 | 2011-10-24 19:50:29 -0700 | [diff] [blame] | 945 | CLK_DUMMY("core_clk", VCODEC_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 946 | CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 947 | CLK_DUMMY("rgb_tv_clk", RGB_TV_CLK, NULL, OFF), |
| 948 | CLK_DUMMY("npl_tv_clk", NPL_TV_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 949 | CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF), |
Matt Wagantall | 5a4f1ba | 2011-08-18 18:13:03 -0700 | [diff] [blame] | 950 | CLK_DUMMY("core_clk", HDMI_APP_CLK, "hdmi_msm.1", OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 951 | CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF), |
| 952 | CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF), |
| 953 | CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF), |
| 954 | CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF), |
| 955 | CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF), |
| 956 | CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF), |
Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 957 | CLK_DUMMY("bus_clk", ROT_AXI_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 958 | CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF), |
| 959 | CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF), |
| 960 | CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF), |
| 961 | CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 962 | CLK_DUMMY("bus_clk", GFX3D_AXI_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 963 | CLK_DUMMY("vcap_axi_clk", VCAP_AXI_CLK, NULL, OFF), |
| 964 | CLK_DUMMY("vcap_ahb_clk", VCAP_AHB_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 965 | CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF), |
| 966 | CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF), |
| 967 | CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, NULL, OFF), |
| 968 | CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, NULL, OFF), |
| 969 | CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, NULL, OFF), |
| 970 | CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 971 | CLK_DUMMY("lvds_clk", LVDS_CLK, NULL, OFF), |
| 972 | CLK_DUMMY("mdp_p2clk", MDP_P2CLK, NULL, OFF), |
| 973 | CLK_DUMMY("dsi2_pixel_clk", DSI2_PIXEL_CLK, NULL, OFF), |
| 974 | CLK_DUMMY("lvds_ref_clk", LVDS_REF_CLK, NULL, OFF), |
Pu Chen | 86b4be9 | 2011-11-03 17:27:57 -0700 | [diff] [blame] | 975 | CLK_DUMMY("iface_clk", GFX3D_P_CLK, "kgsl-3d0.0", OFF), |
Matt Wagantall | 5a4f1ba | 2011-08-18 18:13:03 -0700 | [diff] [blame] | 976 | CLK_DUMMY("master_iface_clk", HDMI_M_P_CLK, "hdmi_msm.1", OFF), |
| 977 | CLK_DUMMY("slave_iface_clk", HDMI_S_P_CLK, "hdmi_msm.1", OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 978 | CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF), |
| 979 | CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 980 | CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 981 | CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF), |
Matt Wagantall | e604d71 | 2011-10-21 15:38:18 -0700 | [diff] [blame] | 982 | CLK_DUMMY("iface_clk", SMMU_P_CLK, "msm_smmu", OFF), |
Matt Wagantall | bb90da9 | 2011-10-25 15:07:52 -0700 | [diff] [blame] | 983 | CLK_DUMMY("iface_clk", ROT_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 984 | CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF), |
| 985 | CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF), |
| 986 | CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF), |
| 987 | CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF), |
| 988 | CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF), |
| 989 | CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF), |
| 990 | CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF), |
| 991 | CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF), |
| 992 | CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF), |
| 993 | CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF), |
| 994 | CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF), |
| 995 | CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF), |
| 996 | CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF), |
| 997 | CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF), |
Tianyi Gou | 142b8db | 2011-09-21 18:01:54 -0700 | [diff] [blame] | 998 | CLK_DUMMY("audio_slimbus_clk", AUDIO_SLIMBUS_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 999 | |
| 1000 | CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 1001 | CLK_DUMMY("core_clk", DFAB_USB_HS_CLK, NULL, 0), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 1002 | CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, NULL, 0), |
| 1003 | CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, NULL, 0), |
| 1004 | CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, NULL, 0), |
| 1005 | CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, NULL, 0), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1006 | CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0), |
| 1007 | CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0), |
Jin Hong | 01f2dbb | 2011-11-03 22:13:51 -0700 | [diff] [blame] | 1008 | CLK_DUMMY("mem_clk", EBI1_ADM_CLK, "msm_dmov", 0), |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 1009 | CLK_DUMMY("ce3_core_src_clk", CE3_SRC_CLK, "qce.0", OFF), |
| 1010 | CLK_DUMMY("ce3_core_src_clk", CE3_SRC_CLK, "qcrypto.0", OFF), |
| 1011 | CLK_DUMMY("core_clk", CE3_CORE_CLK, "qce.0", OFF), |
| 1012 | CLK_DUMMY("core_clk", CE3_CORE_CLK, "qcrypto.0", OFF), |
| 1013 | CLK_DUMMY("iface_clk", CE3_P_CLK, "qce0.0", OFF), |
| 1014 | CLK_DUMMY("iface_clk", CE3_P_CLK, "qcrypto.0", OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1015 | }; |
| 1016 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 1017 | struct clock_init_data apq8064_dummy_clock_init_data __initdata = { |
| 1018 | .table = msm_clocks_8064_dummy, |
| 1019 | .size = ARRAY_SIZE(msm_clocks_8064_dummy), |
| 1020 | }; |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1021 | |
| 1022 | struct msm_rpm_platform_data apq8064_rpm_data __initdata = { |
| 1023 | .reg_base_addrs = { |
| 1024 | [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE, |
| 1025 | [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400, |
| 1026 | [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600, |
| 1027 | [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00, |
| 1028 | }, |
| 1029 | .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ, |
| 1030 | .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008, |
| 1031 | .ipc_rpm_val = 4, |
| 1032 | .target_id = { |
| 1033 | MSM_RPM_MAP(8064, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4), |
| 1034 | MSM_RPM_MAP(8064, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4), |
| 1035 | MSM_RPM_MAP(8064, INVALIDATE_0, INVALIDATE, 8), |
| 1036 | MSM_RPM_MAP(8064, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1), |
| 1037 | MSM_RPM_MAP(8064, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1), |
| 1038 | MSM_RPM_MAP(8064, RPM_CTL, RPM_CTL, 1), |
| 1039 | MSM_RPM_MAP(8064, CXO_CLK, CXO_CLK, 1), |
| 1040 | MSM_RPM_MAP(8064, PXO_CLK, PXO_CLK, 1), |
| 1041 | MSM_RPM_MAP(8064, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1), |
| 1042 | MSM_RPM_MAP(8064, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1), |
| 1043 | MSM_RPM_MAP(8064, MM_FABRIC_CLK, MM_FABRIC_CLK, 1), |
| 1044 | MSM_RPM_MAP(8064, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1), |
| 1045 | MSM_RPM_MAP(8064, SFPB_CLK, SFPB_CLK, 1), |
| 1046 | MSM_RPM_MAP(8064, CFPB_CLK, CFPB_CLK, 1), |
| 1047 | MSM_RPM_MAP(8064, MMFPB_CLK, MMFPB_CLK, 1), |
| 1048 | MSM_RPM_MAP(8064, EBI1_CLK, EBI1_CLK, 1), |
| 1049 | MSM_RPM_MAP(8064, APPS_FABRIC_CFG_HALT_0, |
| 1050 | APPS_FABRIC_CFG_HALT, 2), |
| 1051 | MSM_RPM_MAP(8064, APPS_FABRIC_CFG_CLKMOD_0, |
| 1052 | APPS_FABRIC_CFG_CLKMOD, 3), |
| 1053 | MSM_RPM_MAP(8064, APPS_FABRIC_CFG_IOCTL, |
| 1054 | APPS_FABRIC_CFG_IOCTL, 1), |
| 1055 | MSM_RPM_MAP(8064, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12), |
| 1056 | MSM_RPM_MAP(8064, SYS_FABRIC_CFG_HALT_0, |
| 1057 | SYS_FABRIC_CFG_HALT, 2), |
| 1058 | MSM_RPM_MAP(8064, SYS_FABRIC_CFG_CLKMOD_0, |
| 1059 | SYS_FABRIC_CFG_CLKMOD, 3), |
| 1060 | MSM_RPM_MAP(8064, SYS_FABRIC_CFG_IOCTL, |
| 1061 | SYS_FABRIC_CFG_IOCTL, 1), |
| 1062 | MSM_RPM_MAP(8064, SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 30), |
| 1063 | MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_HALT_0, |
| 1064 | MMSS_FABRIC_CFG_HALT, 2), |
| 1065 | MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_CLKMOD_0, |
| 1066 | MMSS_FABRIC_CFG_CLKMOD, 3), |
| 1067 | MSM_RPM_MAP(8064, MMSS_FABRIC_CFG_IOCTL, |
| 1068 | MMSS_FABRIC_CFG_IOCTL, 1), |
| 1069 | MSM_RPM_MAP(8064, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 21), |
| 1070 | MSM_RPM_MAP(8064, PM8921_S1_0, PM8921_S1, 2), |
| 1071 | MSM_RPM_MAP(8064, PM8921_S2_0, PM8921_S2, 2), |
| 1072 | MSM_RPM_MAP(8064, PM8921_S3_0, PM8921_S3, 2), |
| 1073 | MSM_RPM_MAP(8064, PM8921_S4_0, PM8921_S4, 2), |
| 1074 | MSM_RPM_MAP(8064, PM8921_S5_0, PM8921_S5, 2), |
| 1075 | MSM_RPM_MAP(8064, PM8921_S6_0, PM8921_S6, 2), |
| 1076 | MSM_RPM_MAP(8064, PM8921_S7_0, PM8921_S7, 2), |
| 1077 | MSM_RPM_MAP(8064, PM8921_S8_0, PM8921_S8, 2), |
| 1078 | MSM_RPM_MAP(8064, PM8921_L1_0, PM8921_L1, 2), |
| 1079 | MSM_RPM_MAP(8064, PM8921_L2_0, PM8921_L2, 2), |
| 1080 | MSM_RPM_MAP(8064, PM8921_L3_0, PM8921_L3, 2), |
| 1081 | MSM_RPM_MAP(8064, PM8921_L4_0, PM8921_L4, 2), |
| 1082 | MSM_RPM_MAP(8064, PM8921_L5_0, PM8921_L5, 2), |
| 1083 | MSM_RPM_MAP(8064, PM8921_L6_0, PM8921_L6, 2), |
| 1084 | MSM_RPM_MAP(8064, PM8921_L7_0, PM8921_L7, 2), |
| 1085 | MSM_RPM_MAP(8064, PM8921_L8_0, PM8921_L8, 2), |
| 1086 | MSM_RPM_MAP(8064, PM8921_L9_0, PM8921_L9, 2), |
| 1087 | MSM_RPM_MAP(8064, PM8921_L10_0, PM8921_L10, 2), |
| 1088 | MSM_RPM_MAP(8064, PM8921_L11_0, PM8921_L11, 2), |
| 1089 | MSM_RPM_MAP(8064, PM8921_L12_0, PM8921_L12, 2), |
| 1090 | MSM_RPM_MAP(8064, PM8921_L13_0, PM8921_L13, 2), |
| 1091 | MSM_RPM_MAP(8064, PM8921_L14_0, PM8921_L14, 2), |
| 1092 | MSM_RPM_MAP(8064, PM8921_L15_0, PM8921_L15, 2), |
| 1093 | MSM_RPM_MAP(8064, PM8921_L16_0, PM8921_L16, 2), |
| 1094 | MSM_RPM_MAP(8064, PM8921_L17_0, PM8921_L17, 2), |
| 1095 | MSM_RPM_MAP(8064, PM8921_L18_0, PM8921_L18, 2), |
| 1096 | MSM_RPM_MAP(8064, PM8921_L19_0, PM8921_L19, 2), |
| 1097 | MSM_RPM_MAP(8064, PM8921_L20_0, PM8921_L20, 2), |
| 1098 | MSM_RPM_MAP(8064, PM8921_L21_0, PM8921_L21, 2), |
| 1099 | MSM_RPM_MAP(8064, PM8921_L22_0, PM8921_L22, 2), |
| 1100 | MSM_RPM_MAP(8064, PM8921_L23_0, PM8921_L23, 2), |
| 1101 | MSM_RPM_MAP(8064, PM8921_L24_0, PM8921_L24, 2), |
| 1102 | MSM_RPM_MAP(8064, PM8921_L25_0, PM8921_L25, 2), |
| 1103 | MSM_RPM_MAP(8064, PM8921_L26_0, PM8921_L26, 2), |
| 1104 | MSM_RPM_MAP(8064, PM8921_L27_0, PM8921_L27, 2), |
| 1105 | MSM_RPM_MAP(8064, PM8921_L28_0, PM8921_L28, 2), |
| 1106 | MSM_RPM_MAP(8064, PM8921_L29_0, PM8921_L29, 2), |
| 1107 | MSM_RPM_MAP(8064, PM8921_CLK1_0, PM8921_CLK1, 2), |
| 1108 | MSM_RPM_MAP(8064, PM8921_CLK2_0, PM8921_CLK2, 2), |
| 1109 | MSM_RPM_MAP(8064, PM8921_LVS1, PM8921_LVS1, 1), |
| 1110 | MSM_RPM_MAP(8064, PM8921_LVS2, PM8921_LVS2, 1), |
| 1111 | MSM_RPM_MAP(8064, PM8921_LVS3, PM8921_LVS3, 1), |
| 1112 | MSM_RPM_MAP(8064, PM8921_LVS4, PM8921_LVS4, 1), |
| 1113 | MSM_RPM_MAP(8064, PM8921_LVS5, PM8921_LVS5, 1), |
| 1114 | MSM_RPM_MAP(8064, PM8921_LVS6, PM8921_LVS6, 1), |
| 1115 | MSM_RPM_MAP(8064, PM8921_LVS7, PM8921_LVS7, 1), |
| 1116 | MSM_RPM_MAP(8064, PM8821_S1_0, PM8821_S1, 2), |
| 1117 | MSM_RPM_MAP(8064, PM8821_S2_0, PM8821_S2, 2), |
| 1118 | MSM_RPM_MAP(8064, PM8821_L1_0, PM8821_L1, 2), |
| 1119 | MSM_RPM_MAP(8064, NCP_0, NCP, 2), |
| 1120 | MSM_RPM_MAP(8064, CXO_BUFFERS, CXO_BUFFERS, 1), |
| 1121 | MSM_RPM_MAP(8064, USB_OTG_SWITCH, USB_OTG_SWITCH, 1), |
| 1122 | MSM_RPM_MAP(8064, HDMI_SWITCH, HDMI_SWITCH, 1), |
| 1123 | MSM_RPM_MAP(8064, DDR_DMM_0, DDR_DMM, 2), |
| 1124 | MSM_RPM_MAP(8064, QDSS_CLK, QDSS_CLK, 1), |
| 1125 | }, |
| 1126 | .target_status = { |
| 1127 | MSM_RPM_STATUS_ID_MAP(8064, VERSION_MAJOR), |
| 1128 | MSM_RPM_STATUS_ID_MAP(8064, VERSION_MINOR), |
| 1129 | MSM_RPM_STATUS_ID_MAP(8064, VERSION_BUILD), |
| 1130 | MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_0), |
| 1131 | MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_1), |
| 1132 | MSM_RPM_STATUS_ID_MAP(8064, SUPPORTED_RESOURCES_2), |
| 1133 | MSM_RPM_STATUS_ID_MAP(8064, RESERVED_SUPPORTED_RESOURCES_0), |
| 1134 | MSM_RPM_STATUS_ID_MAP(8064, SEQUENCE), |
| 1135 | MSM_RPM_STATUS_ID_MAP(8064, RPM_CTL), |
| 1136 | MSM_RPM_STATUS_ID_MAP(8064, CXO_CLK), |
| 1137 | MSM_RPM_STATUS_ID_MAP(8064, PXO_CLK), |
| 1138 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CLK), |
| 1139 | MSM_RPM_STATUS_ID_MAP(8064, SYSTEM_FABRIC_CLK), |
| 1140 | MSM_RPM_STATUS_ID_MAP(8064, MM_FABRIC_CLK), |
| 1141 | MSM_RPM_STATUS_ID_MAP(8064, DAYTONA_FABRIC_CLK), |
| 1142 | MSM_RPM_STATUS_ID_MAP(8064, SFPB_CLK), |
| 1143 | MSM_RPM_STATUS_ID_MAP(8064, CFPB_CLK), |
| 1144 | MSM_RPM_STATUS_ID_MAP(8064, MMFPB_CLK), |
| 1145 | MSM_RPM_STATUS_ID_MAP(8064, EBI1_CLK), |
| 1146 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_HALT), |
| 1147 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_CLKMOD), |
| 1148 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_CFG_IOCTL), |
| 1149 | MSM_RPM_STATUS_ID_MAP(8064, APPS_FABRIC_ARB), |
| 1150 | MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_HALT), |
| 1151 | MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_CLKMOD), |
| 1152 | MSM_RPM_STATUS_ID_MAP(8064, SYS_FABRIC_CFG_IOCTL), |
| 1153 | MSM_RPM_STATUS_ID_MAP(8064, SYSTEM_FABRIC_ARB), |
| 1154 | MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_HALT), |
| 1155 | MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_CLKMOD), |
| 1156 | MSM_RPM_STATUS_ID_MAP(8064, MMSS_FABRIC_CFG_IOCTL), |
| 1157 | MSM_RPM_STATUS_ID_MAP(8064, MM_FABRIC_ARB), |
| 1158 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S1_0), |
| 1159 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S1_1), |
| 1160 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S2_0), |
| 1161 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S2_1), |
| 1162 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S3_0), |
| 1163 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S3_1), |
| 1164 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S4_0), |
| 1165 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S4_1), |
| 1166 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S5_0), |
| 1167 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S5_1), |
| 1168 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S6_0), |
| 1169 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S6_1), |
| 1170 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S7_0), |
| 1171 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S7_1), |
| 1172 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S8_0), |
| 1173 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_S8_1), |
| 1174 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L1_0), |
| 1175 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L1_1), |
| 1176 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L2_0), |
| 1177 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L2_1), |
| 1178 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L3_0), |
| 1179 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L3_1), |
| 1180 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L4_0), |
| 1181 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L4_1), |
| 1182 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L5_0), |
| 1183 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L5_1), |
| 1184 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L6_0), |
| 1185 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L6_1), |
| 1186 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L7_0), |
| 1187 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L7_1), |
| 1188 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L8_0), |
| 1189 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L8_1), |
| 1190 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L9_0), |
| 1191 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L9_1), |
| 1192 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L10_0), |
| 1193 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L10_1), |
| 1194 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L11_0), |
| 1195 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L11_1), |
| 1196 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L12_0), |
| 1197 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L12_1), |
| 1198 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L13_0), |
| 1199 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L13_1), |
| 1200 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L14_0), |
| 1201 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L14_1), |
| 1202 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L15_0), |
| 1203 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L15_1), |
| 1204 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L16_0), |
| 1205 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L16_1), |
| 1206 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L17_0), |
| 1207 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L17_1), |
| 1208 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L18_0), |
| 1209 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L18_1), |
| 1210 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L19_0), |
| 1211 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L19_1), |
| 1212 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L20_0), |
| 1213 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L20_1), |
| 1214 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L21_0), |
| 1215 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L21_1), |
| 1216 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L22_0), |
| 1217 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L22_1), |
| 1218 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L23_0), |
| 1219 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L23_1), |
| 1220 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L24_0), |
| 1221 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L24_1), |
| 1222 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L25_0), |
| 1223 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L25_1), |
| 1224 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L26_0), |
| 1225 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L26_1), |
| 1226 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L27_0), |
| 1227 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L27_1), |
| 1228 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L28_0), |
| 1229 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L28_1), |
| 1230 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L29_0), |
| 1231 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_L29_1), |
| 1232 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK1_0), |
| 1233 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK1_1), |
| 1234 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK2_0), |
| 1235 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_CLK2_1), |
| 1236 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS1), |
| 1237 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS2), |
| 1238 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS3), |
| 1239 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS4), |
| 1240 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS5), |
| 1241 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS6), |
| 1242 | MSM_RPM_STATUS_ID_MAP(8064, PM8921_LVS7), |
| 1243 | MSM_RPM_STATUS_ID_MAP(8064, NCP_0), |
| 1244 | MSM_RPM_STATUS_ID_MAP(8064, NCP_1), |
| 1245 | MSM_RPM_STATUS_ID_MAP(8064, CXO_BUFFERS), |
| 1246 | MSM_RPM_STATUS_ID_MAP(8064, USB_OTG_SWITCH), |
| 1247 | MSM_RPM_STATUS_ID_MAP(8064, HDMI_SWITCH), |
| 1248 | MSM_RPM_STATUS_ID_MAP(8064, DDR_DMM_0), |
| 1249 | MSM_RPM_STATUS_ID_MAP(8064, DDR_DMM_1), |
| 1250 | MSM_RPM_STATUS_ID_MAP(8064, EBI1_CH0_RANGE), |
| 1251 | MSM_RPM_STATUS_ID_MAP(8064, EBI1_CH1_RANGE), |
| 1252 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S1_0), |
| 1253 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S1_1), |
| 1254 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S2_0), |
| 1255 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_S2_1), |
| 1256 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_L1_0), |
| 1257 | MSM_RPM_STATUS_ID_MAP(8064, PM8821_L1_1), |
| 1258 | }, |
| 1259 | .target_ctrl_id = { |
| 1260 | MSM_RPM_CTRL_MAP(8064, VERSION_MAJOR), |
| 1261 | MSM_RPM_CTRL_MAP(8064, VERSION_MINOR), |
| 1262 | MSM_RPM_CTRL_MAP(8064, VERSION_BUILD), |
| 1263 | MSM_RPM_CTRL_MAP(8064, REQ_CTX_0), |
| 1264 | MSM_RPM_CTRL_MAP(8064, REQ_SEL_0), |
| 1265 | MSM_RPM_CTRL_MAP(8064, ACK_CTX_0), |
| 1266 | MSM_RPM_CTRL_MAP(8064, ACK_SEL_0), |
| 1267 | }, |
| 1268 | .sel_invalidate = MSM_RPM_8064_SEL_INVALIDATE, |
| 1269 | .sel_notification = MSM_RPM_8064_SEL_NOTIFICATION, |
| 1270 | .sel_last = MSM_RPM_8064_SEL_LAST, |
| 1271 | .ver = {3, 0, 0}, |
| 1272 | }; |
| 1273 | |
| 1274 | struct platform_device apq8064_rpm_device = { |
| 1275 | .name = "msm_rpm", |
| 1276 | .id = -1, |
| 1277 | }; |
| 1278 | |
| 1279 | static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = { |
| 1280 | .phys_addr_base = 0x0010D204, |
| 1281 | .phys_size = SZ_8K, |
| 1282 | }; |
| 1283 | |
| 1284 | struct platform_device apq8064_rpm_stat_device = { |
| 1285 | .name = "msm_rpm_stat", |
| 1286 | .id = -1, |
| 1287 | .dev = { |
| 1288 | .platform_data = &msm_rpm_stat_pdata, |
| 1289 | }, |
| 1290 | }; |
| 1291 | |
| 1292 | static struct msm_rpm_log_platform_data msm_rpm_log_pdata = { |
| 1293 | .phys_addr_base = 0x0010C000, |
| 1294 | .reg_offsets = { |
| 1295 | [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080, |
| 1296 | [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0, |
| 1297 | }, |
| 1298 | .phys_size = SZ_8K, |
| 1299 | .log_len = 4096, /* log's buffer length in bytes */ |
| 1300 | .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */ |
| 1301 | }; |
| 1302 | |
| 1303 | struct platform_device apq8064_rpm_log_device = { |
| 1304 | .name = "msm_rpm_log", |
| 1305 | .id = -1, |
| 1306 | .dev = { |
| 1307 | .platform_data = &msm_rpm_log_pdata, |
| 1308 | }, |
| 1309 | }; |
| 1310 | |
| 1311 | #ifdef CONFIG_MSM_MPM |
| 1312 | static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] __initdata = { |
| 1313 | [1] = MSM_GPIO_TO_INT(26), |
| 1314 | [2] = MSM_GPIO_TO_INT(88), |
| 1315 | [4] = MSM_GPIO_TO_INT(73), |
| 1316 | [5] = MSM_GPIO_TO_INT(74), |
| 1317 | [6] = MSM_GPIO_TO_INT(75), |
| 1318 | [7] = MSM_GPIO_TO_INT(76), |
| 1319 | [8] = MSM_GPIO_TO_INT(77), |
| 1320 | [9] = MSM_GPIO_TO_INT(36), |
| 1321 | [10] = MSM_GPIO_TO_INT(84), |
| 1322 | [11] = MSM_GPIO_TO_INT(7), |
| 1323 | [12] = MSM_GPIO_TO_INT(11), |
| 1324 | [13] = MSM_GPIO_TO_INT(52), |
| 1325 | [14] = MSM_GPIO_TO_INT(15), |
| 1326 | [15] = MSM_GPIO_TO_INT(83), |
| 1327 | [16] = USB3_HS_IRQ, |
| 1328 | [19] = MSM_GPIO_TO_INT(61), |
| 1329 | [20] = MSM_GPIO_TO_INT(58), |
| 1330 | [23] = MSM_GPIO_TO_INT(65), |
| 1331 | [24] = MSM_GPIO_TO_INT(63), |
| 1332 | [25] = USB1_HS_IRQ, |
| 1333 | [27] = HDMI_IRQ, |
| 1334 | [29] = MSM_GPIO_TO_INT(22), |
| 1335 | [30] = MSM_GPIO_TO_INT(72), |
| 1336 | [31] = USB4_HS_IRQ, |
| 1337 | [33] = MSM_GPIO_TO_INT(44), |
| 1338 | [34] = MSM_GPIO_TO_INT(39), |
| 1339 | [35] = MSM_GPIO_TO_INT(19), |
| 1340 | [36] = MSM_GPIO_TO_INT(23), |
| 1341 | [37] = MSM_GPIO_TO_INT(41), |
| 1342 | [38] = MSM_GPIO_TO_INT(30), |
| 1343 | [41] = MSM_GPIO_TO_INT(42), |
| 1344 | [42] = MSM_GPIO_TO_INT(56), |
| 1345 | [43] = MSM_GPIO_TO_INT(55), |
| 1346 | [44] = MSM_GPIO_TO_INT(50), |
| 1347 | [45] = MSM_GPIO_TO_INT(49), |
| 1348 | [46] = MSM_GPIO_TO_INT(47), |
| 1349 | [47] = MSM_GPIO_TO_INT(45), |
| 1350 | [48] = MSM_GPIO_TO_INT(38), |
| 1351 | [49] = MSM_GPIO_TO_INT(34), |
| 1352 | [50] = MSM_GPIO_TO_INT(32), |
| 1353 | [51] = MSM_GPIO_TO_INT(29), |
| 1354 | [52] = MSM_GPIO_TO_INT(18), |
| 1355 | [53] = MSM_GPIO_TO_INT(10), |
| 1356 | [54] = MSM_GPIO_TO_INT(81), |
| 1357 | [55] = MSM_GPIO_TO_INT(6), |
| 1358 | }; |
| 1359 | |
| 1360 | static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = { |
| 1361 | TLMM_MSM_SUMMARY_IRQ, |
| 1362 | RPM_APCC_CPU0_GP_HIGH_IRQ, |
| 1363 | RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 1364 | RPM_APCC_CPU0_GP_LOW_IRQ, |
| 1365 | RPM_APCC_CPU0_WAKE_UP_IRQ, |
| 1366 | RPM_APCC_CPU1_GP_HIGH_IRQ, |
| 1367 | RPM_APCC_CPU1_GP_MEDIUM_IRQ, |
| 1368 | RPM_APCC_CPU1_GP_LOW_IRQ, |
| 1369 | RPM_APCC_CPU1_WAKE_UP_IRQ, |
| 1370 | MSS_TO_APPS_IRQ_0, |
| 1371 | MSS_TO_APPS_IRQ_1, |
| 1372 | MSS_TO_APPS_IRQ_2, |
| 1373 | MSS_TO_APPS_IRQ_3, |
| 1374 | MSS_TO_APPS_IRQ_4, |
| 1375 | MSS_TO_APPS_IRQ_5, |
| 1376 | MSS_TO_APPS_IRQ_6, |
| 1377 | MSS_TO_APPS_IRQ_7, |
| 1378 | MSS_TO_APPS_IRQ_8, |
| 1379 | MSS_TO_APPS_IRQ_9, |
| 1380 | LPASS_SCSS_GP_LOW_IRQ, |
| 1381 | LPASS_SCSS_GP_MEDIUM_IRQ, |
| 1382 | LPASS_SCSS_GP_HIGH_IRQ, |
| 1383 | SPS_MTI_30, |
| 1384 | SPS_MTI_31, |
| 1385 | RIVA_APSS_SPARE_IRQ, |
| 1386 | RIVA_APPS_WLAN_SMSM_IRQ, |
| 1387 | RIVA_APPS_WLAN_RX_DATA_AVAIL_IRQ, |
| 1388 | RIVA_APPS_WLAN_DATA_XFER_DONE_IRQ, |
| 1389 | }; |
| 1390 | |
| 1391 | struct msm_mpm_device_data apq8064_mpm_dev_data __initdata = { |
| 1392 | .irqs_m2a = msm_mpm_irqs_m2a, |
| 1393 | .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a), |
| 1394 | .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs, |
| 1395 | .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs), |
| 1396 | .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8, |
| 1397 | .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8, |
| 1398 | .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008, |
| 1399 | .mpm_apps_ipc_val = BIT(1), |
| 1400 | .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 1401 | |
| 1402 | }; |
| 1403 | #endif |
Joel King | dacbc82 | 2012-01-25 13:30:57 -0800 | [diff] [blame] | 1404 | |
| 1405 | #define MDM2AP_ERRFATAL 19 |
| 1406 | #define AP2MDM_ERRFATAL 18 |
| 1407 | #define MDM2AP_STATUS 49 |
| 1408 | #define AP2MDM_STATUS 48 |
| 1409 | #define AP2MDM_PMIC_RESET_N 27 |
| 1410 | |
| 1411 | static struct resource mdm_resources[] = { |
| 1412 | { |
| 1413 | .start = MDM2AP_ERRFATAL, |
| 1414 | .end = MDM2AP_ERRFATAL, |
| 1415 | .name = "MDM2AP_ERRFATAL", |
| 1416 | .flags = IORESOURCE_IO, |
| 1417 | }, |
| 1418 | { |
| 1419 | .start = AP2MDM_ERRFATAL, |
| 1420 | .end = AP2MDM_ERRFATAL, |
| 1421 | .name = "AP2MDM_ERRFATAL", |
| 1422 | .flags = IORESOURCE_IO, |
| 1423 | }, |
| 1424 | { |
| 1425 | .start = MDM2AP_STATUS, |
| 1426 | .end = MDM2AP_STATUS, |
| 1427 | .name = "MDM2AP_STATUS", |
| 1428 | .flags = IORESOURCE_IO, |
| 1429 | }, |
| 1430 | { |
| 1431 | .start = AP2MDM_STATUS, |
| 1432 | .end = AP2MDM_STATUS, |
| 1433 | .name = "AP2MDM_STATUS", |
| 1434 | .flags = IORESOURCE_IO, |
| 1435 | }, |
| 1436 | { |
| 1437 | .start = AP2MDM_PMIC_RESET_N, |
| 1438 | .end = AP2MDM_PMIC_RESET_N, |
| 1439 | .name = "AP2MDM_PMIC_RESET_N", |
| 1440 | .flags = IORESOURCE_IO, |
| 1441 | }, |
| 1442 | }; |
| 1443 | |
| 1444 | struct platform_device mdm_8064_device = { |
| 1445 | .name = "mdm2_modem", |
| 1446 | .id = -1, |
| 1447 | .num_resources = ARRAY_SIZE(mdm_resources), |
| 1448 | .resource = mdm_resources, |
| 1449 | }; |
| 1450 | |