blob: 17e7364a89775e44519602795f266303c2673e9b [file] [log] [blame]
Daniel Walker10932762010-05-12 12:02:25 -07001/*
2 * Copyright (C) 2008 Google, Inc.
Taniya Das2e948192011-12-20 11:15:13 +05303 * Copyright (c) 2008-2012, Code Aurora Forum. All rights reserved.
Daniel Walker10932762010-05-12 12:02:25 -07004 *
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 Huntsman3f2bc4d2011-08-16 17:27:22 -070018#include <linux/msm_rotator.h>
Daniel Walker10932762010-05-12 12:02:25 -070019#include <linux/dma-mapping.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070020#include <linux/msm_kgsl.h>
21#include <linux/android_pmem.h>
22#include <linux/regulator/machine.h>
Taniya Das2e948192011-12-20 11:15:13 +053023#include <linux/init.h>
Daniel Walker10932762010-05-12 12:02:25 -070024#include <mach/irqs.h>
25#include <mach/msm_iomap.h>
26#include <mach/dma.h>
27#include <mach/board.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070028#include <asm/clkdev.h>
Daniel Walker10932762010-05-12 12:02:25 -070029
30#include "devices.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070031#include "gpio_hw.h"
32#include "footswitch.h"
Daniel Walker10932762010-05-12 12:02:25 -070033
34#include <asm/mach/flash.h>
35
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070036#include <asm/mach/mmc.h>
37#include <mach/msm_hsusb.h>
38#ifdef CONFIG_PMIC8058
39#include <linux/mfd/pmic8058.h>
40#endif
41#include <mach/dal_axi.h>
42#include <mach/msm_memtypes.h>
Murali Nalajala2a0bbda2012-03-28 12:12:54 +053043#include "pm.h"
44#include "irq.h"
Daniel Walker10932762010-05-12 12:02:25 -070045
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070046/* EBI THERMAL DRIVER */
47static struct resource msm_ebi0_thermal_resources[] = {
48 {
49 .start = 0xA8600000,
50 .end = 0xA86005FF,
51 .name = "physbase",
52 .flags = IORESOURCE_MEM
53 }
54};
55
56struct platform_device msm_ebi0_thermal = {
57 .name = "msm_popmem-tm",
58 .id = 0,
59 .num_resources = 1,
60 .resource = msm_ebi0_thermal_resources
61};
62
63static struct resource msm_ebi1_thermal_resources[] = {
64 {
65 .start = 0xA8700000,
66 .end = 0xA87005FF,
67 .name = "physbase",
68 .flags = IORESOURCE_MEM
69 }
70};
71
72struct platform_device msm_ebi1_thermal = {
73 .name = "msm_popmem-tm",
74 .id = 1,
75 .num_resources = 1,
76 .resource = msm_ebi1_thermal_resources
77};
78
Laxminath Kasam1d8255d2012-02-15 13:10:19 +053079static struct resource resources_adsp[] = {
80{
81 .start = INT_ADSP_A9_A11,
82 .end = INT_ADSP_A9_A11,
83 .flags = IORESOURCE_IRQ,
84},
85};
86
87struct platform_device msm_adsp_device = {
88 .name = "msm_adsp",
89 .id = -1,
90 .num_resources = ARRAY_SIZE(resources_adsp),
91 .resource = resources_adsp,
92};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070093
94static struct resource resources_uart1[] = {
95 {
96 .start = INT_UART1,
97 .end = INT_UART1,
98 .flags = IORESOURCE_IRQ,
99 },
100 {
Taniya Das298de8c2012-02-16 11:45:31 +0530101 .start = MSM7X30_UART1_PHYS,
102 .end = MSM7X30_UART1_PHYS + MSM7X30_UART1_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700103 .flags = IORESOURCE_MEM,
104 },
105};
Daniel Walker10932762010-05-12 12:02:25 -0700106
107static struct resource resources_uart2[] = {
108 {
109 .start = INT_UART2,
110 .end = INT_UART2,
111 .flags = IORESOURCE_IRQ,
112 },
113 {
Taniya Das298de8c2012-02-16 11:45:31 +0530114 .start = MSM7X30_UART2_PHYS,
115 .end = MSM7X30_UART2_PHYS + MSM7X30_UART2_SIZE - 1,
Daniel Walker10932762010-05-12 12:02:25 -0700116 .flags = IORESOURCE_MEM,
Stepan Moskovchenkod41cb8c2011-01-17 20:33:32 -0800117 .name = "uart_resource"
Daniel Walker10932762010-05-12 12:02:25 -0700118 },
119};
120
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700121static struct resource resources_uart3[] = {
122 {
123 .start = INT_UART3,
124 .end = INT_UART3,
125 .flags = IORESOURCE_IRQ,
126 },
127 {
Taniya Das298de8c2012-02-16 11:45:31 +0530128 .start = MSM7X30_UART3_PHYS,
129 .end = MSM7X30_UART3_PHYS + MSM7X30_UART3_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700130 .flags = IORESOURCE_MEM,
131 },
132};
133
134struct platform_device msm_device_uart1 = {
135 .name = "msm_serial",
136 .id = 0,
137 .num_resources = ARRAY_SIZE(resources_uart1),
138 .resource = resources_uart1,
139};
140
Daniel Walker10932762010-05-12 12:02:25 -0700141struct platform_device msm_device_uart2 = {
142 .name = "msm_serial",
143 .id = 1,
144 .num_resources = ARRAY_SIZE(resources_uart2),
145 .resource = resources_uart2,
146};
147
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700148struct platform_device msm_device_uart3 = {
149 .name = "msm_serial",
150 .id = 2,
151 .num_resources = ARRAY_SIZE(resources_uart3),
152 .resource = resources_uart3,
Niranjana Vishwanathapuraa8855e92010-10-06 13:52:10 -0700153};
154
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700155#define MSM_UART1DM_PHYS 0xA3300000
156#define MSM_UART2DM_PHYS 0xA3200000
157static struct resource msm_uart1_dm_resources[] = {
158 {
159 .start = MSM_UART1DM_PHYS,
160 .end = MSM_UART1DM_PHYS + PAGE_SIZE - 1,
161 .flags = IORESOURCE_MEM,
162 },
163 {
164 .start = INT_UART1DM_IRQ,
165 .end = INT_UART1DM_IRQ,
166 .flags = IORESOURCE_IRQ,
167 },
168 {
169 .start = INT_UART1DM_RX,
170 .end = INT_UART1DM_RX,
171 .flags = IORESOURCE_IRQ,
172 },
173 {
174 .start = DMOV_HSUART1_TX_CHAN,
175 .end = DMOV_HSUART1_RX_CHAN,
176 .name = "uartdm_channels",
177 .flags = IORESOURCE_DMA,
178 },
179 {
180 .start = DMOV_HSUART1_TX_CRCI,
181 .end = DMOV_HSUART1_RX_CRCI,
182 .name = "uartdm_crci",
183 .flags = IORESOURCE_DMA,
184 },
185};
186
187static u64 msm_uart_dm1_dma_mask = DMA_BIT_MASK(32);
188
189struct platform_device msm_device_uart_dm1 = {
190 .name = "msm_serial_hs",
191 .id = 0,
192 .num_resources = ARRAY_SIZE(msm_uart1_dm_resources),
193 .resource = msm_uart1_dm_resources,
194 .dev = {
195 .dma_mask = &msm_uart_dm1_dma_mask,
196 .coherent_dma_mask = DMA_BIT_MASK(32),
197 },
198};
199
200static struct resource msm_uart2_dm_resources[] = {
201 {
202 .start = MSM_UART2DM_PHYS,
203 .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
204 .flags = IORESOURCE_MEM,
205 },
206 {
207 .start = INT_UART2DM_IRQ,
208 .end = INT_UART2DM_IRQ,
209 .flags = IORESOURCE_IRQ,
210 },
211 {
212 .start = INT_UART2DM_RX,
213 .end = INT_UART2DM_RX,
214 .flags = IORESOURCE_IRQ,
215 },
216 {
217 .start = DMOV_HSUART2_TX_CHAN,
218 .end = DMOV_HSUART2_RX_CHAN,
219 .name = "uartdm_channels",
220 .flags = IORESOURCE_DMA,
221 },
222 {
223 .start = DMOV_HSUART2_TX_CRCI,
224 .end = DMOV_HSUART2_RX_CRCI,
225 .name = "uartdm_crci",
226 .flags = IORESOURCE_DMA,
227 },
228};
229
230static u64 msm_uart_dm2_dma_mask = DMA_BIT_MASK(32);
231
232struct platform_device msm_device_uart_dm2 = {
233 .name = "msm_serial_hs",
234 .id = 1,
235 .num_resources = ARRAY_SIZE(msm_uart2_dm_resources),
236 .resource = msm_uart2_dm_resources,
237 .dev = {
238 .dma_mask = &msm_uart_dm2_dma_mask,
239 .coherent_dma_mask = DMA_BIT_MASK(32),
240 },
241};
242
243#define MSM_I2C_SIZE SZ_4K
244#define MSM_I2C_PHYS 0xACD00000
245#define MSM_I2C_2_PHYS 0xACF00000
246static struct resource resources_i2c_2[] = {
247 {
248 .start = MSM_I2C_2_PHYS,
249 .end = MSM_I2C_2_PHYS + MSM_I2C_SIZE - 1,
250 .flags = IORESOURCE_MEM,
251 },
252 {
253 .start = INT_PWB_I2C_2,
254 .end = INT_PWB_I2C_2,
255 .flags = IORESOURCE_IRQ,
256 },
257};
258
259struct platform_device msm_device_i2c_2 = {
260 .name = "msm_i2c",
261 .id = 2,
262 .num_resources = ARRAY_SIZE(resources_i2c_2),
263 .resource = resources_i2c_2,
264};
265
266static struct resource resources_i2c[] = {
267 {
268 .start = MSM_I2C_PHYS,
269 .end = MSM_I2C_PHYS + MSM_I2C_SIZE - 1,
270 .flags = IORESOURCE_MEM,
271 },
272 {
273 .start = INT_PWB_I2C,
274 .end = INT_PWB_I2C,
275 .flags = IORESOURCE_IRQ,
276 },
277};
278
279struct platform_device msm_device_i2c = {
280 .name = "msm_i2c",
281 .id = 0,
282 .num_resources = ARRAY_SIZE(resources_i2c),
283 .resource = resources_i2c,
284};
285
286#define MSM_QUP_PHYS 0xA8301000
287#define MSM_GSBI_QUP_I2C_PHYS 0xA8300000
288#define MSM_QUP_SIZE SZ_4K
289static struct resource resources_qup[] = {
290 {
291 .name = "qup_phys_addr",
292 .start = MSM_QUP_PHYS,
293 .end = MSM_QUP_PHYS + MSM_QUP_SIZE - 1,
294 .flags = IORESOURCE_MEM,
295 },
296 {
297 .name = "gsbi_qup_i2c_addr",
298 .start = MSM_GSBI_QUP_I2C_PHYS,
299 .end = MSM_GSBI_QUP_I2C_PHYS + 4 - 1,
300 .flags = IORESOURCE_MEM,
301 },
302 {
303 .name = "qup_in_intr",
304 .start = INT_PWB_QUP_IN,
305 .end = INT_PWB_QUP_IN,
306 .flags = IORESOURCE_IRQ,
307 },
308 {
309 .name = "qup_out_intr",
310 .start = INT_PWB_QUP_OUT,
311 .end = INT_PWB_QUP_OUT,
312 .flags = IORESOURCE_IRQ,
313 },
314 {
315 .name = "qup_err_intr",
316 .start = INT_PWB_QUP_ERR,
317 .end = INT_PWB_QUP_ERR,
318 .flags = IORESOURCE_IRQ,
319 },
320};
321
322struct platform_device qup_device_i2c = {
323 .name = "qup_i2c",
324 .id = 4,
325 .num_resources = ARRAY_SIZE(resources_qup),
326 .resource = resources_qup,
327};
328
Anirudh Ghayal9d9cdc22011-10-10 17:17:07 +0530329#ifdef CONFIG_MSM_SSBI
330#define MSM_SSBI_PMIC1_PHYS 0xAD900000
331static struct resource msm_ssbi_pmic1_resources[] = {
332 {
333 .start = MSM_SSBI_PMIC1_PHYS,
334 .end = MSM_SSBI_PMIC1_PHYS + SZ_4K - 1,
335 .flags = IORESOURCE_MEM,
336 },
337};
338
339struct platform_device msm_device_ssbi_pmic1 = {
340 .name = "msm_ssbi",
341 .id = 0,
342 .resource = msm_ssbi_pmic1_resources,
343 .num_resources = ARRAY_SIZE(msm_ssbi_pmic1_resources),
344};
345#endif
346
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700347#ifdef CONFIG_I2C_SSBI
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700348#define MSM_SSBI7_PHYS 0xAC800000
349static struct resource msm_ssbi7_resources[] = {
350 {
351 .name = "ssbi_base",
352 .start = MSM_SSBI7_PHYS,
353 .end = MSM_SSBI7_PHYS + SZ_4K - 1,
354 .flags = IORESOURCE_MEM,
355 },
356};
357
358struct platform_device msm_device_ssbi7 = {
359 .name = "i2c_ssbi",
360 .id = 7,
361 .num_resources = ARRAY_SIZE(msm_ssbi7_resources),
362 .resource = msm_ssbi7_resources,
363};
364#endif /* CONFIG_I2C_SSBI */
365
366#define MSM_HSUSB_PHYS 0xA3600000
367static struct resource resources_hsusb_otg[] = {
Pavankumar Kondeti5155e2c2010-12-08 13:37:08 +0530368 {
369 .start = MSM_HSUSB_PHYS,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700370 .end = MSM_HSUSB_PHYS + SZ_1K - 1,
Pavankumar Kondeti5155e2c2010-12-08 13:37:08 +0530371 .flags = IORESOURCE_MEM,
372 },
373 {
374 .start = INT_USB_HS,
375 .end = INT_USB_HS,
376 .flags = IORESOURCE_IRQ,
377 },
378};
379
Pavankumar Kondeti5155e2c2010-12-08 13:37:08 +0530380static u64 dma_mask = 0xffffffffULL;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700381struct platform_device msm_device_hsusb_otg = {
382 .name = "msm_hsusb_otg",
383 .id = -1,
384 .num_resources = ARRAY_SIZE(resources_hsusb_otg),
385 .resource = resources_hsusb_otg,
386 .dev = {
387 .dma_mask = &dma_mask,
388 .coherent_dma_mask = 0xffffffffULL,
389 },
390};
391
392static struct resource resources_hsusb_peripheral[] = {
393 {
394 .start = MSM_HSUSB_PHYS,
395 .end = MSM_HSUSB_PHYS + SZ_1K - 1,
396 .flags = IORESOURCE_MEM,
397 },
398 {
399 .start = INT_USB_HS,
400 .end = INT_USB_HS,
401 .flags = IORESOURCE_IRQ,
402 },
403};
404
405static struct resource resources_gadget_peripheral[] = {
406 {
407 .start = MSM_HSUSB_PHYS,
408 .end = MSM_HSUSB_PHYS + SZ_1K - 1,
409 .flags = IORESOURCE_MEM,
410 },
411 {
412 .start = INT_USB_HS,
413 .end = INT_USB_HS,
414 .flags = IORESOURCE_IRQ,
415 },
416};
417
418struct platform_device msm_device_hsusb_peripheral = {
419 .name = "msm_hsusb_peripheral",
420 .id = -1,
421 .num_resources = ARRAY_SIZE(resources_hsusb_peripheral),
422 .resource = resources_hsusb_peripheral,
423 .dev = {
424 .dma_mask = &dma_mask,
425 .coherent_dma_mask = 0xffffffffULL,
426 },
427};
428
429struct platform_device msm_device_gadget_peripheral = {
430 .name = "msm_hsusb",
431 .id = -1,
432 .num_resources = ARRAY_SIZE(resources_gadget_peripheral),
433 .resource = resources_gadget_peripheral,
434 .dev = {
435 .dma_mask = &dma_mask,
436 .coherent_dma_mask = 0xffffffffULL,
437 },
438};
439
Pavankumar Kondeti5155e2c2010-12-08 13:37:08 +0530440static struct resource resources_hsusb_host[] = {
441 {
442 .start = MSM_HSUSB_PHYS,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700443 .end = MSM_HSUSB_PHYS + SZ_1K - 1,
Pavankumar Kondeti5155e2c2010-12-08 13:37:08 +0530444 .flags = IORESOURCE_MEM,
445 },
446 {
447 .start = INT_USB_HS,
448 .end = INT_USB_HS,
449 .flags = IORESOURCE_IRQ,
450 },
451};
452
453struct platform_device msm_device_hsusb_host = {
454 .name = "msm_hsusb_host",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700455 .id = 0,
Pavankumar Kondeti5155e2c2010-12-08 13:37:08 +0530456 .num_resources = ARRAY_SIZE(resources_hsusb_host),
457 .resource = resources_hsusb_host,
458 .dev = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700459 .dma_mask = &dma_mask,
460 .coherent_dma_mask = 0xffffffffULL,
Pavankumar Kondeti5155e2c2010-12-08 13:37:08 +0530461 },
462};
463
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700464static struct platform_device *msm_host_devices[] = {
465 &msm_device_hsusb_host,
Daniel Walker10932762010-05-12 12:02:25 -0700466};
467
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700468int msm_add_host(unsigned int host, struct msm_usb_host_platform_data *plat)
469{
470 struct platform_device *pdev;
Daniel Walker10932762010-05-12 12:02:25 -0700471
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700472 pdev = msm_host_devices[host];
473 if (!pdev)
474 return -ENODEV;
475 pdev->dev.platform_data = plat;
476 return platform_device_register(pdev);
477}
478
479struct platform_device asoc_msm_pcm = {
480 .name = "msm-dsp-audio",
481 .id = 0,
482};
483
484struct platform_device asoc_msm_dai0 = {
485 .name = "msm-codec-dai",
486 .id = 0,
487};
488
489struct platform_device asoc_msm_dai1 = {
490 .name = "msm-cpu-dai",
491 .id = 0,
492};
493
494#if defined (CONFIG_SND_MSM_MVS_DAI_SOC)
495struct platform_device asoc_msm_mvs = {
496 .name = "msm-mvs-audio",
497 .id = 0,
498};
499
500struct platform_device asoc_mvs_dai0 = {
501 .name = "mvs-codec-dai",
502 .id = 0,
503};
504
505struct platform_device asoc_mvs_dai1 = {
506 .name = "mvs-cpu-dai",
507 .id = 0,
508};
509#endif
510
511#define MSM_NAND_PHYS 0xA0200000
512#define MSM_NANDC01_PHYS 0xA0240000
513#define MSM_NANDC10_PHYS 0xA0280000
514#define MSM_NANDC11_PHYS 0xA02C0000
515#define EBI2_REG_BASE 0xA0000000
516static struct resource resources_nand[] = {
517 [0] = {
518 .name = "msm_nand_dmac",
519 .start = DMOV_NAND_CHAN,
520 .end = DMOV_NAND_CHAN,
521 .flags = IORESOURCE_DMA,
522 },
523 [1] = {
524 .name = "msm_nand_phys",
525 .start = MSM_NAND_PHYS,
526 .end = MSM_NAND_PHYS + 0x7FF,
527 .flags = IORESOURCE_MEM,
528 },
529 [2] = {
530 .name = "msm_nandc01_phys",
531 .start = MSM_NANDC01_PHYS,
532 .end = MSM_NANDC01_PHYS + 0x7FF,
533 .flags = IORESOURCE_MEM,
534 },
535 [3] = {
536 .name = "msm_nandc10_phys",
537 .start = MSM_NANDC10_PHYS,
538 .end = MSM_NANDC10_PHYS + 0x7FF,
539 .flags = IORESOURCE_MEM,
540 },
541 [4] = {
542 .name = "msm_nandc11_phys",
543 .start = MSM_NANDC11_PHYS,
544 .end = MSM_NANDC11_PHYS + 0x7FF,
545 .flags = IORESOURCE_MEM,
546 },
547 [5] = {
548 .name = "ebi2_reg_base",
549 .start = EBI2_REG_BASE,
550 .end = EBI2_REG_BASE + 0x60,
551 .flags = IORESOURCE_MEM,
552 },
553};
554
555static struct resource resources_otg[] = {
556 {
557 .start = MSM_HSUSB_PHYS,
558 .end = MSM_HSUSB_PHYS + SZ_1K - 1,
559 .flags = IORESOURCE_MEM,
560 },
561 {
562 .start = INT_USB_HS,
563 .end = INT_USB_HS,
564 .flags = IORESOURCE_IRQ,
565 },
566 {
567 .name = "vbus_on",
Anirudh Ghayalc2019332011-11-12 06:29:10 +0530568 .start = PMIC8058_IRQ_BASE + PM8058_CHGVAL_IRQ,
569 .end = PMIC8058_IRQ_BASE + PM8058_CHGVAL_IRQ,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700570 .flags = IORESOURCE_IRQ,
571 },
572};
573
574struct platform_device msm_device_otg = {
575 .name = "msm_otg",
576 .id = -1,
577 .num_resources = ARRAY_SIZE(resources_otg),
578 .resource = resources_otg,
579 .dev = {
580 .coherent_dma_mask = 0xffffffffULL,
581 },
582};
583
584struct flash_platform_data msm_nand_data = {
585 .parts = NULL,
586 .nr_parts = 0,
587 .interleave = 0,
588};
589
590struct platform_device msm_device_nand = {
591 .name = "msm_nand",
592 .id = -1,
593 .num_resources = ARRAY_SIZE(resources_nand),
594 .resource = resources_nand,
595 .dev = {
596 .platform_data = &msm_nand_data,
597 },
598};
599
Murali Nalajala2a0bbda2012-03-28 12:12:54 +0530600static struct msm_pm_irq_calls msm7x30_pm_irq_calls = {
601 .irq_pending = msm_irq_pending,
602 .idle_sleep_allowed = msm_irq_idle_sleep_allowed,
603 .enter_sleep1 = msm_irq_enter_sleep1,
604 .enter_sleep2 = msm_irq_enter_sleep2,
605 .exit_sleep1 = msm_irq_exit_sleep1,
606 .exit_sleep2 = msm_irq_exit_sleep2,
607 .exit_sleep3 = msm_irq_exit_sleep3,
608};
609
610void msm_pm_register_irqs(void)
611{
612 msm_pm_set_irq_extns(&msm7x30_pm_irq_calls);
613}
614
Angshuman Sarkarbad32df2012-02-01 19:52:52 +0530615static struct resource smd_resource[] = {
616 {
617 .name = "a9_m2a_0",
618 .start = INT_A9_M2A_0,
619 .flags = IORESOURCE_IRQ,
620 },
621 {
622 .name = "a9_m2a_5",
623 .start = INT_A9_M2A_5,
624 .flags = IORESOURCE_IRQ,
625 },
626 {
627 .name = "adsp_a11_smsm",
628 .start = INT_ADSP_A11,
629 .flags = IORESOURCE_IRQ,
630 },
631};
632
633static struct smd_subsystem_config smd_config_list[] = {
634 {
635 .irq_config_id = SMD_MODEM,
636 .subsys_name = "modem",
637 .edge = SMD_APPS_MODEM,
638
639 .smd_int.irq_name = "a9_m2a_0",
640 .smd_int.flags = IRQF_TRIGGER_RISING,
641 .smd_int.irq_id = -1,
642 .smd_int.device_name = "smd_dev",
643 .smd_int.dev_id = 0,
644
645 .smd_int.out_bit_pos = 1 << 0,
Taniya Das298de8c2012-02-16 11:45:31 +0530646 .smd_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
Angshuman Sarkarbad32df2012-02-01 19:52:52 +0530647 .smd_int.out_offset = 0x8,
648
649 .smsm_int.irq_name = "a9_m2a_5",
650 .smsm_int.flags = IRQF_TRIGGER_RISING,
651 .smsm_int.irq_id = -1,
652 .smsm_int.device_name = "smd_dev",
653 .smsm_int.dev_id = 0,
654
655 .smsm_int.out_bit_pos = 1 << 5,
Taniya Das298de8c2012-02-16 11:45:31 +0530656 .smsm_int.out_base = (void __iomem *)MSM_APCS_GCC_BASE,
Angshuman Sarkarbad32df2012-02-01 19:52:52 +0530657 .smsm_int.out_offset = 0x8,
658
659 }
660};
661
662static struct smd_platform smd_platform_data = {
663 .num_ss_configs = ARRAY_SIZE(smd_config_list),
664 .smd_ss_configs = smd_config_list,
665};
666
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700667struct platform_device msm_device_smd = {
668 .name = "msm_smd",
669 .id = -1,
Angshuman Sarkarbad32df2012-02-01 19:52:52 +0530670 .resource = smd_resource,
671 .num_resources = ARRAY_SIZE(smd_resource),
672 .dev = {
673 .platform_data = &smd_platform_data,
674 }
675
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700676};
677
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700678static struct resource msm_dmov_resource[] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700679 {
680 .start = INT_ADM_AARM,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700681 .flags = IORESOURCE_IRQ,
682 },
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700683 {
684 .start = 0xAC400000,
685 .end = 0xAC400000 + SZ_4K - 1,
686 .flags = IORESOURCE_MEM,
687 },
688};
689
690static struct msm_dmov_pdata msm_dmov_pdata = {
691 .sd = 2,
692 .sd_size = 0x400,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700693};
694
695struct platform_device msm_device_dmov = {
696 .name = "msm_dmov",
697 .id = -1,
698 .resource = msm_dmov_resource,
699 .num_resources = ARRAY_SIZE(msm_dmov_resource),
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700700 .dev = {
701 .platform_data = &msm_dmov_pdata,
702 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700703};
704
705#define MSM_SDC1_BASE 0xA0400000
706#define MSM_SDC2_BASE 0xA0500000
707#define MSM_SDC3_BASE 0xA3000000
708#define MSM_SDC4_BASE 0xA3100000
709static struct resource resources_sdc1[] = {
710 {
711 .start = MSM_SDC1_BASE,
712 .end = MSM_SDC1_BASE + SZ_4K - 1,
713 .flags = IORESOURCE_MEM,
714 },
715 {
716 .start = INT_SDC1_0,
717 .end = INT_SDC1_1,
718 .flags = IORESOURCE_IRQ,
719 },
720 {
Krishna Konda25786ec2011-07-25 16:21:36 -0700721 .name = "sdcc_dma_chnl",
722 .start = DMOV_SDC1_CHAN,
723 .end = DMOV_SDC1_CHAN,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700724 .flags = IORESOURCE_DMA,
725 },
Krishna Konda25786ec2011-07-25 16:21:36 -0700726 {
727 .name = "sdcc_dma_crci",
728 .start = DMOV_SDC1_CRCI,
729 .end = DMOV_SDC1_CRCI,
730 .flags = IORESOURCE_DMA,
731 }
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700732};
733
734static struct resource resources_sdc2[] = {
735 {
736 .start = MSM_SDC2_BASE,
737 .end = MSM_SDC2_BASE + SZ_4K - 1,
738 .flags = IORESOURCE_MEM,
739 },
740 {
741 .start = INT_SDC2_0,
742 .end = INT_SDC2_1,
743 .flags = IORESOURCE_IRQ,
744 },
745 {
Krishna Konda25786ec2011-07-25 16:21:36 -0700746 .name = "sdcc_dma_chnl",
747 .start = DMOV_SDC2_CHAN,
748 .end = DMOV_SDC2_CHAN,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700749 .flags = IORESOURCE_DMA,
750 },
Krishna Konda25786ec2011-07-25 16:21:36 -0700751 {
752 .name = "sdcc_dma_crci",
753 .start = DMOV_SDC2_CRCI,
754 .end = DMOV_SDC2_CRCI,
755 .flags = IORESOURCE_DMA,
756 }
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700757};
758
759static struct resource resources_sdc3[] = {
760 {
761 .start = MSM_SDC3_BASE,
762 .end = MSM_SDC3_BASE + SZ_4K - 1,
763 .flags = IORESOURCE_MEM,
764 },
765 {
766 .start = INT_SDC3_0,
767 .end = INT_SDC3_1,
768 .flags = IORESOURCE_IRQ,
769 },
770 {
Krishna Konda25786ec2011-07-25 16:21:36 -0700771 .name = "sdcc_dma_chnl",
Pankaj Kumare657b9f2011-10-12 20:11:12 +0530772 .start = DMOV_SDC3_CHAN,
773 .end = DMOV_SDC3_CHAN,
Krishna Konda25786ec2011-07-25 16:21:36 -0700774 .flags = IORESOURCE_DMA,
775 },
776 {
777 .name = "sdcc_dma_crci",
Pankaj Kumare657b9f2011-10-12 20:11:12 +0530778 .start = DMOV_SDC3_CRCI,
779 .end = DMOV_SDC3_CRCI,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700780 .flags = IORESOURCE_DMA,
781 },
782};
783
784static struct resource resources_sdc4[] = {
785 {
786 .start = MSM_SDC4_BASE,
787 .end = MSM_SDC4_BASE + SZ_4K - 1,
788 .flags = IORESOURCE_MEM,
789 },
790 {
791 .start = INT_SDC4_0,
792 .end = INT_SDC4_1,
793 .flags = IORESOURCE_IRQ,
794 },
795 {
Krishna Konda25786ec2011-07-25 16:21:36 -0700796 .name = "sdcc_dma_chnl",
Pankaj Kumare657b9f2011-10-12 20:11:12 +0530797 .start = DMOV_SDC4_CHAN,
798 .end = DMOV_SDC4_CHAN,
Krishna Konda25786ec2011-07-25 16:21:36 -0700799 .flags = IORESOURCE_DMA,
800 },
801 {
802 .name = "sdcc_dma_crci",
Pankaj Kumare657b9f2011-10-12 20:11:12 +0530803 .start = DMOV_SDC4_CRCI,
804 .end = DMOV_SDC4_CRCI,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700805 .flags = IORESOURCE_DMA,
806 },
807};
808
809struct platform_device msm_device_sdc1 = {
810 .name = "msm_sdcc",
811 .id = 1,
812 .num_resources = ARRAY_SIZE(resources_sdc1),
813 .resource = resources_sdc1,
814 .dev = {
815 .coherent_dma_mask = 0xffffffff,
816 },
817};
818
819struct platform_device msm_device_sdc2 = {
820 .name = "msm_sdcc",
821 .id = 2,
822 .num_resources = ARRAY_SIZE(resources_sdc2),
823 .resource = resources_sdc2,
824 .dev = {
825 .coherent_dma_mask = 0xffffffff,
826 },
827};
828
829struct platform_device msm_device_sdc3 = {
830 .name = "msm_sdcc",
831 .id = 3,
832 .num_resources = ARRAY_SIZE(resources_sdc3),
833 .resource = resources_sdc3,
834 .dev = {
835 .coherent_dma_mask = 0xffffffff,
836 },
837};
838
839struct platform_device msm_device_sdc4 = {
840 .name = "msm_sdcc",
841 .id = 4,
842 .num_resources = ARRAY_SIZE(resources_sdc4),
843 .resource = resources_sdc4,
844 .dev = {
845 .coherent_dma_mask = 0xffffffff,
846 },
847};
848
849static struct platform_device *msm_sdcc_devices[] __initdata = {
850 &msm_device_sdc1,
851 &msm_device_sdc2,
852 &msm_device_sdc3,
853 &msm_device_sdc4,
854};
855
856int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
857{
858 struct platform_device *pdev;
859
860 if (controller < 1 || controller > 4)
861 return -EINVAL;
862
863 pdev = msm_sdcc_devices[controller-1];
864 pdev->dev.platform_data = plat;
865 return platform_device_register(pdev);
866}
867
868static struct resource msm_vidc_720p_resources[] = {
869 {
870 .start = 0xA3B00000,
871 .end = 0xA3B00000 + SZ_4K - 1,
872 .flags = IORESOURCE_MEM,
873 },
874 {
875 .start = INT_MFC720,
876 .end = INT_MFC720,
877 .flags = IORESOURCE_IRQ,
878 },
879};
880
881struct msm_vidc_platform_data vidc_platform_data = {
Deepak Koturcb4f6722011-10-31 14:06:57 -0700882 .memtype = MEMTYPE_EBI0,
Deepika Pepakayalabebc7622011-12-01 15:13:43 -0800883 .enable_ion = 0,
884 .disable_dmx = 0
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700885};
886
887struct platform_device msm_device_vidc_720p = {
888 .name = "msm_vidc",
889 .id = 0,
890 .num_resources = ARRAY_SIZE(msm_vidc_720p_resources),
891 .resource = msm_vidc_720p_resources,
892 .dev = {
893 .platform_data = &vidc_platform_data,
894 },
895};
896
897#if defined(CONFIG_FB_MSM_MDP40)
898#define MDP_BASE 0xA3F00000
899#define PMDH_BASE 0xAD600000
900#define EMDH_BASE 0xAD700000
901#define TVENC_BASE 0xAD400000
902#else
903#define MDP_BASE 0xAA200000
904#define PMDH_BASE 0xAA600000
905#define EMDH_BASE 0xAA700000
906#define TVENC_BASE 0xAA400000
907#endif
908
909static struct resource msm_mdp_resources[] = {
910 {
911 .name = "mdp",
912 .start = MDP_BASE,
913 .end = MDP_BASE + 0x000F0000 - 1,
914 .flags = IORESOURCE_MEM,
915 },
916 {
917 .start = INT_MDP,
918 .end = INT_MDP,
919 .flags = IORESOURCE_IRQ,
920 },
921};
922
923static struct resource msm_mddi_resources[] = {
924 {
925 .name = "pmdh",
926 .start = PMDH_BASE,
927 .end = PMDH_BASE + PAGE_SIZE - 1,
928 .flags = IORESOURCE_MEM,
929 }
930};
931
932static struct resource msm_mddi_ext_resources[] = {
933 {
934 .name = "emdh",
935 .start = EMDH_BASE,
936 .end = EMDH_BASE + PAGE_SIZE - 1,
937 .flags = IORESOURCE_MEM,
938 }
939};
940
941static struct resource msm_ebi2_lcd_resources[] = {
942 {
943 .name = "base",
944 .start = 0xa0d00000,
945 .end = 0xa0d00000 + PAGE_SIZE - 1,
946 .flags = IORESOURCE_MEM,
947 },
948 {
949 .name = "lcd01",
950 .start = 0x98000000,
951 .end = 0x98000000 + 0x80000 - 1,
952 .flags = IORESOURCE_MEM,
953 },
954 {
955 .name = "lcd02",
956 .start = 0x9c000000,
957 .end = 0x9c000000 + 0x80000 - 1,
958 .flags = IORESOURCE_MEM,
959 },
960};
961
962static struct resource msm_tvenc_resources[] = {
963 {
964 .name = "tvenc",
965 .start = TVENC_BASE,
966 .end = TVENC_BASE + PAGE_SIZE - 1,
967 .flags = IORESOURCE_MEM,
968 }
969};
970
971#ifdef CONFIG_FB_MSM_TVOUT
972static struct resource tvout_device_resources[] = {
973 {
974 .name = "tvout_device_irq",
975 .start = INT_TV_ENC,
976 .end = INT_TV_ENC,
977 .flags = IORESOURCE_IRQ,
978 },
979};
980#endif
981
982static struct platform_device msm_mdp_device = {
983 .name = "mdp",
984 .id = 0,
985 .num_resources = ARRAY_SIZE(msm_mdp_resources),
986 .resource = msm_mdp_resources,
987};
988
989static struct platform_device msm_mddi_device = {
990 .name = "mddi",
991 .id = 0,
992 .num_resources = ARRAY_SIZE(msm_mddi_resources),
993 .resource = msm_mddi_resources,
994};
995
996static struct platform_device msm_mddi_ext_device = {
997 .name = "mddi_ext",
998 .id = 0,
999 .num_resources = ARRAY_SIZE(msm_mddi_ext_resources),
1000 .resource = msm_mddi_ext_resources,
1001};
1002
1003static struct platform_device msm_ebi2_lcd_device = {
1004 .name = "ebi2_lcd",
1005 .id = 0,
1006 .num_resources = ARRAY_SIZE(msm_ebi2_lcd_resources),
1007 .resource = msm_ebi2_lcd_resources,
1008};
1009
1010static struct platform_device msm_lcdc_device = {
1011 .name = "lcdc",
1012 .id = 0,
1013};
1014
1015static struct platform_device msm_dtv_device = {
1016 .name = "dtv",
1017 .id = 0,
1018};
1019
1020static struct platform_device msm_tvenc_device = {
1021 .name = "tvenc",
1022 .id = 0,
1023 .num_resources = ARRAY_SIZE(msm_tvenc_resources),
1024 .resource = msm_tvenc_resources,
1025};
1026
1027#ifdef CONFIG_FB_MSM_TVOUT
1028static struct platform_device tvout_msm_device = {
1029 .name = "tvout_device",
1030 .id = 0,
1031 .num_resources = ARRAY_SIZE(tvout_device_resources),
1032 .resource = tvout_device_resources,
1033};
1034#endif
1035
1036/* TSIF begin */
1037#if defined(CONFIG_TSIF) || defined(CONFIG_TSIF_MODULE)
1038
1039#define MSM_TSIF_PHYS (0xa3400000)
1040#define MSM_TSIF_SIZE (0x200)
1041
1042static struct resource tsif_resources[] = {
1043 [0] = {
1044 .flags = IORESOURCE_IRQ,
1045 .start = INT_TSIF,
1046 .end = INT_TSIF,
1047 },
1048 [1] = {
1049 .flags = IORESOURCE_MEM,
1050 .start = MSM_TSIF_PHYS,
1051 .end = MSM_TSIF_PHYS + MSM_TSIF_SIZE - 1,
1052 },
1053 [2] = {
1054 .flags = IORESOURCE_DMA,
1055 .start = DMOV_TSIF_CHAN,
1056 .end = DMOV_TSIF_CRCI,
1057 },
1058};
1059
1060static void tsif_release(struct device *dev)
1061{
1062 dev_info(dev, "release\n");
1063}
1064
1065struct platform_device msm_device_tsif = {
1066 .name = "msm_tsif",
1067 .id = 0,
1068 .num_resources = ARRAY_SIZE(tsif_resources),
1069 .resource = tsif_resources,
1070 .dev = {
1071 .release = tsif_release,
1072 },
1073};
1074#endif /* defined(CONFIG_TSIF) || defined(CONFIG_TSIF_MODULE) */
1075/* TSIF end */
1076
1077
1078
1079#ifdef CONFIG_MSM_ROTATOR
1080static struct resource resources_msm_rotator[] = {
1081 {
1082 .start = 0xA3E00000,
1083 .end = 0xA3F00000 - 1,
1084 .flags = IORESOURCE_MEM,
1085 },
1086 {
1087 .start = INT_ROTATOR,
1088 .end = INT_ROTATOR,
1089 .flags = IORESOURCE_IRQ,
1090 },
1091};
1092
1093static struct msm_rot_clocks rotator_clocks[] = {
1094 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001095 .clk_name = "core_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001096 .clk_type = ROTATOR_CORE_CLK,
1097 .clk_rate = 0,
1098 },
1099 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001100 .clk_name = "iface_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001101 .clk_type = ROTATOR_PCLK,
1102 .clk_rate = 0,
1103 },
1104 {
Matt Wagantallbb90da92011-10-25 15:07:52 -07001105 .clk_name = "mem_clk",
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001106 .clk_type = ROTATOR_IMEM_CLK,
1107 .clk_rate = 0,
1108 },
1109};
1110
1111static struct msm_rotator_platform_data rotator_pdata = {
1112 .number_of_clocks = ARRAY_SIZE(rotator_clocks),
1113 .hardware_version_number = 0x1000303,
1114 .rotator_clks = rotator_clocks,
1115 .regulator_name = "fs_rot",
1116};
1117
1118struct platform_device msm_rotator_device = {
1119 .name = "msm_rotator",
1120 .id = 0,
1121 .num_resources = ARRAY_SIZE(resources_msm_rotator),
1122 .resource = resources_msm_rotator,
1123 .dev = {
1124 .platform_data = &rotator_pdata,
1125 },
1126};
1127#endif
1128
1129static void __init msm_register_device(struct platform_device *pdev, void *data)
1130{
1131 int ret;
1132
1133 pdev->dev.platform_data = data;
1134
1135 ret = platform_device_register(pdev);
1136 if (ret)
1137 dev_err(&pdev->dev,
1138 "%s: platform_device_register() failed = %d\n",
1139 __func__, ret);
1140}
1141
1142void __init msm_fb_register_device(char *name, void *data)
1143{
1144 if (!strncmp(name, "mdp", 3))
1145 msm_register_device(&msm_mdp_device, data);
1146 else if (!strncmp(name, "pmdh", 4))
1147 msm_register_device(&msm_mddi_device, data);
1148 else if (!strncmp(name, "emdh", 4))
1149 msm_register_device(&msm_mddi_ext_device, data);
1150 else if (!strncmp(name, "ebi2", 4))
1151 msm_register_device(&msm_ebi2_lcd_device, data);
1152 else if (!strncmp(name, "tvenc", 5))
1153 msm_register_device(&msm_tvenc_device, data);
1154 else if (!strncmp(name, "lcdc", 4))
1155 msm_register_device(&msm_lcdc_device, data);
1156 else if (!strncmp(name, "dtv", 3))
1157 msm_register_device(&msm_dtv_device, data);
1158#ifdef CONFIG_FB_MSM_TVOUT
1159 else if (!strncmp(name, "tvout_device", 12))
1160 msm_register_device(&tvout_msm_device, data);
1161#endif
1162 else
1163 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
1164}
1165
1166static struct platform_device msm_camera_device = {
1167 .name = "msm_camera",
1168 .id = 0,
1169};
1170
1171void __init msm_camera_register_device(void *res, uint32_t num,
1172 void *data)
1173{
1174 msm_camera_device.num_resources = num;
1175 msm_camera_device.resource = res;
1176
1177 msm_register_device(&msm_camera_device, data);
1178}
1179
1180struct resource kgsl_3d0_resources[] = {
1181 {
1182 .name = KGSL_3D0_REG_MEMORY,
1183 .start = 0xA3500000, /* 3D GRP address */
1184 .end = 0xA351ffff,
1185 .flags = IORESOURCE_MEM,
1186 },
1187 {
1188 .name = KGSL_3D0_IRQ,
1189 .start = INT_GRP_3D,
1190 .end = INT_GRP_3D,
1191 .flags = IORESOURCE_IRQ,
1192 },
1193};
1194
1195static struct kgsl_device_platform_data kgsl_3d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06001196 .pwrlevel = {
1197 {
1198 .gpu_freq = 245760000,
1199 .bus_freq = 192000000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001200 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06001201 {
1202 .gpu_freq = 192000000,
1203 .bus_freq = 152000000,
1204 },
1205 {
1206 .gpu_freq = 192000000,
1207 .bus_freq = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001208 },
1209 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06001210 .init_level = 0,
1211 .num_levels = 3,
1212 .set_grp_async = set_grp3d_async,
1213 .idle_timeout = HZ/20,
1214 .nap_allowed = true,
Kedar Joshic11d0982012-02-07 10:59:49 +05301215 .idle_needed = true,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06001216 .clk_map = KGSL_CLK_SRC | KGSL_CLK_CORE |
1217 KGSL_CLK_IFACE | KGSL_CLK_MEM,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001218};
1219
1220struct platform_device msm_kgsl_3d0 = {
1221 .name = "kgsl-3d0",
1222 .id = 0,
1223 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
1224 .resource = kgsl_3d0_resources,
1225 .dev = {
1226 .platform_data = &kgsl_3d0_pdata,
1227 },
1228};
1229
1230static struct resource kgsl_2d0_resources[] = {
1231 {
1232 .name = KGSL_2D0_REG_MEMORY,
1233 .start = 0xA3900000, /* Z180 base address */
1234 .end = 0xA3900FFF,
1235 .flags = IORESOURCE_MEM,
1236 },
1237 {
1238 .name = KGSL_2D0_IRQ,
1239 .start = INT_GRP_2D,
1240 .end = INT_GRP_2D,
1241 .flags = IORESOURCE_IRQ,
1242 },
1243};
1244
1245static struct kgsl_device_platform_data kgsl_2d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06001246 .pwrlevel = {
1247 {
1248 .gpu_freq = 0,
1249 .bus_freq = 192000000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001250 },
1251 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06001252 .init_level = 0,
1253 .num_levels = 1,
1254 /* HW workaround, run Z180 SYNC @ 192 MHZ */
1255 .set_grp_async = NULL,
1256 .idle_timeout = HZ/10,
1257 .nap_allowed = true,
Kedar Joshic11d0982012-02-07 10:59:49 +05301258 .idle_needed = true,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -06001259 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001260};
1261
1262struct platform_device msm_kgsl_2d0 = {
1263 .name = "kgsl-2d0",
1264 .id = 0,
1265 .num_resources = ARRAY_SIZE(kgsl_2d0_resources),
1266 .resource = kgsl_2d0_resources,
1267 .dev = {
1268 .platform_data = &kgsl_2d0_pdata,
1269 },
1270};
1271
1272struct platform_device *msm_footswitch_devices[] = {
1273 FS_PCOM(FS_GFX2D0, "fs_gfx2d0"),
1274 FS_PCOM(FS_GFX3D, "fs_gfx3d"),
1275 FS_PCOM(FS_MDP, "fs_mdp"),
1276 FS_PCOM(FS_MFC, "fs_mfc"),
1277 FS_PCOM(FS_ROT, "fs_rot"),
1278 FS_PCOM(FS_VFE, "fs_vfe"),
1279 FS_PCOM(FS_VPE, "fs_vpe"),
1280};
1281unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
Taniya Das2e948192011-12-20 11:15:13 +05301282
1283static struct resource gpio_resources[] = {
1284 {
1285 .start = INT_GPIO_GROUP1,
1286 .flags = IORESOURCE_IRQ,
1287 },
1288 {
1289 .start = INT_GPIO_GROUP2,
1290 .flags = IORESOURCE_IRQ,
1291 },
1292};
1293
1294static struct platform_device msm_device_gpio = {
1295 .name = "msmgpio",
1296 .id = -1,
1297 .resource = gpio_resources,
1298 .num_resources = ARRAY_SIZE(gpio_resources),
1299};
1300
1301static int __init msm7630_init_gpio(void)
1302{
1303 platform_device_register(&msm_device_gpio);
1304 return 0;
1305}
1306
1307postcore_initcall(msm7630_init_gpio);