Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 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/gpio.h> |
| 19 | #include <asm/clkdev.h> |
| 20 | #include <linux/msm_kgsl.h> |
| 21 | #include <linux/android_pmem.h> |
| 22 | #include <mach/irqs-8960.h> |
Mayank Rana | 9f51f58 | 2011-08-04 18:35:59 +0530 | [diff] [blame] | 23 | #include <mach/dma.h> |
| 24 | #include <linux/dma-mapping.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 25 | #include <mach/board.h> |
| 26 | #include <mach/msm_iomap.h> |
| 27 | #include <mach/msm_hsusb.h> |
| 28 | #include <mach/msm_sps.h> |
| 29 | #include <mach/rpm.h> |
| 30 | #include <mach/msm_bus_board.h> |
| 31 | #include <mach/msm_memtypes.h> |
| 32 | #include "clock.h" |
| 33 | #include "devices.h" |
| 34 | #include "devices-msm8x60.h" |
| 35 | #include "footswitch.h" |
| 36 | |
| 37 | #ifdef CONFIG_MSM_MPM |
| 38 | #include "mpm.h" |
| 39 | #endif |
| 40 | #ifdef CONFIG_MSM_DSPS |
| 41 | #include <mach/msm_dsps.h> |
| 42 | #endif |
| 43 | |
| 44 | |
| 45 | /* Address of GSBI blocks */ |
| 46 | #define MSM_GSBI1_PHYS 0x16000000 |
| 47 | #define MSM_GSBI2_PHYS 0x16100000 |
| 48 | #define MSM_GSBI3_PHYS 0x16200000 |
| 49 | #define MSM_GSBI4_PHYS 0x16300000 |
| 50 | #define MSM_GSBI5_PHYS 0x16400000 |
| 51 | #define MSM_GSBI6_PHYS 0x16500000 |
| 52 | #define MSM_GSBI7_PHYS 0x16600000 |
| 53 | #define MSM_GSBI8_PHYS 0x1A000000 |
| 54 | #define MSM_GSBI9_PHYS 0x1A100000 |
| 55 | #define MSM_GSBI10_PHYS 0x1A200000 |
| 56 | #define MSM_GSBI11_PHYS 0x12440000 |
| 57 | #define MSM_GSBI12_PHYS 0x12480000 |
| 58 | |
| 59 | #define MSM_UART2DM_PHYS (MSM_GSBI2_PHYS + 0x40000) |
| 60 | #define MSM_UART5DM_PHYS (MSM_GSBI5_PHYS + 0x40000) |
Mayank Rana | 9f51f58 | 2011-08-04 18:35:59 +0530 | [diff] [blame] | 61 | #define MSM_UART6DM_PHYS (MSM_GSBI6_PHYS + 0x40000) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 62 | |
| 63 | /* GSBI QUP devices */ |
| 64 | #define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000) |
| 65 | #define MSM_GSBI2_QUP_PHYS (MSM_GSBI2_PHYS + 0x80000) |
| 66 | #define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000) |
| 67 | #define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000) |
| 68 | #define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000) |
| 69 | #define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000) |
| 70 | #define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000) |
| 71 | #define MSM_GSBI8_QUP_PHYS (MSM_GSBI8_PHYS + 0x80000) |
| 72 | #define MSM_GSBI9_QUP_PHYS (MSM_GSBI9_PHYS + 0x80000) |
| 73 | #define MSM_GSBI10_QUP_PHYS (MSM_GSBI10_PHYS + 0x80000) |
| 74 | #define MSM_GSBI11_QUP_PHYS (MSM_GSBI11_PHYS + 0x20000) |
| 75 | #define MSM_GSBI12_QUP_PHYS (MSM_GSBI12_PHYS + 0x20000) |
| 76 | #define MSM_QUP_SIZE SZ_4K |
| 77 | |
| 78 | #define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000 |
| 79 | #define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000 |
| 80 | #define MSM_PMIC_SSBI_SIZE SZ_4K |
| 81 | |
| 82 | static struct resource resources_otg[] = { |
| 83 | { |
| 84 | .start = MSM8960_HSUSB_PHYS, |
| 85 | .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE, |
| 86 | .flags = IORESOURCE_MEM, |
| 87 | }, |
| 88 | { |
| 89 | .start = USB1_HS_IRQ, |
| 90 | .end = USB1_HS_IRQ, |
| 91 | .flags = IORESOURCE_IRQ, |
| 92 | }, |
| 93 | }; |
| 94 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 95 | struct platform_device msm8960_device_otg = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 96 | .name = "msm_otg", |
| 97 | .id = -1, |
| 98 | .num_resources = ARRAY_SIZE(resources_otg), |
| 99 | .resource = resources_otg, |
| 100 | .dev = { |
| 101 | .coherent_dma_mask = 0xffffffff, |
| 102 | }, |
| 103 | }; |
| 104 | |
| 105 | static struct resource resources_hsusb[] = { |
| 106 | { |
| 107 | .start = MSM8960_HSUSB_PHYS, |
| 108 | .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE, |
| 109 | .flags = IORESOURCE_MEM, |
| 110 | }, |
| 111 | { |
| 112 | .start = USB1_HS_IRQ, |
| 113 | .end = USB1_HS_IRQ, |
| 114 | .flags = IORESOURCE_IRQ, |
| 115 | }, |
| 116 | }; |
| 117 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 118 | struct platform_device msm8960_device_gadget_peripheral = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 119 | .name = "msm_hsusb", |
| 120 | .id = -1, |
| 121 | .num_resources = ARRAY_SIZE(resources_hsusb), |
| 122 | .resource = resources_hsusb, |
| 123 | .dev = { |
| 124 | .coherent_dma_mask = 0xffffffff, |
| 125 | }, |
| 126 | }; |
| 127 | |
| 128 | static struct resource resources_hsusb_host[] = { |
| 129 | { |
| 130 | .start = MSM8960_HSUSB_PHYS, |
| 131 | .end = MSM8960_HSUSB_PHYS + MSM8960_HSUSB_SIZE - 1, |
| 132 | .flags = IORESOURCE_MEM, |
| 133 | }, |
| 134 | { |
| 135 | .start = USB1_HS_IRQ, |
| 136 | .end = USB1_HS_IRQ, |
| 137 | .flags = IORESOURCE_IRQ, |
| 138 | }, |
| 139 | }; |
| 140 | |
| 141 | static u64 dma_mask = 0xffffffffULL; |
| 142 | struct platform_device msm_device_hsusb_host = { |
| 143 | .name = "msm_hsusb_host", |
| 144 | .id = -1, |
| 145 | .num_resources = ARRAY_SIZE(resources_hsusb_host), |
| 146 | .resource = resources_hsusb_host, |
| 147 | .dev = { |
| 148 | .dma_mask = &dma_mask, |
| 149 | .coherent_dma_mask = 0xffffffff, |
| 150 | }, |
| 151 | }; |
| 152 | |
| 153 | static struct resource resources_uart_gsbi2[] = { |
| 154 | { |
| 155 | .start = MSM8960_GSBI2_UARTDM_IRQ, |
| 156 | .end = MSM8960_GSBI2_UARTDM_IRQ, |
| 157 | .flags = IORESOURCE_IRQ, |
| 158 | }, |
| 159 | { |
| 160 | .start = MSM_UART2DM_PHYS, |
| 161 | .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1, |
| 162 | .name = "uartdm_resource", |
| 163 | .flags = IORESOURCE_MEM, |
| 164 | }, |
| 165 | { |
| 166 | .start = MSM_GSBI2_PHYS, |
| 167 | .end = MSM_GSBI2_PHYS + PAGE_SIZE - 1, |
| 168 | .name = "gsbi_resource", |
| 169 | .flags = IORESOURCE_MEM, |
| 170 | }, |
| 171 | }; |
| 172 | |
| 173 | struct platform_device msm8960_device_uart_gsbi2 = { |
| 174 | .name = "msm_serial_hsl", |
| 175 | .id = 0, |
| 176 | .num_resources = ARRAY_SIZE(resources_uart_gsbi2), |
| 177 | .resource = resources_uart_gsbi2, |
| 178 | }; |
Mayank Rana | 9f51f58 | 2011-08-04 18:35:59 +0530 | [diff] [blame] | 179 | /* GSBI 6 used into UARTDM Mode */ |
| 180 | static struct resource msm_uart_dm6_resources[] = { |
| 181 | { |
| 182 | .start = MSM_UART6DM_PHYS, |
| 183 | .end = MSM_UART6DM_PHYS + PAGE_SIZE - 1, |
| 184 | .name = "uartdm_resource", |
| 185 | .flags = IORESOURCE_MEM, |
| 186 | }, |
| 187 | { |
| 188 | .start = GSBI6_UARTDM_IRQ, |
| 189 | .end = GSBI6_UARTDM_IRQ, |
| 190 | .flags = IORESOURCE_IRQ, |
| 191 | }, |
| 192 | { |
| 193 | .start = MSM_GSBI6_PHYS, |
| 194 | .end = MSM_GSBI6_PHYS + 4 - 1, |
| 195 | .name = "gsbi_resource", |
| 196 | .flags = IORESOURCE_MEM, |
| 197 | }, |
| 198 | { |
| 199 | .start = DMOV_HSUART_GSBI6_TX_CHAN, |
| 200 | .end = DMOV_HSUART_GSBI6_RX_CHAN, |
| 201 | .name = "uartdm_channels", |
| 202 | .flags = IORESOURCE_DMA, |
| 203 | }, |
| 204 | { |
| 205 | .start = DMOV_HSUART_GSBI6_TX_CRCI, |
| 206 | .end = DMOV_HSUART_GSBI6_RX_CRCI, |
| 207 | .name = "uartdm_crci", |
| 208 | .flags = IORESOURCE_DMA, |
| 209 | }, |
| 210 | }; |
| 211 | static u64 msm_uart_dm6_dma_mask = DMA_BIT_MASK(32); |
| 212 | struct platform_device msm_device_uart_dm6 = { |
| 213 | .name = "msm_serial_hs", |
| 214 | .id = 0, |
| 215 | .num_resources = ARRAY_SIZE(msm_uart_dm6_resources), |
| 216 | .resource = msm_uart_dm6_resources, |
| 217 | .dev = { |
| 218 | .dma_mask = &msm_uart_dm6_dma_mask, |
| 219 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 220 | }, |
| 221 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 222 | |
| 223 | static struct resource resources_uart_gsbi5[] = { |
| 224 | { |
| 225 | .start = GSBI5_UARTDM_IRQ, |
| 226 | .end = GSBI5_UARTDM_IRQ, |
| 227 | .flags = IORESOURCE_IRQ, |
| 228 | }, |
| 229 | { |
| 230 | .start = MSM_UART5DM_PHYS, |
| 231 | .end = MSM_UART5DM_PHYS + PAGE_SIZE - 1, |
| 232 | .name = "uartdm_resource", |
| 233 | .flags = IORESOURCE_MEM, |
| 234 | }, |
| 235 | { |
| 236 | .start = MSM_GSBI5_PHYS, |
| 237 | .end = MSM_GSBI5_PHYS + PAGE_SIZE - 1, |
| 238 | .name = "gsbi_resource", |
| 239 | .flags = IORESOURCE_MEM, |
| 240 | }, |
| 241 | }; |
| 242 | |
| 243 | struct platform_device msm8960_device_uart_gsbi5 = { |
| 244 | .name = "msm_serial_hsl", |
| 245 | .id = 0, |
| 246 | .num_resources = ARRAY_SIZE(resources_uart_gsbi5), |
| 247 | .resource = resources_uart_gsbi5, |
| 248 | }; |
| 249 | /* MSM Video core device */ |
| 250 | #ifdef CONFIG_MSM_BUS_SCALING |
| 251 | static struct msm_bus_vectors vidc_init_vectors[] = { |
| 252 | { |
| 253 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 254 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 255 | .ab = 0, |
| 256 | .ib = 0, |
| 257 | }, |
| 258 | { |
| 259 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 260 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 261 | .ab = 0, |
| 262 | .ib = 0, |
| 263 | }, |
| 264 | { |
| 265 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 266 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 267 | .ab = 0, |
| 268 | .ib = 0, |
| 269 | }, |
| 270 | { |
| 271 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 272 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 273 | .ab = 0, |
| 274 | .ib = 0, |
| 275 | }, |
| 276 | }; |
| 277 | static struct msm_bus_vectors vidc_venc_vga_vectors[] = { |
| 278 | { |
| 279 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 280 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 281 | .ab = 54525952, |
| 282 | .ib = 436207616, |
| 283 | }, |
| 284 | { |
| 285 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 286 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 287 | .ab = 72351744, |
| 288 | .ib = 289406976, |
| 289 | }, |
| 290 | { |
| 291 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 292 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 293 | .ab = 500000, |
| 294 | .ib = 1000000, |
| 295 | }, |
| 296 | { |
| 297 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 298 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 299 | .ab = 500000, |
| 300 | .ib = 1000000, |
| 301 | }, |
| 302 | }; |
| 303 | static struct msm_bus_vectors vidc_vdec_vga_vectors[] = { |
| 304 | { |
| 305 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 306 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 307 | .ab = 40894464, |
| 308 | .ib = 327155712, |
| 309 | }, |
| 310 | { |
| 311 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 312 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 313 | .ab = 48234496, |
| 314 | .ib = 192937984, |
| 315 | }, |
| 316 | { |
| 317 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 318 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 319 | .ab = 500000, |
| 320 | .ib = 2000000, |
| 321 | }, |
| 322 | { |
| 323 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 324 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 325 | .ab = 500000, |
| 326 | .ib = 2000000, |
| 327 | }, |
| 328 | }; |
| 329 | static struct msm_bus_vectors vidc_venc_720p_vectors[] = { |
| 330 | { |
| 331 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 332 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 333 | .ab = 163577856, |
| 334 | .ib = 1308622848, |
| 335 | }, |
| 336 | { |
| 337 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 338 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 339 | .ab = 219152384, |
| 340 | .ib = 876609536, |
| 341 | }, |
| 342 | { |
| 343 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 344 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 345 | .ab = 1750000, |
| 346 | .ib = 3500000, |
| 347 | }, |
| 348 | { |
| 349 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 350 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 351 | .ab = 1750000, |
| 352 | .ib = 3500000, |
| 353 | }, |
| 354 | }; |
| 355 | static struct msm_bus_vectors vidc_vdec_720p_vectors[] = { |
| 356 | { |
| 357 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 358 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 359 | .ab = 121634816, |
| 360 | .ib = 973078528, |
| 361 | }, |
| 362 | { |
| 363 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 364 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 365 | .ab = 155189248, |
| 366 | .ib = 620756992, |
| 367 | }, |
| 368 | { |
| 369 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 370 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 371 | .ab = 1750000, |
| 372 | .ib = 7000000, |
| 373 | }, |
| 374 | { |
| 375 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 376 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 377 | .ab = 1750000, |
| 378 | .ib = 7000000, |
| 379 | }, |
| 380 | }; |
| 381 | static struct msm_bus_vectors vidc_venc_1080p_vectors[] = { |
| 382 | { |
| 383 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 384 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 385 | .ab = 372244480, |
| 386 | .ib = 1861222400, |
| 387 | }, |
| 388 | { |
| 389 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 390 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 391 | .ab = 501219328, |
| 392 | .ib = 2004877312, |
| 393 | }, |
| 394 | { |
| 395 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 396 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 397 | .ab = 2500000, |
| 398 | .ib = 5000000, |
| 399 | }, |
| 400 | { |
| 401 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 402 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 403 | .ab = 2500000, |
| 404 | .ib = 5000000, |
| 405 | }, |
| 406 | }; |
| 407 | static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = { |
| 408 | { |
| 409 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 410 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 411 | .ab = 222298112, |
| 412 | .ib = 1778384896, |
| 413 | }, |
| 414 | { |
| 415 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 416 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 417 | .ab = 330301440, |
| 418 | .ib = 1321205760, |
| 419 | }, |
| 420 | { |
| 421 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 422 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 423 | .ab = 2500000, |
| 424 | .ib = 700000000, |
| 425 | }, |
| 426 | { |
| 427 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 428 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 429 | .ab = 2500000, |
| 430 | .ib = 10000000, |
| 431 | }, |
| 432 | }; |
| 433 | |
| 434 | static struct msm_bus_paths vidc_bus_client_config[] = { |
| 435 | { |
| 436 | ARRAY_SIZE(vidc_init_vectors), |
| 437 | vidc_init_vectors, |
| 438 | }, |
| 439 | { |
| 440 | ARRAY_SIZE(vidc_venc_vga_vectors), |
| 441 | vidc_venc_vga_vectors, |
| 442 | }, |
| 443 | { |
| 444 | ARRAY_SIZE(vidc_vdec_vga_vectors), |
| 445 | vidc_vdec_vga_vectors, |
| 446 | }, |
| 447 | { |
| 448 | ARRAY_SIZE(vidc_venc_720p_vectors), |
| 449 | vidc_venc_720p_vectors, |
| 450 | }, |
| 451 | { |
| 452 | ARRAY_SIZE(vidc_vdec_720p_vectors), |
| 453 | vidc_vdec_720p_vectors, |
| 454 | }, |
| 455 | { |
| 456 | ARRAY_SIZE(vidc_venc_1080p_vectors), |
| 457 | vidc_venc_1080p_vectors, |
| 458 | }, |
| 459 | { |
| 460 | ARRAY_SIZE(vidc_vdec_1080p_vectors), |
| 461 | vidc_vdec_1080p_vectors, |
| 462 | }, |
| 463 | }; |
| 464 | |
| 465 | static struct msm_bus_scale_pdata vidc_bus_client_data = { |
| 466 | vidc_bus_client_config, |
| 467 | ARRAY_SIZE(vidc_bus_client_config), |
| 468 | .name = "vidc", |
| 469 | }; |
| 470 | #endif |
| 471 | |
Mona Hossain | 9c430e3 | 2011-07-27 11:04:47 -0700 | [diff] [blame] | 472 | #ifdef CONFIG_HW_RANDOM_MSM |
| 473 | /* PRNG device */ |
| 474 | #define MSM_PRNG_PHYS 0x1A500000 |
| 475 | static struct resource rng_resources = { |
| 476 | .flags = IORESOURCE_MEM, |
| 477 | .start = MSM_PRNG_PHYS, |
| 478 | .end = MSM_PRNG_PHYS + SZ_512 - 1, |
| 479 | }; |
| 480 | |
| 481 | struct platform_device msm_device_rng = { |
| 482 | .name = "msm_rng", |
| 483 | .id = 0, |
| 484 | .num_resources = 1, |
| 485 | .resource = &rng_resources, |
| 486 | }; |
| 487 | #endif |
| 488 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 489 | #define MSM_VIDC_BASE_PHYS 0x04400000 |
| 490 | #define MSM_VIDC_BASE_SIZE 0x00100000 |
| 491 | |
| 492 | static struct resource msm_device_vidc_resources[] = { |
| 493 | { |
| 494 | .start = MSM_VIDC_BASE_PHYS, |
| 495 | .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1, |
| 496 | .flags = IORESOURCE_MEM, |
| 497 | }, |
| 498 | { |
| 499 | .start = VCODEC_IRQ, |
| 500 | .end = VCODEC_IRQ, |
| 501 | .flags = IORESOURCE_IRQ, |
| 502 | }, |
| 503 | }; |
| 504 | |
| 505 | struct msm_vidc_platform_data vidc_platform_data = { |
| 506 | #ifdef CONFIG_MSM_BUS_SCALING |
| 507 | .vidc_bus_client_pdata = &vidc_bus_client_data, |
| 508 | #endif |
| 509 | .memtype = MEMTYPE_EBI1 |
| 510 | }; |
| 511 | |
| 512 | struct platform_device msm_device_vidc = { |
| 513 | .name = "msm_vidc", |
| 514 | .id = 0, |
| 515 | .num_resources = ARRAY_SIZE(msm_device_vidc_resources), |
| 516 | .resource = msm_device_vidc_resources, |
| 517 | .dev = { |
| 518 | .platform_data = &vidc_platform_data, |
| 519 | }, |
| 520 | }; |
| 521 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 522 | #define MSM_SDC1_BASE 0x12400000 |
| 523 | #define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800) |
| 524 | #define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000) |
| 525 | #define MSM_SDC2_BASE 0x12140000 |
| 526 | #define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800) |
| 527 | #define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000) |
| 528 | #define MSM_SDC2_BASE 0x12140000 |
| 529 | #define MSM_SDC3_BASE 0x12180000 |
| 530 | #define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800) |
| 531 | #define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000) |
| 532 | #define MSM_SDC4_BASE 0x121C0000 |
| 533 | #define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800) |
| 534 | #define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000) |
| 535 | #define MSM_SDC5_BASE 0x12200000 |
| 536 | #define MSM_SDC5_DML_BASE (MSM_SDC5_BASE + 0x800) |
| 537 | #define MSM_SDC5_BAM_BASE (MSM_SDC5_BASE + 0x2000) |
| 538 | |
| 539 | static struct resource resources_sdc1[] = { |
| 540 | { |
| 541 | .name = "core_mem", |
| 542 | .flags = IORESOURCE_MEM, |
| 543 | .start = MSM_SDC1_BASE, |
| 544 | .end = MSM_SDC1_DML_BASE - 1, |
| 545 | }, |
| 546 | { |
| 547 | .name = "core_irq", |
| 548 | .flags = IORESOURCE_IRQ, |
| 549 | .start = SDC1_IRQ_0, |
| 550 | .end = SDC1_IRQ_0 |
| 551 | }, |
| 552 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 553 | { |
| 554 | .name = "sdcc_dml_addr", |
| 555 | .start = MSM_SDC1_DML_BASE, |
| 556 | .end = MSM_SDC1_BAM_BASE - 1, |
| 557 | .flags = IORESOURCE_MEM, |
| 558 | }, |
| 559 | { |
| 560 | .name = "sdcc_bam_addr", |
| 561 | .start = MSM_SDC1_BAM_BASE, |
| 562 | .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1, |
| 563 | .flags = IORESOURCE_MEM, |
| 564 | }, |
| 565 | { |
| 566 | .name = "sdcc_bam_irq", |
| 567 | .start = SDC1_BAM_IRQ, |
| 568 | .end = SDC1_BAM_IRQ, |
| 569 | .flags = IORESOURCE_IRQ, |
| 570 | }, |
| 571 | #endif |
| 572 | }; |
| 573 | |
| 574 | static struct resource resources_sdc2[] = { |
| 575 | { |
| 576 | .name = "core_mem", |
| 577 | .flags = IORESOURCE_MEM, |
| 578 | .start = MSM_SDC2_BASE, |
| 579 | .end = MSM_SDC2_DML_BASE - 1, |
| 580 | }, |
| 581 | { |
| 582 | .name = "core_irq", |
| 583 | .flags = IORESOURCE_IRQ, |
| 584 | .start = SDC2_IRQ_0, |
| 585 | .end = SDC2_IRQ_0 |
| 586 | }, |
| 587 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 588 | { |
| 589 | .name = "sdcc_dml_addr", |
| 590 | .start = MSM_SDC2_DML_BASE, |
| 591 | .end = MSM_SDC2_BAM_BASE - 1, |
| 592 | .flags = IORESOURCE_MEM, |
| 593 | }, |
| 594 | { |
| 595 | .name = "sdcc_bam_addr", |
| 596 | .start = MSM_SDC2_BAM_BASE, |
| 597 | .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1, |
| 598 | .flags = IORESOURCE_MEM, |
| 599 | }, |
| 600 | { |
| 601 | .name = "sdcc_bam_irq", |
| 602 | .start = SDC2_BAM_IRQ, |
| 603 | .end = SDC2_BAM_IRQ, |
| 604 | .flags = IORESOURCE_IRQ, |
| 605 | }, |
| 606 | #endif |
| 607 | }; |
| 608 | |
| 609 | static struct resource resources_sdc3[] = { |
| 610 | { |
| 611 | .name = "core_mem", |
| 612 | .flags = IORESOURCE_MEM, |
| 613 | .start = MSM_SDC3_BASE, |
| 614 | .end = MSM_SDC3_DML_BASE - 1, |
| 615 | }, |
| 616 | { |
| 617 | .name = "core_irq", |
| 618 | .flags = IORESOURCE_IRQ, |
| 619 | .start = SDC3_IRQ_0, |
| 620 | .end = SDC3_IRQ_0 |
| 621 | }, |
| 622 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 623 | { |
| 624 | .name = "sdcc_dml_addr", |
| 625 | .start = MSM_SDC3_DML_BASE, |
| 626 | .end = MSM_SDC3_BAM_BASE - 1, |
| 627 | .flags = IORESOURCE_MEM, |
| 628 | }, |
| 629 | { |
| 630 | .name = "sdcc_bam_addr", |
| 631 | .start = MSM_SDC3_BAM_BASE, |
| 632 | .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1, |
| 633 | .flags = IORESOURCE_MEM, |
| 634 | }, |
| 635 | { |
| 636 | .name = "sdcc_bam_irq", |
| 637 | .start = SDC3_BAM_IRQ, |
| 638 | .end = SDC3_BAM_IRQ, |
| 639 | .flags = IORESOURCE_IRQ, |
| 640 | }, |
| 641 | #endif |
| 642 | }; |
| 643 | |
| 644 | static struct resource resources_sdc4[] = { |
| 645 | { |
| 646 | .name = "core_mem", |
| 647 | .flags = IORESOURCE_MEM, |
| 648 | .start = MSM_SDC4_BASE, |
| 649 | .end = MSM_SDC4_DML_BASE - 1, |
| 650 | }, |
| 651 | { |
| 652 | .name = "core_irq", |
| 653 | .flags = IORESOURCE_IRQ, |
| 654 | .start = SDC4_IRQ_0, |
| 655 | .end = SDC4_IRQ_0 |
| 656 | }, |
| 657 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 658 | { |
| 659 | .name = "sdcc_dml_addr", |
| 660 | .start = MSM_SDC4_DML_BASE, |
| 661 | .end = MSM_SDC4_BAM_BASE - 1, |
| 662 | .flags = IORESOURCE_MEM, |
| 663 | }, |
| 664 | { |
| 665 | .name = "sdcc_bam_addr", |
| 666 | .start = MSM_SDC4_BAM_BASE, |
| 667 | .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1, |
| 668 | .flags = IORESOURCE_MEM, |
| 669 | }, |
| 670 | { |
| 671 | .name = "sdcc_bam_irq", |
| 672 | .start = SDC4_BAM_IRQ, |
| 673 | .end = SDC4_BAM_IRQ, |
| 674 | .flags = IORESOURCE_IRQ, |
| 675 | }, |
| 676 | #endif |
| 677 | }; |
| 678 | |
| 679 | static struct resource resources_sdc5[] = { |
| 680 | { |
| 681 | .name = "core_mem", |
| 682 | .flags = IORESOURCE_MEM, |
| 683 | .start = MSM_SDC5_BASE, |
| 684 | .end = MSM_SDC5_DML_BASE - 1, |
| 685 | }, |
| 686 | { |
| 687 | .name = "core_irq", |
| 688 | .flags = IORESOURCE_IRQ, |
| 689 | .start = SDC5_IRQ_0, |
| 690 | .end = SDC5_IRQ_0 |
| 691 | }, |
| 692 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 693 | { |
| 694 | .name = "sdcc_dml_addr", |
| 695 | .start = MSM_SDC5_DML_BASE, |
| 696 | .end = MSM_SDC5_BAM_BASE - 1, |
| 697 | .flags = IORESOURCE_MEM, |
| 698 | }, |
| 699 | { |
| 700 | .name = "sdcc_bam_addr", |
| 701 | .start = MSM_SDC5_BAM_BASE, |
| 702 | .end = MSM_SDC5_BAM_BASE + (2 * SZ_4K) - 1, |
| 703 | .flags = IORESOURCE_MEM, |
| 704 | }, |
| 705 | { |
| 706 | .name = "sdcc_bam_irq", |
| 707 | .start = SDC5_BAM_IRQ, |
| 708 | .end = SDC5_BAM_IRQ, |
| 709 | .flags = IORESOURCE_IRQ, |
| 710 | }, |
| 711 | #endif |
| 712 | }; |
| 713 | |
| 714 | struct platform_device msm_device_sdc1 = { |
| 715 | .name = "msm_sdcc", |
| 716 | .id = 1, |
| 717 | .num_resources = ARRAY_SIZE(resources_sdc1), |
| 718 | .resource = resources_sdc1, |
| 719 | .dev = { |
| 720 | .coherent_dma_mask = 0xffffffff, |
| 721 | }, |
| 722 | }; |
| 723 | |
| 724 | struct platform_device msm_device_sdc2 = { |
| 725 | .name = "msm_sdcc", |
| 726 | .id = 2, |
| 727 | .num_resources = ARRAY_SIZE(resources_sdc2), |
| 728 | .resource = resources_sdc2, |
| 729 | .dev = { |
| 730 | .coherent_dma_mask = 0xffffffff, |
| 731 | }, |
| 732 | }; |
| 733 | |
| 734 | struct platform_device msm_device_sdc3 = { |
| 735 | .name = "msm_sdcc", |
| 736 | .id = 3, |
| 737 | .num_resources = ARRAY_SIZE(resources_sdc3), |
| 738 | .resource = resources_sdc3, |
| 739 | .dev = { |
| 740 | .coherent_dma_mask = 0xffffffff, |
| 741 | }, |
| 742 | }; |
| 743 | |
| 744 | struct platform_device msm_device_sdc4 = { |
| 745 | .name = "msm_sdcc", |
| 746 | .id = 4, |
| 747 | .num_resources = ARRAY_SIZE(resources_sdc4), |
| 748 | .resource = resources_sdc4, |
| 749 | .dev = { |
| 750 | .coherent_dma_mask = 0xffffffff, |
| 751 | }, |
| 752 | }; |
| 753 | |
| 754 | struct platform_device msm_device_sdc5 = { |
| 755 | .name = "msm_sdcc", |
| 756 | .id = 5, |
| 757 | .num_resources = ARRAY_SIZE(resources_sdc5), |
| 758 | .resource = resources_sdc5, |
| 759 | .dev = { |
| 760 | .coherent_dma_mask = 0xffffffff, |
| 761 | }, |
| 762 | }; |
| 763 | |
| 764 | struct platform_device msm_device_smd = { |
| 765 | .name = "msm_smd", |
| 766 | .id = -1, |
| 767 | }; |
| 768 | |
| 769 | struct platform_device msm_device_bam_dmux = { |
| 770 | .name = "BAM_RMNT", |
| 771 | .id = -1, |
| 772 | }; |
| 773 | |
Stepan Moskovchenko | df13d34 | 2011-08-03 19:01:25 -0700 | [diff] [blame] | 774 | static struct resource msm_dmov_resource[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 775 | { |
| 776 | .start = ADM_0_SCSS_1_IRQ, |
| 777 | .end = (resource_size_t)MSM_DMOV_BASE, |
| 778 | .flags = IORESOURCE_IRQ, |
| 779 | }, |
| 780 | }; |
| 781 | |
Stepan Moskovchenko | df13d34 | 2011-08-03 19:01:25 -0700 | [diff] [blame] | 782 | struct platform_device msm8960_device_dmov = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 783 | .name = "msm_dmov", |
| 784 | .id = -1, |
| 785 | .resource = msm_dmov_resource, |
| 786 | .num_resources = ARRAY_SIZE(msm_dmov_resource), |
| 787 | }; |
| 788 | |
| 789 | static struct platform_device *msm_sdcc_devices[] __initdata = { |
| 790 | &msm_device_sdc1, |
| 791 | &msm_device_sdc2, |
| 792 | &msm_device_sdc3, |
| 793 | &msm_device_sdc4, |
| 794 | &msm_device_sdc5, |
| 795 | }; |
| 796 | |
| 797 | int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat) |
| 798 | { |
| 799 | struct platform_device *pdev; |
| 800 | |
| 801 | if (controller < 1 || controller > 5) |
| 802 | return -EINVAL; |
| 803 | |
| 804 | pdev = msm_sdcc_devices[controller-1]; |
| 805 | pdev->dev.platform_data = plat; |
| 806 | return platform_device_register(pdev); |
| 807 | } |
| 808 | |
| 809 | static struct resource resources_qup_i2c_gsbi4[] = { |
| 810 | { |
| 811 | .name = "gsbi_qup_i2c_addr", |
| 812 | .start = MSM_GSBI4_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 813 | .end = MSM_GSBI4_PHYS + 4 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 814 | .flags = IORESOURCE_MEM, |
| 815 | }, |
| 816 | { |
| 817 | .name = "qup_phys_addr", |
| 818 | .start = MSM_GSBI4_QUP_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 819 | .end = MSM_GSBI4_QUP_PHYS + MSM_QUP_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 820 | .flags = IORESOURCE_MEM, |
| 821 | }, |
| 822 | { |
| 823 | .name = "qup_err_intr", |
| 824 | .start = GSBI4_QUP_IRQ, |
| 825 | .end = GSBI4_QUP_IRQ, |
| 826 | .flags = IORESOURCE_IRQ, |
| 827 | }, |
| 828 | }; |
| 829 | |
| 830 | struct platform_device msm8960_device_qup_i2c_gsbi4 = { |
| 831 | .name = "qup_i2c", |
| 832 | .id = 4, |
| 833 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4), |
| 834 | .resource = resources_qup_i2c_gsbi4, |
| 835 | }; |
| 836 | |
| 837 | static struct resource resources_qup_i2c_gsbi3[] = { |
| 838 | { |
| 839 | .name = "gsbi_qup_i2c_addr", |
| 840 | .start = MSM_GSBI3_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 841 | .end = MSM_GSBI3_PHYS + 4 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 842 | .flags = IORESOURCE_MEM, |
| 843 | }, |
| 844 | { |
| 845 | .name = "qup_phys_addr", |
| 846 | .start = MSM_GSBI3_QUP_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 847 | .end = MSM_GSBI3_QUP_PHYS + MSM_QUP_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 848 | .flags = IORESOURCE_MEM, |
| 849 | }, |
| 850 | { |
| 851 | .name = "qup_err_intr", |
| 852 | .start = GSBI3_QUP_IRQ, |
| 853 | .end = GSBI3_QUP_IRQ, |
| 854 | .flags = IORESOURCE_IRQ, |
| 855 | }, |
| 856 | }; |
| 857 | |
| 858 | struct platform_device msm8960_device_qup_i2c_gsbi3 = { |
| 859 | .name = "qup_i2c", |
| 860 | .id = 3, |
| 861 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi3), |
| 862 | .resource = resources_qup_i2c_gsbi3, |
| 863 | }; |
| 864 | |
| 865 | static struct resource resources_qup_i2c_gsbi10[] = { |
| 866 | { |
| 867 | .name = "gsbi_qup_i2c_addr", |
| 868 | .start = MSM_GSBI10_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 869 | .end = MSM_GSBI10_PHYS + 4 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 870 | .flags = IORESOURCE_MEM, |
| 871 | }, |
| 872 | { |
| 873 | .name = "qup_phys_addr", |
| 874 | .start = MSM_GSBI10_QUP_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 875 | .end = MSM_GSBI10_QUP_PHYS + MSM_QUP_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 876 | .flags = IORESOURCE_MEM, |
| 877 | }, |
| 878 | { |
| 879 | .name = "qup_err_intr", |
| 880 | .start = GSBI10_QUP_IRQ, |
| 881 | .end = GSBI10_QUP_IRQ, |
| 882 | .flags = IORESOURCE_IRQ, |
| 883 | }, |
| 884 | }; |
| 885 | |
| 886 | struct platform_device msm8960_device_qup_i2c_gsbi10 = { |
| 887 | .name = "qup_i2c", |
| 888 | .id = 10, |
| 889 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi10), |
| 890 | .resource = resources_qup_i2c_gsbi10, |
| 891 | }; |
| 892 | |
| 893 | static struct resource resources_qup_i2c_gsbi12[] = { |
| 894 | { |
| 895 | .name = "gsbi_qup_i2c_addr", |
| 896 | .start = MSM_GSBI12_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 897 | .end = MSM_GSBI12_PHYS + 4 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 898 | .flags = IORESOURCE_MEM, |
| 899 | }, |
| 900 | { |
| 901 | .name = "qup_phys_addr", |
| 902 | .start = MSM_GSBI12_QUP_PHYS, |
Harini Jayaraman | d7614a7 | 2011-09-15 14:16:02 -0600 | [diff] [blame] | 903 | .end = MSM_GSBI12_QUP_PHYS + MSM_QUP_SIZE - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 904 | .flags = IORESOURCE_MEM, |
| 905 | }, |
| 906 | { |
| 907 | .name = "qup_err_intr", |
| 908 | .start = GSBI12_QUP_IRQ, |
| 909 | .end = GSBI12_QUP_IRQ, |
| 910 | .flags = IORESOURCE_IRQ, |
| 911 | }, |
| 912 | }; |
| 913 | |
| 914 | struct platform_device msm8960_device_qup_i2c_gsbi12 = { |
| 915 | .name = "qup_i2c", |
| 916 | .id = 12, |
| 917 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi12), |
| 918 | .resource = resources_qup_i2c_gsbi12, |
| 919 | }; |
| 920 | |
| 921 | #ifdef CONFIG_MSM_CAMERA |
| 922 | struct resource msm_camera_resources[] = { |
| 923 | { |
| 924 | .name = "vfe", |
| 925 | .start = 0x04500000, |
| 926 | .end = 0x04500000 + SZ_1M - 1, |
| 927 | .flags = IORESOURCE_MEM, |
| 928 | }, |
| 929 | { |
| 930 | .name = "vfe", |
| 931 | .start = VFE_IRQ, |
| 932 | .end = VFE_IRQ, |
| 933 | .flags = IORESOURCE_IRQ, |
| 934 | }, |
| 935 | { |
Mingcheng Zhu | 8e9f99e | 2011-08-26 16:33:32 -0700 | [diff] [blame] | 936 | .name = "vpe", |
| 937 | .start = 0x05300000, |
| 938 | .end = 0x05300000 + SZ_1M - 1, |
| 939 | .flags = IORESOURCE_MEM, |
| 940 | }, |
| 941 | { |
| 942 | .name = "vpe", |
| 943 | .start = VPE_IRQ, |
| 944 | .end = VPE_IRQ, |
| 945 | .flags = IORESOURCE_IRQ, |
| 946 | }, |
| 947 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 948 | .name = "vid_buf", |
| 949 | .flags = IORESOURCE_DMA, |
| 950 | }, |
| 951 | { |
| 952 | .name = "ispif", |
| 953 | .start = 0x04800800, |
| 954 | .end = 0x04800800 + SZ_1K - 1, |
| 955 | .flags = IORESOURCE_MEM, |
| 956 | }, |
| 957 | { |
| 958 | .name = "ispif", |
| 959 | .start = ISPIF_IRQ, |
| 960 | .end = ISPIF_IRQ, |
| 961 | .flags = IORESOURCE_IRQ, |
| 962 | }, |
| 963 | { |
| 964 | .name = "csid0", |
| 965 | .start = 0x04800000, |
| 966 | .end = 0x04800000 + SZ_1K - 1, |
| 967 | .flags = IORESOURCE_MEM, |
| 968 | }, |
| 969 | { |
| 970 | .name = "csid0", |
| 971 | .start = CSI_0_IRQ, |
| 972 | .end = CSI_0_IRQ, |
| 973 | .flags = IORESOURCE_IRQ, |
| 974 | }, |
| 975 | { |
| 976 | .name = "csiphy0", |
| 977 | .start = 0x04800C00, |
| 978 | .end = 0x04800C00 + SZ_1K - 1, |
| 979 | .flags = IORESOURCE_MEM, |
| 980 | }, |
| 981 | { |
| 982 | .name = "csiphy0", |
| 983 | .start = CSIPHY_4LN_IRQ, |
| 984 | .end = CSIPHY_4LN_IRQ, |
| 985 | .flags = IORESOURCE_IRQ, |
| 986 | }, |
| 987 | { |
| 988 | .name = "csid1", |
| 989 | .start = 0x04800400, |
| 990 | .end = 0x04800400 + SZ_1K - 1, |
| 991 | .flags = IORESOURCE_MEM, |
| 992 | }, |
| 993 | { |
| 994 | .name = "csid1", |
| 995 | .start = CSI_1_IRQ, |
| 996 | .end = CSI_1_IRQ, |
| 997 | .flags = IORESOURCE_IRQ, |
| 998 | }, |
| 999 | { |
| 1000 | .name = "csiphy1", |
| 1001 | .start = 0x04801000, |
| 1002 | .end = 0x04801000 + SZ_1K - 1, |
| 1003 | .flags = IORESOURCE_MEM, |
| 1004 | }, |
| 1005 | { |
| 1006 | .name = "csiphy1", |
| 1007 | .start = MSM8960_CSIPHY_2LN_IRQ, |
| 1008 | .end = MSM8960_CSIPHY_2LN_IRQ, |
| 1009 | .flags = IORESOURCE_IRQ, |
| 1010 | }, |
Nishant Pandit | 24153d8 | 2011-08-27 16:05:13 +0530 | [diff] [blame] | 1011 | { |
| 1012 | .name = "s3d_rw", |
| 1013 | .start = 0x008003E0, |
| 1014 | .end = 0x008003E0 + SZ_16 - 1, |
| 1015 | .flags = IORESOURCE_MEM, |
| 1016 | }, |
| 1017 | { |
| 1018 | .name = "s3d_ctl", |
| 1019 | .start = 0x008020B8, |
| 1020 | .end = 0x008020B8 + SZ_16 - 1, |
| 1021 | .flags = IORESOURCE_MEM, |
| 1022 | }, |
| 1023 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1024 | }; |
| 1025 | |
| 1026 | int __init msm_get_cam_resources(struct msm_camera_sensor_info *s_info) |
| 1027 | { |
| 1028 | s_info->resource = msm_camera_resources; |
| 1029 | s_info->num_resources = ARRAY_SIZE(msm_camera_resources); |
| 1030 | return 0; |
| 1031 | } |
| 1032 | #endif |
| 1033 | |
| 1034 | static struct resource resources_ssbi_pm8921[] = { |
| 1035 | { |
| 1036 | .start = MSM_PMIC1_SSBI_CMD_PHYS, |
| 1037 | .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1, |
| 1038 | .flags = IORESOURCE_MEM, |
| 1039 | }, |
| 1040 | }; |
| 1041 | |
| 1042 | struct platform_device msm8960_device_ssbi_pm8921 = { |
| 1043 | .name = "msm_ssbi", |
| 1044 | .id = 0, |
| 1045 | .resource = resources_ssbi_pm8921, |
| 1046 | .num_resources = ARRAY_SIZE(resources_ssbi_pm8921), |
| 1047 | }; |
| 1048 | |
| 1049 | static struct resource resources_qup_spi_gsbi1[] = { |
| 1050 | { |
| 1051 | .name = "spi_base", |
| 1052 | .start = MSM_GSBI1_QUP_PHYS, |
| 1053 | .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1, |
| 1054 | .flags = IORESOURCE_MEM, |
| 1055 | }, |
| 1056 | { |
| 1057 | .name = "gsbi_base", |
| 1058 | .start = MSM_GSBI1_PHYS, |
| 1059 | .end = MSM_GSBI1_PHYS + 4 - 1, |
| 1060 | .flags = IORESOURCE_MEM, |
| 1061 | }, |
| 1062 | { |
| 1063 | .name = "spi_irq_in", |
| 1064 | .start = MSM8960_GSBI1_QUP_IRQ, |
| 1065 | .end = MSM8960_GSBI1_QUP_IRQ, |
| 1066 | .flags = IORESOURCE_IRQ, |
| 1067 | }, |
Harini Jayaraman | aac8e34 | 2011-08-09 19:25:23 -0600 | [diff] [blame] | 1068 | { |
| 1069 | .name = "spi_clk", |
| 1070 | .start = 9, |
| 1071 | .end = 9, |
| 1072 | .flags = IORESOURCE_IO, |
| 1073 | }, |
| 1074 | { |
| 1075 | .name = "spi_cs", |
| 1076 | .start = 8, |
| 1077 | .end = 8, |
| 1078 | .flags = IORESOURCE_IO, |
| 1079 | }, |
| 1080 | { |
| 1081 | .name = "spi_miso", |
| 1082 | .start = 7, |
| 1083 | .end = 7, |
| 1084 | .flags = IORESOURCE_IO, |
| 1085 | }, |
| 1086 | { |
| 1087 | .name = "spi_mosi", |
| 1088 | .start = 6, |
| 1089 | .end = 6, |
| 1090 | .flags = IORESOURCE_IO, |
| 1091 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1092 | }; |
| 1093 | |
| 1094 | struct platform_device msm8960_device_qup_spi_gsbi1 = { |
| 1095 | .name = "spi_qsd", |
| 1096 | .id = 0, |
| 1097 | .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi1), |
| 1098 | .resource = resources_qup_spi_gsbi1, |
| 1099 | }; |
| 1100 | |
| 1101 | struct platform_device msm_pcm = { |
| 1102 | .name = "msm-pcm-dsp", |
| 1103 | .id = -1, |
| 1104 | }; |
| 1105 | |
| 1106 | struct platform_device msm_pcm_routing = { |
| 1107 | .name = "msm-pcm-routing", |
| 1108 | .id = -1, |
| 1109 | }; |
| 1110 | |
| 1111 | struct platform_device msm_cpudai0 = { |
| 1112 | .name = "msm-dai-q6", |
| 1113 | .id = 0x4000, |
| 1114 | }; |
| 1115 | |
| 1116 | struct platform_device msm_cpudai1 = { |
| 1117 | .name = "msm-dai-q6", |
| 1118 | .id = 0x4001, |
| 1119 | }; |
| 1120 | |
| 1121 | struct platform_device msm_cpudai_hdmi_rx = { |
| 1122 | .name = "msm-dai-q6", |
| 1123 | .id = 8, |
| 1124 | }; |
| 1125 | |
| 1126 | struct platform_device msm_cpudai_bt_rx = { |
| 1127 | .name = "msm-dai-q6", |
| 1128 | .id = 0x3000, |
| 1129 | }; |
| 1130 | |
| 1131 | struct platform_device msm_cpudai_bt_tx = { |
| 1132 | .name = "msm-dai-q6", |
| 1133 | .id = 0x3001, |
| 1134 | }; |
| 1135 | |
| 1136 | struct platform_device msm_cpudai_fm_rx = { |
| 1137 | .name = "msm-dai-q6", |
| 1138 | .id = 0x3004, |
| 1139 | }; |
| 1140 | |
| 1141 | struct platform_device msm_cpudai_fm_tx = { |
| 1142 | .name = "msm-dai-q6", |
| 1143 | .id = 0x3005, |
| 1144 | }; |
| 1145 | |
| 1146 | struct platform_device msm_cpu_fe = { |
| 1147 | .name = "msm-dai-fe", |
| 1148 | .id = -1, |
| 1149 | }; |
| 1150 | |
| 1151 | struct platform_device msm_stub_codec = { |
| 1152 | .name = "msm-stub-codec", |
| 1153 | .id = 1, |
| 1154 | }; |
| 1155 | |
| 1156 | struct platform_device msm_voice = { |
| 1157 | .name = "msm-pcm-voice", |
| 1158 | .id = -1, |
| 1159 | }; |
| 1160 | |
| 1161 | struct platform_device msm_voip = { |
| 1162 | .name = "msm-voip-dsp", |
| 1163 | .id = -1, |
| 1164 | }; |
| 1165 | |
| 1166 | struct platform_device msm_lpa_pcm = { |
| 1167 | .name = "msm-pcm-lpa", |
| 1168 | .id = -1, |
| 1169 | }; |
| 1170 | |
| 1171 | struct platform_device msm_pcm_hostless = { |
| 1172 | .name = "msm-pcm-hostless", |
| 1173 | .id = -1, |
| 1174 | }; |
| 1175 | |
Laxminath Kasam | cee1d60 | 2011-08-01 19:26:57 +0530 | [diff] [blame] | 1176 | struct platform_device msm_cpudai_afe_01_rx = { |
| 1177 | .name = "msm-dai-q6", |
| 1178 | .id = 0xE0, |
| 1179 | }; |
| 1180 | |
| 1181 | struct platform_device msm_cpudai_afe_01_tx = { |
| 1182 | .name = "msm-dai-q6", |
| 1183 | .id = 0xF0, |
| 1184 | }; |
| 1185 | |
| 1186 | struct platform_device msm_cpudai_afe_02_rx = { |
| 1187 | .name = "msm-dai-q6", |
| 1188 | .id = 0xF1, |
| 1189 | }; |
| 1190 | |
| 1191 | struct platform_device msm_cpudai_afe_02_tx = { |
| 1192 | .name = "msm-dai-q6", |
| 1193 | .id = 0xE1, |
| 1194 | }; |
| 1195 | |
| 1196 | struct platform_device msm_pcm_afe = { |
| 1197 | .name = "msm-pcm-afe", |
| 1198 | .id = -1, |
| 1199 | }; |
| 1200 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1201 | struct platform_device *msm_footswitch_devices[] = { |
Nagamalleswararao Ganji | fd7454a | 2011-08-09 10:56:40 -0700 | [diff] [blame] | 1202 | FS_8X60(FS_MDP, "fs_mdp"), |
| 1203 | FS_8X60(FS_ROT, "fs_rot"), |
Shuzhen Wang | 4d28c09 | 2011-07-14 15:40:33 -0700 | [diff] [blame] | 1204 | FS_8X60(FS_IJPEG, "fs_ijpeg"), |
| 1205 | FS_8X60(FS_VFE, "fs_vfe"), |
| 1206 | FS_8X60(FS_VPE, "fs_vpe"), |
Lucille Sylvester | a610fb1 | 2011-07-22 17:22:20 -0600 | [diff] [blame] | 1207 | FS_8X60(FS_GFX3D, "fs_gfx3d"), |
| 1208 | FS_8X60(FS_GFX2D0, "fs_gfx2d0"), |
| 1209 | FS_8X60(FS_GFX2D1, "fs_gfx2d1"), |
Gopikrishnaiah Anandan | 031eb94 | 2011-07-28 13:24:00 -0700 | [diff] [blame] | 1210 | FS_8X60(FS_VED, "fs_ved"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1211 | }; |
| 1212 | unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices); |
| 1213 | |
| 1214 | #ifdef CONFIG_MSM_ROTATOR |
| 1215 | #define ROTATOR_HW_BASE 0x04E00000 |
| 1216 | static struct resource resources_msm_rotator[] = { |
| 1217 | { |
| 1218 | .start = ROTATOR_HW_BASE, |
| 1219 | .end = ROTATOR_HW_BASE + 0x100000 - 1, |
| 1220 | .flags = IORESOURCE_MEM, |
| 1221 | }, |
| 1222 | { |
| 1223 | .start = ROT_IRQ, |
| 1224 | .end = ROT_IRQ, |
| 1225 | .flags = IORESOURCE_IRQ, |
| 1226 | }, |
| 1227 | }; |
| 1228 | |
| 1229 | static struct msm_rot_clocks rotator_clocks[] = { |
| 1230 | { |
| 1231 | .clk_name = "rot_clk", |
| 1232 | .clk_type = ROTATOR_CORE_CLK, |
| 1233 | .clk_rate = 160 * 1000 * 1000, |
| 1234 | }, |
| 1235 | { |
| 1236 | .clk_name = "rotator_pclk", |
| 1237 | .clk_type = ROTATOR_PCLK, |
| 1238 | .clk_rate = 0, |
| 1239 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1240 | }; |
| 1241 | |
| 1242 | static struct msm_rotator_platform_data rotator_pdata = { |
| 1243 | .number_of_clocks = ARRAY_SIZE(rotator_clocks), |
| 1244 | .hardware_version_number = 0x01020309, |
| 1245 | .rotator_clks = rotator_clocks, |
| 1246 | .regulator_name = "fs_rot", |
| 1247 | }; |
| 1248 | |
| 1249 | struct platform_device msm_rotator_device = { |
| 1250 | .name = "msm_rotator", |
| 1251 | .id = 0, |
| 1252 | .num_resources = ARRAY_SIZE(resources_msm_rotator), |
| 1253 | .resource = resources_msm_rotator, |
| 1254 | .dev = { |
| 1255 | .platform_data = &rotator_pdata, |
| 1256 | }, |
| 1257 | }; |
| 1258 | #endif |
| 1259 | |
| 1260 | #define MIPI_DSI_HW_BASE 0x04700000 |
| 1261 | #define MDP_HW_BASE 0x05100000 |
| 1262 | |
| 1263 | static struct resource msm_mipi_dsi1_resources[] = { |
| 1264 | { |
| 1265 | .name = "mipi_dsi", |
| 1266 | .start = MIPI_DSI_HW_BASE, |
kuogee hsieh | f12acf5 | 2011-09-06 10:49:43 -0700 | [diff] [blame] | 1267 | .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1268 | .flags = IORESOURCE_MEM, |
| 1269 | }, |
| 1270 | { |
| 1271 | .start = DSI1_IRQ, |
| 1272 | .end = DSI1_IRQ, |
| 1273 | .flags = IORESOURCE_IRQ, |
| 1274 | }, |
| 1275 | }; |
| 1276 | |
| 1277 | struct platform_device msm_mipi_dsi1_device = { |
| 1278 | .name = "mipi_dsi", |
| 1279 | .id = 1, |
| 1280 | .num_resources = ARRAY_SIZE(msm_mipi_dsi1_resources), |
| 1281 | .resource = msm_mipi_dsi1_resources, |
| 1282 | }; |
| 1283 | |
| 1284 | static struct resource msm_mdp_resources[] = { |
| 1285 | { |
| 1286 | .name = "mdp", |
| 1287 | .start = MDP_HW_BASE, |
kuogee hsieh | f12acf5 | 2011-09-06 10:49:43 -0700 | [diff] [blame] | 1288 | .end = MDP_HW_BASE + 0x000F0000 - 1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1289 | .flags = IORESOURCE_MEM, |
| 1290 | }, |
| 1291 | { |
| 1292 | .start = MDP_IRQ, |
| 1293 | .end = MDP_IRQ, |
| 1294 | .flags = IORESOURCE_IRQ, |
| 1295 | }, |
| 1296 | }; |
| 1297 | |
| 1298 | static struct platform_device msm_mdp_device = { |
| 1299 | .name = "mdp", |
| 1300 | .id = 0, |
| 1301 | .num_resources = ARRAY_SIZE(msm_mdp_resources), |
| 1302 | .resource = msm_mdp_resources, |
| 1303 | }; |
| 1304 | |
| 1305 | static void __init msm_register_device(struct platform_device *pdev, void *data) |
| 1306 | { |
| 1307 | int ret; |
| 1308 | |
| 1309 | pdev->dev.platform_data = data; |
| 1310 | ret = platform_device_register(pdev); |
| 1311 | if (ret) |
| 1312 | dev_err(&pdev->dev, |
| 1313 | "%s: platform_device_register() failed = %d\n", |
| 1314 | __func__, ret); |
| 1315 | } |
| 1316 | |
Ravishangar Kalyanam | 882930f | 2011-07-08 17:51:52 -0700 | [diff] [blame] | 1317 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1318 | static struct platform_device msm_dtv_device = { |
| 1319 | .name = "dtv", |
| 1320 | .id = 0, |
| 1321 | }; |
| 1322 | #endif |
| 1323 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1324 | void __init msm_fb_register_device(char *name, void *data) |
| 1325 | { |
| 1326 | if (!strncmp(name, "mdp", 3)) |
| 1327 | msm_register_device(&msm_mdp_device, data); |
| 1328 | else if (!strncmp(name, "mipi_dsi", 8)) |
| 1329 | msm_register_device(&msm_mipi_dsi1_device, data); |
Ravishangar Kalyanam | 882930f | 2011-07-08 17:51:52 -0700 | [diff] [blame] | 1330 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1331 | else if (!strncmp(name, "dtv", 3)) |
| 1332 | msm_register_device(&msm_dtv_device, data); |
| 1333 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1334 | else |
| 1335 | printk(KERN_ERR "%s: unknown device! %s\n", __func__, name); |
| 1336 | } |
| 1337 | |
| 1338 | static struct resource resources_sps[] = { |
| 1339 | { |
| 1340 | .name = "pipe_mem", |
| 1341 | .start = 0x12800000, |
| 1342 | .end = 0x12800000 + 0x4000 - 1, |
| 1343 | .flags = IORESOURCE_MEM, |
| 1344 | }, |
| 1345 | { |
| 1346 | .name = "bamdma_dma", |
| 1347 | .start = 0x12240000, |
| 1348 | .end = 0x12240000 + 0x1000 - 1, |
| 1349 | .flags = IORESOURCE_MEM, |
| 1350 | }, |
| 1351 | { |
| 1352 | .name = "bamdma_bam", |
| 1353 | .start = 0x12244000, |
| 1354 | .end = 0x12244000 + 0x4000 - 1, |
| 1355 | .flags = IORESOURCE_MEM, |
| 1356 | }, |
| 1357 | { |
| 1358 | .name = "bamdma_irq", |
| 1359 | .start = SPS_BAM_DMA_IRQ, |
| 1360 | .end = SPS_BAM_DMA_IRQ, |
| 1361 | .flags = IORESOURCE_IRQ, |
| 1362 | }, |
| 1363 | }; |
| 1364 | |
| 1365 | struct msm_sps_platform_data msm_sps_pdata = { |
| 1366 | .bamdma_restricted_pipes = 0x06, |
| 1367 | }; |
| 1368 | |
| 1369 | struct platform_device msm_device_sps = { |
| 1370 | .name = "msm_sps", |
| 1371 | .id = -1, |
| 1372 | .num_resources = ARRAY_SIZE(resources_sps), |
| 1373 | .resource = resources_sps, |
| 1374 | .dev.platform_data = &msm_sps_pdata, |
| 1375 | }; |
| 1376 | |
| 1377 | #ifdef CONFIG_MSM_MPM |
| 1378 | static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] = { |
Praveen Chidambaram | b3d857c | 2011-05-31 16:28:07 -0600 | [diff] [blame] | 1379 | [1] = MSM_GPIO_TO_INT(46), |
| 1380 | [2] = MSM_GPIO_TO_INT(150), |
| 1381 | [4] = MSM_GPIO_TO_INT(103), |
| 1382 | [5] = MSM_GPIO_TO_INT(104), |
| 1383 | [6] = MSM_GPIO_TO_INT(105), |
| 1384 | [7] = MSM_GPIO_TO_INT(106), |
| 1385 | [8] = MSM_GPIO_TO_INT(107), |
| 1386 | [9] = MSM_GPIO_TO_INT(7), |
| 1387 | [10] = MSM_GPIO_TO_INT(11), |
| 1388 | [11] = MSM_GPIO_TO_INT(15), |
| 1389 | [12] = MSM_GPIO_TO_INT(19), |
| 1390 | [13] = MSM_GPIO_TO_INT(23), |
| 1391 | [14] = MSM_GPIO_TO_INT(27), |
| 1392 | [15] = MSM_GPIO_TO_INT(31), |
| 1393 | [16] = MSM_GPIO_TO_INT(35), |
| 1394 | [19] = MSM_GPIO_TO_INT(90), |
| 1395 | [20] = MSM_GPIO_TO_INT(92), |
| 1396 | [23] = MSM_GPIO_TO_INT(85), |
| 1397 | [24] = MSM_GPIO_TO_INT(83), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1398 | [25] = USB1_HS_IRQ, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1399 | [27] = HDMI_IRQ, |
Praveen Chidambaram | b3d857c | 2011-05-31 16:28:07 -0600 | [diff] [blame] | 1400 | [29] = MSM_GPIO_TO_INT(10), |
| 1401 | [30] = MSM_GPIO_TO_INT(102), |
| 1402 | [31] = MSM_GPIO_TO_INT(81), |
| 1403 | [32] = MSM_GPIO_TO_INT(78), |
| 1404 | [33] = MSM_GPIO_TO_INT(94), |
| 1405 | [34] = MSM_GPIO_TO_INT(72), |
| 1406 | [35] = MSM_GPIO_TO_INT(39), |
| 1407 | [36] = MSM_GPIO_TO_INT(43), |
| 1408 | [37] = MSM_GPIO_TO_INT(61), |
| 1409 | [38] = MSM_GPIO_TO_INT(50), |
| 1410 | [39] = MSM_GPIO_TO_INT(42), |
| 1411 | [41] = MSM_GPIO_TO_INT(62), |
| 1412 | [42] = MSM_GPIO_TO_INT(76), |
| 1413 | [43] = MSM_GPIO_TO_INT(75), |
| 1414 | [44] = MSM_GPIO_TO_INT(70), |
| 1415 | [45] = MSM_GPIO_TO_INT(69), |
| 1416 | [46] = MSM_GPIO_TO_INT(67), |
| 1417 | [47] = MSM_GPIO_TO_INT(65), |
| 1418 | [48] = MSM_GPIO_TO_INT(58), |
| 1419 | [49] = MSM_GPIO_TO_INT(54), |
| 1420 | [50] = MSM_GPIO_TO_INT(52), |
| 1421 | [51] = MSM_GPIO_TO_INT(49), |
| 1422 | [52] = MSM_GPIO_TO_INT(40), |
| 1423 | [53] = MSM_GPIO_TO_INT(37), |
| 1424 | [54] = MSM_GPIO_TO_INT(24), |
| 1425 | [55] = MSM_GPIO_TO_INT(14), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1426 | }; |
| 1427 | |
| 1428 | static uint16_t msm_mpm_bypassed_apps_irqs[] = { |
| 1429 | TLMM_MSM_SUMMARY_IRQ, |
| 1430 | RPM_APCC_CPU0_GP_HIGH_IRQ, |
| 1431 | RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 1432 | RPM_APCC_CPU0_GP_LOW_IRQ, |
| 1433 | RPM_APCC_CPU0_WAKE_UP_IRQ, |
| 1434 | RPM_APCC_CPU1_GP_HIGH_IRQ, |
| 1435 | RPM_APCC_CPU1_GP_MEDIUM_IRQ, |
| 1436 | RPM_APCC_CPU1_GP_LOW_IRQ, |
| 1437 | RPM_APCC_CPU1_WAKE_UP_IRQ, |
| 1438 | MSS_TO_APPS_IRQ_0, |
| 1439 | MSS_TO_APPS_IRQ_1, |
| 1440 | MSS_TO_APPS_IRQ_2, |
| 1441 | MSS_TO_APPS_IRQ_3, |
| 1442 | MSS_TO_APPS_IRQ_4, |
| 1443 | MSS_TO_APPS_IRQ_5, |
| 1444 | MSS_TO_APPS_IRQ_6, |
| 1445 | MSS_TO_APPS_IRQ_7, |
| 1446 | MSS_TO_APPS_IRQ_8, |
| 1447 | MSS_TO_APPS_IRQ_9, |
| 1448 | LPASS_SCSS_GP_LOW_IRQ, |
| 1449 | LPASS_SCSS_GP_MEDIUM_IRQ, |
| 1450 | LPASS_SCSS_GP_HIGH_IRQ, |
David Collins | 5e2b2fd | 2011-09-08 15:23:30 -0700 | [diff] [blame] | 1451 | SPS_MTI_30, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1452 | SPS_MTI_31, |
David Collins | 5e2b2fd | 2011-09-08 15:23:30 -0700 | [diff] [blame] | 1453 | RIVA_APSS_SPARE_IRQ, |
| 1454 | RIVA_APPS_WLAN_SMSM_IRQ |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1455 | }; |
| 1456 | |
| 1457 | struct msm_mpm_device_data msm_mpm_dev_data = { |
| 1458 | .irqs_m2a = msm_mpm_irqs_m2a, |
| 1459 | .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a), |
| 1460 | .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs, |
| 1461 | .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs), |
| 1462 | .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8, |
| 1463 | .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8, |
| 1464 | .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008, |
| 1465 | .mpm_apps_ipc_val = BIT(1), |
| 1466 | .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 1467 | |
| 1468 | }; |
| 1469 | #endif |
| 1470 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 1471 | static struct clk_lookup msm_clocks_8960_dummy[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1472 | CLK_DUMMY("pll2", PLL2, NULL, 0), |
| 1473 | CLK_DUMMY("pll8", PLL8, NULL, 0), |
| 1474 | CLK_DUMMY("pll4", PLL4, NULL, 0), |
| 1475 | |
| 1476 | CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0), |
| 1477 | CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0), |
| 1478 | CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0), |
| 1479 | CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0), |
| 1480 | CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0), |
| 1481 | CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0), |
| 1482 | CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0), |
| 1483 | CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0), |
| 1484 | CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0), |
| 1485 | CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0), |
| 1486 | CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0), |
| 1487 | CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0), |
| 1488 | CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0), |
| 1489 | CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0), |
| 1490 | CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0), |
| 1491 | CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0), |
| 1492 | |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 1493 | CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF), |
| 1494 | CLK_DUMMY("core_clk", GSBI2_UART_CLK, "msm_serial_hsl.0", OFF), |
| 1495 | CLK_DUMMY("core_clk", GSBI3_UART_CLK, NULL, OFF), |
| 1496 | CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF), |
| 1497 | CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF), |
| 1498 | CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF), |
| 1499 | CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF), |
| 1500 | CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF), |
| 1501 | CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF), |
| 1502 | CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF), |
| 1503 | CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF), |
| 1504 | CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 1505 | CLK_DUMMY("core_clk", GSBI1_QUP_CLK, "spi_qsd.0", OFF), |
| 1506 | CLK_DUMMY("core_clk", GSBI2_QUP_CLK, NULL, OFF), |
| 1507 | CLK_DUMMY("core_clk", GSBI3_QUP_CLK, NULL, OFF), |
| 1508 | CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF), |
| 1509 | CLK_DUMMY("core_clk", GSBI5_QUP_CLK, NULL, OFF), |
| 1510 | CLK_DUMMY("core_clk", GSBI6_QUP_CLK, NULL, OFF), |
| 1511 | CLK_DUMMY("core_clk", GSBI7_QUP_CLK, NULL, OFF), |
| 1512 | CLK_DUMMY("core_clk", GSBI8_QUP_CLK, NULL, OFF), |
| 1513 | CLK_DUMMY("core_clk", GSBI9_QUP_CLK, NULL, OFF), |
| 1514 | CLK_DUMMY("core_clk", GSBI10_QUP_CLK, NULL, OFF), |
| 1515 | CLK_DUMMY("core_clk", GSBI11_QUP_CLK, NULL, OFF), |
| 1516 | CLK_DUMMY("core_clk", GSBI12_QUP_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1517 | CLK_DUMMY("pdm_clk", PDM_CLK, NULL, OFF), |
Matt Wagantall | d86d683 | 2011-08-17 14:06:55 -0700 | [diff] [blame] | 1518 | CLK_DUMMY("mem_clk", PMEM_CLK, NULL, OFF), |
Matt Wagantall | c120529 | 2011-08-11 17:19:31 -0700 | [diff] [blame] | 1519 | CLK_DUMMY("core_clk", PRNG_CLK, NULL, OFF), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 1520 | CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF), |
| 1521 | CLK_DUMMY("core_clk", SDC2_CLK, NULL, OFF), |
| 1522 | CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF), |
| 1523 | CLK_DUMMY("core_clk", SDC4_CLK, NULL, OFF), |
| 1524 | CLK_DUMMY("core_clk", SDC5_CLK, NULL, OFF), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 1525 | CLK_DUMMY("core_clk", TSIF_REF_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1526 | CLK_DUMMY("tssc_clk", TSSC_CLK, NULL, OFF), |
| 1527 | CLK_DUMMY("usb_hs_clk", USB_HS1_XCVR_CLK, NULL, OFF), |
| 1528 | CLK_DUMMY("usb_phy_clk", USB_PHY0_CLK, NULL, OFF), |
| 1529 | CLK_DUMMY("usb_fs_src_clk", USB_FS1_SRC_CLK, NULL, OFF), |
| 1530 | CLK_DUMMY("usb_fs_clk", USB_FS1_XCVR_CLK, NULL, OFF), |
| 1531 | CLK_DUMMY("usb_fs_sys_clk", USB_FS1_SYS_CLK, NULL, OFF), |
| 1532 | CLK_DUMMY("usb_fs_src_clk", USB_FS2_SRC_CLK, NULL, OFF), |
| 1533 | CLK_DUMMY("usb_fs_clk", USB_FS2_XCVR_CLK, NULL, OFF), |
| 1534 | CLK_DUMMY("usb_fs_sys_clk", USB_FS2_SYS_CLK, NULL, OFF), |
Matt Wagantall | c4b3a4d | 2011-08-17 16:58:39 -0700 | [diff] [blame] | 1535 | CLK_DUMMY("iface_clk", CE2_CLK, "qce.0", OFF), |
| 1536 | CLK_DUMMY("core_clk", CE1_CORE_CLK, "qce.0", OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 1537 | CLK_DUMMY("iface_clk", GSBI1_P_CLK, "spi_qsd.0", OFF), |
| 1538 | CLK_DUMMY("iface_clk", GSBI2_P_CLK, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1539 | "msm_serial_hsl.0", OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 1540 | CLK_DUMMY("iface_clk", GSBI3_P_CLK, NULL, OFF), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 1541 | CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 1542 | CLK_DUMMY("iface_clk", GSBI5_P_CLK, NULL, OFF), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 1543 | CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF), |
Matt Wagantall | 62cf63e | 2011-08-17 16:34:47 -0700 | [diff] [blame] | 1544 | CLK_DUMMY("iface_clk", GSBI7_P_CLK, NULL, OFF), |
| 1545 | CLK_DUMMY("iface_clk", GSBI8_P_CLK, NULL, OFF), |
| 1546 | CLK_DUMMY("iface_clk", GSBI9_P_CLK, NULL, OFF), |
| 1547 | CLK_DUMMY("iface_clk", GSBI10_P_CLK, NULL, OFF), |
| 1548 | CLK_DUMMY("iface_clk", GSBI11_P_CLK, NULL, OFF), |
| 1549 | CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF), |
| 1550 | CLK_DUMMY("iface_clk", GSBI12_P_CLK, NULL, OFF), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 1551 | CLK_DUMMY("iface_clk", TSIF_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1552 | CLK_DUMMY("usb_fs_pclk", USB_FS1_P_CLK, NULL, OFF), |
| 1553 | CLK_DUMMY("usb_fs_pclk", USB_FS2_P_CLK, NULL, OFF), |
| 1554 | CLK_DUMMY("usb_hs_pclk", USB_HS1_P_CLK, NULL, OFF), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 1555 | CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF), |
| 1556 | CLK_DUMMY("iface_clk", SDC2_P_CLK, NULL, OFF), |
| 1557 | CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF), |
| 1558 | CLK_DUMMY("iface_clk", SDC4_P_CLK, NULL, OFF), |
| 1559 | CLK_DUMMY("iface_clk", SDC5_P_CLK, NULL, OFF), |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 1560 | CLK_DUMMY("core_clk", ADM0_CLK, NULL, OFF), |
| 1561 | CLK_DUMMY("iface_clk", ADM0_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1562 | CLK_DUMMY("pmic_arb_pclk", PMIC_ARB0_P_CLK, NULL, OFF), |
| 1563 | CLK_DUMMY("pmic_arb_pclk", PMIC_ARB1_P_CLK, NULL, OFF), |
| 1564 | CLK_DUMMY("pmic_ssbi2", PMIC_SSBI2_CLK, NULL, OFF), |
| 1565 | CLK_DUMMY("rpm_msg_ram_pclk", RPM_MSG_RAM_P_CLK, NULL, OFF), |
| 1566 | CLK_DUMMY("amp_clk", AMP_CLK, NULL, OFF), |
| 1567 | CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF), |
| 1568 | CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF), |
| 1569 | CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF), |
| 1570 | CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF), |
| 1571 | CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF), |
| 1572 | CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF), |
| 1573 | CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF), |
| 1574 | CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF), |
| 1575 | CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF), |
| 1576 | CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF), |
| 1577 | CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF), |
| 1578 | CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, "mipi_dsi.1", OFF), |
| 1579 | CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, "mipi_dsi.2", OFF), |
| 1580 | CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, "mipi_dsi.1", OFF), |
| 1581 | CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, "mipi_dsi.2", OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame^] | 1582 | CLK_DUMMY("core_clk", GFX2D0_CLK, NULL, OFF), |
| 1583 | CLK_DUMMY("core_clk", GFX2D1_CLK, NULL, OFF), |
| 1584 | CLK_DUMMY("core_clk", GFX3D_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1585 | CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame^] | 1586 | CLK_DUMMY("mem_clk", IMEM_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1587 | CLK_DUMMY("jpegd_clk", JPEGD_CLK, NULL, OFF), |
| 1588 | CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF), |
| 1589 | CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF), |
| 1590 | CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF), |
| 1591 | CLK_DUMMY("rot_clk", ROT_CLK, NULL, OFF), |
| 1592 | CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF), |
| 1593 | CLK_DUMMY("tv_enc_clk", TV_ENC_CLK, NULL, OFF), |
| 1594 | CLK_DUMMY("tv_dac_clk", TV_DAC_CLK, NULL, OFF), |
| 1595 | CLK_DUMMY("vcodec_clk", VCODEC_CLK, NULL, OFF), |
| 1596 | CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF), |
| 1597 | CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF), |
| 1598 | CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF), |
| 1599 | CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF), |
| 1600 | CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF), |
| 1601 | CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF), |
| 1602 | CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF), |
| 1603 | CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF), |
| 1604 | CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF), |
| 1605 | CLK_DUMMY("rot_axi_clk", ROT_AXI_CLK, NULL, OFF), |
| 1606 | CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF), |
| 1607 | CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF), |
| 1608 | CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF), |
| 1609 | CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF), |
| 1610 | CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF), |
| 1611 | CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF), |
| 1612 | CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, "mipi_dsi.1", OFF), |
| 1613 | CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, "mipi_dsi.1", OFF), |
| 1614 | CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, "mipi_dsi.2", OFF), |
| 1615 | CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, "mipi_dsi.2", OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame^] | 1616 | CLK_DUMMY("iface_clk", GFX2D0_P_CLK, NULL, OFF), |
| 1617 | CLK_DUMMY("iface_clk", GFX2D1_P_CLK, NULL, OFF), |
| 1618 | CLK_DUMMY("iface_clk", GFX3D_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1619 | CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF), |
| 1620 | CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF), |
| 1621 | CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF), |
| 1622 | CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame^] | 1623 | CLK_DUMMY("mem_iface_clk", IMEM_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1624 | CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF), |
| 1625 | CLK_DUMMY("smmu_pclk", SMMU_P_CLK, NULL, OFF), |
| 1626 | CLK_DUMMY("rotator_pclk", ROT_P_CLK, NULL, OFF), |
| 1627 | CLK_DUMMY("tv_enc_pclk", TV_ENC_P_CLK, NULL, OFF), |
| 1628 | CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF), |
| 1629 | CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF), |
| 1630 | CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF), |
| 1631 | CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF), |
| 1632 | CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF), |
| 1633 | CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF), |
| 1634 | CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF), |
| 1635 | CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF), |
| 1636 | CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF), |
| 1637 | CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF), |
| 1638 | CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF), |
| 1639 | CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF), |
| 1640 | CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF), |
| 1641 | CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF), |
| 1642 | CLK_DUMMY("iommu_clk", JPEGD_AXI_CLK, NULL, 0), |
| 1643 | CLK_DUMMY("iommu_clk", VFE_AXI_CLK, NULL, 0), |
| 1644 | CLK_DUMMY("iommu_clk", VCODEC_AXI_CLK, NULL, 0), |
| 1645 | CLK_DUMMY("iommu_clk", GFX3D_CLK, NULL, 0), |
| 1646 | CLK_DUMMY("iommu_clk", GFX2D0_CLK, NULL, 0), |
| 1647 | CLK_DUMMY("iommu_clk", GFX2D1_CLK, NULL, 0), |
| 1648 | |
| 1649 | CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0), |
| 1650 | CLK_DUMMY("dfab_usb_hs_clk", DFAB_USB_HS_CLK, NULL, 0), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 1651 | CLK_DUMMY("bus_clk", DFAB_SDC1_CLK, "msm_sdcc.1", 0), |
| 1652 | CLK_DUMMY("bus_clk", DFAB_SDC2_CLK, "msm_sdcc.2", 0), |
| 1653 | CLK_DUMMY("bus_clk", DFAB_SDC3_CLK, "msm_sdcc.3", 0), |
| 1654 | CLK_DUMMY("bus_clk", DFAB_SDC4_CLK, "msm_sdcc.4", 0), |
| 1655 | CLK_DUMMY("bus_clk", DFAB_SDC5_CLK, "msm_sdcc.5", 0), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1656 | CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0), |
| 1657 | CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0), |
| 1658 | }; |
| 1659 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 1660 | struct clock_init_data msm8960_dummy_clock_init_data __initdata = { |
| 1661 | .table = msm_clocks_8960_dummy, |
| 1662 | .size = ARRAY_SIZE(msm_clocks_8960_dummy), |
| 1663 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1664 | |
| 1665 | #define LPASS_SLIMBUS_PHYS 0x28080000 |
| 1666 | #define LPASS_SLIMBUS_BAM_PHYS 0x28084000 |
| 1667 | /* Board info for the slimbus slave device */ |
| 1668 | static struct resource slimbus_res[] = { |
| 1669 | { |
| 1670 | .start = LPASS_SLIMBUS_PHYS, |
| 1671 | .end = LPASS_SLIMBUS_PHYS + 8191, |
| 1672 | .flags = IORESOURCE_MEM, |
| 1673 | .name = "slimbus_physical", |
| 1674 | }, |
| 1675 | { |
| 1676 | .start = LPASS_SLIMBUS_BAM_PHYS, |
| 1677 | .end = LPASS_SLIMBUS_BAM_PHYS + 8191, |
| 1678 | .flags = IORESOURCE_MEM, |
| 1679 | .name = "slimbus_bam_physical", |
| 1680 | }, |
| 1681 | { |
| 1682 | .start = SLIMBUS0_CORE_EE1_IRQ, |
| 1683 | .end = SLIMBUS0_CORE_EE1_IRQ, |
| 1684 | .flags = IORESOURCE_IRQ, |
| 1685 | .name = "slimbus_irq", |
| 1686 | }, |
| 1687 | { |
| 1688 | .start = SLIMBUS0_BAM_EE1_IRQ, |
| 1689 | .end = SLIMBUS0_BAM_EE1_IRQ, |
| 1690 | .flags = IORESOURCE_IRQ, |
| 1691 | .name = "slimbus_bam_irq", |
| 1692 | }, |
| 1693 | }; |
| 1694 | |
| 1695 | struct platform_device msm_slim_ctrl = { |
| 1696 | .name = "msm_slim_ctrl", |
| 1697 | .id = 1, |
| 1698 | .num_resources = ARRAY_SIZE(slimbus_res), |
| 1699 | .resource = slimbus_res, |
| 1700 | .dev = { |
| 1701 | .coherent_dma_mask = 0xffffffffULL, |
| 1702 | }, |
| 1703 | }; |
| 1704 | |
| 1705 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1706 | static struct msm_bus_vectors grp3d_init_vectors[] = { |
| 1707 | { |
| 1708 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 1709 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1710 | .ab = 0, |
| 1711 | .ib = 0, |
| 1712 | }, |
| 1713 | }; |
| 1714 | |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 1715 | static struct msm_bus_vectors grp3d_low_vectors[] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1716 | { |
| 1717 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 1718 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1719 | .ab = 0, |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 1720 | .ib = 1200000000U, |
| 1721 | }, |
| 1722 | }; |
| 1723 | |
| 1724 | static struct msm_bus_vectors grp3d_nominal_low_vectors[] = { |
| 1725 | { |
| 1726 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 1727 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1728 | .ab = 0, |
| 1729 | .ib = 2048000000U, |
| 1730 | }, |
| 1731 | }; |
| 1732 | |
| 1733 | static struct msm_bus_vectors grp3d_nominal_high_vectors[] = { |
| 1734 | { |
| 1735 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 1736 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1737 | .ab = 0, |
| 1738 | .ib = 2656000000U, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1739 | }, |
| 1740 | }; |
| 1741 | |
| 1742 | static struct msm_bus_vectors grp3d_max_vectors[] = { |
| 1743 | { |
| 1744 | .src = MSM_BUS_MASTER_GRAPHICS_3D, |
| 1745 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1746 | .ab = 0, |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 1747 | .ib = 3968000000U, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1748 | }, |
| 1749 | }; |
| 1750 | |
| 1751 | static struct msm_bus_paths grp3d_bus_scale_usecases[] = { |
| 1752 | { |
| 1753 | ARRAY_SIZE(grp3d_init_vectors), |
| 1754 | grp3d_init_vectors, |
| 1755 | }, |
| 1756 | { |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 1757 | ARRAY_SIZE(grp3d_low_vectors), |
| 1758 | grp3d_low_vectors, |
| 1759 | }, |
| 1760 | { |
| 1761 | ARRAY_SIZE(grp3d_nominal_low_vectors), |
| 1762 | grp3d_nominal_low_vectors, |
| 1763 | }, |
| 1764 | { |
| 1765 | ARRAY_SIZE(grp3d_nominal_high_vectors), |
| 1766 | grp3d_nominal_high_vectors, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1767 | }, |
| 1768 | { |
| 1769 | ARRAY_SIZE(grp3d_max_vectors), |
| 1770 | grp3d_max_vectors, |
| 1771 | }, |
| 1772 | }; |
| 1773 | |
| 1774 | static struct msm_bus_scale_pdata grp3d_bus_scale_pdata = { |
| 1775 | grp3d_bus_scale_usecases, |
| 1776 | ARRAY_SIZE(grp3d_bus_scale_usecases), |
| 1777 | .name = "grp3d", |
| 1778 | }; |
| 1779 | |
| 1780 | static struct msm_bus_vectors grp2d0_init_vectors[] = { |
| 1781 | { |
| 1782 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0, |
| 1783 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1784 | .ab = 0, |
| 1785 | .ib = 0, |
| 1786 | }, |
| 1787 | }; |
| 1788 | |
| 1789 | static struct msm_bus_vectors grp2d0_max_vectors[] = { |
| 1790 | { |
| 1791 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE0, |
| 1792 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1793 | .ab = 0, |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 1794 | .ib = 204800000U, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1795 | }, |
| 1796 | }; |
| 1797 | |
| 1798 | static struct msm_bus_paths grp2d0_bus_scale_usecases[] = { |
| 1799 | { |
| 1800 | ARRAY_SIZE(grp2d0_init_vectors), |
| 1801 | grp2d0_init_vectors, |
| 1802 | }, |
| 1803 | { |
| 1804 | ARRAY_SIZE(grp2d0_max_vectors), |
| 1805 | grp2d0_max_vectors, |
| 1806 | }, |
| 1807 | }; |
| 1808 | |
| 1809 | struct msm_bus_scale_pdata grp2d0_bus_scale_pdata = { |
| 1810 | grp2d0_bus_scale_usecases, |
| 1811 | ARRAY_SIZE(grp2d0_bus_scale_usecases), |
| 1812 | .name = "grp2d0", |
| 1813 | }; |
| 1814 | |
| 1815 | static struct msm_bus_vectors grp2d1_init_vectors[] = { |
| 1816 | { |
| 1817 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1, |
| 1818 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1819 | .ab = 0, |
| 1820 | .ib = 0, |
| 1821 | }, |
| 1822 | }; |
| 1823 | |
| 1824 | static struct msm_bus_vectors grp2d1_max_vectors[] = { |
| 1825 | { |
| 1826 | .src = MSM_BUS_MASTER_GRAPHICS_2D_CORE1, |
| 1827 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1828 | .ab = 0, |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 1829 | .ib = 204800000U, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1830 | }, |
| 1831 | }; |
| 1832 | |
| 1833 | static struct msm_bus_paths grp2d1_bus_scale_usecases[] = { |
| 1834 | { |
| 1835 | ARRAY_SIZE(grp2d1_init_vectors), |
| 1836 | grp2d1_init_vectors, |
| 1837 | }, |
| 1838 | { |
| 1839 | ARRAY_SIZE(grp2d1_max_vectors), |
| 1840 | grp2d1_max_vectors, |
| 1841 | }, |
| 1842 | }; |
| 1843 | |
| 1844 | struct msm_bus_scale_pdata grp2d1_bus_scale_pdata = { |
| 1845 | grp2d1_bus_scale_usecases, |
| 1846 | ARRAY_SIZE(grp2d1_bus_scale_usecases), |
| 1847 | .name = "grp2d1", |
| 1848 | }; |
| 1849 | #endif |
| 1850 | |
| 1851 | static struct resource kgsl_3d0_resources[] = { |
| 1852 | { |
| 1853 | .name = KGSL_3D0_REG_MEMORY, |
| 1854 | .start = 0x04300000, /* GFX3D address */ |
| 1855 | .end = 0x0431ffff, |
| 1856 | .flags = IORESOURCE_MEM, |
| 1857 | }, |
| 1858 | { |
| 1859 | .name = KGSL_3D0_IRQ, |
| 1860 | .start = GFX3D_IRQ, |
| 1861 | .end = GFX3D_IRQ, |
| 1862 | .flags = IORESOURCE_IRQ, |
| 1863 | }, |
| 1864 | }; |
| 1865 | |
| 1866 | static struct kgsl_device_platform_data kgsl_3d0_pdata = { |
| 1867 | .pwr_data = { |
| 1868 | .pwrlevel = { |
| 1869 | { |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 1870 | .gpu_freq = 400000000, |
| 1871 | .bus_freq = 4, |
| 1872 | }, |
| 1873 | { |
| 1874 | .gpu_freq = 300000000, |
| 1875 | .bus_freq = 3, |
| 1876 | }, |
| 1877 | { |
| 1878 | .gpu_freq = 200000000, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1879 | .bus_freq = 2, |
| 1880 | }, |
| 1881 | { |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 1882 | .gpu_freq = 128000000, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1883 | .bus_freq = 1, |
| 1884 | }, |
| 1885 | { |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 1886 | .gpu_freq = 27000000, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1887 | .bus_freq = 0, |
| 1888 | }, |
| 1889 | }, |
Lucille Sylvester | 34ec369 | 2011-08-16 16:28:04 -0600 | [diff] [blame] | 1890 | .init_level = 1, |
| 1891 | .num_levels = 5, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1892 | .set_grp_async = NULL, |
| 1893 | .idle_timeout = HZ/5, |
Lucille Sylvester | 0a98de9 | 2011-09-13 17:20:55 -0600 | [diff] [blame] | 1894 | .nap_allowed = false, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1895 | }, |
| 1896 | .clk = { |
| 1897 | .name = { |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame^] | 1898 | .clk = "core_clk", |
| 1899 | .pclk = "iface_clk", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1900 | }, |
| 1901 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1902 | .bus_scale_table = &grp3d_bus_scale_pdata, |
| 1903 | #endif |
| 1904 | }, |
| 1905 | .imem_clk_name = { |
| 1906 | .clk = NULL, |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame^] | 1907 | .pclk = "mem_iface_clk", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1908 | }, |
| 1909 | }; |
| 1910 | |
| 1911 | struct platform_device msm_kgsl_3d0 = { |
| 1912 | .name = "kgsl-3d0", |
| 1913 | .id = 0, |
| 1914 | .num_resources = ARRAY_SIZE(kgsl_3d0_resources), |
| 1915 | .resource = kgsl_3d0_resources, |
| 1916 | .dev = { |
| 1917 | .platform_data = &kgsl_3d0_pdata, |
| 1918 | }, |
| 1919 | }; |
| 1920 | |
| 1921 | static struct resource kgsl_2d0_resources[] = { |
| 1922 | { |
| 1923 | .name = KGSL_2D0_REG_MEMORY, |
| 1924 | .start = 0x04100000, /* Z180 base address */ |
| 1925 | .end = 0x04100FFF, |
| 1926 | .flags = IORESOURCE_MEM, |
| 1927 | }, |
| 1928 | { |
| 1929 | .name = KGSL_2D0_IRQ, |
| 1930 | .start = GFX2D0_IRQ, |
| 1931 | .end = GFX2D0_IRQ, |
| 1932 | .flags = IORESOURCE_IRQ, |
| 1933 | }, |
| 1934 | }; |
| 1935 | |
| 1936 | static struct kgsl_device_platform_data kgsl_2d0_pdata = { |
| 1937 | .pwr_data = { |
| 1938 | .pwrlevel = { |
| 1939 | { |
| 1940 | .gpu_freq = 200000000, |
| 1941 | .bus_freq = 1, |
| 1942 | }, |
| 1943 | { |
| 1944 | .gpu_freq = 200000000, |
| 1945 | .bus_freq = 0, |
| 1946 | }, |
| 1947 | }, |
| 1948 | .init_level = 0, |
| 1949 | .num_levels = 2, |
| 1950 | .set_grp_async = NULL, |
| 1951 | .idle_timeout = HZ/10, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1952 | .nap_allowed = true, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1953 | }, |
| 1954 | .clk = { |
| 1955 | .name = { |
| 1956 | /* note: 2d clocks disabled on v1 */ |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame^] | 1957 | .clk = "core_clk", |
| 1958 | .pclk = "iface_clk", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1959 | }, |
| 1960 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1961 | .bus_scale_table = &grp2d0_bus_scale_pdata, |
| 1962 | #endif |
| 1963 | }, |
| 1964 | }; |
| 1965 | |
| 1966 | struct platform_device msm_kgsl_2d0 = { |
| 1967 | .name = "kgsl-2d0", |
| 1968 | .id = 0, |
| 1969 | .num_resources = ARRAY_SIZE(kgsl_2d0_resources), |
| 1970 | .resource = kgsl_2d0_resources, |
| 1971 | .dev = { |
| 1972 | .platform_data = &kgsl_2d0_pdata, |
| 1973 | }, |
| 1974 | }; |
| 1975 | |
| 1976 | static struct resource kgsl_2d1_resources[] = { |
| 1977 | { |
| 1978 | .name = KGSL_2D1_REG_MEMORY, |
| 1979 | .start = 0x04200000, /* Z180 device 1 base address */ |
| 1980 | .end = 0x04200FFF, |
| 1981 | .flags = IORESOURCE_MEM, |
| 1982 | }, |
| 1983 | { |
| 1984 | .name = KGSL_2D1_IRQ, |
| 1985 | .start = GFX2D1_IRQ, |
| 1986 | .end = GFX2D1_IRQ, |
| 1987 | .flags = IORESOURCE_IRQ, |
| 1988 | }, |
| 1989 | }; |
| 1990 | |
| 1991 | static struct kgsl_device_platform_data kgsl_2d1_pdata = { |
| 1992 | .pwr_data = { |
| 1993 | .pwrlevel = { |
| 1994 | { |
| 1995 | .gpu_freq = 200000000, |
| 1996 | .bus_freq = 1, |
| 1997 | }, |
| 1998 | { |
| 1999 | .gpu_freq = 200000000, |
| 2000 | .bus_freq = 0, |
| 2001 | }, |
| 2002 | }, |
| 2003 | .init_level = 0, |
| 2004 | .num_levels = 2, |
| 2005 | .set_grp_async = NULL, |
| 2006 | .idle_timeout = HZ/10, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2007 | .nap_allowed = true, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2008 | }, |
| 2009 | .clk = { |
| 2010 | .name = { |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame^] | 2011 | .clk = "core_clk", |
| 2012 | .pclk = "iface_clk", |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2013 | }, |
| 2014 | #ifdef CONFIG_MSM_BUS_SCALING |
| 2015 | .bus_scale_table = &grp2d1_bus_scale_pdata, |
| 2016 | #endif |
| 2017 | }, |
| 2018 | }; |
| 2019 | |
| 2020 | struct platform_device msm_kgsl_2d1 = { |
| 2021 | .name = "kgsl-2d1", |
| 2022 | .id = 1, |
| 2023 | .num_resources = ARRAY_SIZE(kgsl_2d1_resources), |
| 2024 | .resource = kgsl_2d1_resources, |
| 2025 | .dev = { |
| 2026 | .platform_data = &kgsl_2d1_pdata, |
| 2027 | }, |
| 2028 | }; |
| 2029 | |
| 2030 | #ifdef CONFIG_MSM_GEMINI |
| 2031 | static struct resource msm_gemini_resources[] = { |
| 2032 | { |
| 2033 | .start = 0x04600000, |
| 2034 | .end = 0x04600000 + SZ_1M - 1, |
| 2035 | .flags = IORESOURCE_MEM, |
| 2036 | }, |
| 2037 | { |
| 2038 | .start = JPEG_IRQ, |
| 2039 | .end = JPEG_IRQ, |
| 2040 | .flags = IORESOURCE_IRQ, |
| 2041 | }, |
| 2042 | }; |
| 2043 | |
| 2044 | struct platform_device msm8960_gemini_device = { |
| 2045 | .name = "msm_gemini", |
| 2046 | .resource = msm_gemini_resources, |
| 2047 | .num_resources = ARRAY_SIZE(msm_gemini_resources), |
| 2048 | }; |
| 2049 | #endif |
| 2050 | |
| 2051 | struct msm_rpm_map_data rpm_map_data[] __initdata = { |
| 2052 | MSM_RPM_MAP(TRIGGER_TIMED_TO, TRIGGER_TIMED, 1), |
| 2053 | MSM_RPM_MAP(TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1), |
| 2054 | |
| 2055 | MSM_RPM_MAP(RPM_CTL, RPM_CTL, 1), |
| 2056 | |
| 2057 | MSM_RPM_MAP(CXO_CLK, CXO_CLK, 1), |
| 2058 | MSM_RPM_MAP(PXO_CLK, PXO_CLK, 1), |
| 2059 | MSM_RPM_MAP(APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1), |
| 2060 | MSM_RPM_MAP(SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1), |
| 2061 | MSM_RPM_MAP(MM_FABRIC_CLK, MM_FABRIC_CLK, 1), |
| 2062 | MSM_RPM_MAP(DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1), |
| 2063 | MSM_RPM_MAP(SFPB_CLK, SFPB_CLK, 1), |
| 2064 | MSM_RPM_MAP(CFPB_CLK, CFPB_CLK, 1), |
| 2065 | MSM_RPM_MAP(MMFPB_CLK, MMFPB_CLK, 1), |
| 2066 | MSM_RPM_MAP(EBI1_CLK, EBI1_CLK, 1), |
| 2067 | |
| 2068 | MSM_RPM_MAP(APPS_FABRIC_CFG_HALT_0, APPS_FABRIC_CFG_HALT, 2), |
| 2069 | MSM_RPM_MAP(APPS_FABRIC_CFG_CLKMOD_0, APPS_FABRIC_CFG_CLKMOD, 3), |
| 2070 | MSM_RPM_MAP(APPS_FABRIC_CFG_IOCTL, APPS_FABRIC_CFG_IOCTL, 1), |
| 2071 | MSM_RPM_MAP(APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 12), |
| 2072 | |
| 2073 | MSM_RPM_MAP(SYS_FABRIC_CFG_HALT_0, SYS_FABRIC_CFG_HALT, 2), |
| 2074 | MSM_RPM_MAP(SYS_FABRIC_CFG_CLKMOD_0, SYS_FABRIC_CFG_CLKMOD, 3), |
| 2075 | MSM_RPM_MAP(SYS_FABRIC_CFG_IOCTL, SYS_FABRIC_CFG_IOCTL, 1), |
Eugene Seah | d9040ad | 2011-07-11 13:20:54 -0600 | [diff] [blame] | 2076 | MSM_RPM_MAP(SYSTEM_FABRIC_ARB_0, SYSTEM_FABRIC_ARB, 29), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2077 | |
| 2078 | MSM_RPM_MAP(MMSS_FABRIC_CFG_HALT_0, MMSS_FABRIC_CFG_HALT, 2), |
| 2079 | MSM_RPM_MAP(MMSS_FABRIC_CFG_CLKMOD_0, MMSS_FABRIC_CFG_CLKMOD, 3), |
| 2080 | MSM_RPM_MAP(MMSS_FABRIC_CFG_IOCTL, MMSS_FABRIC_CFG_IOCTL, 1), |
| 2081 | MSM_RPM_MAP(MM_FABRIC_ARB_0, MM_FABRIC_ARB, 23), |
| 2082 | |
| 2083 | MSM_RPM_MAP(PM8921_S1_0, PM8921_S1, 2), |
| 2084 | MSM_RPM_MAP(PM8921_S2_0, PM8921_S2, 2), |
| 2085 | MSM_RPM_MAP(PM8921_S3_0, PM8921_S3, 2), |
| 2086 | MSM_RPM_MAP(PM8921_S4_0, PM8921_S4, 2), |
| 2087 | MSM_RPM_MAP(PM8921_S5_0, PM8921_S5, 2), |
| 2088 | MSM_RPM_MAP(PM8921_S6_0, PM8921_S6, 2), |
| 2089 | MSM_RPM_MAP(PM8921_S7_0, PM8921_S7, 2), |
| 2090 | MSM_RPM_MAP(PM8921_S8_0, PM8921_S8, 2), |
| 2091 | MSM_RPM_MAP(PM8921_L1_0, PM8921_L1, 2), |
| 2092 | MSM_RPM_MAP(PM8921_L2_0, PM8921_L2, 2), |
| 2093 | MSM_RPM_MAP(PM8921_L3_0, PM8921_L3, 2), |
| 2094 | MSM_RPM_MAP(PM8921_L4_0, PM8921_L4, 2), |
| 2095 | MSM_RPM_MAP(PM8921_L5_0, PM8921_L5, 2), |
| 2096 | MSM_RPM_MAP(PM8921_L6_0, PM8921_L6, 2), |
| 2097 | MSM_RPM_MAP(PM8921_L7_0, PM8921_L7, 2), |
| 2098 | MSM_RPM_MAP(PM8921_L8_0, PM8921_L8, 2), |
| 2099 | MSM_RPM_MAP(PM8921_L9_0, PM8921_L9, 2), |
| 2100 | MSM_RPM_MAP(PM8921_L10_0, PM8921_L10, 2), |
| 2101 | MSM_RPM_MAP(PM8921_L11_0, PM8921_L11, 2), |
| 2102 | MSM_RPM_MAP(PM8921_L12_0, PM8921_L12, 2), |
| 2103 | MSM_RPM_MAP(PM8921_L13_0, PM8921_L13, 2), |
| 2104 | MSM_RPM_MAP(PM8921_L14_0, PM8921_L14, 2), |
| 2105 | MSM_RPM_MAP(PM8921_L15_0, PM8921_L15, 2), |
| 2106 | MSM_RPM_MAP(PM8921_L16_0, PM8921_L16, 2), |
| 2107 | MSM_RPM_MAP(PM8921_L17_0, PM8921_L17, 2), |
| 2108 | MSM_RPM_MAP(PM8921_L18_0, PM8921_L18, 2), |
| 2109 | MSM_RPM_MAP(PM8921_L19_0, PM8921_L19, 2), |
| 2110 | MSM_RPM_MAP(PM8921_L20_0, PM8921_L20, 2), |
| 2111 | MSM_RPM_MAP(PM8921_L21_0, PM8921_L21, 2), |
| 2112 | MSM_RPM_MAP(PM8921_L22_0, PM8921_L22, 2), |
| 2113 | MSM_RPM_MAP(PM8921_L23_0, PM8921_L23, 2), |
| 2114 | MSM_RPM_MAP(PM8921_L24_0, PM8921_L24, 2), |
| 2115 | MSM_RPM_MAP(PM8921_L25_0, PM8921_L25, 2), |
| 2116 | MSM_RPM_MAP(PM8921_L26_0, PM8921_L26, 2), |
| 2117 | MSM_RPM_MAP(PM8921_L27_0, PM8921_L27, 2), |
| 2118 | MSM_RPM_MAP(PM8921_L28_0, PM8921_L28, 2), |
| 2119 | MSM_RPM_MAP(PM8921_L29_0, PM8921_L29, 2), |
| 2120 | MSM_RPM_MAP(PM8921_CLK1_0, PM8921_CLK1, 2), |
| 2121 | MSM_RPM_MAP(PM8921_CLK2_0, PM8921_CLK2, 2), |
| 2122 | MSM_RPM_MAP(PM8921_LVS1, PM8921_LVS1, 1), |
| 2123 | MSM_RPM_MAP(PM8921_LVS2, PM8921_LVS2, 1), |
| 2124 | MSM_RPM_MAP(PM8921_LVS3, PM8921_LVS3, 1), |
| 2125 | MSM_RPM_MAP(PM8921_LVS4, PM8921_LVS4, 1), |
| 2126 | MSM_RPM_MAP(PM8921_LVS5, PM8921_LVS5, 1), |
| 2127 | MSM_RPM_MAP(PM8921_LVS6, PM8921_LVS6, 1), |
| 2128 | MSM_RPM_MAP(PM8921_LVS7, PM8921_LVS7, 1), |
| 2129 | MSM_RPM_MAP(NCP_0, NCP, 2), |
| 2130 | MSM_RPM_MAP(CXO_BUFFERS, CXO_BUFFERS, 1), |
| 2131 | MSM_RPM_MAP(USB_OTG_SWITCH, USB_OTG_SWITCH, 1), |
| 2132 | MSM_RPM_MAP(HDMI_SWITCH, HDMI_SWITCH, 1), |
| 2133 | |
| 2134 | }; |
| 2135 | unsigned int rpm_map_data_size = ARRAY_SIZE(rpm_map_data); |
| 2136 | |
| 2137 | struct platform_device msm_bus_sys_fabric = { |
| 2138 | .name = "msm_bus_fabric", |
| 2139 | .id = MSM_BUS_FAB_SYSTEM, |
| 2140 | }; |
| 2141 | struct platform_device msm_bus_apps_fabric = { |
| 2142 | .name = "msm_bus_fabric", |
| 2143 | .id = MSM_BUS_FAB_APPSS, |
| 2144 | }; |
| 2145 | struct platform_device msm_bus_mm_fabric = { |
| 2146 | .name = "msm_bus_fabric", |
| 2147 | .id = MSM_BUS_FAB_MMSS, |
| 2148 | }; |
| 2149 | struct platform_device msm_bus_sys_fpb = { |
| 2150 | .name = "msm_bus_fabric", |
| 2151 | .id = MSM_BUS_FAB_SYSTEM_FPB, |
| 2152 | }; |
| 2153 | struct platform_device msm_bus_cpss_fpb = { |
| 2154 | .name = "msm_bus_fabric", |
| 2155 | .id = MSM_BUS_FAB_CPSS_FPB, |
| 2156 | }; |
| 2157 | |
| 2158 | /* Sensors DSPS platform data */ |
| 2159 | #ifdef CONFIG_MSM_DSPS |
| 2160 | |
| 2161 | #define PPSS_REG_PHYS_BASE 0x12080000 |
| 2162 | |
| 2163 | static struct dsps_clk_info dsps_clks[] = {}; |
| 2164 | static struct dsps_regulator_info dsps_regs[] = {}; |
| 2165 | |
| 2166 | /* |
| 2167 | * Note: GPIOs field is intialized in run-time at the function |
| 2168 | * msm8960_init_dsps(). |
| 2169 | */ |
| 2170 | |
| 2171 | struct msm_dsps_platform_data msm_dsps_pdata = { |
| 2172 | .clks = dsps_clks, |
| 2173 | .clks_num = ARRAY_SIZE(dsps_clks), |
| 2174 | .gpios = NULL, |
| 2175 | .gpios_num = 0, |
| 2176 | .regs = dsps_regs, |
| 2177 | .regs_num = ARRAY_SIZE(dsps_regs), |
| 2178 | .dsps_pwr_ctl_en = 1, |
| 2179 | .signature = DSPS_SIGNATURE, |
| 2180 | }; |
| 2181 | |
| 2182 | static struct resource msm_dsps_resources[] = { |
| 2183 | { |
| 2184 | .start = PPSS_REG_PHYS_BASE, |
| 2185 | .end = PPSS_REG_PHYS_BASE + SZ_8K - 1, |
| 2186 | .name = "ppss_reg", |
| 2187 | .flags = IORESOURCE_MEM, |
| 2188 | }, |
Wentao Xu | a55500b | 2011-08-16 18:15:04 -0400 | [diff] [blame] | 2189 | |
| 2190 | { |
| 2191 | .start = PPSS_WDOG_TIMER_IRQ, |
| 2192 | .end = PPSS_WDOG_TIMER_IRQ, |
| 2193 | .name = "ppss_wdog", |
| 2194 | .flags = IORESOURCE_IRQ, |
| 2195 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2196 | }; |
| 2197 | |
| 2198 | struct platform_device msm_dsps_device = { |
| 2199 | .name = "msm_dsps", |
| 2200 | .id = 0, |
| 2201 | .num_resources = ARRAY_SIZE(msm_dsps_resources), |
| 2202 | .resource = msm_dsps_resources, |
| 2203 | .dev.platform_data = &msm_dsps_pdata, |
| 2204 | }; |
| 2205 | |
| 2206 | #endif /* CONFIG_MSM_DSPS */ |