blob: c009bdfda5c9f2789cf42a07c5dd5fa7c426ffdc [file] [log] [blame]
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -07001/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13#include <linux/kernel.h>
14#include <linux/platform_device.h>
Harini Jayaramaneba52672011-09-08 15:13:00 -060015#include <linux/i2c.h>
Kenneth Heitkeaf3d3cf2011-09-08 11:45:31 -070016#include <linux/msm_ssbi.h>
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -070017#include <asm/mach-types.h>
18#include <asm/mach/arch.h>
Krishna Kondadd794462011-10-01 00:19:29 -070019#include <asm/mach/mmc.h>
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -070020#include <mach/board.h>
21#include <mach/msm_iomap.h>
22#include <mach/gpio.h>
23#include <mach/gpiomux.h>
Harini Jayaraman738c9312011-09-08 15:22:38 -060024#include <mach/msm_spi.h>
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -070025#include "timer.h"
26#include "devices.h"
David Collinsfb88c432011-08-25 15:12:47 -070027#include "board-9615.h"
Maheshkumar Sivasubramanian4923db22011-09-15 09:28:15 -060028#include "cpuidle.h"
29#include "pm.h"
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -070030
Rohit Vaswani09666872011-08-23 17:41:54 -070031static struct platform_device *common_devices[] = {
Jeff Ohlsteind19bf442011-09-09 12:48:18 -070032 &msm9615_device_dmov,
Jeff Hugo56b933a2011-09-28 14:42:05 -060033 &msm_device_smd,
Rohit Vaswani09666872011-08-23 17:41:54 -070034 &msm9615_device_uart_gsbi4,
Kenneth Heitkeaf3d3cf2011-09-08 11:45:31 -070035 &msm9615_device_ssbi_pmic1,
Harini Jayaramaneba52672011-09-08 15:13:00 -060036 &msm9615_device_qup_i2c_gsbi5,
Harini Jayaraman738c9312011-09-08 15:22:38 -060037 &msm9615_device_qup_spi_gsbi3,
Yan He092b7272011-09-21 15:25:03 -070038 &msm_device_sps,
Siddartha Mohanadoss5d49cec2011-09-21 10:26:15 -070039 &msm9615_device_tsens,
Sahitya Tummala38295432011-09-29 10:08:45 +053040 &msm_device_nand,
Praveen Chidambaramab3b1c42011-08-25 08:44:05 -060041 &msm_rpm_device,
Rohit Vaswani09666872011-08-23 17:41:54 -070042};
43
David Collinsfb88c432011-08-25 15:12:47 -070044static struct pm8xxx_irq_platform_data pm8xxx_irq_pdata __devinitdata = {
45 .irq_base = PM8018_IRQ_BASE,
46 .devirq = MSM_GPIO_TO_INT(87),
47 .irq_trigger_flag = IRQF_TRIGGER_LOW,
48};
49
50static struct pm8xxx_gpio_platform_data pm8xxx_gpio_pdata __devinitdata = {
51 .gpio_base = PM8018_GPIO_PM_TO_SYS(1),
52};
53
54static struct pm8xxx_mpp_platform_data pm8xxx_mpp_pdata __devinitdata = {
55 .mpp_base = PM8018_MPP_PM_TO_SYS(1),
56};
57
58static struct pm8xxx_rtc_platform_data pm8xxx_rtc_pdata __devinitdata = {
59 .rtc_write_enable = false,
60};
61
62static struct pm8xxx_pwrkey_platform_data pm8xxx_pwrkey_pdata = {
63 .pull_up = 1,
64 .kpd_trigger_delay_us = 970,
65 .wakeup = 1,
66};
67
68static struct pm8xxx_misc_platform_data pm8xxx_misc_pdata = {
69 .priority = 0,
70};
71
72static struct pm8018_platform_data pm8018_platform_data __devinitdata = {
73 .irq_pdata = &pm8xxx_irq_pdata,
74 .gpio_pdata = &pm8xxx_gpio_pdata,
75 .mpp_pdata = &pm8xxx_mpp_pdata,
76 .rtc_pdata = &pm8xxx_rtc_pdata,
77 .pwrkey_pdata = &pm8xxx_pwrkey_pdata,
78 .misc_pdata = &pm8xxx_misc_pdata,
David Collins00b31e62011-08-31 20:00:10 -070079 .regulator_pdatas = msm_pm8018_regulator_pdata,
David Collinsfb88c432011-08-25 15:12:47 -070080};
81
Kenneth Heitkeaf3d3cf2011-09-08 11:45:31 -070082static struct msm_ssbi_platform_data msm9615_ssbi_pm8018_pdata __devinitdata = {
83 .controller_type = MSM_SBI_CTRL_PMIC_ARBITER,
84 .slave = {
David Collinsfb88c432011-08-25 15:12:47 -070085 .name = PM8018_CORE_DEV_NAME,
86 .platform_data = &pm8018_platform_data,
Kenneth Heitkeaf3d3cf2011-09-08 11:45:31 -070087 },
88};
89
Rohit Vaswanif688fa62011-10-13 18:13:10 -070090static struct gpiomux_setting ps_hold = {
91 .func = GPIOMUX_FUNC_1,
92 .drv = GPIOMUX_DRV_8MA,
93 .pull = GPIOMUX_PULL_NONE,
94};
95
Rohit Vaswani09666872011-08-23 17:41:54 -070096static struct gpiomux_setting gsbi4 = {
97 .func = GPIOMUX_FUNC_1,
98 .drv = GPIOMUX_DRV_8MA,
99 .pull = GPIOMUX_PULL_NONE,
100};
101
Harini Jayaramaneba52672011-09-08 15:13:00 -0600102static struct gpiomux_setting gsbi5 = {
103 .func = GPIOMUX_FUNC_1,
104 .drv = GPIOMUX_DRV_8MA,
105 .pull = GPIOMUX_PULL_NONE,
106};
107
Harini Jayaraman738c9312011-09-08 15:22:38 -0600108static struct gpiomux_setting gsbi3 = {
109 .func = GPIOMUX_FUNC_1,
110 .drv = GPIOMUX_DRV_8MA,
111 .pull = GPIOMUX_PULL_NONE,
112};
113
114static struct gpiomux_setting gsbi3_cs1_config = {
115 .func = GPIOMUX_FUNC_4,
116 .drv = GPIOMUX_DRV_8MA,
117 .pull = GPIOMUX_PULL_NONE,
118};
119
Rohit Vaswanif688fa62011-10-13 18:13:10 -0700120struct msm_gpiomux_config msm9615_ps_hold_config[] __initdata = {
121 {
122 .gpio = 83,
123 .settings = {
124 [GPIOMUX_SUSPENDED] = &ps_hold,
125 },
126 },
127};
128
Rohit Vaswani09666872011-08-23 17:41:54 -0700129struct msm_gpiomux_config msm9615_gsbi_configs[] __initdata = {
130 {
Harini Jayaraman738c9312011-09-08 15:22:38 -0600131 .gpio = 8, /* GSBI3 QUP SPI_CLK */
132 .settings = {
133 [GPIOMUX_SUSPENDED] = &gsbi3,
134 },
135 },
136 {
137 .gpio = 9, /* GSBI3 QUP SPI_CS_N */
138 .settings = {
139 [GPIOMUX_SUSPENDED] = &gsbi3,
140 },
141 },
142 {
143 .gpio = 10, /* GSBI3 QUP SPI_DATA_MISO */
144 .settings = {
145 [GPIOMUX_SUSPENDED] = &gsbi3,
146 },
147 },
148 {
149 .gpio = 11, /* GSBI3 QUP SPI_DATA_MOSI */
150 .settings = {
151 [GPIOMUX_SUSPENDED] = &gsbi3,
152 },
153 },
154 {
Rohit Vaswani09666872011-08-23 17:41:54 -0700155 .gpio = 12, /* GSBI4 UART */
156 .settings = {
157 [GPIOMUX_SUSPENDED] = &gsbi4,
158 },
159 },
160 {
161 .gpio = 13, /* GSBI4 UART */
162 .settings = {
163 [GPIOMUX_SUSPENDED] = &gsbi4,
164 },
165 },
166 {
167 .gpio = 14, /* GSBI4 UART */
168 .settings = {
169 [GPIOMUX_SUSPENDED] = &gsbi4,
170 },
171 },
172 {
173 .gpio = 15, /* GSBI4 UART */
174 .settings = {
175 [GPIOMUX_SUSPENDED] = &gsbi4,
176 },
177 },
Harini Jayaramaneba52672011-09-08 15:13:00 -0600178 {
179 .gpio = 16, /* GSBI5 I2C QUP SCL */
180 .settings = {
181 [GPIOMUX_SUSPENDED] = &gsbi5,
182 },
183 },
184 {
185 .gpio = 17, /* GSBI5 I2C QUP SDA */
186 .settings = {
187 [GPIOMUX_SUSPENDED] = &gsbi5,
188 },
189 },
Harini Jayaraman738c9312011-09-08 15:22:38 -0600190 {
191 /* GPIO 19 can be used for I2C/UART on GSBI5 */
192 .gpio = 19, /* GSBI3 QUP SPI_CS_1 */
193 .settings = {
194 [GPIOMUX_SUSPENDED] = &gsbi3_cs1_config,
195 },
196 },
Rohit Vaswani09666872011-08-23 17:41:54 -0700197};
198
Krishna Kondadd794462011-10-01 00:19:29 -0700199#if (defined(CONFIG_MMC_MSM_SDC1_SUPPORT)\
200 || defined(CONFIG_MMC_MSM_SDC2_SUPPORT))
201
202#define GPIO_SDCARD_PWR_EN 18
203
204/* MDM9x15 have 2 SDCC controllers */
205enum sdcc_controllers {
206 SDCC1,
207 SDCC2,
208 MAX_SDCC_CONTROLLER
209};
210
211#ifdef CONFIG_MMC_MSM_SDC1_SUPPORT
212/* SDC1 pad data */
213static struct msm_mmc_pad_drv sdc1_pad_drv_on_cfg[] = {
214 {TLMM_HDRV_SDC1_CLK, GPIO_CFG_16MA},
215 {TLMM_HDRV_SDC1_CMD, GPIO_CFG_10MA},
216 {TLMM_HDRV_SDC1_DATA, GPIO_CFG_10MA}
217};
218
219static struct msm_mmc_pad_drv sdc1_pad_drv_off_cfg[] = {
220 {TLMM_HDRV_SDC1_CLK, GPIO_CFG_2MA},
221 {TLMM_HDRV_SDC1_CMD, GPIO_CFG_2MA},
222 {TLMM_HDRV_SDC1_DATA, GPIO_CFG_2MA}
223};
224
225static struct msm_mmc_pad_pull sdc1_pad_pull_on_cfg[] = {
226 {TLMM_PULL_SDC1_CLK, GPIO_CFG_NO_PULL},
227 {TLMM_PULL_SDC1_CMD, GPIO_CFG_PULL_UP},
228 {TLMM_PULL_SDC1_DATA, GPIO_CFG_PULL_UP}
229};
230
231static struct msm_mmc_pad_pull sdc1_pad_pull_off_cfg[] = {
232 {TLMM_PULL_SDC1_CLK, GPIO_CFG_NO_PULL},
233 {TLMM_PULL_SDC1_CMD, GPIO_CFG_PULL_DOWN},
234 {TLMM_PULL_SDC1_DATA, GPIO_CFG_PULL_DOWN}
235};
236
237static struct msm_mmc_pad_pull_data mmc_pad_pull_data[MAX_SDCC_CONTROLLER] = {
238 [SDCC1] = {
239 .on = sdc1_pad_pull_on_cfg,
240 .off = sdc1_pad_pull_off_cfg,
241 .size = ARRAY_SIZE(sdc1_pad_pull_on_cfg)
242 },
243};
244
245static struct msm_mmc_pad_drv_data mmc_pad_drv_data[MAX_SDCC_CONTROLLER] = {
246 [SDCC1] = {
247 .on = sdc1_pad_drv_on_cfg,
248 .off = sdc1_pad_drv_off_cfg,
249 .size = ARRAY_SIZE(sdc1_pad_drv_on_cfg)
250 },
251};
252
253static struct msm_mmc_pad_data mmc_pad_data[MAX_SDCC_CONTROLLER] = {
254 [SDCC1] = {
255 .pull = &mmc_pad_pull_data[SDCC1],
256 .drv = &mmc_pad_drv_data[SDCC1]
257 },
258};
259#endif
260
Krishna Konda71aef182011-10-01 02:27:51 -0700261#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
262static struct gpiomux_setting sdcc2_clk_actv_cfg = {
263 .func = GPIOMUX_FUNC_1,
264 .drv = GPIOMUX_DRV_16MA,
265 .pull = GPIOMUX_PULL_NONE,
266};
267
268static struct gpiomux_setting sdcc2_cmd_data_0_3_actv_cfg = {
269 .func = GPIOMUX_FUNC_1,
270 .drv = GPIOMUX_DRV_8MA,
271 .pull = GPIOMUX_PULL_UP,
272};
273
274static struct gpiomux_setting sdcc2_suspend_cfg = {
275 .func = GPIOMUX_FUNC_1,
276 .drv = GPIOMUX_DRV_2MA,
277 .pull = GPIOMUX_PULL_DOWN,
278};
279
280static struct msm_gpiomux_config msm9615_sdcc2_configs[] __initdata = {
281 {
282 /* SDC2_DATA_0 */
283 .gpio = 25,
284 .settings = {
285 [GPIOMUX_ACTIVE] = &sdcc2_cmd_data_0_3_actv_cfg,
286 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_cfg,
287 },
288 },
289 {
290 /* SDC2_DATA_1 */
291 .gpio = 26,
292 .settings = {
293 [GPIOMUX_ACTIVE] = &sdcc2_cmd_data_0_3_actv_cfg,
294 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_cfg,
295 },
296 },
297 {
298 /* SDC2_DATA_2 */
299 .gpio = 27,
300 .settings = {
301 [GPIOMUX_ACTIVE] = &sdcc2_cmd_data_0_3_actv_cfg,
302 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_cfg,
303 },
304 },
305 {
306 /* SDC2_DATA_3 */
307 .gpio = 28,
308 .settings = {
309 [GPIOMUX_ACTIVE] = &sdcc2_cmd_data_0_3_actv_cfg,
310 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_cfg,
311 },
312 },
313 {
314 /* SDC2_CMD GSBI1 */
315 .gpio = 29,
316 .settings = {
317 [GPIOMUX_ACTIVE] = &sdcc2_cmd_data_0_3_actv_cfg,
318 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_cfg,
319 },
320 },
321 {
322 /* SDC2_CLK GSBI1 */
323 .gpio = 30,
324 .settings = {
325 [GPIOMUX_ACTIVE] = &sdcc2_clk_actv_cfg,
326 [GPIOMUX_SUSPENDED] = &sdcc2_suspend_cfg,
327 },
328 },
329};
330
331static struct msm_mmc_gpio sdc2_gpio_cfg[] = {
332 {25, "sdc2_dat_0"},
333 {26, "sdc2_dat_1"},
334 {27, "sdc2_dat_2"},
335 {28, "sdc2_dat_3"},
336 {29, "sdc2_cmd"},
337 {30, "sdc2_clk"},
338};
339
340static struct msm_mmc_gpio_data mmc_gpio_data[MAX_SDCC_CONTROLLER] = {
341 [SDCC2] = {
342 .gpio = sdc2_gpio_cfg,
343 .size = ARRAY_SIZE(sdc2_gpio_cfg),
344 },
345};
346#else
347static struct msm_gpiomux_config msm9615_sdcc2_configs[0];
348#endif
349
350static struct msm_mmc_pin_data mmc_slot_pin_data[MAX_SDCC_CONTROLLER] = {
Krishna Kondadd794462011-10-01 00:19:29 -0700351#ifdef CONFIG_MMC_MSM_SDC1_SUPPORT
352 [SDCC1] = {
353 .is_gpio = 0,
354 .pad_data = &mmc_pad_data[SDCC1],
355 },
356#endif
Krishna Konda71aef182011-10-01 02:27:51 -0700357#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
358 [SDCC2] = {
359 .is_gpio = 1,
360 .gpio_data = &mmc_gpio_data[SDCC2],
361 },
362#endif
Krishna Kondadd794462011-10-01 00:19:29 -0700363};
364
365#ifdef CONFIG_MMC_MSM_SDC1_SUPPORT
366static unsigned int sdc1_sup_clk_rates[] = {
367 400000, 24000000, 48000000
368};
369
370static struct mmc_platform_data sdc1_data = {
371 .ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29,
372 .mmc_bus_width = MMC_CAP_4_BIT_DATA,
373 .sup_clk_table = sdc1_sup_clk_rates,
374 .sup_clk_cnt = ARRAY_SIZE(sdc1_sup_clk_rates),
375 .sdcc_v4_sup = true,
376 .pin_data = &mmc_slot_pin_data[SDCC1],
377};
378static struct mmc_platform_data *msm9615_sdc1_pdata = &sdc1_data;
379#else
380static struct mmc_platform_data *msm9615_sdc1_pdata;
381#endif
382
Krishna Konda71aef182011-10-01 02:27:51 -0700383#ifdef CONFIG_MMC_MSM_SDC2_SUPPORT
384static unsigned int sdc2_sup_clk_rates[] = {
385 400000, 24000000, 48000000
386};
387
388static struct mmc_platform_data sdc2_data = {
389 .ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29,
390 .mmc_bus_width = MMC_CAP_4_BIT_DATA,
391 .sup_clk_table = sdc2_sup_clk_rates,
392 .sup_clk_cnt = ARRAY_SIZE(sdc2_sup_clk_rates),
393 .sdcc_v4_sup = true,
394 .pin_data = &mmc_slot_pin_data[SDCC2],
395};
396static struct mmc_platform_data *msm9615_sdc2_pdata = &sdc2_data;
397#else
398static struct mmc_platform_data *msm9615_sdc2_pdata;
399#endif
400
Krishna Kondadd794462011-10-01 00:19:29 -0700401static void __init msm9615_init_mmc(void)
402{
403 int ret;
404
405 if (msm9615_sdc1_pdata) {
406 ret = gpio_request(GPIO_SDCARD_PWR_EN, "SDCARD_PWR_EN");
407
408 if (ret) {
409 pr_err("%s: sdcc1: Error requesting GPIO "
410 "SDCARD_PWR_EN:%d\n", __func__, ret);
411 } else {
412 ret = gpio_direction_output(GPIO_SDCARD_PWR_EN, 1);
413 if (ret) {
414 pr_err("%s: sdcc1: Error setting o/p direction"
415 " for GPIO SDCARD_PWR_EN:%d\n",
416 __func__, ret);
417 gpio_free(GPIO_SDCARD_PWR_EN);
418 } else {
419 msm_add_sdcc(1, msm9615_sdc1_pdata);
420 }
421 }
422 }
Krishna Konda71aef182011-10-01 02:27:51 -0700423
424 if (msm9615_sdc2_pdata) {
425 msm_gpiomux_install(msm9615_sdcc2_configs,
426 ARRAY_SIZE(msm9615_sdcc2_configs));
427
428 /* SDC2: External card slot */
429 msm_add_sdcc(2, msm9615_sdc2_pdata);
430 }
Krishna Kondadd794462011-10-01 00:19:29 -0700431}
432#else
433static void __init msm9615_init_mmc(void) { }
434#endif
Maheshkumar Sivasubramanian4923db22011-09-15 09:28:15 -0600435static struct msm_cpuidle_state msm_cstates[] __initdata = {
436 {0, 0, "C0", "WFI",
437 MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT},
438
439 {0, 1, "C1", "STANDALONE_POWER_COLLAPSE",
440 MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE},
441
442 {0, 2, "C2", "POWER_COLLAPSE",
443 MSM_PM_SLEEP_MODE_POWER_COLLAPSE},
444};
445static struct msm_pm_platform_data msm_pm_data[MSM_PM_SLEEP_MODE_NR] = {
446 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = {
447 .idle_supported = 1,
448 .suspend_supported = 1,
449 .idle_enabled = 0,
450 .suspend_enabled = 0,
451 },
452 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
453 .idle_supported = 1,
454 .suspend_supported = 1,
455 .idle_enabled = 0,
456 .suspend_enabled = 0,
457 },
458 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
459 .idle_supported = 1,
460 .suspend_supported = 1,
461 .idle_enabled = 1,
462 .suspend_enabled = 1,
463 },
464};
Krishna Kondadd794462011-10-01 00:19:29 -0700465
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -0700466static int __init gpiomux_init(void)
467{
468 int rc;
469
470 rc = msm_gpiomux_init(NR_GPIO_IRQS);
471 if (rc) {
472 pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc);
473 return rc;
474 }
Rohit Vaswani09666872011-08-23 17:41:54 -0700475 msm_gpiomux_install(msm9615_gsbi_configs,
476 ARRAY_SIZE(msm9615_gsbi_configs));
477
Rohit Vaswanif688fa62011-10-13 18:13:10 -0700478 msm_gpiomux_install(msm9615_ps_hold_config,
479 ARRAY_SIZE(msm9615_ps_hold_config));
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -0700480 return 0;
481}
482
Harini Jayaraman738c9312011-09-08 15:22:38 -0600483static struct msm_spi_platform_data msm9615_qup_spi_gsbi3_pdata = {
484 .max_clock_speed = 24000000,
485};
486
Harini Jayaramaneba52672011-09-08 15:13:00 -0600487static struct msm_i2c_platform_data msm9615_i2c_qup_gsbi5_pdata = {
488 .clk_freq = 100000,
489 .src_clk_rate = 24000000,
490};
491
492static void __init msm9615_i2c_init(void)
493{
494 msm9615_device_qup_i2c_gsbi5.dev.platform_data =
495 &msm9615_i2c_qup_gsbi5_pdata;
496}
497
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -0700498static void __init msm9615_common_init(void)
499{
500 msm9615_device_init();
501 gpiomux_init();
Harini Jayaramaneba52672011-09-08 15:13:00 -0600502 msm9615_i2c_init();
David Collins00b31e62011-08-31 20:00:10 -0700503 regulator_suppress_info_printing();
Harini Jayaraman738c9312011-09-08 15:22:38 -0600504 msm9615_device_qup_spi_gsbi3.dev.platform_data =
505 &msm9615_qup_spi_gsbi3_pdata;
Kenneth Heitkeaf3d3cf2011-09-08 11:45:31 -0700506 msm9615_device_ssbi_pmic1.dev.platform_data =
507 &msm9615_ssbi_pm8018_pdata;
David Collins00b31e62011-08-31 20:00:10 -0700508 pm8018_platform_data.num_regulators = msm_pm8018_regulator_pdata_len;
Rohit Vaswani09666872011-08-23 17:41:54 -0700509 platform_add_devices(common_devices, ARRAY_SIZE(common_devices));
Krishna Kondadd794462011-10-01 00:19:29 -0700510
511 msm9615_init_mmc();
Maheshkumar Sivasubramanian4923db22011-09-15 09:28:15 -0600512 msm_pm_set_platform_data(msm_pm_data, ARRAY_SIZE(msm_pm_data));
513 msm_pm_set_rpm_wakeup_irq(RPM_APCC_CPU0_WAKE_UP_IRQ);
514 msm_cpuidle_set_states(msm_cstates, ARRAY_SIZE(msm_cstates),
515 msm_pm_data);
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -0700516}
517
518static void __init msm9615_cdp_init(void)
519{
520 msm9615_common_init();
521}
522
523static void __init msm9615_mtp_init(void)
524{
525 msm9615_common_init();
526}
527
528MACHINE_START(MSM9615_CDP, "QCT MSM9615 CDP")
529 .map_io = msm9615_map_io,
530 .init_irq = msm9615_init_irq,
531 .timer = &msm_timer,
532 .init_machine = msm9615_cdp_init,
533MACHINE_END
534
535MACHINE_START(MSM9615_MTP, "QCT MSM9615 MTP")
536 .map_io = msm9615_map_io,
537 .init_irq = msm9615_init_irq,
538 .timer = &msm_timer,
539 .init_machine = msm9615_mtp_init,
540MACHINE_END