Daniel Walker | 62a6cc5 | 2010-05-05 07:27:16 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008 Google, Inc. |
Murali Nalajala | 2a0bbda | 2012-03-28 12:12:54 +0530 | [diff] [blame] | 3 | * Copyright (c) 2008-2012, Code Aurora Forum. All rights reserved. |
Daniel Walker | 62a6cc5 | 2010-05-05 07:27:16 -0700 | [diff] [blame] | 4 | * |
| 5 | * This software is licensed under the terms of the GNU General Public |
| 6 | * License version 2, as published by the Free Software Foundation, and |
| 7 | * may be copied, distributed, and modified under those terms. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | */ |
| 15 | |
| 16 | #include <linux/kernel.h> |
| 17 | #include <linux/platform_device.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 18 | #include <linux/msm_kgsl.h> |
Stephen Boyd | bd32344 | 2011-02-23 09:37:42 -0800 | [diff] [blame] | 19 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 20 | #include <linux/dma-mapping.h> |
| 21 | #include <asm/clkdev.h> |
Daniel Walker | 62a6cc5 | 2010-05-05 07:27:16 -0700 | [diff] [blame] | 22 | #include <mach/irqs.h> |
| 23 | #include <mach/msm_iomap.h> |
| 24 | #include <mach/dma.h> |
| 25 | #include <mach/board.h> |
| 26 | |
| 27 | #include "devices.h" |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 28 | #include "gpio_hw.h" |
Daniel Walker | 62a6cc5 | 2010-05-05 07:27:16 -0700 | [diff] [blame] | 29 | |
| 30 | #include <asm/mach/flash.h> |
| 31 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 32 | #include <asm/mach/mmc.h> |
| 33 | #include <mach/msm_hsusb.h> |
| 34 | #include <mach/usbdiag.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 35 | #include <mach/rpc_hsusb.h> |
Murali Nalajala | 2a0bbda | 2012-03-28 12:12:54 +0530 | [diff] [blame] | 36 | #include "pm.h" |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 37 | |
| 38 | static struct resource resources_uart1[] = { |
| 39 | { |
| 40 | .start = INT_UART1, |
| 41 | .end = INT_UART1, |
| 42 | .flags = IORESOURCE_IRQ, |
| 43 | }, |
| 44 | { |
| 45 | .start = MSM_UART1_PHYS, |
| 46 | .end = MSM_UART1_PHYS + MSM_UART1_SIZE - 1, |
| 47 | .flags = IORESOURCE_MEM, |
| 48 | }, |
| 49 | }; |
| 50 | |
| 51 | static struct resource resources_uart2[] = { |
| 52 | { |
| 53 | .start = INT_UART2, |
| 54 | .end = INT_UART2, |
| 55 | .flags = IORESOURCE_IRQ, |
| 56 | }, |
| 57 | { |
| 58 | .start = MSM_UART2_PHYS, |
| 59 | .end = MSM_UART2_PHYS + MSM_UART2_SIZE - 1, |
| 60 | .flags = IORESOURCE_MEM, |
| 61 | }, |
| 62 | }; |
Daniel Walker | 62a6cc5 | 2010-05-05 07:27:16 -0700 | [diff] [blame] | 63 | |
| 64 | static struct resource resources_uart3[] = { |
| 65 | { |
| 66 | .start = INT_UART3, |
| 67 | .end = INT_UART3, |
| 68 | .flags = IORESOURCE_IRQ, |
| 69 | }, |
| 70 | { |
| 71 | .start = MSM_UART3_PHYS, |
| 72 | .end = MSM_UART3_PHYS + MSM_UART3_SIZE - 1, |
| 73 | .flags = IORESOURCE_MEM, |
Stepan Moskovchenko | d41cb8c | 2011-01-17 20:33:32 -0800 | [diff] [blame] | 74 | .name = "uart_resource" |
Daniel Walker | 62a6cc5 | 2010-05-05 07:27:16 -0700 | [diff] [blame] | 75 | }, |
| 76 | }; |
| 77 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 78 | struct platform_device msm_device_uart1 = { |
| 79 | .name = "msm_serial", |
| 80 | .id = 0, |
| 81 | .num_resources = ARRAY_SIZE(resources_uart1), |
| 82 | .resource = resources_uart1, |
| 83 | }; |
| 84 | |
| 85 | struct platform_device msm_device_uart2 = { |
| 86 | .name = "msm_serial", |
| 87 | .id = 1, |
| 88 | .num_resources = ARRAY_SIZE(resources_uart2), |
| 89 | .resource = resources_uart2, |
| 90 | }; |
| 91 | |
Daniel Walker | 62a6cc5 | 2010-05-05 07:27:16 -0700 | [diff] [blame] | 92 | struct platform_device msm_device_uart3 = { |
| 93 | .name = "msm_serial", |
| 94 | .id = 2, |
| 95 | .num_resources = ARRAY_SIZE(resources_uart3), |
| 96 | .resource = resources_uart3, |
| 97 | }; |
| 98 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 99 | #define MSM_UART1DM_PHYS 0xA0200000 |
| 100 | #define MSM_UART2DM_PHYS 0xA0900000 |
| 101 | static struct resource msm_uart1_dm_resources[] = { |
| 102 | { |
| 103 | .start = MSM_UART1DM_PHYS, |
| 104 | .end = MSM_UART1DM_PHYS + PAGE_SIZE - 1, |
| 105 | .flags = IORESOURCE_MEM, |
| 106 | }, |
| 107 | { |
| 108 | .start = INT_UART1DM_IRQ, |
| 109 | .end = INT_UART1DM_IRQ, |
| 110 | .flags = IORESOURCE_IRQ, |
| 111 | }, |
| 112 | { |
| 113 | .start = INT_UART1DM_RX, |
| 114 | .end = INT_UART1DM_RX, |
| 115 | .flags = IORESOURCE_IRQ, |
| 116 | }, |
| 117 | { |
| 118 | .start = DMOV_HSUART1_TX_CHAN, |
| 119 | .end = DMOV_HSUART1_RX_CHAN, |
| 120 | .name = "uartdm_channels", |
| 121 | .flags = IORESOURCE_DMA, |
| 122 | }, |
| 123 | { |
| 124 | .start = DMOV_HSUART1_TX_CRCI, |
| 125 | .end = DMOV_HSUART1_RX_CRCI, |
| 126 | .name = "uartdm_crci", |
| 127 | .flags = IORESOURCE_DMA, |
| 128 | }, |
| 129 | }; |
| 130 | |
| 131 | static u64 msm_uart_dm1_dma_mask = DMA_BIT_MASK(32); |
| 132 | |
| 133 | struct platform_device msm_device_uart_dm1 = { |
| 134 | .name = "msm_serial_hs", |
| 135 | .id = 0, |
| 136 | .num_resources = ARRAY_SIZE(msm_uart1_dm_resources), |
| 137 | .resource = msm_uart1_dm_resources, |
| 138 | .dev = { |
| 139 | .dma_mask = &msm_uart_dm1_dma_mask, |
| 140 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 141 | }, |
| 142 | }; |
| 143 | |
| 144 | static struct resource msm_uart2_dm_resources[] = { |
| 145 | { |
| 146 | .start = MSM_UART2DM_PHYS, |
| 147 | .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1, |
| 148 | .flags = IORESOURCE_MEM, |
| 149 | }, |
| 150 | { |
| 151 | .start = INT_UART2DM_IRQ, |
| 152 | .end = INT_UART2DM_IRQ, |
| 153 | .flags = IORESOURCE_IRQ, |
| 154 | }, |
| 155 | { |
| 156 | .start = INT_UART2DM_RX, |
| 157 | .end = INT_UART2DM_RX, |
| 158 | .flags = IORESOURCE_IRQ, |
| 159 | }, |
| 160 | { |
| 161 | .start = DMOV_HSUART2_TX_CHAN, |
| 162 | .end = DMOV_HSUART2_RX_CHAN, |
| 163 | .name = "uartdm_channels", |
| 164 | .flags = IORESOURCE_DMA, |
| 165 | }, |
| 166 | { |
| 167 | .start = DMOV_HSUART2_TX_CRCI, |
| 168 | .end = DMOV_HSUART2_RX_CRCI, |
| 169 | .name = "uartdm_crci", |
| 170 | .flags = IORESOURCE_DMA, |
| 171 | }, |
| 172 | }; |
| 173 | |
| 174 | static u64 msm_uart_dm2_dma_mask = DMA_BIT_MASK(32); |
| 175 | |
| 176 | struct platform_device msm_device_uart_dm2 = { |
| 177 | .name = "msm_serial_hs", |
| 178 | .id = 1, |
| 179 | .num_resources = ARRAY_SIZE(msm_uart2_dm_resources), |
| 180 | .resource = msm_uart2_dm_resources, |
| 181 | .dev = { |
| 182 | .dma_mask = &msm_uart_dm2_dma_mask, |
| 183 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 184 | }, |
| 185 | }; |
| 186 | |
| 187 | #define MSM_I2C_SIZE SZ_4K |
| 188 | #define MSM_I2C_PHYS 0xA9900000 |
| 189 | |
| 190 | static struct resource resources_i2c[] = { |
| 191 | { |
| 192 | .start = MSM_I2C_PHYS, |
| 193 | .end = MSM_I2C_PHYS + MSM_I2C_SIZE - 1, |
| 194 | .flags = IORESOURCE_MEM, |
| 195 | }, |
| 196 | { |
| 197 | .start = INT_PWB_I2C, |
| 198 | .end = INT_PWB_I2C, |
| 199 | .flags = IORESOURCE_IRQ, |
| 200 | }, |
| 201 | }; |
| 202 | |
| 203 | struct platform_device msm_device_i2c = { |
| 204 | .name = "msm_i2c", |
| 205 | .id = 0, |
| 206 | .num_resources = ARRAY_SIZE(resources_i2c), |
| 207 | .resource = resources_i2c, |
| 208 | }; |
| 209 | |
| 210 | #define MSM_HSUSB_PHYS 0xA0800000 |
| 211 | static struct resource resources_hsusb_otg[] = { |
| 212 | { |
| 213 | .start = MSM_HSUSB_PHYS, |
| 214 | .end = MSM_HSUSB_PHYS + SZ_1K - 1, |
| 215 | .flags = IORESOURCE_MEM, |
| 216 | }, |
| 217 | { |
| 218 | .start = INT_USB_HS, |
| 219 | .end = INT_USB_HS, |
| 220 | .flags = IORESOURCE_IRQ, |
| 221 | }, |
| 222 | }; |
| 223 | |
| 224 | static u64 dma_mask = 0xffffffffULL; |
| 225 | struct platform_device msm_device_hsusb_otg = { |
| 226 | .name = "msm_hsusb_otg", |
| 227 | .id = -1, |
| 228 | .num_resources = ARRAY_SIZE(resources_hsusb_otg), |
| 229 | .resource = resources_hsusb_otg, |
| 230 | .dev = { |
| 231 | .dma_mask = &dma_mask, |
| 232 | .coherent_dma_mask = 0xffffffffULL, |
| 233 | }, |
| 234 | }; |
| 235 | |
| 236 | static struct resource resources_hsusb_peripheral[] = { |
| 237 | { |
| 238 | .start = MSM_HSUSB_PHYS, |
| 239 | .end = MSM_HSUSB_PHYS + SZ_1K - 1, |
| 240 | .flags = IORESOURCE_MEM, |
| 241 | }, |
| 242 | { |
| 243 | .start = INT_USB_HS, |
| 244 | .end = INT_USB_HS, |
| 245 | .flags = IORESOURCE_IRQ, |
| 246 | }, |
| 247 | }; |
| 248 | |
| 249 | static struct resource resources_gadget_peripheral[] = { |
| 250 | { |
| 251 | .start = MSM_HSUSB_PHYS, |
| 252 | .end = MSM_HSUSB_PHYS + SZ_1K - 1, |
| 253 | .flags = IORESOURCE_MEM, |
| 254 | }, |
| 255 | { |
| 256 | .start = INT_USB_HS, |
| 257 | .end = INT_USB_HS, |
| 258 | .flags = IORESOURCE_IRQ, |
| 259 | }, |
| 260 | }; |
| 261 | |
| 262 | struct platform_device msm_device_hsusb_peripheral = { |
| 263 | .name = "msm_hsusb_peripheral", |
| 264 | .id = -1, |
| 265 | .num_resources = ARRAY_SIZE(resources_hsusb_peripheral), |
| 266 | .resource = resources_hsusb_peripheral, |
| 267 | .dev = { |
| 268 | .dma_mask = &dma_mask, |
| 269 | .coherent_dma_mask = 0xffffffffULL, |
| 270 | }, |
| 271 | }; |
| 272 | |
| 273 | struct platform_device msm_device_gadget_peripheral = { |
| 274 | .name = "msm_hsusb", |
| 275 | .id = -1, |
| 276 | .num_resources = ARRAY_SIZE(resources_gadget_peripheral), |
| 277 | .resource = resources_gadget_peripheral, |
| 278 | .dev = { |
| 279 | .dma_mask = &dma_mask, |
| 280 | .coherent_dma_mask = 0xffffffffULL, |
| 281 | }, |
| 282 | }; |
| 283 | |
| 284 | #ifdef CONFIG_USB_FS_HOST |
| 285 | #define MSM_HS2USB_PHYS 0xA0800400 |
| 286 | static struct resource resources_hsusb_host2[] = { |
| 287 | { |
| 288 | .start = MSM_HS2USB_PHYS, |
| 289 | .end = MSM_HS2USB_PHYS + SZ_1K - 1, |
| 290 | .flags = IORESOURCE_MEM, |
| 291 | }, |
| 292 | { |
| 293 | .start = INT_USB_OTG, |
| 294 | .end = INT_USB_OTG, |
| 295 | .flags = IORESOURCE_IRQ, |
| 296 | }, |
| 297 | }; |
| 298 | |
| 299 | struct platform_device msm_device_hsusb_host2 = { |
| 300 | .name = "msm_hsusb_host", |
| 301 | .id = 1, |
| 302 | .num_resources = ARRAY_SIZE(resources_hsusb_host2), |
| 303 | .resource = resources_hsusb_host2, |
| 304 | .dev = { |
| 305 | .dma_mask = &dma_mask, |
| 306 | .coherent_dma_mask = 0xffffffffULL, |
| 307 | }, |
| 308 | }; |
| 309 | #endif |
| 310 | |
| 311 | static struct resource resources_hsusb_host[] = { |
| 312 | { |
| 313 | .start = MSM_HSUSB_PHYS, |
| 314 | .end = MSM_HSUSB_PHYS + SZ_1K - 1, |
| 315 | .flags = IORESOURCE_MEM, |
| 316 | }, |
| 317 | { |
| 318 | .start = INT_USB_HS, |
| 319 | .end = INT_USB_HS, |
| 320 | .flags = IORESOURCE_IRQ, |
| 321 | }, |
| 322 | }; |
| 323 | |
| 324 | struct platform_device msm_device_hsusb_host = { |
| 325 | .name = "msm_hsusb_host", |
| 326 | .id = 0, |
| 327 | .num_resources = ARRAY_SIZE(resources_hsusb_host), |
| 328 | .resource = resources_hsusb_host, |
| 329 | .dev = { |
| 330 | .dma_mask = &dma_mask, |
| 331 | .coherent_dma_mask = 0xffffffffULL, |
| 332 | }, |
| 333 | }; |
| 334 | |
| 335 | static struct platform_device *msm_host_devices[] = { |
| 336 | &msm_device_hsusb_host, |
| 337 | #ifdef CONFIG_USB_FS_HOST |
| 338 | &msm_device_hsusb_host2, |
| 339 | #endif |
| 340 | }; |
| 341 | |
| 342 | int msm_add_host(unsigned int host, struct msm_usb_host_platform_data *plat) |
| 343 | { |
| 344 | struct platform_device *pdev; |
| 345 | |
| 346 | pdev = msm_host_devices[host]; |
| 347 | if (!pdev) |
| 348 | return -ENODEV; |
| 349 | pdev->dev.platform_data = plat; |
| 350 | return platform_device_register(pdev); |
| 351 | } |
| 352 | |
| 353 | #ifdef CONFIG_USB_ANDROID |
| 354 | struct usb_diag_platform_data usb_diag_pdata = { |
| 355 | .ch_name = DIAG_LEGACY, |
| 356 | .update_pid_and_serial_num = usb_diag_update_pid_and_serial_num, |
| 357 | }; |
| 358 | |
| 359 | struct platform_device usb_diag_device = { |
| 360 | .name = "usb_diag", |
| 361 | .id = -1, |
| 362 | .dev = { |
| 363 | .platform_data = &usb_diag_pdata, |
| 364 | }, |
| 365 | }; |
| 366 | #endif |
| 367 | |
| 368 | #ifdef CONFIG_USB_F_SERIAL |
| 369 | static struct usb_gadget_fserial_platform_data fserial_pdata = { |
| 370 | .no_ports = 2, |
| 371 | }; |
| 372 | |
| 373 | struct platform_device usb_gadget_fserial_device = { |
| 374 | .name = "usb_fserial", |
| 375 | .id = -1, |
| 376 | .dev = { |
| 377 | .platform_data = &fserial_pdata, |
| 378 | }, |
| 379 | }; |
| 380 | #endif |
| 381 | |
| 382 | #define MSM_NAND_PHYS 0xA0A00000 |
| 383 | static struct resource resources_nand[] = { |
| 384 | [0] = { |
| 385 | .name = "msm_nand_dmac", |
| 386 | .start = DMOV_NAND_CHAN, |
| 387 | .end = DMOV_NAND_CHAN, |
| 388 | .flags = IORESOURCE_DMA, |
| 389 | }, |
| 390 | [1] = { |
| 391 | .name = "msm_nand_phys", |
| 392 | .start = MSM_NAND_PHYS, |
| 393 | .end = MSM_NAND_PHYS + 0x7FF, |
| 394 | .flags = IORESOURCE_MEM, |
| 395 | }, |
Niranjana Vishwanathapura | 88b5227 | 2010-10-06 13:52:11 -0700 | [diff] [blame] | 396 | }; |
| 397 | |
Pavankumar Kondeti | 7032d51 | 2010-12-08 13:37:07 +0530 | [diff] [blame] | 398 | static struct resource resources_otg[] = { |
| 399 | { |
| 400 | .start = MSM_HSUSB_PHYS, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 401 | .end = MSM_HSUSB_PHYS + SZ_1K - 1, |
Pavankumar Kondeti | 7032d51 | 2010-12-08 13:37:07 +0530 | [diff] [blame] | 402 | .flags = IORESOURCE_MEM, |
| 403 | }, |
| 404 | { |
| 405 | .start = INT_USB_HS, |
| 406 | .end = INT_USB_HS, |
| 407 | .flags = IORESOURCE_IRQ, |
| 408 | }, |
| 409 | }; |
| 410 | |
| 411 | struct platform_device msm_device_otg = { |
| 412 | .name = "msm_otg", |
| 413 | .id = -1, |
| 414 | .num_resources = ARRAY_SIZE(resources_otg), |
| 415 | .resource = resources_otg, |
| 416 | .dev = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 417 | .coherent_dma_mask = 0xffffffffULL, |
Pavankumar Kondeti | 7032d51 | 2010-12-08 13:37:07 +0530 | [diff] [blame] | 418 | }, |
| 419 | }; |
| 420 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 421 | struct flash_platform_data msm_nand_data = { |
| 422 | .parts = NULL, |
| 423 | .nr_parts = 0, |
Pavankumar Kondeti | 7032d51 | 2010-12-08 13:37:07 +0530 | [diff] [blame] | 424 | }; |
| 425 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 426 | struct platform_device msm_device_nand = { |
| 427 | .name = "msm_nand", |
Pavankumar Kondeti | 7032d51 | 2010-12-08 13:37:07 +0530 | [diff] [blame] | 428 | .id = -1, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 429 | .num_resources = ARRAY_SIZE(resources_nand), |
| 430 | .resource = resources_nand, |
Pavankumar Kondeti | 7032d51 | 2010-12-08 13:37:07 +0530 | [diff] [blame] | 431 | .dev = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 432 | .platform_data = &msm_nand_data, |
Pavankumar Kondeti | 7032d51 | 2010-12-08 13:37:07 +0530 | [diff] [blame] | 433 | }, |
| 434 | }; |
| 435 | |
Murali Nalajala | 2a0bbda | 2012-03-28 12:12:54 +0530 | [diff] [blame] | 436 | static struct msm_pm_irq_calls qsd8x50_pm_irq_calls = { |
| 437 | .irq_pending = msm_irq_pending, |
| 438 | .idle_sleep_allowed = msm_irq_idle_sleep_allowed, |
| 439 | .enter_sleep1 = msm_irq_enter_sleep1, |
| 440 | .enter_sleep2 = msm_irq_enter_sleep2, |
| 441 | .exit_sleep1 = msm_irq_exit_sleep1, |
| 442 | .exit_sleep2 = msm_irq_exit_sleep2, |
| 443 | .exit_sleep3 = msm_irq_exit_sleep3, |
| 444 | }; |
| 445 | |
Stephen Boyd | 986c963 | 2012-04-24 16:31:45 -0700 | [diff] [blame^] | 446 | void __init msm_pm_register_irqs(void) |
Murali Nalajala | 2a0bbda | 2012-03-28 12:12:54 +0530 | [diff] [blame] | 447 | { |
| 448 | msm_pm_set_irq_extns(&qsd8x50_pm_irq_calls); |
| 449 | } |
| 450 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 451 | struct platform_device msm_device_smd = { |
| 452 | .name = "msm_smd", |
| 453 | .id = -1, |
| 454 | }; |
| 455 | |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 456 | static struct resource msm_dmov_resource[] = { |
Pavankumar Kondeti | 7032d51 | 2010-12-08 13:37:07 +0530 | [diff] [blame] | 457 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 458 | .start = INT_ADM_AARM, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 459 | .flags = IORESOURCE_IRQ, |
Pavankumar Kondeti | 7032d51 | 2010-12-08 13:37:07 +0530 | [diff] [blame] | 460 | }, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 461 | { |
| 462 | .start = 0xA9700000, |
| 463 | .end = 0xA9700000 + SZ_4K - 1, |
| 464 | .flags = IORESOURCE_MEM, |
| 465 | }, |
| 466 | }; |
| 467 | |
| 468 | static struct msm_dmov_pdata msm_dmov_pdata = { |
| 469 | .sd = 3, |
| 470 | .sd_size = 0x400, |
Pavankumar Kondeti | 7032d51 | 2010-12-08 13:37:07 +0530 | [diff] [blame] | 471 | }; |
| 472 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 473 | struct platform_device msm_device_dmov = { |
| 474 | .name = "msm_dmov", |
| 475 | .id = -1, |
| 476 | .resource = msm_dmov_resource, |
| 477 | .num_resources = ARRAY_SIZE(msm_dmov_resource), |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 478 | .dev = { |
| 479 | .platform_data = &msm_dmov_pdata, |
| 480 | }, |
Pavankumar Kondeti | 7032d51 | 2010-12-08 13:37:07 +0530 | [diff] [blame] | 481 | }; |
| 482 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 483 | #define MSM_SDC1_BASE 0xA0300000 |
| 484 | #define MSM_SDC2_BASE 0xA0400000 |
| 485 | #define MSM_SDC3_BASE 0xA0500000 |
| 486 | #define MSM_SDC4_BASE 0xA0600000 |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 487 | static struct resource resources_sdc1[] = { |
| 488 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 489 | .start = MSM_SDC1_BASE, |
| 490 | .end = MSM_SDC1_BASE + SZ_4K - 1, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 491 | .flags = IORESOURCE_MEM, |
| 492 | }, |
| 493 | { |
| 494 | .start = INT_SDC1_0, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 495 | .end = INT_SDC1_1, |
| 496 | .flags = IORESOURCE_IRQ, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 497 | }, |
| 498 | { |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 499 | .name = "sdcc_dma_chnl", |
| 500 | .start = DMOV_SDC1_CHAN, |
| 501 | .end = DMOV_SDC1_CHAN, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 502 | .flags = IORESOURCE_DMA, |
| 503 | }, |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 504 | { |
| 505 | .name = "sdcc_dma_crci", |
| 506 | .start = DMOV_SDC1_CRCI, |
| 507 | .end = DMOV_SDC1_CRCI, |
| 508 | .flags = IORESOURCE_DMA, |
| 509 | } |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 510 | }; |
| 511 | |
| 512 | static struct resource resources_sdc2[] = { |
| 513 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 514 | .start = MSM_SDC2_BASE, |
| 515 | .end = MSM_SDC2_BASE + SZ_4K - 1, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 516 | .flags = IORESOURCE_MEM, |
| 517 | }, |
| 518 | { |
| 519 | .start = INT_SDC2_0, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 520 | .end = INT_SDC2_1, |
| 521 | .flags = IORESOURCE_IRQ, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 522 | }, |
| 523 | { |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 524 | .name = "sdcc_dma_chnl", |
| 525 | .start = DMOV_SDC2_CHAN, |
| 526 | .end = DMOV_SDC2_CHAN, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 527 | .flags = IORESOURCE_DMA, |
| 528 | }, |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 529 | { |
| 530 | .name = "sdcc_dma_crci", |
| 531 | .start = DMOV_SDC2_CRCI, |
| 532 | .end = DMOV_SDC2_CRCI, |
| 533 | .flags = IORESOURCE_DMA, |
| 534 | } |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 535 | }; |
| 536 | |
| 537 | static struct resource resources_sdc3[] = { |
| 538 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 539 | .start = MSM_SDC3_BASE, |
| 540 | .end = MSM_SDC3_BASE + SZ_4K - 1, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 541 | .flags = IORESOURCE_MEM, |
| 542 | }, |
| 543 | { |
| 544 | .start = INT_SDC3_0, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 545 | .end = INT_SDC3_1, |
| 546 | .flags = IORESOURCE_IRQ, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 547 | }, |
| 548 | { |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 549 | .name = "sdcc_dma_chnl", |
| 550 | .start = DMOV_SDC3_CHAN, |
| 551 | .end = DMOV_SDC3_CHAN, |
| 552 | .flags = IORESOURCE_DMA, |
| 553 | }, |
| 554 | { |
| 555 | .name = "sdcc_dma_crci", |
| 556 | .start = DMOV_SDC3_CRCI, |
| 557 | .end = DMOV_SDC3_CRCI, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 558 | .flags = IORESOURCE_DMA, |
| 559 | }, |
| 560 | }; |
| 561 | |
| 562 | static struct resource resources_sdc4[] = { |
| 563 | { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 564 | .start = MSM_SDC4_BASE, |
| 565 | .end = MSM_SDC4_BASE + SZ_4K - 1, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 566 | .flags = IORESOURCE_MEM, |
| 567 | }, |
| 568 | { |
| 569 | .start = INT_SDC4_0, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 570 | .end = INT_SDC4_1, |
| 571 | .flags = IORESOURCE_IRQ, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 572 | }, |
| 573 | { |
Krishna Konda | 25786ec | 2011-07-25 16:21:36 -0700 | [diff] [blame] | 574 | .name = "sdcc_dma_chnl", |
| 575 | .start = DMOV_SDC4_CHAN, |
| 576 | .end = DMOV_SDC4_CHAN, |
| 577 | .flags = IORESOURCE_DMA, |
| 578 | }, |
| 579 | { |
| 580 | .name = "sdcc_dma_crci", |
| 581 | .start = DMOV_SDC4_CRCI, |
| 582 | .end = DMOV_SDC4_CRCI, |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 583 | .flags = IORESOURCE_DMA, |
| 584 | }, |
| 585 | }; |
| 586 | |
| 587 | struct platform_device msm_device_sdc1 = { |
| 588 | .name = "msm_sdcc", |
| 589 | .id = 1, |
| 590 | .num_resources = ARRAY_SIZE(resources_sdc1), |
| 591 | .resource = resources_sdc1, |
| 592 | .dev = { |
| 593 | .coherent_dma_mask = 0xffffffff, |
| 594 | }, |
| 595 | }; |
| 596 | |
| 597 | struct platform_device msm_device_sdc2 = { |
| 598 | .name = "msm_sdcc", |
| 599 | .id = 2, |
| 600 | .num_resources = ARRAY_SIZE(resources_sdc2), |
| 601 | .resource = resources_sdc2, |
| 602 | .dev = { |
| 603 | .coherent_dma_mask = 0xffffffff, |
| 604 | }, |
| 605 | }; |
| 606 | |
| 607 | struct platform_device msm_device_sdc3 = { |
| 608 | .name = "msm_sdcc", |
| 609 | .id = 3, |
| 610 | .num_resources = ARRAY_SIZE(resources_sdc3), |
| 611 | .resource = resources_sdc3, |
| 612 | .dev = { |
| 613 | .coherent_dma_mask = 0xffffffff, |
| 614 | }, |
| 615 | }; |
| 616 | |
| 617 | struct platform_device msm_device_sdc4 = { |
| 618 | .name = "msm_sdcc", |
| 619 | .id = 4, |
| 620 | .num_resources = ARRAY_SIZE(resources_sdc4), |
| 621 | .resource = resources_sdc4, |
| 622 | .dev = { |
| 623 | .coherent_dma_mask = 0xffffffff, |
| 624 | }, |
| 625 | }; |
| 626 | |
| 627 | static struct platform_device *msm_sdcc_devices[] __initdata = { |
| 628 | &msm_device_sdc1, |
| 629 | &msm_device_sdc2, |
| 630 | &msm_device_sdc3, |
| 631 | &msm_device_sdc4, |
| 632 | }; |
| 633 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 634 | int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat) |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 635 | { |
| 636 | struct platform_device *pdev; |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 637 | |
| 638 | if (controller < 1 || controller > 4) |
| 639 | return -EINVAL; |
| 640 | |
| 641 | pdev = msm_sdcc_devices[controller-1]; |
| 642 | pdev->dev.platform_data = plat; |
Sahitya Tummala | 8b4d95f | 2011-01-18 11:22:50 +0530 | [diff] [blame] | 643 | return platform_device_register(pdev); |
| 644 | } |
| 645 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 646 | #if defined(CONFIG_FB_MSM_MDP40) |
| 647 | #define MDP_BASE 0xA3F00000 |
| 648 | #define PMDH_BASE 0xAD600000 |
| 649 | #define EMDH_BASE 0xAD700000 |
| 650 | #define TVENC_BASE 0xAD400000 |
| 651 | #else |
| 652 | #define MDP_BASE 0xAA200000 |
| 653 | #define PMDH_BASE 0xAA600000 |
| 654 | #define EMDH_BASE 0xAA700000 |
| 655 | #define TVENC_BASE 0xAA400000 |
| 656 | #endif |
| 657 | |
| 658 | static struct resource msm_mdp_resources[] = { |
| 659 | { |
| 660 | .name = "mdp", |
| 661 | .start = MDP_BASE, |
| 662 | .end = MDP_BASE + 0x000F0000 - 1, |
| 663 | .flags = IORESOURCE_MEM, |
| 664 | }, |
| 665 | { |
| 666 | .start = INT_MDP, |
| 667 | .end = INT_MDP, |
| 668 | .flags = IORESOURCE_IRQ, |
| 669 | }, |
Daniel Walker | 62a6cc5 | 2010-05-05 07:27:16 -0700 | [diff] [blame] | 670 | }; |
| 671 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 672 | static struct resource msm_mddi_resources[] = { |
| 673 | { |
| 674 | .name = "pmdh", |
| 675 | .start = PMDH_BASE, |
| 676 | .end = PMDH_BASE + PAGE_SIZE - 1, |
| 677 | .flags = IORESOURCE_MEM, |
| 678 | } |
| 679 | }; |
| 680 | |
| 681 | static struct resource msm_mddi_ext_resources[] = { |
| 682 | { |
| 683 | .name = "emdh", |
| 684 | .start = EMDH_BASE, |
| 685 | .end = EMDH_BASE + PAGE_SIZE - 1, |
| 686 | .flags = IORESOURCE_MEM, |
| 687 | } |
| 688 | }; |
| 689 | |
| 690 | static struct resource msm_ebi2_lcd_resources[] = { |
| 691 | { |
| 692 | .name = "base", |
| 693 | .start = 0xa0d00000, |
| 694 | .end = 0xa0d00000 + PAGE_SIZE - 1, |
| 695 | .flags = IORESOURCE_MEM, |
| 696 | }, |
| 697 | { |
| 698 | .name = "lcd01", |
| 699 | .start = 0x98000000, |
| 700 | .end = 0x98000000 + 0x80000 - 1, |
| 701 | .flags = IORESOURCE_MEM, |
| 702 | }, |
| 703 | { |
| 704 | .name = "lcd02", |
| 705 | .start = 0x9c000000, |
| 706 | .end = 0x9c000000 + 0x80000 - 1, |
| 707 | .flags = IORESOURCE_MEM, |
| 708 | }, |
| 709 | }; |
| 710 | |
| 711 | static struct resource msm_tvenc_resources[] = { |
| 712 | { |
| 713 | .name = "tvenc", |
| 714 | .start = TVENC_BASE, |
| 715 | .end = TVENC_BASE + PAGE_SIZE - 1, |
| 716 | .flags = IORESOURCE_MEM, |
| 717 | } |
| 718 | }; |
| 719 | |
| 720 | static struct platform_device msm_mdp_device = { |
| 721 | .name = "mdp", |
| 722 | .id = 0, |
| 723 | .num_resources = ARRAY_SIZE(msm_mdp_resources), |
| 724 | .resource = msm_mdp_resources, |
| 725 | }; |
| 726 | |
| 727 | static struct platform_device msm_mddi_device = { |
| 728 | .name = "mddi", |
| 729 | .id = 0, |
| 730 | .num_resources = ARRAY_SIZE(msm_mddi_resources), |
| 731 | .resource = msm_mddi_resources, |
| 732 | }; |
| 733 | |
| 734 | static struct platform_device msm_mddi_ext_device = { |
| 735 | .name = "mddi_ext", |
| 736 | .id = 0, |
| 737 | .num_resources = ARRAY_SIZE(msm_mddi_ext_resources), |
| 738 | .resource = msm_mddi_ext_resources, |
| 739 | }; |
| 740 | |
| 741 | static struct platform_device msm_ebi2_lcd_device = { |
| 742 | .name = "ebi2_lcd", |
| 743 | .id = 0, |
| 744 | .num_resources = ARRAY_SIZE(msm_ebi2_lcd_resources), |
| 745 | .resource = msm_ebi2_lcd_resources, |
| 746 | }; |
| 747 | |
| 748 | static struct platform_device msm_lcdc_device = { |
| 749 | .name = "lcdc", |
| 750 | .id = 0, |
| 751 | }; |
| 752 | |
| 753 | static struct platform_device msm_tvenc_device = { |
| 754 | .name = "tvenc", |
| 755 | .id = 0, |
| 756 | .num_resources = ARRAY_SIZE(msm_tvenc_resources), |
| 757 | .resource = msm_tvenc_resources, |
| 758 | }; |
| 759 | |
| 760 | #if defined(CONFIG_MSM_SOC_REV_A) |
| 761 | #define MSM_QUP_PHYS 0xA1680000 |
| 762 | #define MSM_GSBI_QUP_I2C_PHYS 0xA1600000 |
| 763 | #define INT_PWB_QUP_ERR INT_GSBI_QUP |
| 764 | #else |
| 765 | #define MSM_QUP_PHYS 0xA9900000 |
| 766 | #define MSM_GSBI_QUP_I2C_PHYS 0xA9900000 |
| 767 | #define INT_PWB_QUP_ERR INT_PWB_I2C |
| 768 | #endif |
| 769 | #define MSM_QUP_SIZE SZ_4K |
| 770 | static struct resource resources_qup[] = { |
| 771 | { |
| 772 | .name = "qup_phys_addr", |
| 773 | .start = MSM_QUP_PHYS, |
| 774 | .end = MSM_QUP_PHYS + MSM_QUP_SIZE - 1, |
| 775 | .flags = IORESOURCE_MEM, |
| 776 | }, |
| 777 | { |
| 778 | .name = "gsbi_qup_i2c_addr", |
| 779 | .start = MSM_GSBI_QUP_I2C_PHYS, |
| 780 | .end = MSM_GSBI_QUP_I2C_PHYS + 4 - 1, |
| 781 | .flags = IORESOURCE_MEM, |
| 782 | }, |
| 783 | { |
| 784 | .name = "qup_err_intr", |
| 785 | .start = INT_PWB_QUP_ERR, |
| 786 | .end = INT_PWB_QUP_ERR, |
| 787 | .flags = IORESOURCE_IRQ, |
| 788 | }, |
| 789 | }; |
| 790 | |
| 791 | struct platform_device qup_device_i2c = { |
| 792 | .name = "qup_i2c", |
| 793 | .id = 4, |
| 794 | .num_resources = ARRAY_SIZE(resources_qup), |
| 795 | .resource = resources_qup, |
| 796 | }; |
| 797 | |
| 798 | /* TSIF begin */ |
| 799 | #if defined(CONFIG_TSIF) || defined(CONFIG_TSIF_MODULE) |
| 800 | |
| 801 | #define MSM_TSIF_PHYS (0xa0100000) |
| 802 | #define MSM_TSIF_SIZE (0x200) |
| 803 | |
| 804 | static struct resource tsif_resources[] = { |
| 805 | [0] = { |
| 806 | .flags = IORESOURCE_IRQ, |
| 807 | .start = INT_TSIF_IRQ, |
| 808 | .end = INT_TSIF_IRQ, |
| 809 | }, |
| 810 | [1] = { |
| 811 | .flags = IORESOURCE_MEM, |
| 812 | .start = MSM_TSIF_PHYS, |
| 813 | .end = MSM_TSIF_PHYS + MSM_TSIF_SIZE - 1, |
| 814 | }, |
| 815 | [2] = { |
| 816 | .flags = IORESOURCE_DMA, |
| 817 | .start = DMOV_TSIF_CHAN, |
| 818 | .end = DMOV_TSIF_CRCI, |
| 819 | }, |
| 820 | }; |
| 821 | |
| 822 | static void tsif_release(struct device *dev) |
| 823 | { |
| 824 | dev_info(dev, "release\n"); |
| 825 | } |
| 826 | |
| 827 | struct platform_device msm_device_tsif = { |
| 828 | .name = "msm_tsif", |
| 829 | .id = 0, |
| 830 | .num_resources = ARRAY_SIZE(tsif_resources), |
| 831 | .resource = tsif_resources, |
| 832 | .dev = { |
| 833 | .release = tsif_release, |
| 834 | }, |
| 835 | }; |
| 836 | #endif /* defined(CONFIG_TSIF) || defined(CONFIG_TSIF_MODULE) */ |
| 837 | /* TSIF end */ |
| 838 | |
| 839 | #define MSM_TSSC_PHYS 0xAA300000 |
| 840 | static struct resource resources_tssc[] = { |
| 841 | { |
| 842 | .start = MSM_TSSC_PHYS, |
| 843 | .end = MSM_TSSC_PHYS + SZ_4K - 1, |
| 844 | .name = "tssc", |
| 845 | .flags = IORESOURCE_MEM, |
| 846 | }, |
| 847 | { |
| 848 | .start = INT_TCHSCRN1, |
| 849 | .end = INT_TCHSCRN1, |
| 850 | .name = "tssc1", |
| 851 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING, |
| 852 | }, |
| 853 | { |
| 854 | .start = INT_TCHSCRN2, |
| 855 | .end = INT_TCHSCRN2, |
| 856 | .name = "tssc2", |
| 857 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_RISING, |
| 858 | }, |
| 859 | }; |
| 860 | |
| 861 | struct platform_device msm_device_tssc = { |
| 862 | .name = "msm_touchscreen", |
| 863 | .id = 0, |
| 864 | .num_resources = ARRAY_SIZE(resources_tssc), |
| 865 | .resource = resources_tssc, |
| 866 | }; |
| 867 | |
| 868 | static void __init msm_register_device(struct platform_device *pdev, void *data) |
| 869 | { |
| 870 | int ret; |
| 871 | |
| 872 | pdev->dev.platform_data = data; |
| 873 | |
| 874 | ret = platform_device_register(pdev); |
| 875 | if (ret) |
| 876 | dev_err(&pdev->dev, |
| 877 | "%s: platform_device_register() failed = %d\n", |
| 878 | __func__, ret); |
| 879 | } |
| 880 | |
| 881 | void __init msm_fb_register_device(char *name, void *data) |
| 882 | { |
| 883 | if (!strncmp(name, "mdp", 3)) |
| 884 | msm_register_device(&msm_mdp_device, data); |
| 885 | else if (!strncmp(name, "pmdh", 4)) |
| 886 | msm_register_device(&msm_mddi_device, data); |
| 887 | else if (!strncmp(name, "emdh", 4)) |
| 888 | msm_register_device(&msm_mddi_ext_device, data); |
| 889 | else if (!strncmp(name, "ebi2", 4)) |
| 890 | msm_register_device(&msm_ebi2_lcd_device, data); |
| 891 | else if (!strncmp(name, "tvenc", 5)) |
| 892 | msm_register_device(&msm_tvenc_device, data); |
| 893 | else if (!strncmp(name, "lcdc", 4)) |
| 894 | msm_register_device(&msm_lcdc_device, data); |
| 895 | else |
| 896 | printk(KERN_ERR "%s: unknown device! %s\n", __func__, name); |
| 897 | } |
| 898 | |
| 899 | static struct platform_device msm_camera_device = { |
| 900 | .name = "msm_camera", |
| 901 | .id = 0, |
| 902 | }; |
| 903 | |
| 904 | void __init msm_camera_register_device(void *res, uint32_t num, |
| 905 | void *data) |
| 906 | { |
| 907 | msm_camera_device.num_resources = num; |
| 908 | msm_camera_device.resource = res; |
| 909 | |
| 910 | msm_register_device(&msm_camera_device, data); |
| 911 | } |
| 912 | |
| 913 | static struct resource kgsl_3d0_resources[] = { |
| 914 | { |
| 915 | .name = KGSL_3D0_REG_MEMORY, |
| 916 | .start = 0xA0000000, |
| 917 | .end = 0xA001ffff, |
| 918 | .flags = IORESOURCE_MEM, |
| 919 | }, |
| 920 | { |
| 921 | .name = KGSL_3D0_IRQ, |
| 922 | .start = INT_GRAPHICS, |
| 923 | .end = INT_GRAPHICS, |
| 924 | .flags = IORESOURCE_IRQ, |
| 925 | }, |
| 926 | }; |
| 927 | |
| 928 | static struct kgsl_device_platform_data kgsl_3d0_pdata = { |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 929 | .pwrlevel = { |
| 930 | { |
| 931 | .gpu_freq = 0, |
| 932 | .bus_freq = 128000000, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 933 | }, |
| 934 | }, |
Lucille Sylvester | dce84cd | 2011-10-12 14:15:37 -0600 | [diff] [blame] | 935 | .init_level = 0, |
| 936 | .num_levels = 1, |
| 937 | .set_grp_async = NULL, |
| 938 | .idle_timeout = HZ/5, |
| 939 | .clk_map = KGSL_CLK_CORE | KGSL_CLK_MEM, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 940 | }; |
| 941 | |
| 942 | struct platform_device msm_kgsl_3d0 = { |
| 943 | .name = "kgsl-3d0", |
| 944 | .id = 0, |
| 945 | .num_resources = ARRAY_SIZE(kgsl_3d0_resources), |
| 946 | .resource = kgsl_3d0_resources, |
| 947 | .dev = { |
| 948 | .platform_data = &kgsl_3d0_pdata, |
| 949 | }, |
| 950 | }; |
Daniel Walker | 62a6cc5 | 2010-05-05 07:27:16 -0700 | [diff] [blame] | 951 | |