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/clkdev.h> |
| 19 | #include <mach/irqs-8064.h> |
| 20 | #include <mach/board.h> |
| 21 | #include <mach/msm_iomap.h> |
| 22 | #include "clock.h" |
| 23 | #include "devices.h" |
| 24 | |
| 25 | /* Address of GSBI blocks */ |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 26 | #define MSM_GSBI1_PHYS 0x12440000 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 27 | #define MSM_GSBI3_PHYS 0x16200000 |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 28 | #define MSM_GSBI4_PHYS 0x16300000 |
| 29 | #define MSM_GSBI5_PHYS 0x1A200000 |
| 30 | #define MSM_GSBI6_PHYS 0x16500000 |
| 31 | #define MSM_GSBI7_PHYS 0x16600000 |
| 32 | |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 33 | /* GSBI UART devices */ |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 34 | #define MSM_UART1DM_PHYS (MSM_GSBI1_PHYS + 0x10000) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 35 | #define MSM_UART3DM_PHYS (MSM_GSBI3_PHYS + 0x40000) |
| 36 | |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 37 | /* GSBI QUP devices */ |
| 38 | #define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000) |
| 39 | #define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000) |
| 40 | #define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000) |
| 41 | #define MSM_GSBI6_QUP_PHYS (MSM_GSBI6_PHYS + 0x80000) |
| 42 | #define MSM_GSBI7_QUP_PHYS (MSM_GSBI7_PHYS + 0x80000) |
| 43 | #define MSM_QUP_SIZE SZ_4K |
| 44 | |
Kenneth Heitke | 36920d3 | 2011-07-20 16:44:30 -0600 | [diff] [blame] | 45 | /* Address of SSBI CMD */ |
| 46 | #define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000 |
| 47 | #define MSM_PMIC2_SSBI_CMD_PHYS 0x00C00000 |
| 48 | #define MSM_PMIC_SSBI_SIZE SZ_4K |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 49 | |
Hemant Kumar | caa0909 | 2011-07-30 00:26:33 -0700 | [diff] [blame] | 50 | /* Address of HS USBOTG1 */ |
| 51 | #define MSM_HSUSB_PHYS 0x12500000 |
| 52 | #define MSM_HSUSB_SIZE SZ_4K |
| 53 | |
| 54 | |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 55 | static struct resource msm_dmov_resource[] = { |
| 56 | { |
| 57 | .start = ADM_0_SCSS_0_IRQ, |
| 58 | .end = (resource_size_t)MSM_DMOV_BASE, |
| 59 | .flags = IORESOURCE_IRQ, |
| 60 | }, |
| 61 | }; |
| 62 | |
Stepan Moskovchenko | df13d34 | 2011-08-03 19:01:25 -0700 | [diff] [blame] | 63 | struct platform_device apq8064_device_dmov = { |
Joel King | 0581896d | 2011-07-19 16:43:28 -0700 | [diff] [blame] | 64 | .name = "msm_dmov", |
| 65 | .id = -1, |
| 66 | .resource = msm_dmov_resource, |
| 67 | .num_resources = ARRAY_SIZE(msm_dmov_resource), |
| 68 | }; |
| 69 | |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 70 | static struct resource resources_uart_gsbi1[] = { |
| 71 | { |
| 72 | .start = APQ8064_GSBI1_UARTDM_IRQ, |
| 73 | .end = APQ8064_GSBI1_UARTDM_IRQ, |
| 74 | .flags = IORESOURCE_IRQ, |
| 75 | }, |
| 76 | { |
| 77 | .start = MSM_UART1DM_PHYS, |
| 78 | .end = MSM_UART1DM_PHYS + PAGE_SIZE - 1, |
| 79 | .name = "uartdm_resource", |
| 80 | .flags = IORESOURCE_MEM, |
| 81 | }, |
| 82 | { |
| 83 | .start = MSM_GSBI1_PHYS, |
| 84 | .end = MSM_GSBI1_PHYS + PAGE_SIZE - 1, |
| 85 | .name = "gsbi_resource", |
| 86 | .flags = IORESOURCE_MEM, |
| 87 | }, |
| 88 | }; |
| 89 | |
| 90 | struct platform_device apq8064_device_uart_gsbi1 = { |
| 91 | .name = "msm_serial_hsl", |
| 92 | .id = 0, |
| 93 | .num_resources = ARRAY_SIZE(resources_uart_gsbi1), |
| 94 | .resource = resources_uart_gsbi1, |
| 95 | }; |
| 96 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 97 | static struct resource resources_uart_gsbi3[] = { |
| 98 | { |
| 99 | .start = GSBI3_UARTDM_IRQ, |
| 100 | .end = GSBI3_UARTDM_IRQ, |
| 101 | .flags = IORESOURCE_IRQ, |
| 102 | }, |
| 103 | { |
| 104 | .start = MSM_UART3DM_PHYS, |
| 105 | .end = MSM_UART3DM_PHYS + PAGE_SIZE - 1, |
| 106 | .name = "uartdm_resource", |
| 107 | .flags = IORESOURCE_MEM, |
| 108 | }, |
| 109 | { |
| 110 | .start = MSM_GSBI3_PHYS, |
| 111 | .end = MSM_GSBI3_PHYS + PAGE_SIZE - 1, |
| 112 | .name = "gsbi_resource", |
| 113 | .flags = IORESOURCE_MEM, |
| 114 | }, |
| 115 | }; |
| 116 | |
| 117 | struct platform_device apq8064_device_uart_gsbi3 = { |
| 118 | .name = "msm_serial_hsl", |
| 119 | .id = 0, |
| 120 | .num_resources = ARRAY_SIZE(resources_uart_gsbi3), |
| 121 | .resource = resources_uart_gsbi3, |
| 122 | }; |
| 123 | |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 124 | static struct resource resources_qup_i2c_gsbi4[] = { |
| 125 | { |
| 126 | .name = "gsbi_qup_i2c_addr", |
| 127 | .start = MSM_GSBI4_PHYS, |
| 128 | .end = MSM_GSBI4_PHYS + MSM_QUP_SIZE - 1, |
| 129 | .flags = IORESOURCE_MEM, |
| 130 | }, |
| 131 | { |
| 132 | .name = "qup_phys_addr", |
| 133 | .start = MSM_GSBI4_QUP_PHYS, |
| 134 | .end = MSM_GSBI4_QUP_PHYS + 4 - 1, |
| 135 | .flags = IORESOURCE_MEM, |
| 136 | }, |
| 137 | { |
| 138 | .name = "qup_err_intr", |
| 139 | .start = GSBI4_QUP_IRQ, |
| 140 | .end = GSBI4_QUP_IRQ, |
| 141 | .flags = IORESOURCE_IRQ, |
| 142 | }, |
| 143 | }; |
| 144 | |
| 145 | struct platform_device apq8064_device_qup_i2c_gsbi4 = { |
| 146 | .name = "qup_i2c", |
| 147 | .id = 4, |
| 148 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi4), |
| 149 | .resource = resources_qup_i2c_gsbi4, |
| 150 | }; |
| 151 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 152 | static struct resource resources_qup_spi_gsbi5[] = { |
| 153 | { |
| 154 | .name = "spi_base", |
| 155 | .start = MSM_GSBI5_QUP_PHYS, |
| 156 | .end = MSM_GSBI5_QUP_PHYS + SZ_4K - 1, |
| 157 | .flags = IORESOURCE_MEM, |
| 158 | }, |
| 159 | { |
| 160 | .name = "gsbi_base", |
| 161 | .start = MSM_GSBI5_PHYS, |
| 162 | .end = MSM_GSBI5_PHYS + 4 - 1, |
| 163 | .flags = IORESOURCE_MEM, |
| 164 | }, |
| 165 | { |
| 166 | .name = "spi_irq_in", |
| 167 | .start = GSBI5_QUP_IRQ, |
| 168 | .end = GSBI5_QUP_IRQ, |
| 169 | .flags = IORESOURCE_IRQ, |
| 170 | }, |
| 171 | }; |
| 172 | |
| 173 | struct platform_device apq8064_device_qup_spi_gsbi5 = { |
| 174 | .name = "spi_qsd", |
| 175 | .id = 0, |
| 176 | .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi5), |
| 177 | .resource = resources_qup_spi_gsbi5, |
| 178 | }; |
| 179 | |
| 180 | static struct resource resources_ssbi_pmic1[] = { |
| 181 | { |
| 182 | .start = MSM_PMIC1_SSBI_CMD_PHYS, |
| 183 | .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1, |
| 184 | .flags = IORESOURCE_MEM, |
| 185 | }, |
| 186 | }; |
| 187 | |
| 188 | struct platform_device apq8064_device_ssbi_pmic1 = { |
| 189 | .name = "msm_ssbi", |
| 190 | .id = 0, |
| 191 | .resource = resources_ssbi_pmic1, |
| 192 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic1), |
| 193 | }; |
| 194 | |
| 195 | static struct resource resources_ssbi_pmic2[] = { |
| 196 | { |
| 197 | .start = MSM_PMIC2_SSBI_CMD_PHYS, |
| 198 | .end = MSM_PMIC2_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1, |
| 199 | .flags = IORESOURCE_MEM, |
| 200 | }, |
| 201 | }; |
| 202 | |
| 203 | struct platform_device apq8064_device_ssbi_pmic2 = { |
| 204 | .name = "msm_ssbi", |
| 205 | .id = 1, |
| 206 | .resource = resources_ssbi_pmic2, |
| 207 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic2), |
| 208 | }; |
| 209 | |
| 210 | static struct resource resources_otg[] = { |
| 211 | { |
| 212 | .start = MSM_HSUSB_PHYS, |
| 213 | .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE - 1, |
| 214 | .flags = IORESOURCE_MEM, |
| 215 | }, |
| 216 | { |
| 217 | .start = USB1_HS_IRQ, |
| 218 | .end = USB1_HS_IRQ, |
| 219 | .flags = IORESOURCE_IRQ, |
| 220 | }, |
| 221 | }; |
| 222 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 223 | struct platform_device apq8064_device_otg = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 224 | .name = "msm_otg", |
| 225 | .id = -1, |
| 226 | .num_resources = ARRAY_SIZE(resources_otg), |
| 227 | .resource = resources_otg, |
| 228 | .dev = { |
| 229 | .coherent_dma_mask = 0xffffffff, |
| 230 | }, |
| 231 | }; |
| 232 | |
| 233 | static struct resource resources_hsusb[] = { |
| 234 | { |
| 235 | .start = MSM_HSUSB_PHYS, |
| 236 | .end = MSM_HSUSB_PHYS + MSM_HSUSB_SIZE - 1, |
| 237 | .flags = IORESOURCE_MEM, |
| 238 | }, |
| 239 | { |
| 240 | .start = USB1_HS_IRQ, |
| 241 | .end = USB1_HS_IRQ, |
| 242 | .flags = IORESOURCE_IRQ, |
| 243 | }, |
| 244 | }; |
| 245 | |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 246 | struct platform_device apq8064_device_gadget_peripheral = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 247 | .name = "msm_hsusb", |
| 248 | .id = -1, |
| 249 | .num_resources = ARRAY_SIZE(resources_hsusb), |
| 250 | .resource = resources_hsusb, |
| 251 | .dev = { |
| 252 | .coherent_dma_mask = 0xffffffff, |
| 253 | }, |
| 254 | }; |
| 255 | |
| 256 | #define MSM_SDC1_BASE 0x12400000 |
| 257 | #define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800) |
| 258 | #define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000) |
| 259 | #define MSM_SDC2_BASE 0x12140000 |
| 260 | #define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800) |
| 261 | #define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000) |
| 262 | #define MSM_SDC3_BASE 0x12180000 |
| 263 | #define MSM_SDC3_DML_BASE (MSM_SDC3_BASE + 0x800) |
| 264 | #define MSM_SDC3_BAM_BASE (MSM_SDC3_BASE + 0x2000) |
| 265 | #define MSM_SDC4_BASE 0x121C0000 |
| 266 | #define MSM_SDC4_DML_BASE (MSM_SDC4_BASE + 0x800) |
| 267 | #define MSM_SDC4_BAM_BASE (MSM_SDC4_BASE + 0x2000) |
| 268 | |
| 269 | static struct resource resources_sdc1[] = { |
| 270 | { |
| 271 | .name = "core_mem", |
| 272 | .flags = IORESOURCE_MEM, |
| 273 | .start = MSM_SDC1_BASE, |
| 274 | .end = MSM_SDC1_DML_BASE - 1, |
| 275 | }, |
| 276 | { |
| 277 | .name = "core_irq", |
| 278 | .flags = IORESOURCE_IRQ, |
| 279 | .start = SDC1_IRQ_0, |
| 280 | .end = SDC1_IRQ_0 |
| 281 | }, |
| 282 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 283 | { |
| 284 | .name = "sdcc_dml_addr", |
| 285 | .start = MSM_SDC1_DML_BASE, |
| 286 | .end = MSM_SDC1_BAM_BASE - 1, |
| 287 | .flags = IORESOURCE_MEM, |
| 288 | }, |
| 289 | { |
| 290 | .name = "sdcc_bam_addr", |
| 291 | .start = MSM_SDC1_BAM_BASE, |
| 292 | .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1, |
| 293 | .flags = IORESOURCE_MEM, |
| 294 | }, |
| 295 | { |
| 296 | .name = "sdcc_bam_irq", |
| 297 | .start = SDC1_BAM_IRQ, |
| 298 | .end = SDC1_BAM_IRQ, |
| 299 | .flags = IORESOURCE_IRQ, |
| 300 | }, |
| 301 | #endif |
| 302 | }; |
| 303 | |
| 304 | static struct resource resources_sdc2[] = { |
| 305 | { |
| 306 | .name = "core_mem", |
| 307 | .flags = IORESOURCE_MEM, |
| 308 | .start = MSM_SDC2_BASE, |
| 309 | .end = MSM_SDC2_DML_BASE - 1, |
| 310 | }, |
| 311 | { |
| 312 | .name = "core_irq", |
| 313 | .flags = IORESOURCE_IRQ, |
| 314 | .start = SDC2_IRQ_0, |
| 315 | .end = SDC2_IRQ_0 |
| 316 | }, |
| 317 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 318 | { |
| 319 | .name = "sdcc_dml_addr", |
| 320 | .start = MSM_SDC2_DML_BASE, |
| 321 | .end = MSM_SDC2_BAM_BASE - 1, |
| 322 | .flags = IORESOURCE_MEM, |
| 323 | }, |
| 324 | { |
| 325 | .name = "sdcc_bam_addr", |
| 326 | .start = MSM_SDC2_BAM_BASE, |
| 327 | .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1, |
| 328 | .flags = IORESOURCE_MEM, |
| 329 | }, |
| 330 | { |
| 331 | .name = "sdcc_bam_irq", |
| 332 | .start = SDC2_BAM_IRQ, |
| 333 | .end = SDC2_BAM_IRQ, |
| 334 | .flags = IORESOURCE_IRQ, |
| 335 | }, |
| 336 | #endif |
| 337 | }; |
| 338 | |
| 339 | static struct resource resources_sdc3[] = { |
| 340 | { |
| 341 | .name = "core_mem", |
| 342 | .flags = IORESOURCE_MEM, |
| 343 | .start = MSM_SDC3_BASE, |
| 344 | .end = MSM_SDC3_DML_BASE - 1, |
| 345 | }, |
| 346 | { |
| 347 | .name = "core_irq", |
| 348 | .flags = IORESOURCE_IRQ, |
| 349 | .start = SDC3_IRQ_0, |
| 350 | .end = SDC3_IRQ_0 |
| 351 | }, |
| 352 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 353 | { |
| 354 | .name = "sdcc_dml_addr", |
| 355 | .start = MSM_SDC3_DML_BASE, |
| 356 | .end = MSM_SDC3_BAM_BASE - 1, |
| 357 | .flags = IORESOURCE_MEM, |
| 358 | }, |
| 359 | { |
| 360 | .name = "sdcc_bam_addr", |
| 361 | .start = MSM_SDC3_BAM_BASE, |
| 362 | .end = MSM_SDC3_BAM_BASE + (2 * SZ_4K) - 1, |
| 363 | .flags = IORESOURCE_MEM, |
| 364 | }, |
| 365 | { |
| 366 | .name = "sdcc_bam_irq", |
| 367 | .start = SDC3_BAM_IRQ, |
| 368 | .end = SDC3_BAM_IRQ, |
| 369 | .flags = IORESOURCE_IRQ, |
| 370 | }, |
| 371 | #endif |
| 372 | }; |
| 373 | |
| 374 | static struct resource resources_sdc4[] = { |
| 375 | { |
| 376 | .name = "core_mem", |
| 377 | .flags = IORESOURCE_MEM, |
| 378 | .start = MSM_SDC4_BASE, |
| 379 | .end = MSM_SDC4_DML_BASE - 1, |
| 380 | }, |
| 381 | { |
| 382 | .name = "core_irq", |
| 383 | .flags = IORESOURCE_IRQ, |
| 384 | .start = SDC4_IRQ_0, |
| 385 | .end = SDC4_IRQ_0 |
| 386 | }, |
| 387 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 388 | { |
| 389 | .name = "sdcc_dml_addr", |
| 390 | .start = MSM_SDC4_DML_BASE, |
| 391 | .end = MSM_SDC4_BAM_BASE - 1, |
| 392 | .flags = IORESOURCE_MEM, |
| 393 | }, |
| 394 | { |
| 395 | .name = "sdcc_bam_addr", |
| 396 | .start = MSM_SDC4_BAM_BASE, |
| 397 | .end = MSM_SDC4_BAM_BASE + (2 * SZ_4K) - 1, |
| 398 | .flags = IORESOURCE_MEM, |
| 399 | }, |
| 400 | { |
| 401 | .name = "sdcc_bam_irq", |
| 402 | .start = SDC4_BAM_IRQ, |
| 403 | .end = SDC4_BAM_IRQ, |
| 404 | .flags = IORESOURCE_IRQ, |
| 405 | }, |
| 406 | #endif |
| 407 | }; |
| 408 | |
| 409 | struct platform_device apq8064_device_sdc1 = { |
| 410 | .name = "msm_sdcc", |
| 411 | .id = 1, |
| 412 | .num_resources = ARRAY_SIZE(resources_sdc1), |
| 413 | .resource = resources_sdc1, |
| 414 | .dev = { |
| 415 | .coherent_dma_mask = 0xffffffff, |
| 416 | }, |
| 417 | }; |
| 418 | |
| 419 | struct platform_device apq8064_device_sdc2 = { |
| 420 | .name = "msm_sdcc", |
| 421 | .id = 2, |
| 422 | .num_resources = ARRAY_SIZE(resources_sdc2), |
| 423 | .resource = resources_sdc2, |
| 424 | .dev = { |
| 425 | .coherent_dma_mask = 0xffffffff, |
| 426 | }, |
| 427 | }; |
| 428 | |
| 429 | struct platform_device apq8064_device_sdc3 = { |
| 430 | .name = "msm_sdcc", |
| 431 | .id = 3, |
| 432 | .num_resources = ARRAY_SIZE(resources_sdc3), |
| 433 | .resource = resources_sdc3, |
| 434 | .dev = { |
| 435 | .coherent_dma_mask = 0xffffffff, |
| 436 | }, |
| 437 | }; |
| 438 | |
| 439 | struct platform_device apq8064_device_sdc4 = { |
| 440 | .name = "msm_sdcc", |
| 441 | .id = 4, |
| 442 | .num_resources = ARRAY_SIZE(resources_sdc4), |
| 443 | .resource = resources_sdc4, |
| 444 | .dev = { |
| 445 | .coherent_dma_mask = 0xffffffff, |
| 446 | }, |
| 447 | }; |
| 448 | |
| 449 | static struct platform_device *apq8064_sdcc_devices[] __initdata = { |
| 450 | &apq8064_device_sdc1, |
| 451 | &apq8064_device_sdc2, |
| 452 | &apq8064_device_sdc3, |
| 453 | &apq8064_device_sdc4, |
| 454 | }; |
| 455 | |
| 456 | int __init apq8064_add_sdcc(unsigned int controller, |
| 457 | struct mmc_platform_data *plat) |
| 458 | { |
| 459 | struct platform_device *pdev; |
| 460 | |
| 461 | if (!plat) |
| 462 | return 0; |
| 463 | if (controller < 1 || controller > 4) |
| 464 | return -EINVAL; |
| 465 | |
| 466 | pdev = apq8064_sdcc_devices[controller-1]; |
| 467 | pdev->dev.platform_data = plat; |
| 468 | return platform_device_register(pdev); |
| 469 | } |
| 470 | |
| 471 | static struct clk_lookup msm_clocks_8064_dummy[] = { |
| 472 | CLK_DUMMY("pll2", PLL2, NULL, 0), |
| 473 | CLK_DUMMY("pll8", PLL8, NULL, 0), |
| 474 | CLK_DUMMY("pll4", PLL4, NULL, 0), |
| 475 | |
| 476 | CLK_DUMMY("afab_clk", AFAB_CLK, NULL, 0), |
| 477 | CLK_DUMMY("afab_a_clk", AFAB_A_CLK, NULL, 0), |
| 478 | CLK_DUMMY("cfpb_clk", CFPB_CLK, NULL, 0), |
| 479 | CLK_DUMMY("cfpb_a_clk", CFPB_A_CLK, NULL, 0), |
| 480 | CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0), |
| 481 | CLK_DUMMY("dfab_a_clk", DFAB_A_CLK, NULL, 0), |
| 482 | CLK_DUMMY("ebi1_clk", EBI1_CLK, NULL, 0), |
| 483 | CLK_DUMMY("ebi1_a_clk", EBI1_A_CLK, NULL, 0), |
| 484 | CLK_DUMMY("mmfab_clk", MMFAB_CLK, NULL, 0), |
| 485 | CLK_DUMMY("mmfab_a_clk", MMFAB_A_CLK, NULL, 0), |
| 486 | CLK_DUMMY("mmfpb_clk", MMFPB_CLK, NULL, 0), |
| 487 | CLK_DUMMY("mmfpb_a_clk", MMFPB_A_CLK, NULL, 0), |
| 488 | CLK_DUMMY("sfab_clk", SFAB_CLK, NULL, 0), |
| 489 | CLK_DUMMY("sfab_a_clk", SFAB_A_CLK, NULL, 0), |
| 490 | CLK_DUMMY("sfpb_clk", SFPB_CLK, NULL, 0), |
| 491 | CLK_DUMMY("sfpb_a_clk", SFPB_A_CLK, NULL, 0), |
| 492 | |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 493 | CLK_DUMMY("core_clk", GSBI1_UART_CLK, NULL, OFF), |
| 494 | CLK_DUMMY("core_clk", GSBI2_UART_CLK, NULL, OFF), |
| 495 | CLK_DUMMY("core_clk", GSBI3_UART_CLK, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 496 | "msm_serial_hsl.0", OFF), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 497 | CLK_DUMMY("core_clk", GSBI4_UART_CLK, NULL, OFF), |
| 498 | CLK_DUMMY("core_clk", GSBI5_UART_CLK, NULL, OFF), |
| 499 | CLK_DUMMY("core_clk", GSBI6_UART_CLK, NULL, OFF), |
| 500 | CLK_DUMMY("core_clk", GSBI7_UART_CLK, NULL, OFF), |
| 501 | CLK_DUMMY("core_clk", GSBI8_UART_CLK, NULL, OFF), |
| 502 | CLK_DUMMY("core_clk", GSBI9_UART_CLK, NULL, OFF), |
| 503 | CLK_DUMMY("core_clk", GSBI10_UART_CLK, NULL, OFF), |
| 504 | CLK_DUMMY("core_clk", GSBI11_UART_CLK, NULL, OFF), |
| 505 | CLK_DUMMY("core_clk", GSBI12_UART_CLK, NULL, OFF), |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 506 | CLK_DUMMY("gsbi_qup_clk", GSBI1_QUP_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 507 | CLK_DUMMY("gsbi_qup_clk", GSBI2_QUP_CLK, NULL, OFF), |
| 508 | CLK_DUMMY("gsbi_qup_clk", GSBI3_QUP_CLK, NULL, OFF), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame^] | 509 | CLK_DUMMY("core_clk", GSBI4_QUP_CLK, "qup_i2c.4", OFF), |
| 510 | CLK_DUMMY("core_clk", GSBI5_QUP_CLK, "spi_qsd.0", OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 511 | CLK_DUMMY("gsbi_qup_clk", GSBI6_QUP_CLK, NULL, OFF), |
| 512 | CLK_DUMMY("gsbi_qup_clk", GSBI7_QUP_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 513 | CLK_DUMMY("pdm_clk", PDM_CLK, NULL, OFF), |
| 514 | CLK_DUMMY("pmem_clk", PMEM_CLK, NULL, OFF), |
| 515 | CLK_DUMMY("prng_clk", PRNG_CLK, NULL, OFF), |
| 516 | CLK_DUMMY("sdc_clk", SDC1_CLK, NULL, OFF), |
| 517 | CLK_DUMMY("sdc_clk", SDC2_CLK, NULL, OFF), |
| 518 | CLK_DUMMY("sdc_clk", SDC3_CLK, NULL, OFF), |
| 519 | CLK_DUMMY("sdc_clk", SDC4_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 520 | CLK_DUMMY("tsif_ref_clk", TSIF_REF_CLK, NULL, OFF), |
| 521 | CLK_DUMMY("tssc_clk", TSSC_CLK, NULL, OFF), |
| 522 | CLK_DUMMY("usb_hs_clk", USB_HS1_XCVR_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 523 | CLK_DUMMY("usb_hs_clk", USB_HS3_XCVR_CLK, NULL, OFF), |
| 524 | CLK_DUMMY("usb_hs_clk", USB_HS4_XCVR_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 525 | CLK_DUMMY("usb_phy_clk", USB_PHY0_CLK, NULL, OFF), |
| 526 | CLK_DUMMY("usb_fs_src_clk", USB_FS1_SRC_CLK, NULL, OFF), |
| 527 | CLK_DUMMY("usb_fs_clk", USB_FS1_XCVR_CLK, NULL, OFF), |
| 528 | CLK_DUMMY("usb_fs_sys_clk", USB_FS1_SYS_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 529 | CLK_DUMMY("ce_pclk", CE2_CLK, NULL, OFF), |
| 530 | CLK_DUMMY("ce_clk", CE1_CORE_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 531 | CLK_DUMMY("ce_clk", CE3_CORE_CLK, NULL, OFF), |
| 532 | CLK_DUMMY("ce_pclk", CE3_P_CLK, NULL, OFF), |
| 533 | CLK_DUMMY("pcie_pclk", PCIE_P_CLK, NULL, OFF), |
| 534 | CLK_DUMMY("pcie_alt_ref_clk", PCIE_ALT_REF_CLK, NULL, OFF), |
| 535 | CLK_DUMMY("sata_rxoob_clk", SATA_RXOOB_CLK, NULL, OFF), |
| 536 | CLK_DUMMY("sata_pmalive_clk", SATA_PMALIVE_CLK, NULL, OFF), |
| 537 | CLK_DUMMY("sata_phy_ref_clk", SATA_PHY_REF_CLK, NULL, OFF), |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 538 | CLK_DUMMY("gsbi_pclk", GSBI1_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 539 | CLK_DUMMY("gsbi_pclk", GSBI2_P_CLK, NULL, OFF), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 540 | CLK_DUMMY("iface_clk", GSBI3_P_CLK, "msm_serial_hsl.0", OFF), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame^] | 541 | CLK_DUMMY("iface_clk", GSBI4_P_CLK, "qup_i2c.4", OFF), |
| 542 | CLK_DUMMY("iface_clk", GSBI5_P_CLK, "spi_qsd.0", OFF), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 543 | CLK_DUMMY("iface_clk", GSBI6_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 544 | CLK_DUMMY("gsbi_pclk", GSBI7_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 545 | CLK_DUMMY("tsif_pclk", TSIF_P_CLK, NULL, OFF), |
| 546 | CLK_DUMMY("usb_fs_pclk", USB_FS1_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 547 | CLK_DUMMY("usb_hs_pclk", USB_HS1_P_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 548 | CLK_DUMMY("usb_hs_pclk", USB_HS3_P_CLK, NULL, OFF), |
| 549 | CLK_DUMMY("usb_hs_pclk", USB_HS4_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 550 | CLK_DUMMY("sdc_pclk", SDC1_P_CLK, NULL, OFF), |
| 551 | CLK_DUMMY("sdc_pclk", SDC2_P_CLK, NULL, OFF), |
| 552 | CLK_DUMMY("sdc_pclk", SDC3_P_CLK, NULL, OFF), |
| 553 | CLK_DUMMY("sdc_pclk", SDC4_P_CLK, NULL, OFF), |
| 554 | CLK_DUMMY("sdc_pclk", SDC5_P_CLK, NULL, OFF), |
| 555 | CLK_DUMMY("adm_clk", ADM0_CLK, NULL, OFF), |
| 556 | CLK_DUMMY("adm_pclk", ADM0_P_CLK, NULL, OFF), |
| 557 | CLK_DUMMY("pmic_arb_pclk", PMIC_ARB0_P_CLK, NULL, OFF), |
| 558 | CLK_DUMMY("pmic_arb_pclk", PMIC_ARB1_P_CLK, NULL, OFF), |
| 559 | CLK_DUMMY("pmic_ssbi2", PMIC_SSBI2_CLK, NULL, OFF), |
| 560 | CLK_DUMMY("rpm_msg_ram_pclk", RPM_MSG_RAM_P_CLK, NULL, OFF), |
| 561 | CLK_DUMMY("amp_clk", AMP_CLK, NULL, OFF), |
| 562 | CLK_DUMMY("cam_clk", CAM0_CLK, NULL, OFF), |
| 563 | CLK_DUMMY("cam_clk", CAM1_CLK, NULL, OFF), |
| 564 | CLK_DUMMY("csi_src_clk", CSI0_SRC_CLK, NULL, OFF), |
| 565 | CLK_DUMMY("csi_src_clk", CSI1_SRC_CLK, NULL, OFF), |
| 566 | CLK_DUMMY("csi_clk", CSI0_CLK, NULL, OFF), |
| 567 | CLK_DUMMY("csi_clk", CSI1_CLK, NULL, OFF), |
| 568 | CLK_DUMMY("csi_pix_clk", CSI_PIX_CLK, NULL, OFF), |
| 569 | CLK_DUMMY("csi_rdi_clk", CSI_RDI_CLK, NULL, OFF), |
| 570 | CLK_DUMMY("csiphy_timer_src_clk", CSIPHY_TIMER_SRC_CLK, NULL, OFF), |
| 571 | CLK_DUMMY("csi0phy_timer_clk", CSIPHY0_TIMER_CLK, NULL, OFF), |
| 572 | CLK_DUMMY("csi1phy_timer_clk", CSIPHY1_TIMER_CLK, NULL, OFF), |
| 573 | CLK_DUMMY("dsi_byte_div_clk", DSI1_BYTE_CLK, NULL, OFF), |
| 574 | CLK_DUMMY("dsi_byte_div_clk", DSI2_BYTE_CLK, NULL, OFF), |
| 575 | CLK_DUMMY("dsi_esc_clk", DSI1_ESC_CLK, NULL, OFF), |
| 576 | CLK_DUMMY("dsi_esc_clk", DSI2_ESC_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 577 | CLK_DUMMY("vcap_clk", VCAP_CLK, NULL, OFF), |
| 578 | CLK_DUMMY("vcap_npl_clk", VCAP_NPL_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 579 | CLK_DUMMY("gfx3d_clk", GFX3D_CLK, NULL, OFF), |
| 580 | CLK_DUMMY("ijpeg_clk", IJPEG_CLK, NULL, OFF), |
| 581 | CLK_DUMMY("imem_clk", IMEM_CLK, NULL, OFF), |
| 582 | CLK_DUMMY("jpegd_clk", JPEGD_CLK, NULL, OFF), |
| 583 | CLK_DUMMY("mdp_clk", MDP_CLK, NULL, OFF), |
| 584 | CLK_DUMMY("mdp_vsync_clk", MDP_VSYNC_CLK, NULL, OFF), |
| 585 | CLK_DUMMY("lut_mdp", LUT_MDP_CLK, NULL, OFF), |
| 586 | CLK_DUMMY("rot_clk", ROT_CLK, NULL, OFF), |
| 587 | CLK_DUMMY("tv_src_clk", TV_SRC_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 588 | CLK_DUMMY("vcodec_clk", VCODEC_CLK, NULL, OFF), |
| 589 | CLK_DUMMY("mdp_tv_clk", MDP_TV_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 590 | CLK_DUMMY("rgb_tv_clk", RGB_TV_CLK, NULL, OFF), |
| 591 | CLK_DUMMY("npl_tv_clk", NPL_TV_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 592 | CLK_DUMMY("hdmi_clk", HDMI_TV_CLK, NULL, OFF), |
| 593 | CLK_DUMMY("hdmi_app_clk", HDMI_APP_CLK, NULL, OFF), |
| 594 | CLK_DUMMY("vpe_clk", VPE_CLK, NULL, OFF), |
| 595 | CLK_DUMMY("vfe_clk", VFE_CLK, NULL, OFF), |
| 596 | CLK_DUMMY("csi_vfe_clk", CSI0_VFE_CLK, NULL, OFF), |
| 597 | CLK_DUMMY("vfe_axi_clk", VFE_AXI_CLK, NULL, OFF), |
| 598 | CLK_DUMMY("ijpeg_axi_clk", IJPEG_AXI_CLK, NULL, OFF), |
| 599 | CLK_DUMMY("mdp_axi_clk", MDP_AXI_CLK, NULL, OFF), |
| 600 | CLK_DUMMY("rot_axi_clk", ROT_AXI_CLK, NULL, OFF), |
| 601 | CLK_DUMMY("vcodec_axi_clk", VCODEC_AXI_CLK, NULL, OFF), |
| 602 | CLK_DUMMY("vcodec_axi_a_clk", VCODEC_AXI_A_CLK, NULL, OFF), |
| 603 | CLK_DUMMY("vcodec_axi_b_clk", VCODEC_AXI_B_CLK, NULL, OFF), |
| 604 | CLK_DUMMY("vpe_axi_clk", VPE_AXI_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 605 | CLK_DUMMY("gfx3d_axi_clk", GFX3D_AXI_CLK, NULL, OFF), |
| 606 | CLK_DUMMY("vcap_axi_clk", VCAP_AXI_CLK, NULL, OFF), |
| 607 | CLK_DUMMY("vcap_ahb_clk", VCAP_AHB_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 608 | CLK_DUMMY("amp_pclk", AMP_P_CLK, NULL, OFF), |
| 609 | CLK_DUMMY("csi_pclk", CSI0_P_CLK, NULL, OFF), |
| 610 | CLK_DUMMY("dsi_m_pclk", DSI1_M_P_CLK, NULL, OFF), |
| 611 | CLK_DUMMY("dsi_s_pclk", DSI1_S_P_CLK, NULL, OFF), |
| 612 | CLK_DUMMY("dsi_m_pclk", DSI2_M_P_CLK, NULL, OFF), |
| 613 | CLK_DUMMY("dsi_s_pclk", DSI2_S_P_CLK, NULL, OFF), |
Tianyi Gou | 86bb472 | 2011-08-09 13:28:02 -0700 | [diff] [blame] | 614 | CLK_DUMMY("lvds_clk", LVDS_CLK, NULL, OFF), |
| 615 | CLK_DUMMY("mdp_p2clk", MDP_P2CLK, NULL, OFF), |
| 616 | CLK_DUMMY("dsi2_pixel_clk", DSI2_PIXEL_CLK, NULL, OFF), |
| 617 | CLK_DUMMY("lvds_ref_clk", LVDS_REF_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 618 | CLK_DUMMY("gfx3d_pclk", GFX3D_P_CLK, NULL, OFF), |
| 619 | CLK_DUMMY("hdmi_m_pclk", HDMI_M_P_CLK, NULL, OFF), |
| 620 | CLK_DUMMY("hdmi_s_pclk", HDMI_S_P_CLK, NULL, OFF), |
| 621 | CLK_DUMMY("ijpeg_pclk", IJPEG_P_CLK, NULL, OFF), |
| 622 | CLK_DUMMY("jpegd_pclk", JPEGD_P_CLK, NULL, OFF), |
| 623 | CLK_DUMMY("imem_pclk", IMEM_P_CLK, NULL, OFF), |
| 624 | CLK_DUMMY("mdp_pclk", MDP_P_CLK, NULL, OFF), |
| 625 | CLK_DUMMY("smmu_pclk", SMMU_P_CLK, NULL, OFF), |
| 626 | CLK_DUMMY("rotator_pclk", ROT_P_CLK, NULL, OFF), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 627 | CLK_DUMMY("vcodec_pclk", VCODEC_P_CLK, NULL, OFF), |
| 628 | CLK_DUMMY("vfe_pclk", VFE_P_CLK, NULL, OFF), |
| 629 | CLK_DUMMY("vpe_pclk", VPE_P_CLK, NULL, OFF), |
| 630 | CLK_DUMMY("mi2s_osr_clk", MI2S_OSR_CLK, NULL, OFF), |
| 631 | CLK_DUMMY("mi2s_bit_clk", MI2S_BIT_CLK, NULL, OFF), |
| 632 | CLK_DUMMY("i2s_mic_osr_clk", CODEC_I2S_MIC_OSR_CLK, NULL, OFF), |
| 633 | CLK_DUMMY("i2s_mic_bit_clk", CODEC_I2S_MIC_BIT_CLK, NULL, OFF), |
| 634 | CLK_DUMMY("i2s_mic_osr_clk", SPARE_I2S_MIC_OSR_CLK, NULL, OFF), |
| 635 | CLK_DUMMY("i2s_mic_bit_clk", SPARE_I2S_MIC_BIT_CLK, NULL, OFF), |
| 636 | CLK_DUMMY("i2s_spkr_osr_clk", CODEC_I2S_SPKR_OSR_CLK, NULL, OFF), |
| 637 | CLK_DUMMY("i2s_spkr_bit_clk", CODEC_I2S_SPKR_BIT_CLK, NULL, OFF), |
| 638 | CLK_DUMMY("i2s_spkr_osr_clk", SPARE_I2S_SPKR_OSR_CLK, NULL, OFF), |
| 639 | CLK_DUMMY("i2s_spkr_bit_clk", SPARE_I2S_SPKR_BIT_CLK, NULL, OFF), |
| 640 | CLK_DUMMY("pcm_clk", PCM_CLK, NULL, OFF), |
| 641 | CLK_DUMMY("iommu_clk", JPEGD_AXI_CLK, NULL, 0), |
| 642 | CLK_DUMMY("iommu_clk", VFE_AXI_CLK, NULL, 0), |
| 643 | CLK_DUMMY("iommu_clk", VCODEC_AXI_CLK, NULL, 0), |
| 644 | CLK_DUMMY("iommu_clk", GFX3D_CLK, NULL, 0), |
| 645 | CLK_DUMMY("iommu_clk", GFX2D0_CLK, NULL, 0), |
| 646 | CLK_DUMMY("iommu_clk", GFX2D1_CLK, NULL, 0), |
| 647 | |
| 648 | CLK_DUMMY("dfab_dsps_clk", DFAB_DSPS_CLK, NULL, 0), |
| 649 | CLK_DUMMY("dfab_usb_hs_clk", DFAB_USB_HS_CLK, NULL, 0), |
| 650 | CLK_DUMMY("dfab_sdc_clk", DFAB_SDC1_CLK, NULL, 0), |
| 651 | CLK_DUMMY("dfab_sdc_clk", DFAB_SDC2_CLK, NULL, 0), |
| 652 | CLK_DUMMY("dfab_sdc_clk", DFAB_SDC3_CLK, NULL, 0), |
| 653 | CLK_DUMMY("dfab_sdc_clk", DFAB_SDC4_CLK, NULL, 0), |
| 654 | CLK_DUMMY("dfab_sdc_clk", DFAB_SDC5_CLK, NULL, 0), |
| 655 | CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0), |
| 656 | CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0), |
| 657 | }; |
| 658 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 659 | struct clock_init_data apq8064_dummy_clock_init_data __initdata = { |
| 660 | .table = msm_clocks_8064_dummy, |
| 661 | .size = ARRAY_SIZE(msm_clocks_8064_dummy), |
| 662 | }; |