blob: bd0376e61b2e51cac64db5d362ea30a891951cd4 [file] [log] [blame]
Taniya Das2e948192011-12-20 11:15:13 +05301/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07002 *
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#include <linux/kernel.h>
14#include <linux/platform_device.h>
15#include <linux/dma-mapping.h>
16#include <linux/msm_kgsl.h>
17#include <linux/regulator/machine.h>
Taniya Das2e948192011-12-20 11:15:13 +053018#include <linux/init.h>
Taniya Das43bcdd62011-12-02 17:33:27 +053019#include <linux/irq.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070020#include <mach/irqs.h>
21#include <mach/msm_iomap.h>
22#include <mach/board.h>
23#include <mach/dma.h>
24#include <mach/dal_axi.h>
25#include <asm/mach/flash.h>
Taniya Das43bcdd62011-12-02 17:33:27 +053026#include <asm/hardware/gic.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070027#include <asm/hardware/cache-l2x0.h>
28#include <asm/mach/mmc.h>
29#include <mach/rpc_hsusb.h>
30#include <mach/socinfo.h>
31
32#include "devices.h"
33#include "devices-msm7x2xa.h"
34#include "footswitch.h"
Matt Wagantall6d9ebee2011-08-26 12:15:24 -070035#include "acpuclock.h"
Murali Nalajala41786ab2012-03-06 10:47:32 +053036#include "spm.h"
Taniya Dasfcb35002012-03-09 15:28:12 +053037#include "mpm-8625.h"
Murali Nalajala2a0bbda2012-03-28 12:12:54 +053038#include "irq.h"
39#include "pm.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070040
41/* Address of GSBI blocks */
42#define MSM_GSBI0_PHYS 0xA1200000
43#define MSM_GSBI1_PHYS 0xA1300000
44
45/* GSBI QUPe devices */
46#define MSM_GSBI0_QUP_PHYS (MSM_GSBI0_PHYS + 0x80000)
47#define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000)
48
49static struct resource gsbi0_qup_i2c_resources[] = {
50 {
51 .name = "qup_phys_addr",
52 .start = MSM_GSBI0_QUP_PHYS,
53 .end = MSM_GSBI0_QUP_PHYS + SZ_4K - 1,
54 .flags = IORESOURCE_MEM,
55 },
56 {
57 .name = "gsbi_qup_i2c_addr",
58 .start = MSM_GSBI0_PHYS,
59 .end = MSM_GSBI0_PHYS + SZ_4K - 1,
60 .flags = IORESOURCE_MEM,
61 },
62 {
63 .name = "qup_err_intr",
64 .start = INT_PWB_I2C,
65 .end = INT_PWB_I2C,
66 .flags = IORESOURCE_IRQ,
67 },
68};
69
70/* Use GSBI0 QUP for /dev/i2c-0 */
71struct platform_device msm_gsbi0_qup_i2c_device = {
72 .name = "qup_i2c",
73 .id = MSM_GSBI0_QUP_I2C_BUS_ID,
74 .num_resources = ARRAY_SIZE(gsbi0_qup_i2c_resources),
75 .resource = gsbi0_qup_i2c_resources,
76};
77
78static struct resource gsbi1_qup_i2c_resources[] = {
79 {
80 .name = "qup_phys_addr",
81 .start = MSM_GSBI1_QUP_PHYS,
82 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
83 .flags = IORESOURCE_MEM,
84 },
85 {
86 .name = "gsbi_qup_i2c_addr",
87 .start = MSM_GSBI1_PHYS,
88 .end = MSM_GSBI1_PHYS + SZ_4K - 1,
89 .flags = IORESOURCE_MEM,
90 },
91 {
92 .name = "qup_err_intr",
93 .start = INT_ARM11_DMA,
94 .end = INT_ARM11_DMA,
95 .flags = IORESOURCE_IRQ,
96 },
97};
98
99/* Use GSBI1 QUP for /dev/i2c-1 */
100struct platform_device msm_gsbi1_qup_i2c_device = {
101 .name = "qup_i2c",
102 .id = MSM_GSBI1_QUP_I2C_BUS_ID,
103 .num_resources = ARRAY_SIZE(gsbi1_qup_i2c_resources),
104 .resource = gsbi1_qup_i2c_resources,
105};
106
107#define MSM_HSUSB_PHYS 0xA0800000
108static struct resource resources_hsusb_otg[] = {
109 {
110 .start = MSM_HSUSB_PHYS,
111 .end = MSM_HSUSB_PHYS + SZ_1K - 1,
112 .flags = IORESOURCE_MEM,
113 },
114 {
115 .start = INT_USB_HS,
116 .end = INT_USB_HS,
117 .flags = IORESOURCE_IRQ,
118 },
119};
120
121static u64 dma_mask = 0xffffffffULL;
122struct platform_device msm_device_otg = {
123 .name = "msm_otg",
124 .id = -1,
125 .num_resources = ARRAY_SIZE(resources_hsusb_otg),
126 .resource = resources_hsusb_otg,
127 .dev = {
128 .dma_mask = &dma_mask,
129 .coherent_dma_mask = 0xffffffffULL,
130 },
131};
132
133static struct resource resources_gadget_peripheral[] = {
134 {
135 .start = MSM_HSUSB_PHYS,
136 .end = MSM_HSUSB_PHYS + SZ_1K - 1,
137 .flags = IORESOURCE_MEM,
138 },
139 {
140 .start = INT_USB_HS,
141 .end = INT_USB_HS,
142 .flags = IORESOURCE_IRQ,
143 },
144};
145
146struct platform_device msm_device_gadget_peripheral = {
147 .name = "msm_hsusb",
148 .id = -1,
149 .num_resources = ARRAY_SIZE(resources_gadget_peripheral),
150 .resource = resources_gadget_peripheral,
151 .dev = {
152 .dma_mask = &dma_mask,
153 .coherent_dma_mask = 0xffffffffULL,
154 },
155};
156
157static struct resource resources_hsusb_host[] = {
158 {
159 .start = MSM_HSUSB_PHYS,
160 .end = MSM_HSUSB_PHYS + SZ_1K - 1,
161 .flags = IORESOURCE_MEM,
162 },
163 {
164 .start = INT_USB_HS,
165 .end = INT_USB_HS,
166 .flags = IORESOURCE_IRQ,
167 },
168};
169
170struct platform_device msm_device_hsusb_host = {
171 .name = "msm_hsusb_host",
172 .id = 0,
173 .num_resources = ARRAY_SIZE(resources_hsusb_host),
174 .resource = resources_hsusb_host,
175 .dev = {
176 .dma_mask = &dma_mask,
177 .coherent_dma_mask = 0xffffffffULL,
178 },
179};
180
181static struct platform_device *msm_host_devices[] = {
182 &msm_device_hsusb_host,
183};
184
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700185static struct resource msm_dmov_resource[] = {
186 {
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700187 .start = INT_ADM_AARM,
188 .flags = IORESOURCE_IRQ,
189 },
190 {
191 .start = 0xA9700000,
192 .end = 0xA9700000 + SZ_4K - 1,
193 .flags = IORESOURCE_MEM,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700194 },
195};
196
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700197static struct msm_dmov_pdata msm_dmov_pdata = {
198 .sd = 3,
199 .sd_size = 0x400,
200};
201
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700202struct platform_device msm_device_dmov = {
Jeff Ohlstein905f1ce2011-09-07 18:50:18 -0700203 .name = "msm_dmov",
204 .id = -1,
205 .resource = msm_dmov_resource,
206 .num_resources = ARRAY_SIZE(msm_dmov_resource),
207 .dev = {
208 .platform_data = &msm_dmov_pdata,
209 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700210};
211
212struct platform_device msm_device_smd = {
213 .name = "msm_smd",
214 .id = -1,
215};
216
Angshuman Sarkarfb1cce92012-02-21 15:20:43 +0530217static struct resource smd_8625_resource[] = {
218 {
219 .name = "a9_m2a_0",
220 .start = MSM8625_INT_A9_M2A_0,
221 .flags = IORESOURCE_IRQ,
222 },
223 {
224 .name = "a9_m2a_5",
225 .start = MSM8625_INT_A9_M2A_5,
226 .flags = IORESOURCE_IRQ,
227 },
228};
229
230static struct smd_subsystem_config smd_8625_config_list[] = {
231 {
232 .irq_config_id = SMD_MODEM,
233 .subsys_name = "modem",
234 .edge = SMD_APPS_MODEM,
235
236 .smd_int.irq_name = "a9_m2a_0",
237 .smd_int.flags = IRQF_TRIGGER_RISING,
238 .smd_int.irq_id = -1,
239 .smd_int.device_name = "smd_dev",
240 .smd_int.dev_id = 0,
241
242 .smd_int.out_bit_pos = 1,
243 .smd_int.out_base = (void __iomem *)MSM_CSR_BASE,
244 .smd_int.out_offset = 0x400 + (0) * 4,
245
246 .smsm_int.irq_name = "a9_m2a_5",
247 .smsm_int.flags = IRQF_TRIGGER_RISING,
248 .smsm_int.irq_id = -1,
249 .smsm_int.device_name = "smsm_dev",
250 .smsm_int.dev_id = 0,
251
252 .smsm_int.out_bit_pos = 1,
253 .smsm_int.out_base = (void __iomem *)MSM_CSR_BASE,
254 .smsm_int.out_offset = 0x400 + (5) * 4,
255
256 }
257};
258
259static struct smd_platform smd_8625_platform_data = {
260 .num_ss_configs = ARRAY_SIZE(smd_8625_config_list),
261 .smd_ss_configs = smd_8625_config_list,
262};
263
264struct platform_device msm8625_device_smd = {
265 .name = "msm_smd",
266 .id = -1,
267 .resource = smd_8625_resource,
268 .num_resources = ARRAY_SIZE(smd_8625_resource),
269 .dev = {
270 .platform_data = &smd_8625_platform_data,
271 }
272};
273
Laxminath Kasam5faa1ca2012-02-15 12:06:45 +0530274static struct resource resources_adsp[] = {
275 {
276 .start = INT_ADSP_A9_A11,
277 .end = INT_ADSP_A9_A11,
278 .flags = IORESOURCE_IRQ,
279 },
280};
281
282struct platform_device msm_adsp_device = {
283 .name = "msm_adsp",
284 .id = -1,
285 .num_resources = ARRAY_SIZE(resources_adsp),
286 .resource = resources_adsp,
287};
288
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700289static struct resource resources_uart1[] = {
290 {
291 .start = INT_UART1,
292 .end = INT_UART1,
293 .flags = IORESOURCE_IRQ,
294 },
295 {
Taniya Das13b811a2011-12-09 18:33:45 +0530296 .start = MSM7XXX_UART1_PHYS,
297 .end = MSM7XXX_UART1_PHYS + MSM7XXX_UART1_SIZE - 1,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700298 .flags = IORESOURCE_MEM,
299 },
300};
301
302struct platform_device msm_device_uart1 = {
303 .name = "msm_serial",
304 .id = 0,
305 .num_resources = ARRAY_SIZE(resources_uart1),
306 .resource = resources_uart1,
307};
308
309#define MSM_UART1DM_PHYS 0xA0200000
310static struct resource msm_uart1_dm_resources[] = {
311 {
312 .start = MSM_UART1DM_PHYS,
313 .end = MSM_UART1DM_PHYS + PAGE_SIZE - 1,
314 .flags = IORESOURCE_MEM,
315 },
316 {
317 .start = INT_UART1DM_IRQ,
318 .end = INT_UART1DM_IRQ,
319 .flags = IORESOURCE_IRQ,
320 },
321 {
322 .start = INT_UART1DM_RX,
323 .end = INT_UART1DM_RX,
324 .flags = IORESOURCE_IRQ,
325 },
326 {
327 .start = DMOV_HSUART1_TX_CHAN,
328 .end = DMOV_HSUART1_RX_CHAN,
329 .name = "uartdm_channels",
330 .flags = IORESOURCE_DMA,
331 },
332 {
333 .start = DMOV_HSUART1_TX_CRCI,
334 .end = DMOV_HSUART1_RX_CRCI,
335 .name = "uartdm_crci",
336 .flags = IORESOURCE_DMA,
337 },
338};
339
340static u64 msm_uart_dm1_dma_mask = DMA_BIT_MASK(32);
341struct platform_device msm_device_uart_dm1 = {
342 .name = "msm_serial_hs",
343 .id = 0,
344 .num_resources = ARRAY_SIZE(msm_uart1_dm_resources),
345 .resource = msm_uart1_dm_resources,
346 .dev = {
347 .dma_mask = &msm_uart_dm1_dma_mask,
348 .coherent_dma_mask = DMA_BIT_MASK(32),
349 },
350};
351
352#define MSM_UART2DM_PHYS 0xA0300000
353static struct resource msm_uart2dm_resources[] = {
354 {
355 .start = MSM_UART2DM_PHYS,
356 .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
357 .name = "uartdm_resource",
358 .flags = IORESOURCE_MEM,
359 },
360 {
361 .start = INT_UART2DM_IRQ,
362 .end = INT_UART2DM_IRQ,
363 .flags = IORESOURCE_IRQ,
364 },
365};
366
367struct platform_device msm_device_uart_dm2 = {
368 .name = "msm_serial_hsl",
369 .id = 0,
370 .num_resources = ARRAY_SIZE(msm_uart2dm_resources),
371 .resource = msm_uart2dm_resources,
372};
373
374#define MSM_NAND_PHYS 0xA0A00000
375#define MSM_NANDC01_PHYS 0xA0A40000
376#define MSM_NANDC10_PHYS 0xA0A80000
377#define MSM_NANDC11_PHYS 0xA0AC0000
378#define EBI2_REG_BASE 0xA0D00000
379static struct resource resources_nand[] = {
380 [0] = {
381 .name = "msm_nand_dmac",
382 .start = DMOV_NAND_CHAN,
383 .end = DMOV_NAND_CHAN,
384 .flags = IORESOURCE_DMA,
385 },
386 [1] = {
387 .name = "msm_nand_phys",
388 .start = MSM_NAND_PHYS,
389 .end = MSM_NAND_PHYS + 0x7FF,
390 .flags = IORESOURCE_MEM,
391 },
392 [2] = {
393 .name = "msm_nandc01_phys",
394 .start = MSM_NANDC01_PHYS,
395 .end = MSM_NANDC01_PHYS + 0x7FF,
396 .flags = IORESOURCE_MEM,
397 },
398 [3] = {
399 .name = "msm_nandc10_phys",
400 .start = MSM_NANDC10_PHYS,
401 .end = MSM_NANDC10_PHYS + 0x7FF,
402 .flags = IORESOURCE_MEM,
403 },
404 [4] = {
405 .name = "msm_nandc11_phys",
406 .start = MSM_NANDC11_PHYS,
407 .end = MSM_NANDC11_PHYS + 0x7FF,
408 .flags = IORESOURCE_MEM,
409 },
410 [5] = {
411 .name = "ebi2_reg_base",
412 .start = EBI2_REG_BASE,
413 .end = EBI2_REG_BASE + 0x60,
414 .flags = IORESOURCE_MEM,
415 },
416};
417
418struct flash_platform_data msm_nand_data;
419
420struct platform_device msm_device_nand = {
421 .name = "msm_nand",
422 .id = -1,
423 .num_resources = ARRAY_SIZE(resources_nand),
424 .resource = resources_nand,
425 .dev = {
426 .platform_data = &msm_nand_data,
427 },
428};
429
Murali Nalajala2a0bbda2012-03-28 12:12:54 +0530430static struct msm_pm_irq_calls msm7x27a_pm_irq_calls = {
431 .irq_pending = msm_irq_pending,
432 .idle_sleep_allowed = msm_irq_idle_sleep_allowed,
433 .enter_sleep1 = msm_irq_enter_sleep1,
434 .enter_sleep2 = msm_irq_enter_sleep2,
435 .exit_sleep1 = msm_irq_exit_sleep1,
436 .exit_sleep2 = msm_irq_exit_sleep2,
437 .exit_sleep3 = msm_irq_exit_sleep3,
438};
439
440static struct msm_pm_irq_calls msm8625_pm_irq_calls = {
441 .irq_pending = msm_gic_spi_ppi_pending,
442 .idle_sleep_allowed = msm_gic_irq_idle_sleep_allowed,
443 .enter_sleep1 = msm_gic_irq_enter_sleep1,
444 .enter_sleep2 = msm_gic_irq_enter_sleep2,
445 .exit_sleep1 = msm_gic_irq_exit_sleep1,
446 .exit_sleep2 = msm_gic_irq_exit_sleep2,
447 .exit_sleep3 = msm_gic_irq_exit_sleep3,
448};
449
Stephen Boyd986c9632012-04-24 16:31:45 -0700450void __init msm_pm_register_irqs(void)
Murali Nalajala2a0bbda2012-03-28 12:12:54 +0530451{
452 if (cpu_is_msm8625())
453 msm_pm_set_irq_extns(&msm8625_pm_irq_calls);
454 else
455 msm_pm_set_irq_extns(&msm7x27a_pm_irq_calls);
456
457}
458
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700459#define MSM_SDC1_BASE 0xA0400000
460#define MSM_SDC2_BASE 0xA0500000
461#define MSM_SDC3_BASE 0xA0600000
462#define MSM_SDC4_BASE 0xA0700000
463static struct resource resources_sdc1[] = {
464 {
465 .start = MSM_SDC1_BASE,
466 .end = MSM_SDC1_BASE + SZ_4K - 1,
467 .flags = IORESOURCE_MEM,
468 },
469 {
470 .start = INT_SDC1_0,
471 .end = INT_SDC1_1,
472 .flags = IORESOURCE_IRQ,
473 },
474 {
Krishna Konda25786ec2011-07-25 16:21:36 -0700475 .name = "sdcc_dma_chnl",
476 .start = DMOV_SDC1_CHAN,
477 .end = DMOV_SDC1_CHAN,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700478 .flags = IORESOURCE_DMA,
479 },
Krishna Konda25786ec2011-07-25 16:21:36 -0700480 {
481 .name = "sdcc_dma_crci",
482 .start = DMOV_SDC1_CRCI,
483 .end = DMOV_SDC1_CRCI,
484 .flags = IORESOURCE_DMA,
485 }
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700486};
487
488static struct resource resources_sdc2[] = {
489 {
490 .start = MSM_SDC2_BASE,
491 .end = MSM_SDC2_BASE + SZ_4K - 1,
492 .flags = IORESOURCE_MEM,
493 },
494 {
495 .start = INT_SDC2_0,
496 .end = INT_SDC2_1,
497 .flags = IORESOURCE_IRQ,
498 },
499 {
Krishna Konda25786ec2011-07-25 16:21:36 -0700500 .name = "sdcc_dma_chnl",
501 .start = DMOV_SDC2_CHAN,
502 .end = DMOV_SDC2_CHAN,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700503 .flags = IORESOURCE_DMA,
504 },
Krishna Konda25786ec2011-07-25 16:21:36 -0700505 {
506 .name = "sdcc_dma_crci",
507 .start = DMOV_SDC2_CRCI,
508 .end = DMOV_SDC2_CRCI,
509 .flags = IORESOURCE_DMA,
510 }
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700511};
512
513static struct resource resources_sdc3[] = {
514 {
515 .start = MSM_SDC3_BASE,
516 .end = MSM_SDC3_BASE + SZ_4K - 1,
517 .flags = IORESOURCE_MEM,
518 },
519 {
520 .start = INT_SDC3_0,
521 .end = INT_SDC3_1,
522 .flags = IORESOURCE_IRQ,
523 },
524 {
Krishna Konda25786ec2011-07-25 16:21:36 -0700525 .name = "sdcc_dma_chnl",
Sujit Reddy Thumma119bfbb2011-10-12 11:52:21 +0530526 .start = DMOV_SDC3_CHAN,
527 .end = DMOV_SDC3_CHAN,
Krishna Konda25786ec2011-07-25 16:21:36 -0700528 .flags = IORESOURCE_DMA,
529 },
530 {
531 .name = "sdcc_dma_crci",
Sujit Reddy Thumma119bfbb2011-10-12 11:52:21 +0530532 .start = DMOV_SDC3_CRCI,
533 .end = DMOV_SDC3_CRCI,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700534 .flags = IORESOURCE_DMA,
535 },
536};
537
538static struct resource resources_sdc4[] = {
539 {
540 .start = MSM_SDC4_BASE,
541 .end = MSM_SDC4_BASE + SZ_4K - 1,
542 .flags = IORESOURCE_MEM,
543 },
544 {
545 .start = INT_SDC4_0,
546 .end = INT_SDC4_1,
547 .flags = IORESOURCE_IRQ,
548 },
549 {
Krishna Konda25786ec2011-07-25 16:21:36 -0700550 .name = "sdcc_dma_chnl",
Sujit Reddy Thumma119bfbb2011-10-12 11:52:21 +0530551 .start = DMOV_SDC4_CHAN,
552 .end = DMOV_SDC4_CHAN,
Krishna Konda25786ec2011-07-25 16:21:36 -0700553 .flags = IORESOURCE_DMA,
554 },
555 {
556 .name = "sdcc_dma_crci",
Sujit Reddy Thumma119bfbb2011-10-12 11:52:21 +0530557 .start = DMOV_SDC4_CRCI,
558 .end = DMOV_SDC4_CRCI,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700559 .flags = IORESOURCE_DMA,
560 },
561};
562
563struct platform_device msm_device_sdc1 = {
564 .name = "msm_sdcc",
565 .id = 1,
566 .num_resources = ARRAY_SIZE(resources_sdc1),
567 .resource = resources_sdc1,
568 .dev = {
569 .coherent_dma_mask = 0xffffffff,
570 },
571};
572
573struct platform_device msm_device_sdc2 = {
574 .name = "msm_sdcc",
575 .id = 2,
576 .num_resources = ARRAY_SIZE(resources_sdc2),
577 .resource = resources_sdc2,
578 .dev = {
579 .coherent_dma_mask = 0xffffffff,
580 },
581};
582
583struct platform_device msm_device_sdc3 = {
584 .name = "msm_sdcc",
585 .id = 3,
586 .num_resources = ARRAY_SIZE(resources_sdc3),
587 .resource = resources_sdc3,
588 .dev = {
589 .coherent_dma_mask = 0xffffffff,
590 },
591};
592
593struct platform_device msm_device_sdc4 = {
594 .name = "msm_sdcc",
595 .id = 4,
596 .num_resources = ARRAY_SIZE(resources_sdc4),
597 .resource = resources_sdc4,
598 .dev = {
599 .coherent_dma_mask = 0xffffffff,
600 },
601};
602
603static struct platform_device *msm_sdcc_devices[] __initdata = {
604 &msm_device_sdc1,
605 &msm_device_sdc2,
606 &msm_device_sdc3,
607 &msm_device_sdc4,
608};
609
Suresh Vankadara20cd3be2012-01-18 00:34:06 +0530610#ifdef CONFIG_MSM_CAMERA_V4L2
Suresh Vankadara6050cef52012-04-16 21:44:59 +0530611static int apps_reset;
Suresh Vankadara20cd3be2012-01-18 00:34:06 +0530612static struct resource msm_csic0_resources[] = {
613 {
614 .name = "csic",
615 .start = 0xA0F00000,
616 .end = 0xA0F00000 + 0x00100000 - 1,
617 .flags = IORESOURCE_MEM,
618 },
619 {
620 .name = "csic",
621 .start = INT_CSI_IRQ_0,
622 .end = INT_CSI_IRQ_0,
623 .flags = IORESOURCE_IRQ,
624 },
625};
626
627static struct resource msm_csic1_resources[] = {
628 {
629 .name = "csic",
630 .start = 0xA1000000,
631 .end = 0xA1000000 + 0x00100000 - 1,
632 .flags = IORESOURCE_MEM,
633 },
634 {
635 .name = "csic",
636 .start = INT_CSI_IRQ_1,
637 .end = INT_CSI_IRQ_1,
638 .flags = IORESOURCE_IRQ,
639 },
640};
641
642struct platform_device msm7x27a_device_csic0 = {
643 .name = "msm_csic",
644 .id = 0,
645 .resource = msm_csic0_resources,
646 .num_resources = ARRAY_SIZE(msm_csic0_resources),
647};
648
649struct platform_device msm7x27a_device_csic1 = {
650 .name = "msm_csic",
651 .id = 1,
652 .resource = msm_csic1_resources,
653 .num_resources = ARRAY_SIZE(msm_csic1_resources),
654};
655
656static struct resource msm_clkctl_resources[] = {
657 {
658 .name = "clk_ctl",
Taniya Das13b811a2011-12-09 18:33:45 +0530659 .start = MSM7XXX_CLK_CTL_PHYS,
660 .end = MSM7XXX_CLK_CTL_PHYS + MSM7XXX_CLK_CTL_SIZE - 1,
Suresh Vankadara20cd3be2012-01-18 00:34:06 +0530661 .flags = IORESOURCE_MEM,
662 },
663};
664struct platform_device msm7x27a_device_clkctl = {
665 .name = "msm_clk_ctl",
666 .id = 0,
667 .resource = msm_clkctl_resources,
668 .num_resources = ARRAY_SIZE(msm_clkctl_resources),
Suresh Vankadara6050cef52012-04-16 21:44:59 +0530669 .dev = {
670 .platform_data = &apps_reset,
671 },
Suresh Vankadara20cd3be2012-01-18 00:34:06 +0530672};
673
674struct platform_device msm7x27a_device_vfe = {
675 .name = "msm_vfe",
676 .id = 0,
677};
678
679#endif
680
Murali Nalajala41786ab2012-03-06 10:47:32 +0530681/* Command sequence for simple WFI */
682static uint8_t spm_wfi_cmd_sequence[] __initdata = {
Murali Nalajala2250a272012-03-13 15:56:59 +0530683 0x04, 0x03, 0x04, 0x0f,
Murali Nalajala41786ab2012-03-06 10:47:32 +0530684};
685
686/* Command sequence for GDFS, this won't send any interrupt to the modem */
687static uint8_t spm_pc_without_modem[] __initdata = {
688 0x20, 0x00, 0x30, 0x10,
Murali Nalajala2250a272012-03-13 15:56:59 +0530689 0x03, 0x1e, 0x0e, 0x3e,
690 0x4e, 0x4e, 0x4e, 0x4e,
691 0x4e, 0x4e, 0x4e, 0x4e,
692 0x4e, 0x4e, 0x4e, 0x4e,
693 0x4e, 0x4e, 0x4e, 0x4e,
694 0x2E, 0x0f,
Murali Nalajala41786ab2012-03-06 10:47:32 +0530695};
696
697static struct msm_spm_seq_entry msm_spm_seq_list[] __initdata = {
698 [0] = {
699 .mode = MSM_SPM_MODE_CLOCK_GATING,
700 .notify_rpm = false,
701 .cmd = spm_wfi_cmd_sequence,
702 },
703 [1] = {
704 .mode = MSM_SPM_MODE_POWER_COLLAPSE,
705 .notify_rpm = false,
706 .cmd = spm_pc_without_modem,
707 },
708};
709
710static struct msm_spm_platform_data msm_spm_data[] __initdata = {
711 [0] = {
712 .reg_base_addr = MSM_SAW0_BASE,
713 .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x0,
714 .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01,
715 .num_modes = ARRAY_SIZE(msm_spm_seq_list),
716 .modes = msm_spm_seq_list,
717 },
718 [1] = {
719 .reg_base_addr = MSM_SAW1_BASE,
720 .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x0,
721 .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01,
722 .num_modes = ARRAY_SIZE(msm_spm_seq_list),
723 .modes = msm_spm_seq_list,
724 },
725};
726
727void __init msm8x25_spm_device_init(void)
728{
729 msm_spm_init(msm_spm_data, ARRAY_SIZE(msm_spm_data));
730}
731
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700732#define MDP_BASE 0xAA200000
733#define MIPI_DSI_HW_BASE 0xA1100000
734
735static struct resource msm_mipi_dsi_resources[] = {
736 {
737 .name = "mipi_dsi",
738 .start = MIPI_DSI_HW_BASE,
739 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
740 .flags = IORESOURCE_MEM,
741 },
742 {
743 .start = INT_DSI_IRQ,
744 .end = INT_DSI_IRQ,
745 .flags = IORESOURCE_IRQ,
746 },
747};
748
749static struct platform_device msm_mipi_dsi_device = {
750 .name = "mipi_dsi",
751 .id = 1,
752 .num_resources = ARRAY_SIZE(msm_mipi_dsi_resources),
753 .resource = msm_mipi_dsi_resources,
754};
755
756static struct resource msm_mdp_resources[] = {
757 {
758 .name = "mdp",
759 .start = MDP_BASE,
760 .end = MDP_BASE + 0x000F1008 - 1,
761 .flags = IORESOURCE_MEM,
762 },
763 {
764 .start = INT_MDP,
765 .end = INT_MDP,
766 .flags = IORESOURCE_IRQ,
767 },
768};
769
770static struct platform_device msm_mdp_device = {
771 .name = "mdp",
772 .id = 0,
773 .num_resources = ARRAY_SIZE(msm_mdp_resources),
774 .resource = msm_mdp_resources,
775};
776
777static struct platform_device msm_lcdc_device = {
778 .name = "lcdc",
779 .id = 0,
780};
781
782static struct resource kgsl_3d0_resources[] = {
783 {
784 .name = KGSL_3D0_REG_MEMORY,
785 .start = 0xA0000000,
786 .end = 0xA001ffff,
787 .flags = IORESOURCE_MEM,
788 },
789 {
790 .name = KGSL_3D0_IRQ,
791 .start = INT_GRAPHICS,
792 .end = INT_GRAPHICS,
793 .flags = IORESOURCE_IRQ,
794 },
795};
796
797static struct kgsl_device_platform_data kgsl_3d0_pdata = {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -0600798 .pwrlevel = {
799 {
800 .gpu_freq = 245760000,
801 .bus_freq = 200000000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700802 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -0600803 {
Lynus Vazeaf0aac2012-01-05 12:28:47 +0530804 .gpu_freq = 192000000,
805 .bus_freq = 160000000,
806 },
807 {
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -0600808 .gpu_freq = 133330000,
809 .bus_freq = 0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700810 },
811 },
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -0600812 .init_level = 0,
Lynus Vazeaf0aac2012-01-05 12:28:47 +0530813 .num_levels = 3,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -0600814 .set_grp_async = set_grp_xbar_async,
Sudhakara Rao Tentu38ad6e12012-03-30 15:25:18 -0700815 .idle_timeout = HZ,
Lynus Vazfe4bede2012-04-06 11:53:30 -0700816 .strtstp_sleepwake = true,
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -0600817 .nap_allowed = false,
818 .clk_map = KGSL_CLK_CORE | KGSL_CLK_IFACE | KGSL_CLK_MEM,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700819};
820
821struct platform_device msm_kgsl_3d0 = {
822 .name = "kgsl-3d0",
823 .id = 0,
824 .num_resources = ARRAY_SIZE(kgsl_3d0_resources),
825 .resource = kgsl_3d0_resources,
826 .dev = {
827 .platform_data = &kgsl_3d0_pdata,
828 },
829};
830
831void __init msm7x25a_kgsl_3d0_init(void)
832{
833 if (cpu_is_msm7x25a() || cpu_is_msm7x25aa()) {
Lynus Vaz971610e2012-01-06 11:00:32 +0530834 kgsl_3d0_pdata.num_levels = 2;
Lucille Sylvesterdce84cd2011-10-12 14:15:37 -0600835 kgsl_3d0_pdata.pwrlevel[0].gpu_freq = 133330000;
836 kgsl_3d0_pdata.pwrlevel[0].bus_freq = 160000000;
837 kgsl_3d0_pdata.pwrlevel[1].gpu_freq = 96000000;
838 kgsl_3d0_pdata.pwrlevel[1].bus_freq = 0;
Rajesh Kemisettidf6e62f2012-03-12 14:02:30 +0530839 }
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700840}
841
Sudhakara Rao Tentu38ad6e12012-03-30 15:25:18 -0700842void __init msm8x25_kgsl_3d0_init(void)
843{
Lynus Vazfe4bede2012-04-06 11:53:30 -0700844 if (cpu_is_msm8625()) {
Sudhakara Rao Tentu38ad6e12012-03-30 15:25:18 -0700845 kgsl_3d0_pdata.idle_timeout = HZ/5;
Lynus Vazfe4bede2012-04-06 11:53:30 -0700846 kgsl_3d0_pdata.strtstp_sleepwake = false;
Ranjhith Kalisamy24696322012-04-11 22:09:17 +0530847 /* 8x25 supports a higher GPU frequency */
848 kgsl_3d0_pdata.pwrlevel[0].gpu_freq = 300000000;
849 kgsl_3d0_pdata.pwrlevel[0].bus_freq = 200000000;
Lynus Vazfe4bede2012-04-06 11:53:30 -0700850 }
Sudhakara Rao Tentu38ad6e12012-03-30 15:25:18 -0700851}
852
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700853static void __init msm_register_device(struct platform_device *pdev, void *data)
854{
855 int ret;
856
857 pdev->dev.platform_data = data;
858
859 ret = platform_device_register(pdev);
860
861 if (ret)
862 dev_err(&pdev->dev,
863 "%s: platform_device_register() failed = %d\n",
864 __func__, ret);
865}
866
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700867
868#define PERPH_WEB_BLOCK_ADDR (0xA9D00040)
869#define PDM0_CTL_OFFSET (0x04)
870#define SIZE_8B (0x08)
871
872static struct resource resources_led[] = {
873 {
874 .start = PERPH_WEB_BLOCK_ADDR,
875 .end = PERPH_WEB_BLOCK_ADDR + (SIZE_8B) - 1,
876 .name = "led-gpio-pdm",
877 .flags = IORESOURCE_MEM,
878 },
879};
880
881static struct led_info msm_kpbl_pdm_led_pdata = {
882 .name = "keyboard-backlight",
883};
884
885struct platform_device led_pdev = {
886 .name = "leds-msm-pdm",
887 /* use pdev id to represent pdm id */
888 .id = 0,
889 .num_resources = ARRAY_SIZE(resources_led),
890 .resource = resources_led,
891 .dev = {
892 .platform_data = &msm_kpbl_pdm_led_pdata,
893 },
894};
895
Manish Dewangan3a260992011-06-24 18:01:34 +0530896struct platform_device asoc_msm_pcm = {
897 .name = "msm-dsp-audio",
898 .id = 0,
899};
900
901struct platform_device asoc_msm_dai0 = {
902 .name = "msm-codec-dai",
903 .id = 0,
904};
905
906struct platform_device asoc_msm_dai1 = {
907 .name = "msm-cpu-dai",
908 .id = 0,
909};
910
Taniya Das2e948192011-12-20 11:15:13 +0530911static struct resource gpio_resources[] = {
912 {
913 .start = INT_GPIO_GROUP1,
914 .flags = IORESOURCE_IRQ,
915 },
916 {
917 .start = INT_GPIO_GROUP2,
918 .flags = IORESOURCE_IRQ,
919 },
920};
921
922static struct platform_device msm_device_gpio = {
923 .name = "msmgpio",
924 .id = -1,
925 .resource = gpio_resources,
926 .num_resources = ARRAY_SIZE(gpio_resources),
927};
928
Taniya Das43bcdd62011-12-02 17:33:27 +0530929struct platform_device *msm_footswitch_devices[] = {
930 FS_PCOM(FS_GFX3D, "fs_gfx3d"),
931};
932unsigned msm_num_footswitch_devices = ARRAY_SIZE(msm_footswitch_devices);
933
934/* MSM8625 Devices */
935
936static struct resource msm8625_resources_uart1[] = {
937 {
938 .start = MSM8625_INT_UART1,
939 .end = MSM8625_INT_UART1,
940 .flags = IORESOURCE_IRQ,
941 },
942 {
Taniya Das13b811a2011-12-09 18:33:45 +0530943 .start = MSM7XXX_UART1_PHYS,
944 .end = MSM7XXX_UART1_PHYS + MSM7XXX_UART1_SIZE - 1,
Taniya Das43bcdd62011-12-02 17:33:27 +0530945 .flags = IORESOURCE_MEM,
946 },
947};
948
949struct platform_device msm8625_device_uart1 = {
950 .name = "msm_serial",
951 .id = 0,
952 .num_resources = ARRAY_SIZE(msm8625_resources_uart1),
953 .resource = msm8625_resources_uart1,
954};
955
Trilok Soni269fff42012-02-13 20:35:30 +0530956static struct resource msm8625_uart1_dm_resources[] = {
957 {
958 .start = MSM_UART1DM_PHYS,
959 .end = MSM_UART1DM_PHYS + PAGE_SIZE - 1,
960 .flags = IORESOURCE_MEM,
961 },
962 {
963 .start = MSM8625_INT_UART1DM_IRQ,
964 .end = MSM8625_INT_UART1DM_IRQ,
965 .flags = IORESOURCE_IRQ,
966 },
967 {
968 .start = MSM8625_INT_UART1DM_RX,
969 .end = MSM8625_INT_UART1DM_RX,
970 .flags = IORESOURCE_IRQ,
971 },
972 {
973 .start = DMOV_HSUART1_TX_CHAN,
974 .end = DMOV_HSUART1_RX_CHAN,
975 .name = "uartdm_channels",
976 .flags = IORESOURCE_DMA,
977 },
978 {
979 .start = DMOV_HSUART1_TX_CRCI,
980 .end = DMOV_HSUART1_RX_CRCI,
981 .name = "uartdm_crci",
982 .flags = IORESOURCE_DMA,
983 },
984};
985
986struct platform_device msm8625_device_uart_dm1 = {
987 .name = "msm_serial_hs",
988 .id = 0,
989 .num_resources = ARRAY_SIZE(msm8625_uart1_dm_resources),
990 .resource = msm8625_uart1_dm_resources,
991 .dev = {
992 .dma_mask = &msm_uart_dm1_dma_mask,
993 .coherent_dma_mask = DMA_BIT_MASK(32),
994 },
995};
996
997static struct resource msm8625_uart2dm_resources[] = {
998 {
999 .start = MSM_UART2DM_PHYS,
1000 .end = MSM_UART2DM_PHYS + PAGE_SIZE - 1,
1001 .name = "uartdm_resource",
1002 .flags = IORESOURCE_MEM,
1003 },
1004 {
1005 .start = MSM8625_INT_UART2DM_IRQ,
1006 .end = MSM8625_INT_UART2DM_IRQ,
1007 .flags = IORESOURCE_IRQ,
1008 },
1009};
1010
1011struct platform_device msm8625_device_uart_dm2 = {
1012 .name = "msm_serial_hsl",
1013 .id = 0,
1014 .num_resources = ARRAY_SIZE(msm8625_uart2dm_resources),
1015 .resource = msm8625_uart2dm_resources,
1016};
1017
Laxminath Kasam5faa1ca2012-02-15 12:06:45 +05301018static struct resource msm8625_resources_adsp[] = {
1019 {
1020 .start = MSM8625_INT_ADSP_A9_A11,
1021 .end = MSM8625_INT_ADSP_A9_A11,
1022 .flags = IORESOURCE_IRQ,
1023 },
1024};
1025
1026struct platform_device msm8625_device_adsp = {
1027 .name = "msm_adsp",
1028 .id = -1,
1029 .num_resources = ARRAY_SIZE(msm8625_resources_adsp),
1030 .resource = msm8625_resources_adsp,
1031};
1032
Taniya Das43bcdd62011-12-02 17:33:27 +05301033static struct resource msm8625_dmov_resource[] = {
1034 {
1035 .start = MSM8625_INT_ADM_AARM,
1036 .flags = IORESOURCE_IRQ,
1037 },
1038 {
1039 .start = 0xA9700000,
1040 .end = 0xA9700000 + SZ_4K - 1,
1041 .flags = IORESOURCE_MEM,
1042 },
1043};
1044
1045struct platform_device msm8625_device_dmov = {
1046 .name = "msm_dmov",
1047 .id = -1,
1048 .resource = msm8625_dmov_resource,
1049 .num_resources = ARRAY_SIZE(msm8625_dmov_resource),
1050 .dev = {
1051 .platform_data = &msm_dmov_pdata,
1052 },
1053};
Taniya Das2e948192011-12-20 11:15:13 +05301054
Taniya Das9d187142011-12-02 15:53:25 +05301055static struct resource gsbi0_msm8625_qup_resources[] = {
1056 {
1057 .name = "qup_phys_addr",
1058 .start = MSM_GSBI0_QUP_PHYS,
1059 .end = MSM_GSBI0_QUP_PHYS + SZ_4K - 1,
1060 .flags = IORESOURCE_MEM,
1061 },
1062 {
1063 .name = "gsbi_qup_i2c_addr",
1064 .start = MSM_GSBI0_PHYS,
1065 .end = MSM_GSBI0_PHYS + SZ_4K - 1,
1066 .flags = IORESOURCE_MEM,
1067 },
1068 {
1069 .name = "qup_err_intr",
1070 .start = MSM8625_INT_PWB_I2C,
1071 .end = MSM8625_INT_PWB_I2C,
1072 .flags = IORESOURCE_IRQ,
1073 },
1074};
1075
1076/* Use GSBI0 QUP for /dev/i2c-0 */
Taniya Dase3027e22012-02-27 16:32:27 +05301077struct platform_device msm8625_gsbi0_qup_i2c_device = {
Taniya Das9d187142011-12-02 15:53:25 +05301078 .name = "qup_i2c",
1079 .id = MSM_GSBI0_QUP_I2C_BUS_ID,
1080 .num_resources = ARRAY_SIZE(gsbi0_msm8625_qup_resources),
1081 .resource = gsbi0_msm8625_qup_resources,
1082};
1083
Trilok Soni633e59c2012-02-13 20:28:30 +05301084static struct resource gsbi1_msm8625_qup_i2c_resources[] = {
1085 {
1086 .name = "qup_phys_addr",
1087 .start = MSM_GSBI1_QUP_PHYS,
1088 .end = MSM_GSBI1_QUP_PHYS + SZ_4K - 1,
1089 .flags = IORESOURCE_MEM,
1090 },
1091 {
1092 .name = "gsbi_qup_i2c_addr",
1093 .start = MSM_GSBI1_PHYS,
1094 .end = MSM_GSBI1_PHYS + SZ_4K - 1,
1095 .flags = IORESOURCE_MEM,
1096 },
1097 {
1098 .name = "qup_err_intr",
1099 .start = MSM8625_INT_ARM11_DMA,
1100 .end = MSM8625_INT_ARM11_DMA,
1101 .flags = IORESOURCE_IRQ,
1102 },
1103};
1104
1105/* Use GSBI1 QUP for /dev/i2c-1 */
Taniya Dase3027e22012-02-27 16:32:27 +05301106struct platform_device msm8625_gsbi1_qup_i2c_device = {
Trilok Soni633e59c2012-02-13 20:28:30 +05301107 .name = "qup_i2c",
1108 .id = MSM_GSBI1_QUP_I2C_BUS_ID,
1109 .num_resources = ARRAY_SIZE(gsbi1_qup_i2c_resources),
1110 .resource = gsbi1_msm8625_qup_i2c_resources,
1111};
1112
Taniya Das6684d622012-01-12 10:29:09 +05301113static struct resource msm8625_gpio_resources[] = {
1114 {
1115 .start = MSM8625_INT_GPIO_GROUP1,
1116 .flags = IORESOURCE_IRQ,
1117 },
1118 {
1119 .start = MSM8625_INT_GPIO_GROUP2,
1120 .flags = IORESOURCE_IRQ,
1121 },
1122};
1123
1124static struct platform_device msm8625_device_gpio = {
1125 .name = "msmgpio",
1126 .id = -1,
1127 .resource = msm8625_gpio_resources,
1128 .num_resources = ARRAY_SIZE(msm8625_gpio_resources),
1129};
1130
Trilok Soniee75f6c2012-02-13 20:45:07 +05301131static struct resource msm8625_resources_sdc1[] = {
1132 {
1133 .start = MSM_SDC1_BASE,
1134 .end = MSM_SDC1_BASE + SZ_4K - 1,
1135 .flags = IORESOURCE_MEM,
1136 },
1137 {
1138 .start = MSM8625_INT_SDC1_0,
1139 .end = MSM8625_INT_SDC1_1,
1140 .flags = IORESOURCE_IRQ,
1141 },
1142 {
1143 .name = "sdcc_dma_chnl",
1144 .start = DMOV_SDC1_CHAN,
1145 .end = DMOV_SDC1_CHAN,
1146 .flags = IORESOURCE_DMA,
1147 },
1148 {
1149 .name = "sdcc_dma_crci",
1150 .start = DMOV_SDC1_CRCI,
1151 .end = DMOV_SDC1_CRCI,
1152 .flags = IORESOURCE_DMA,
1153 }
1154};
1155
1156static struct resource msm8625_resources_sdc2[] = {
1157 {
1158 .start = MSM_SDC2_BASE,
1159 .end = MSM_SDC2_BASE + SZ_4K - 1,
1160 .flags = IORESOURCE_MEM,
1161 },
1162 {
1163 .start = MSM8625_INT_SDC2_0,
1164 .end = MSM8625_INT_SDC2_1,
1165 .flags = IORESOURCE_IRQ,
1166 },
1167 {
1168 .name = "sdcc_dma_chnl",
1169 .start = DMOV_SDC2_CHAN,
1170 .end = DMOV_SDC2_CHAN,
1171 .flags = IORESOURCE_DMA,
1172 },
1173 {
1174 .name = "sdcc_dma_crci",
1175 .start = DMOV_SDC2_CRCI,
1176 .end = DMOV_SDC2_CRCI,
1177 .flags = IORESOURCE_DMA,
1178 }
1179};
1180
1181static struct resource msm8625_resources_sdc3[] = {
1182 {
1183 .start = MSM_SDC3_BASE,
1184 .end = MSM_SDC3_BASE + SZ_4K - 1,
1185 .flags = IORESOURCE_MEM,
1186 },
1187 {
1188 .start = MSM8625_INT_SDC3_0,
1189 .end = MSM8625_INT_SDC3_1,
1190 .flags = IORESOURCE_IRQ,
1191 },
1192 {
1193 .name = "sdcc_dma_chnl",
1194 .start = DMOV_SDC3_CHAN,
1195 .end = DMOV_SDC3_CHAN,
1196 .flags = IORESOURCE_DMA,
1197 },
1198 {
1199 .name = "sdcc_dma_crci",
1200 .start = DMOV_SDC3_CRCI,
1201 .end = DMOV_SDC3_CRCI,
1202 .flags = IORESOURCE_DMA,
1203 },
1204};
1205
1206static struct resource msm8625_resources_sdc4[] = {
1207 {
1208 .start = MSM_SDC4_BASE,
1209 .end = MSM_SDC4_BASE + SZ_4K - 1,
1210 .flags = IORESOURCE_MEM,
1211 },
1212 {
1213 .start = MSM8625_INT_SDC4_0,
1214 .end = MSM8625_INT_SDC4_1,
1215 .flags = IORESOURCE_IRQ,
1216 },
1217 {
1218 .name = "sdcc_dma_chnl",
1219 .start = DMOV_SDC4_CHAN,
1220 .end = DMOV_SDC4_CHAN,
1221 .flags = IORESOURCE_DMA,
1222 },
1223 {
1224 .name = "sdcc_dma_crci",
1225 .start = DMOV_SDC4_CRCI,
1226 .end = DMOV_SDC4_CRCI,
1227 .flags = IORESOURCE_DMA,
1228 },
1229};
1230
1231struct platform_device msm8625_device_sdc1 = {
1232 .name = "msm_sdcc",
1233 .id = 1,
1234 .num_resources = ARRAY_SIZE(msm8625_resources_sdc1),
1235 .resource = msm8625_resources_sdc1,
1236 .dev = {
1237 .coherent_dma_mask = 0xffffffff,
1238 },
1239};
1240
1241struct platform_device msm8625_device_sdc2 = {
1242 .name = "msm_sdcc",
1243 .id = 2,
1244 .num_resources = ARRAY_SIZE(msm8625_resources_sdc2),
1245 .resource = msm8625_resources_sdc2,
1246 .dev = {
1247 .coherent_dma_mask = 0xffffffff,
1248 },
1249};
1250
1251struct platform_device msm8625_device_sdc3 = {
1252 .name = "msm_sdcc",
1253 .id = 3,
1254 .num_resources = ARRAY_SIZE(msm8625_resources_sdc3),
1255 .resource = msm8625_resources_sdc3,
1256 .dev = {
1257 .coherent_dma_mask = 0xffffffff,
1258 },
1259};
1260
1261struct platform_device msm8625_device_sdc4 = {
1262 .name = "msm_sdcc",
1263 .id = 4,
1264 .num_resources = ARRAY_SIZE(msm8625_resources_sdc4),
1265 .resource = msm8625_resources_sdc4,
1266 .dev = {
1267 .coherent_dma_mask = 0xffffffff,
1268 },
1269};
1270
1271static struct platform_device *msm8625_sdcc_devices[] __initdata = {
1272 &msm8625_device_sdc1,
1273 &msm8625_device_sdc2,
1274 &msm8625_device_sdc3,
1275 &msm8625_device_sdc4,
1276};
1277
1278int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat)
1279{
1280 struct platform_device *pdev;
1281
1282 if (controller < 1 || controller > 4)
1283 return -EINVAL;
1284
1285 if (cpu_is_msm8625())
1286 pdev = msm8625_sdcc_devices[controller-1];
1287 else
1288 pdev = msm_sdcc_devices[controller-1];
1289
1290 pdev->dev.platform_data = plat;
1291 return platform_device_register(pdev);
1292}
1293
Trilok Sonida63a8b2012-02-13 20:50:03 +05301294static struct resource msm8625_resources_hsusb_otg[] = {
1295 {
1296 .start = MSM_HSUSB_PHYS,
1297 .end = MSM_HSUSB_PHYS + SZ_1K - 1,
1298 .flags = IORESOURCE_MEM,
1299 },
1300 {
1301 .start = MSM8625_INT_USB_HS,
1302 .end = MSM8625_INT_USB_HS,
1303 .flags = IORESOURCE_IRQ,
1304 },
1305};
1306
1307struct platform_device msm8625_device_otg = {
1308 .name = "msm_otg",
1309 .id = -1,
1310 .num_resources = ARRAY_SIZE(msm8625_resources_hsusb_otg),
1311 .resource = msm8625_resources_hsusb_otg,
1312 .dev = {
1313 .dma_mask = &dma_mask,
1314 .coherent_dma_mask = 0xffffffffULL,
1315 },
1316};
1317
1318static struct resource msm8625_resources_gadget_peripheral[] = {
1319 {
1320 .start = MSM_HSUSB_PHYS,
1321 .end = MSM_HSUSB_PHYS + SZ_1K - 1,
1322 .flags = IORESOURCE_MEM,
1323 },
1324 {
1325 .start = MSM8625_INT_USB_HS,
1326 .end = MSM8625_INT_USB_HS,
1327 .flags = IORESOURCE_IRQ,
1328 },
1329};
1330
1331struct platform_device msm8625_device_gadget_peripheral = {
1332 .name = "msm_hsusb",
1333 .id = -1,
1334 .num_resources = ARRAY_SIZE(msm8625_resources_gadget_peripheral),
1335 .resource = msm8625_resources_gadget_peripheral,
1336 .dev = {
1337 .dma_mask = &dma_mask,
1338 .coherent_dma_mask = 0xffffffffULL,
1339 },
1340};
1341
1342static struct resource msm8625_resources_hsusb_host[] = {
1343 {
1344 .start = MSM_HSUSB_PHYS,
1345 .end = MSM_HSUSB_PHYS + SZ_1K - 1,
1346 .flags = IORESOURCE_MEM,
1347 },
1348 {
1349 .start = MSM8625_INT_USB_HS,
1350 .end = MSM8625_INT_USB_HS,
1351 .flags = IORESOURCE_IRQ,
1352 },
1353};
1354
1355struct platform_device msm8625_device_hsusb_host = {
1356 .name = "msm_hsusb_host",
1357 .id = 0,
1358 .num_resources = ARRAY_SIZE(msm8625_resources_hsusb_host),
1359 .resource = msm8625_resources_hsusb_host,
1360 .dev = {
1361 .dma_mask = &dma_mask,
1362 .coherent_dma_mask = 0xffffffffULL,
1363 },
1364};
1365
1366static struct platform_device *msm8625_host_devices[] = {
1367 &msm8625_device_hsusb_host,
1368};
1369
1370int msm_add_host(unsigned int host, struct msm_usb_host_platform_data *plat)
1371{
1372 struct platform_device *pdev;
1373
1374 if (cpu_is_msm8625())
1375 pdev = msm8625_host_devices[host];
1376 else
1377 pdev = msm_host_devices[host];
1378 if (!pdev)
1379 return -ENODEV;
1380 pdev->dev.platform_data = plat;
1381 return platform_device_register(pdev);
1382}
1383
Trilok Soni88da2552012-02-13 21:01:24 +05301384#ifdef CONFIG_MSM_CAMERA_V4L2
1385static struct resource msm8625_csic0_resources[] = {
1386 {
1387 .name = "csic",
1388 .start = 0xA0F00000,
1389 .end = 0xA0F00000 + 0x00100000 - 1,
1390 .flags = IORESOURCE_MEM,
1391 },
1392 {
1393 .name = "csic",
1394 .start = MSM8625_INT_CSI_IRQ_0,
1395 .end = MSM8625_INT_CSI_IRQ_0,
1396 .flags = IORESOURCE_IRQ,
1397 },
1398};
1399
1400static struct resource msm8625_csic1_resources[] = {
1401 {
1402 .name = "csic",
1403 .start = 0xA1000000,
1404 .end = 0xA1000000 + 0x00100000 - 1,
1405 .flags = IORESOURCE_MEM,
1406 },
1407 {
1408 .name = "csic",
1409 .start = MSM8625_INT_CSI_IRQ_1,
1410 .end = MSM8625_INT_CSI_IRQ_1,
1411 .flags = IORESOURCE_IRQ,
1412 },
1413};
1414
1415struct platform_device msm8625_device_csic0 = {
1416 .name = "msm_csic",
1417 .id = 0,
1418 .resource = msm8625_csic0_resources,
1419 .num_resources = ARRAY_SIZE(msm8625_csic0_resources),
1420};
1421
1422struct platform_device msm8625_device_csic1 = {
1423 .name = "msm_csic",
1424 .id = 1,
1425 .resource = msm8625_csic1_resources,
1426 .num_resources = ARRAY_SIZE(msm8625_csic1_resources),
1427};
1428#endif
1429
Trilok Soniae4633d2012-02-13 21:08:32 +05301430static struct resource msm8625_mipi_dsi_resources[] = {
1431 {
1432 .name = "mipi_dsi",
1433 .start = MIPI_DSI_HW_BASE,
1434 .end = MIPI_DSI_HW_BASE + 0x000F0000 - 1,
1435 .flags = IORESOURCE_MEM,
1436 },
1437 {
1438 .start = MSM8625_INT_DSI_IRQ,
1439 .end = MSM8625_INT_DSI_IRQ,
1440 .flags = IORESOURCE_IRQ,
1441 },
1442};
1443
1444static struct platform_device msm8625_mipi_dsi_device = {
1445 .name = "mipi_dsi",
1446 .id = 1,
1447 .num_resources = ARRAY_SIZE(msm8625_mipi_dsi_resources),
1448 .resource = msm8625_mipi_dsi_resources,
1449};
1450
1451static struct resource msm8625_mdp_resources[] = {
1452 {
1453 .name = "mdp",
1454 .start = MDP_BASE,
1455 .end = MDP_BASE + 0x000F1008 - 1,
1456 .flags = IORESOURCE_MEM,
1457 },
1458 {
1459 .start = MSM8625_INT_MDP,
1460 .end = MSM8625_INT_MDP,
1461 .flags = IORESOURCE_IRQ,
1462 },
1463};
1464
1465static struct platform_device msm8625_mdp_device = {
1466 .name = "mdp",
1467 .id = 0,
1468 .num_resources = ARRAY_SIZE(msm8625_mdp_resources),
1469 .resource = msm8625_mdp_resources,
1470};
1471
1472void __init msm_fb_register_device(char *name, void *data)
1473{
1474 if (!strncmp(name, "mdp", 3)) {
1475 if (cpu_is_msm8625())
1476 msm_register_device(&msm8625_mdp_device, data);
1477 else
1478 msm_register_device(&msm_mdp_device, data);
1479 } else if (!strncmp(name, "mipi_dsi", 8)) {
1480 if (cpu_is_msm8625())
1481 msm_register_device(&msm8625_mipi_dsi_device, data);
1482 else
1483 msm_register_device(&msm_mipi_dsi_device, data);
1484 } else if (!strncmp(name, "lcdc", 4)) {
1485 msm_register_device(&msm_lcdc_device, data);
1486 } else {
1487 printk(KERN_ERR "%s: unknown device! %s\n", __func__, name);
1488 }
1489}
1490
Trilok Soni664b95d2012-02-13 21:13:15 +05301491static struct resource msm8625_kgsl_3d0_resources[] = {
1492 {
1493 .name = KGSL_3D0_REG_MEMORY,
1494 .start = 0xA0000000,
1495 .end = 0xA001ffff,
1496 .flags = IORESOURCE_MEM,
1497 },
1498 {
1499 .name = KGSL_3D0_IRQ,
1500 .start = MSM8625_INT_GRAPHICS,
1501 .end = MSM8625_INT_GRAPHICS,
1502 .flags = IORESOURCE_IRQ,
1503 },
1504};
1505
1506struct platform_device msm8625_kgsl_3d0 = {
1507 .name = "kgsl-3d0",
1508 .id = 0,
1509 .num_resources = ARRAY_SIZE(msm8625_kgsl_3d0_resources),
1510 .resource = msm8625_kgsl_3d0_resources,
1511 .dev = {
1512 .platform_data = &kgsl_3d0_pdata,
1513 },
1514};
1515
Taniya Das7c9f0512011-12-02 14:26:46 +05301516static struct clk_lookup msm_clock_8625_dummy[] = {
1517 CLK_DUMMY("core_clk", adm_clk.c, "msm_dmov", 0),
1518 CLK_DUMMY("adsp_clk", adsp_clk.c, NULL, 0),
1519 CLK_DUMMY("ahb_m_clk", ahb_m_clk.c, NULL, 0),
1520 CLK_DUMMY("ahb_s_clk", ahb_s_clk.c, NULL, 0),
1521 CLK_DUMMY("cam_m_clk", cam_m_clk.c, NULL, 0),
1522 CLK_DUMMY("csi_clk", csi1_clk.c, NULL, 0),
1523 CLK_DUMMY("csi_pclk", csi1_p_clk.c, NULL, 0),
1524 CLK_DUMMY("csi_vfe_clk", csi1_vfe_clk.c, NULL, 0),
1525 CLK_DUMMY("dsi_byte_clk", dsi_byte_clk.c, NULL, 0),
1526 CLK_DUMMY("dsi_clk", dsi_clk.c, NULL, 0),
1527 CLK_DUMMY("dsi_esc_clk", dsi_esc_clk.c, NULL, 0),
1528 CLK_DUMMY("dsi_pixel_clk", dsi_pixel_clk.c, NULL, 0),
1529 CLK_DUMMY("dsi_ref_clk", dsi_ref_clk.c, NULL, 0),
1530 CLK_DUMMY("ebi1_clk", ebi1_clk.c, NULL, 0),
1531 CLK_DUMMY("ebi2_clk", ebi2_clk.c, NULL, 0),
1532 CLK_DUMMY("ecodec_clk", ecodec_clk.c, NULL, 0),
1533 CLK_DUMMY("gp_clk", gp_clk.c, NULL, 0),
1534 CLK_DUMMY("core_clk", gsbi1_qup_clk.c, "qup_i2c.0", 0),
1535 CLK_DUMMY("core_clk", gsbi2_qup_clk.c, "qup_i2c.1", 0),
1536 CLK_DUMMY("iface_clk", gsbi1_qup_p_clk.c, "qup_i2c.0", 0),
1537 CLK_DUMMY("iface_clk", gsbi2_qup_p_clk.c, "qup_i2c.1", 0),
1538 CLK_DUMMY("icodec_rx_clk", icodec_rx_clk.c, NULL, 0),
1539 CLK_DUMMY("icodec_tx_clk", icodec_tx_clk.c, NULL, 0),
1540 CLK_DUMMY("mem_clk", imem_clk.c, NULL, 0),
1541 CLK_DUMMY("mddi_clk", pmdh_clk.c, NULL, 0),
1542 CLK_DUMMY("mdp_clk", mdp_clk.c, NULL, 0),
1543 CLK_DUMMY("mdp_lcdc_pclk_clk", mdp_lcdc_pclk_clk.c, NULL, 0),
1544 CLK_DUMMY("mdp_lcdc_pad_pclk_clk", mdp_lcdc_pad_pclk_clk.c, NULL, 0),
1545 CLK_DUMMY("mdp_vsync_clk", mdp_vsync_clk.c, NULL, 0),
1546 CLK_DUMMY("mdp_dsi_pclk", mdp_dsi_p_clk.c, NULL, 0),
1547 CLK_DUMMY("pbus_clk", pbus_clk.c, NULL, 0),
1548 CLK_DUMMY("pcm_clk", pcm_clk.c, NULL, 0),
1549 CLK_DUMMY("sdac_clk", sdac_clk.c, NULL, 0),
1550 CLK_DUMMY("core_clk", sdc1_clk.c, "msm_sdcc.1", 0),
1551 CLK_DUMMY("iface_clk", sdc1_p_clk.c, "msm_sdcc.1", 0),
1552 CLK_DUMMY("core_clk", sdc2_clk.c, "msm_sdcc.2", 0),
1553 CLK_DUMMY("iface_clk", sdc2_p_clk.c, "msm_sdcc.2", 0),
1554 CLK_DUMMY("core_clk", sdc3_clk.c, "msm_sdcc.3", 0),
1555 CLK_DUMMY("iface_clk", sdc3_p_clk.c, "msm_sdcc.3", 0),
1556 CLK_DUMMY("core_clk", sdc4_clk.c, "msm_sdcc.4", 0),
1557 CLK_DUMMY("iface_clk", sdc4_p_clk.c, "msm_sdcc.4", 0),
1558 CLK_DUMMY("ref_clk", tsif_ref_clk.c, "msm_tsif.0", 0),
1559 CLK_DUMMY("iface_clk", tsif_p_clk.c, "msm_tsif.0", 0),
1560 CLK_DUMMY("core_clk", uart1_clk.c, "msm_serial.0", 0),
1561 CLK_DUMMY("core_clk", uart2_clk.c, "msm_serial.1", 0),
1562 CLK_DUMMY("core_clk", uart1dm_clk.c, "msm_serial_hs.0", 0),
1563 CLK_DUMMY("core_clk", uart2dm_clk.c, "msm_serial_hsl.0", 0),
1564 CLK_DUMMY("usb_hs_core_clk", usb_hs_core_clk.c, NULL, 0),
1565 CLK_DUMMY("usb_hs2_clk", usb_hs2_clk.c, NULL, 0),
1566 CLK_DUMMY("usb_hs_clk", usb_hs_clk.c, NULL, 0),
1567 CLK_DUMMY("usb_hs_pclk", usb_hs_p_clk.c, NULL, 0),
1568 CLK_DUMMY("usb_phy_clk", usb_phy_clk.c, NULL, 0),
1569 CLK_DUMMY("vdc_clk", vdc_clk.c, NULL, 0),
1570 CLK_DUMMY("ebi1_acpu_clk", ebi_acpu_clk.c, NULL, 0),
1571 CLK_DUMMY("ebi1_lcdc_clk", ebi_lcdc_clk.c, NULL, 0),
1572 CLK_DUMMY("ebi1_mddi_clk", ebi_mddi_clk.c, NULL, 0),
1573 CLK_DUMMY("ebi1_usb_clk", ebi_usb_clk.c, NULL, 0),
1574 CLK_DUMMY("ebi1_vfe_clk", ebi_vfe_clk.c, NULL, 0),
1575 CLK_DUMMY("mem_clk", ebi_adm_clk.c, "msm_dmov", 0),
1576};
1577
1578struct clock_init_data msm8625_dummy_clock_init_data __initdata = {
1579 .table = msm_clock_8625_dummy,
1580 .size = ARRAY_SIZE(msm_clock_8625_dummy),
1581};
1582
Pankaj Kumar50c705c2012-01-10 12:02:07 +05301583enum {
1584 MSM8625,
1585 MSM8625A,
1586};
1587
1588static int __init msm8625_cpu_id(void)
1589{
1590 int raw_id, cpu;
1591
1592 raw_id = socinfo_get_raw_id();
1593 switch (raw_id) {
1594 /* Part number for 1GHz part */
1595 case 0x770:
1596 case 0x771:
1597 case 0x780:
1598 cpu = MSM8625;
1599 break;
1600 /* Part number for 1.2GHz part */
1601 case 0x773:
1602 case 0x774:
1603 case 0x781:
1604 cpu = MSM8625A;
1605 break;
1606 default:
1607 pr_err("Invalid Raw ID\n");
1608 return -ENODEV;
1609 }
1610 return cpu;
1611}
1612
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001613int __init msm7x2x_misc_init(void)
1614{
Taniya Das7c9f0512011-12-02 14:26:46 +05301615 if (machine_is_msm8625_rumi3()) {
1616 msm_clock_init(&msm8625_dummy_clock_init_data);
Taniya Das43bcdd62011-12-02 17:33:27 +05301617 return 0;
Taniya Das7c9f0512011-12-02 14:26:46 +05301618 }
Taniya Das43bcdd62011-12-02 17:33:27 +05301619
Stephen Boydbb600ae2011-08-02 20:11:40 -07001620 msm_clock_init(&msm7x27a_clock_init_data);
Pankaj Kumar50c705c2012-01-10 12:02:07 +05301621 if (cpu_is_msm7x27aa())
Matt Wagantallec57f062011-08-16 23:54:46 -07001622 acpuclk_init(&acpuclk_7x27aa_soc_data);
Pankaj Kumar50c705c2012-01-10 12:02:07 +05301623 else if (cpu_is_msm8625()) {
1624 if (msm8625_cpu_id() == MSM8625)
1625 acpuclk_init(&acpuclk_7x27aa_soc_data);
1626 else if (msm8625_cpu_id() == MSM8625A)
1627 acpuclk_init(&acpuclk_8625_soc_data);
1628 } else {
Matt Wagantallec57f062011-08-16 23:54:46 -07001629 acpuclk_init(&acpuclk_7x27a_soc_data);
Pankaj Kumar50c705c2012-01-10 12:02:07 +05301630 }
Matt Wagantallec57f062011-08-16 23:54:46 -07001631
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001632
1633 return 0;
1634}
1635
1636#ifdef CONFIG_CACHE_L2X0
1637static int __init msm7x27x_cache_init(void)
1638{
1639 int aux_ctrl = 0;
Prachee Ramsinghani86b1f652012-04-03 16:01:30 +05301640 int pctrl = 0;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001641
1642 /* Way Size 010(0x2) 32KB */
1643 aux_ctrl = (0x1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) | \
1644 (0x2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) | \
1645 (0x1 << L2X0_AUX_CTRL_EVNT_MON_BUS_EN_SHIFT);
1646
Taniya Das379b5682011-12-02 14:53:46 +05301647 if (cpu_is_msm8625()) {
1648 /* Way Size 011(0x3) 64KB */
1649 aux_ctrl |= (0x3 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) | \
1650 (0x1 << L2X0_AUX_CTRL_DATA_PREFETCH_SHIFT) | \
Prachee Ramsinghani86b1f652012-04-03 16:01:30 +05301651 (0X1 << L2X0_AUX_CTRL_INSTR_PREFETCH_SHIFT) | \
1652 (0x1 << L2X0_AUX_CTRL_L2_FORCE_NWA_SHIFT);
1653
1654 /* Write Prefetch Control settings */
1655 pctrl = readl_relaxed(MSM_L2CC_BASE + L2X0_PREFETCH_CTRL);
1656 pctrl |= (0x3 << L2X0_PREFETCH_CTRL_OFFSET_SHIFT) | \
1657 (0x1 << L2X0_PREFETCH_CTRL_WRAP8_INC_SHIFT) | \
1658 (0x1 << L2X0_PREFETCH_CTRL_WRAP8_SHIFT);
1659 writel_relaxed(pctrl , MSM_L2CC_BASE + L2X0_PREFETCH_CTRL);
Taniya Das379b5682011-12-02 14:53:46 +05301660 }
1661
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001662 l2x0_init(MSM_L2CC_BASE, aux_ctrl, L2X0_AUX_CTRL_MASK);
Prachee Ramsinghani86b1f652012-04-03 16:01:30 +05301663 if (cpu_is_msm8625()) {
1664 pctrl = readl_relaxed(MSM_L2CC_BASE + L2X0_PREFETCH_CTRL);
1665 pr_info("Prfetch Ctrl: 0x%08x\n", pctrl);
1666 }
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001667
1668 return 0;
1669}
1670#else
pankaj kumar80d7cb62011-08-23 13:37:55 +05301671static int __init msm7x27x_cache_init(void){ return 0; }
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001672#endif
1673
1674void __init msm_common_io_init(void)
1675{
1676 msm_map_common_io();
Taniya Das43bcdd62011-12-02 17:33:27 +05301677 if (socinfo_init() < 0)
1678 pr_err("%s: socinfo_init() failed!\n", __func__);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001679 msm7x27x_cache_init();
Taniya Das43bcdd62011-12-02 17:33:27 +05301680}
1681
1682void __init msm8625_init_irq(void)
1683{
Taniya Dasfcb35002012-03-09 15:28:12 +05301684 msm_gic_irq_extn_init(MSM_QGIC_DIST_BASE, MSM_QGIC_CPU_BASE);
Taniya Das43bcdd62011-12-02 17:33:27 +05301685 gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE,
1686 (void *)MSM_QGIC_CPU_BASE);
Taniya Das43bcdd62011-12-02 17:33:27 +05301687}
1688
1689void __init msm8625_map_io(void)
1690{
1691 msm_map_msm8625_io();
1692
Jeff Ohlstein3a77f9f2011-09-06 14:50:20 -07001693 if (socinfo_init() < 0)
1694 pr_err("%s: socinfo_init() failed!\n", __func__);
Taniya Das379b5682011-12-02 14:53:46 +05301695 msm7x27x_cache_init();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001696}
1697
Taniya Das43bcdd62011-12-02 17:33:27 +05301698static int msm7627a_init_gpio(void)
1699{
Taniya Das6684d622012-01-12 10:29:09 +05301700 if (cpu_is_msm8625())
1701 platform_device_register(&msm8625_device_gpio);
1702 else
1703 platform_device_register(&msm_device_gpio);
Taniya Das43bcdd62011-12-02 17:33:27 +05301704 return 0;
1705}
1706postcore_initcall(msm7627a_init_gpio);