blob: 782bb9e89414ef6a8d0c8d9d6bd3b4e8889f326e [file] [log] [blame]
Sravan Kumar Ambapuramb22cf4d2012-01-02 21:45:04 +05301/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
Taniya Dasc98bfbc2011-08-23 09:58:55 +05302 *
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/init.h>
15#include <linux/gpio_event.h>
Pankaj Kumar6f841742011-10-10 15:52:14 +053016#include <linux/usb/android.h>
Taniya Dasc98bfbc2011-08-23 09:58:55 +053017#include <linux/platform_device.h>
18#include <linux/io.h>
19#include <linux/gpio.h>
20#include <linux/mtd/nand.h>
21#include <linux/mtd/partitions.h>
22#include <linux/i2c.h>
23#include <linux/android_pmem.h>
24#include <linux/bootmem.h>
25#include <linux/mfd/marimba.h>
26#include <linux/power_supply.h>
Trilok Sonib9410792012-04-07 15:37:13 +053027#include <linux/input/rmi_platformdata.h>
28#include <linux/input/rmi_i2c.h>
29#include <linux/i2c/atmel_mxt_ts.h>
Pankaj Kumar3cec0582011-11-18 11:13:29 +053030#include <linux/regulator/consumer.h>
Chintan Pandyaf4ad4002012-02-28 19:49:03 +053031#include <linux/memblock.h>
Mohan Pallaka5afe9852012-01-12 23:12:06 +053032#include <linux/input/ft5x06_ts.h>
Siddartha Mohanadossbc2103f2012-03-20 11:41:48 -070033#include <linux/msm_adc.h>
Taniya Dasc98bfbc2011-08-23 09:58:55 +053034#include <asm/mach/mmc.h>
35#include <asm/mach-types.h>
36#include <asm/mach/arch.h>
Chintan Pandyaf4ad4002012-02-28 19:49:03 +053037#include <asm/hardware/gic.h>
Taniya Dasc98bfbc2011-08-23 09:58:55 +053038#include <mach/board.h>
39#include <mach/msm_iomap.h>
40#include <mach/msm_hsusb.h>
41#include <mach/rpc_hsusb.h>
42#include <mach/rpc_pmapp.h>
43#include <mach/usbdiag.h>
Taniya Dasc98bfbc2011-08-23 09:58:55 +053044#include <mach/msm_memtypes.h>
45#include <mach/msm_serial_hs.h>
Taniya Dasc98bfbc2011-08-23 09:58:55 +053046#include <mach/pmic.h>
47#include <mach/socinfo.h>
48#include <mach/vreg.h>
49#include <mach/rpc_pmapp.h>
50#include <mach/msm_battery.h>
51#include <mach/rpc_server_handset.h>
52#include <mach/socinfo.h>
Pankaj Kumar27c02642011-09-22 15:55:55 +053053#include "board-msm7x27a-regulator.h"
Taniya Dasc98bfbc2011-08-23 09:58:55 +053054#include "devices.h"
55#include "devices-msm7x2xa.h"
Matt Wagantall7cca4642012-02-01 16:43:24 -080056#include "pm.h"
Taniya Dasc98bfbc2011-08-23 09:58:55 +053057#include "timer.h"
Murali Nalajalaa1827842011-11-13 14:12:39 +053058#include "pm-boot.h"
Pankaj Kumar3cec0582011-11-18 11:13:29 +053059#include "board-msm7x27a-regulator.h"
Chintan Pandyacf467fc2011-12-01 17:11:11 +053060#include "board-msm7627a.h"
Taniya Dasc98bfbc2011-08-23 09:58:55 +053061
Trilok Sonib9410792012-04-07 15:37:13 +053062#define PMEM_KERNEL_EBI1_SIZE 0x3A000
Sidipotu Ashok4f1ddc92012-04-11 13:51:34 +053063#define MSM_PMEM_AUDIO_SIZE 0x1F4000
Trilok Sonib9410792012-04-07 15:37:13 +053064#define BAHAMA_SLAVE_ID_FM_REG 0x02
65#define FM_GPIO 83
66#define BT_PCM_BCLK_MODE 0x88
67#define BT_PCM_DIN_MODE 0x89
68#define BT_PCM_DOUT_MODE 0x8A
69#define BT_PCM_SYNC_MODE 0x8B
70#define FM_I2S_SD_MODE 0x8E
71#define FM_I2S_WS_MODE 0x8F
72#define FM_I2S_SCK_MODE 0x90
73#define I2C_PIN_CTL 0x15
74#define I2C_NORMAL 0x40
75
Taniya Dasc98bfbc2011-08-23 09:58:55 +053076static struct platform_device msm_wlan_ar6000_pm_device = {
77 .name = "wlan_ar6000_pm_dev",
78 .id = -1,
79};
80
Taniya Dasc98bfbc2011-08-23 09:58:55 +053081static struct msm_gpio qup_i2c_gpios_io[] = {
82 { GPIO_CFG(60, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
83 "qup_scl" },
84 { GPIO_CFG(61, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
85 "qup_sda" },
86 { GPIO_CFG(131, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
87 "qup_scl" },
88 { GPIO_CFG(132, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
89 "qup_sda" },
90};
91
92static struct msm_gpio qup_i2c_gpios_hw[] = {
93 { GPIO_CFG(60, 1, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
94 "qup_scl" },
95 { GPIO_CFG(61, 1, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
96 "qup_sda" },
97 { GPIO_CFG(131, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
98 "qup_scl" },
99 { GPIO_CFG(132, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
100 "qup_sda" },
101};
102
103static void gsbi_qup_i2c_gpio_config(int adap_id, int config_type)
104{
105 int rc;
106
107 if (adap_id < 0 || adap_id > 1)
108 return;
109
110 /* Each adapter gets 2 lines from the table */
111 if (config_type)
112 rc = msm_gpios_request_enable(&qup_i2c_gpios_hw[adap_id*2], 2);
113 else
114 rc = msm_gpios_request_enable(&qup_i2c_gpios_io[adap_id*2], 2);
115 if (rc < 0)
116 pr_err("QUP GPIO request/enable failed: %d\n", rc);
117}
118
119static struct msm_i2c_platform_data msm_gsbi0_qup_i2c_pdata = {
120 .clk_freq = 100000,
121 .msm_i2c_config_gpio = gsbi_qup_i2c_gpio_config,
122};
123
124static struct msm_i2c_platform_data msm_gsbi1_qup_i2c_pdata = {
125 .clk_freq = 100000,
126 .msm_i2c_config_gpio = gsbi_qup_i2c_gpio_config,
127};
128
Trilok Sonib9410792012-04-07 15:37:13 +0530129#ifdef CONFIG_ARCH_MSM7X27A
Sravan Kumar D.V.Nd0b59d62012-04-17 15:08:14 +0530130#define MSM_PMEM_MDP_SIZE 0x2300000
Trilok Sonib9410792012-04-07 15:37:13 +0530131#define MSM_PMEM_ADSP_SIZE 0x1100000
132#endif
133
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530134static struct android_usb_platform_data android_usb_pdata = {
Pankaj Kumar6f841742011-10-10 15:52:14 +0530135 .update_pid_and_serial_num = usb_diag_update_pid_and_serial_num,
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530136};
137
138static struct platform_device android_usb_device = {
139 .name = "android_usb",
140 .id = -1,
141 .dev = {
142 .platform_data = &android_usb_pdata,
143 },
144};
145
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530146#ifdef CONFIG_USB_EHCI_MSM_72K
147static void msm_hsusb_vbus_power(unsigned phy_info, int on)
148{
149 int rc = 0;
150 unsigned gpio;
151
Chintan Pandya40762702011-12-06 13:47:06 +0530152 gpio = QRD_GPIO_HOST_VBUS_EN;
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530153
154 rc = gpio_request(gpio, "i2c_host_vbus_en");
155 if (rc < 0) {
156 pr_err("failed to request %d GPIO\n", gpio);
157 return;
158 }
159 gpio_direction_output(gpio, !!on);
160 gpio_set_value_cansleep(gpio, !!on);
161 gpio_free(gpio);
162}
163
164static struct msm_usb_host_platform_data msm_usb_host_pdata = {
165 .phy_info = (USB_PHY_INTEGRATED | USB_PHY_MODEL_45NM),
166};
167
168static void __init msm7627a_init_host(void)
169{
170 msm_add_host(0, &msm_usb_host_pdata);
171}
172#endif
173
174#ifdef CONFIG_USB_MSM_OTG_72K
175static int hsusb_rpc_connect(int connect)
176{
177 if (connect)
178 return msm_hsusb_rpc_connect();
179 else
180 return msm_hsusb_rpc_close();
181}
182
Pankaj Kumar27c02642011-09-22 15:55:55 +0530183static struct regulator *reg_hsusb;
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530184static int msm_hsusb_ldo_init(int init)
185{
Pankaj Kumar27c02642011-09-22 15:55:55 +0530186 int rc = 0;
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530187
Pankaj Kumar27c02642011-09-22 15:55:55 +0530188 if (init) {
189 reg_hsusb = regulator_get(NULL, "usb");
190 if (IS_ERR(reg_hsusb)) {
191 rc = PTR_ERR(reg_hsusb);
192 pr_err("%s: could not get regulator: %d\n",
193 __func__, rc);
194 goto out;
195 }
196
197 rc = regulator_set_voltage(reg_hsusb, 3300000, 3300000);
198 if (rc) {
199 pr_err("%s: could not set voltage: %d\n",
200 __func__, rc);
201 goto reg_free;
202 }
203
204 return 0;
205 }
206 /* else fall through */
207reg_free:
208 regulator_put(reg_hsusb);
209out:
210 reg_hsusb = NULL;
211 return rc;
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530212}
213
214static int msm_hsusb_ldo_enable(int enable)
215{
216 static int ldo_status;
217
Pankaj Kumar27c02642011-09-22 15:55:55 +0530218 if (IS_ERR_OR_NULL(reg_hsusb))
219 return reg_hsusb ? PTR_ERR(reg_hsusb) : -ENODEV;
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530220
221 if (ldo_status == enable)
222 return 0;
223
224 ldo_status = enable;
225
Pankaj Kumar27c02642011-09-22 15:55:55 +0530226 return enable ?
227 regulator_enable(reg_hsusb) :
228 regulator_disable(reg_hsusb);
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530229}
230
231#ifndef CONFIG_USB_EHCI_MSM_72K
232static int msm_hsusb_pmic_notif_init(void (*callback)(int online), int init)
233{
234 int ret = 0;
235
236 if (init)
237 ret = msm_pm_app_rpc_init(callback);
238 else
239 msm_pm_app_rpc_deinit(callback);
240
241 return ret;
242}
243#endif
244
245static struct msm_otg_platform_data msm_otg_pdata = {
246#ifndef CONFIG_USB_EHCI_MSM_72K
247 .pmic_vbus_notif_init = msm_hsusb_pmic_notif_init,
248#else
249 .vbus_power = msm_hsusb_vbus_power,
250#endif
251 .rpc_connect = hsusb_rpc_connect,
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530252 .pemp_level = PRE_EMPHASIS_WITH_20_PERCENT,
253 .cdr_autoreset = CDR_AUTO_RESET_DISABLE,
254 .drv_ampl = HS_DRV_AMPLITUDE_DEFAULT,
255 .se1_gating = SE1_GATING_DISABLE,
256 .ldo_init = msm_hsusb_ldo_init,
257 .ldo_enable = msm_hsusb_ldo_enable,
258 .chg_init = hsusb_chg_init,
259 .chg_connected = hsusb_chg_connected,
260 .chg_vbus_draw = hsusb_chg_vbus_draw,
261};
262#endif
263
264static struct msm_hsusb_gadget_platform_data msm_gadget_pdata = {
265 .is_phy_status_timer_on = 1,
266};
267
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530268#ifdef CONFIG_SERIAL_MSM_HS
269static struct msm_serial_hs_platform_data msm_uart_dm1_pdata = {
270 .inject_rx_on_wakeup = 1,
271 .rx_to_inject = 0xFD,
272};
273#endif
274static struct msm_pm_platform_data msm7627a_pm_data[MSM_PM_SLEEP_MODE_NR] = {
275 [MSM_PM_SLEEP_MODE_POWER_COLLAPSE] = {
276 .idle_supported = 1,
277 .suspend_supported = 1,
278 .idle_enabled = 1,
279 .suspend_enabled = 1,
280 .latency = 16000,
281 .residency = 20000,
282 },
283 [MSM_PM_SLEEP_MODE_POWER_COLLAPSE_NO_XO_SHUTDOWN] = {
284 .idle_supported = 1,
285 .suspend_supported = 1,
286 .idle_enabled = 1,
287 .suspend_enabled = 1,
288 .latency = 12000,
289 .residency = 20000,
290 },
291 [MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT] = {
292 .idle_supported = 1,
293 .suspend_supported = 1,
294 .idle_enabled = 0,
295 .suspend_enabled = 1,
296 .latency = 2000,
297 .residency = 0,
298 },
299 [MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT] = {
300 .idle_supported = 1,
301 .suspend_supported = 1,
302 .idle_enabled = 1,
303 .suspend_enabled = 1,
304 .latency = 2,
305 .residency = 0,
306 },
307};
308
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -0600309static struct msm_pm_boot_platform_data msm_pm_boot_pdata __initdata = {
Sravan Kumar Ambapuramb22cf4d2012-01-02 21:45:04 +0530310 .mode = MSM_PM_BOOT_CONFIG_RESET_VECTOR_PHYS,
311 .p_addr = 0,
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -0600312};
313
Murali Nalajala4c996be2012-03-12 17:05:41 +0530314/* 8625 PM platform data */
315static struct msm_pm_platform_data msm8625_pm_data[MSM_PM_SLEEP_MODE_NR * 2] = {
316 /* CORE0 entries */
317 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = {
318 .idle_supported = 1,
319 .suspend_supported = 1,
320 .idle_enabled = 0,
321 .suspend_enabled = 0,
322 .latency = 16000,
323 .residency = 20000,
324 },
325
326 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_NO_XO_SHUTDOWN)] = {
327 .idle_supported = 1,
328 .suspend_supported = 1,
329 .idle_enabled = 0,
330 .suspend_enabled = 0,
331 .latency = 12000,
332 .residency = 20000,
333 },
334
335 /* picked latency & redisdency values from 7x30 */
336 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
337 .idle_supported = 1,
338 .suspend_supported = 1,
339 .idle_enabled = 0,
340 .suspend_enabled = 0,
341 .latency = 500,
342 .residency = 6000,
343 },
344
345 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
346 .idle_supported = 1,
347 .suspend_supported = 1,
348 .idle_enabled = 1,
349 .suspend_enabled = 1,
350 .latency = 2,
351 .residency = 10,
352 },
353
354 /* picked latency & redisdency values from 7x30 */
355 [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
356 .idle_supported = 1,
357 .suspend_supported = 1,
358 .idle_enabled = 0,
359 .suspend_enabled = 0,
360 .latency = 500,
361 .residency = 6000,
362 },
363
364 [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
365 .idle_supported = 1,
366 .suspend_supported = 1,
367 .idle_enabled = 1,
368 .suspend_enabled = 1,
369 .latency = 2,
370 .residency = 10,
371 },
372
373};
374
375static struct msm_pm_boot_platform_data msm_pm_8625_boot_pdata __initdata = {
376 .mode = MSM_PM_BOOT_CONFIG_REMAP_BOOT_ADDR,
377 .v_addr = MSM_CFG_CTL_BASE,
378};
379
Trilok Sonib9410792012-04-07 15:37:13 +0530380static struct android_pmem_platform_data android_pmem_adsp_pdata = {
381 .name = "pmem_adsp",
382 .allocator_type = PMEM_ALLOCATORTYPE_BITMAP,
383 .cached = 1,
384 .memory_type = MEMTYPE_EBI1,
385};
386
387static struct platform_device android_pmem_adsp_device = {
388 .name = "android_pmem",
389 .id = 1,
390 .dev = { .platform_data = &android_pmem_adsp_pdata },
391};
392
393static unsigned pmem_mdp_size = MSM_PMEM_MDP_SIZE;
394static int __init pmem_mdp_size_setup(char *p)
395{
396 pmem_mdp_size = memparse(p, NULL);
397 return 0;
398}
399
400early_param("pmem_mdp_size", pmem_mdp_size_setup);
401
402static unsigned pmem_adsp_size = MSM_PMEM_ADSP_SIZE;
403static int __init pmem_adsp_size_setup(char *p)
404{
405 pmem_adsp_size = memparse(p, NULL);
406 return 0;
407}
408
409early_param("pmem_adsp_size", pmem_adsp_size_setup);
410
411#define SND(desc, num) { .name = #desc, .id = num }
412static struct snd_endpoint snd_endpoints_list[] = {
413 SND(HANDSET, 0),
414 SND(MONO_HEADSET, 2),
415 SND(HEADSET, 3),
416 SND(SPEAKER, 6),
417 SND(TTY_HEADSET, 8),
418 SND(TTY_VCO, 9),
419 SND(TTY_HCO, 10),
420 SND(BT, 12),
421 SND(IN_S_SADC_OUT_HANDSET, 16),
422 SND(IN_S_SADC_OUT_SPEAKER_PHONE, 25),
423 SND(FM_DIGITAL_STEREO_HEADSET, 26),
424 SND(FM_DIGITAL_SPEAKER_PHONE, 27),
425 SND(FM_DIGITAL_BT_A2DP_HEADSET, 28),
426 SND(STEREO_HEADSET_AND_SPEAKER, 31),
427 SND(CURRENT, 0x7FFFFFFE),
428 SND(FM_ANALOG_STEREO_HEADSET, 35),
429 SND(FM_ANALOG_STEREO_HEADSET_CODEC, 36),
430};
431#undef SND
432
433static struct msm_snd_endpoints msm_device_snd_endpoints = {
434 .endpoints = snd_endpoints_list,
435 .num = sizeof(snd_endpoints_list) / sizeof(struct snd_endpoint)
436};
437
438static struct platform_device msm_device_snd = {
439 .name = "msm_snd",
440 .id = -1,
441 .dev = {
442 .platform_data = &msm_device_snd_endpoints
443 },
444};
445
446#define DEC0_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
447 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
448 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
449 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
450 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
451 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
452#define DEC1_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
453 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
454 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
455 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
456 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
457 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
458#define DEC2_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
459 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
460 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
461 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
462 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
463 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
464#define DEC3_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
465 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
466 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
467 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
468 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
469 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
470#define DEC4_FORMAT (1<<MSM_ADSP_CODEC_MIDI)
471
472static unsigned int dec_concurrency_table[] = {
473 /* Audio LP */
474 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DMA)), 0,
475 0, 0, 0,
476
477 /* Concurrency 1 */
478 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
479 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
480 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
481 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
482 (DEC4_FORMAT),
483
484 /* Concurrency 2 */
485 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
486 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
487 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
488 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
489 (DEC4_FORMAT),
490
491 /* Concurrency 3 */
492 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
493 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
494 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
495 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
496 (DEC4_FORMAT),
497
498 /* Concurrency 4 */
499 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
500 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
501 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
502 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
503 (DEC4_FORMAT),
504
505 /* Concurrency 5 */
506 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
507 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
508 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
509 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
510 (DEC4_FORMAT),
511
512 /* Concurrency 6 */
Chaithanya Krishna Bacharaju41f09e22012-04-30 14:56:17 +0530513 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
514 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
Sidipotu Ashok451d8442012-04-12 12:12:23 +0530515 0, 0, 0,
Trilok Sonib9410792012-04-07 15:37:13 +0530516
517 /* Concurrency 7 */
518 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
519 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
520 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
521 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
522 (DEC4_FORMAT),
523};
524
525#define DEC_INFO(name, queueid, decid, nr_codec) { .module_name = name, \
526 .module_queueid = queueid, .module_decid = decid, \
527 .nr_codec_support = nr_codec}
528
529static struct msm_adspdec_info dec_info_list[] = {
530 DEC_INFO("AUDPLAY0TASK", 13, 0, 11), /* AudPlay0BitStreamCtrlQueue */
531 DEC_INFO("AUDPLAY1TASK", 14, 1, 11), /* AudPlay1BitStreamCtrlQueue */
532 DEC_INFO("AUDPLAY2TASK", 15, 2, 11), /* AudPlay2BitStreamCtrlQueue */
533 DEC_INFO("AUDPLAY3TASK", 16, 3, 11), /* AudPlay3BitStreamCtrlQueue */
534 DEC_INFO("AUDPLAY4TASK", 17, 4, 1), /* AudPlay4BitStreamCtrlQueue */
535};
536
537static struct msm_adspdec_database msm_device_adspdec_database = {
538 .num_dec = ARRAY_SIZE(dec_info_list),
539 .num_concurrency_support = (ARRAY_SIZE(dec_concurrency_table) / \
540 ARRAY_SIZE(dec_info_list)),
541 .dec_concurrency_table = dec_concurrency_table,
542 .dec_info_list = dec_info_list,
543};
544
545static struct platform_device msm_device_adspdec = {
546 .name = "msm_adspdec",
547 .id = -1,
548 .dev = {
549 .platform_data = &msm_device_adspdec_database
550 },
551};
552
553static struct android_pmem_platform_data android_pmem_audio_pdata = {
554 .name = "pmem_audio",
555 .allocator_type = PMEM_ALLOCATORTYPE_BITMAP,
556 .cached = 0,
557 .memory_type = MEMTYPE_EBI1,
558};
559
560static struct platform_device android_pmem_audio_device = {
561 .name = "android_pmem",
562 .id = 2,
563 .dev = { .platform_data = &android_pmem_audio_pdata },
564};
565
566static struct android_pmem_platform_data android_pmem_pdata = {
567 .name = "pmem",
568 .allocator_type = PMEM_ALLOCATORTYPE_BITMAP,
569 .cached = 1,
570 .memory_type = MEMTYPE_EBI1,
571};
572static struct platform_device android_pmem_device = {
573 .name = "android_pmem",
574 .id = 0,
575 .dev = { .platform_data = &android_pmem_pdata },
576};
577
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530578static u32 msm_calculate_batt_capacity(u32 current_voltage);
579
580static struct msm_psy_batt_pdata msm_psy_batt_data = {
581 .voltage_min_design = 2800,
582 .voltage_max_design = 4300,
583 .avail_chg_sources = AC_CHG | USB_CHG ,
584 .batt_technology = POWER_SUPPLY_TECHNOLOGY_LION,
585 .calculate_capacity = &msm_calculate_batt_capacity,
586};
587
588static u32 msm_calculate_batt_capacity(u32 current_voltage)
589{
590 u32 low_voltage = msm_psy_batt_data.voltage_min_design;
591 u32 high_voltage = msm_psy_batt_data.voltage_max_design;
592
593 return (current_voltage - low_voltage) * 100
594 / (high_voltage - low_voltage);
595}
596
597static struct platform_device msm_batt_device = {
598 .name = "msm-battery",
599 .id = -1,
600 .dev.platform_data = &msm_psy_batt_data,
601};
602
Siddartha Mohanadossbc2103f2012-03-20 11:41:48 -0700603static char *msm_adc_surf_device_names[] = {
604 "XO_ADC",
605};
606
607static struct msm_adc_platform_data msm_adc_pdata = {
608 .dev_names = msm_adc_surf_device_names,
609 .num_adc = ARRAY_SIZE(msm_adc_surf_device_names),
610 .target_hw = MSM_8x25,
611};
612
613static struct platform_device msm_adc_device = {
614 .name = "msm_adc",
615 .id = -1,
616 .dev = {
617 .platform_data = &msm_adc_pdata,
618 },
619};
620
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530621static struct platform_device *common_devices[] __initdata = {
622 &android_usb_device,
Trilok Sonib9410792012-04-07 15:37:13 +0530623 &android_pmem_device,
624 &android_pmem_adsp_device,
625 &android_pmem_audio_device,
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530626 &msm_batt_device,
Trilok Sonib9410792012-04-07 15:37:13 +0530627 &msm_device_adspdec,
628 &msm_device_snd,
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530629 &asoc_msm_pcm,
630 &asoc_msm_dai0,
631 &asoc_msm_dai1,
Siddartha Mohanadossbc2103f2012-03-20 11:41:48 -0700632 &msm_adc_device,
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530633};
634
635static struct platform_device *qrd7627a_devices[] __initdata = {
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530636 &msm_device_dmov,
637 &msm_device_smd,
638 &msm_device_uart1,
639 &msm_device_uart_dm1,
640 &msm_gsbi0_qup_i2c_device,
641 &msm_gsbi1_qup_i2c_device,
642 &msm_device_otg,
643 &msm_device_gadget_peripheral,
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530644 &msm_kgsl_3d0,
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530645};
646
Chintan Pandyab1bad0e2012-02-06 19:04:51 +0530647static struct platform_device *qrd3_devices[] __initdata = {
648 &msm_device_nand,
649};
650
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530651static struct platform_device *msm8625_evb_devices[] __initdata = {
652 &msm8625_device_dmov,
653 &msm8625_device_smd,
654 &msm8625_gsbi0_qup_i2c_device,
655 &msm8625_gsbi1_qup_i2c_device,
656 &msm8625_device_uart1,
Ram Mohan Korukonda5ee9fb82012-03-09 12:10:01 +0530657 &msm8625_device_uart_dm1,
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530658 &msm8625_device_otg,
659 &msm8625_device_gadget_peripheral,
Aparna Mallavarapud95d8fc2012-03-08 12:07:37 +0530660 &msm8625_kgsl_3d0,
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530661};
662
Trilok Sonib9410792012-04-07 15:37:13 +0530663static unsigned pmem_kernel_ebi1_size = PMEM_KERNEL_EBI1_SIZE;
664static int __init pmem_kernel_ebi1_size_setup(char *p)
665{
666 pmem_kernel_ebi1_size = memparse(p, NULL);
667 return 0;
668}
669early_param("pmem_kernel_ebi1_size", pmem_kernel_ebi1_size_setup);
670
671static unsigned pmem_audio_size = MSM_PMEM_AUDIO_SIZE;
672static int __init pmem_audio_size_setup(char *p)
673{
674 pmem_audio_size = memparse(p, NULL);
675 return 0;
676}
677early_param("pmem_audio_size", pmem_audio_size_setup);
678
679static struct memtype_reserve msm7627a_reserve_table[] __initdata = {
680 [MEMTYPE_SMI] = {
681 },
682 [MEMTYPE_EBI0] = {
683 .flags = MEMTYPE_FLAGS_1M_ALIGN,
684 },
685 [MEMTYPE_EBI1] = {
686 .flags = MEMTYPE_FLAGS_1M_ALIGN,
687 },
688};
689
690static void __init size_pmem_devices(void)
691{
692#ifdef CONFIG_ANDROID_PMEM
693 android_pmem_adsp_pdata.size = pmem_adsp_size;
694 android_pmem_pdata.size = pmem_mdp_size;
695 android_pmem_audio_pdata.size = pmem_audio_size;
696#endif
697}
698
699static void __init reserve_memory_for(struct android_pmem_platform_data *p)
700{
701 msm7627a_reserve_table[p->memory_type].size += p->size;
702}
703
704static void __init reserve_pmem_memory(void)
705{
706#ifdef CONFIG_ANDROID_PMEM
707 reserve_memory_for(&android_pmem_adsp_pdata);
708 reserve_memory_for(&android_pmem_pdata);
709 reserve_memory_for(&android_pmem_audio_pdata);
710 msm7627a_reserve_table[MEMTYPE_EBI1].size += pmem_kernel_ebi1_size;
711#endif
712}
713
714static void __init msm7627a_calculate_reserve_sizes(void)
715{
716 size_pmem_devices();
717 reserve_pmem_memory();
718}
719
720static int msm7627a_paddr_to_memtype(unsigned int paddr)
721{
722 return MEMTYPE_EBI1;
723}
724
725static struct reserve_info msm7627a_reserve_info __initdata = {
726 .memtype_reserve_table = msm7627a_reserve_table,
727 .calculate_reserve_sizes = msm7627a_calculate_reserve_sizes,
728 .paddr_to_memtype = msm7627a_paddr_to_memtype,
729};
730
731static void __init msm7627a_reserve(void)
732{
733 reserve_info = &msm7627a_reserve_info;
734 msm_reserve();
735 memblock_remove(MSM8625_WARM_BOOT_PHYS, SZ_32);
736}
737
738static void __init msm8625_reserve(void)
739{
740 memblock_remove(MSM8625_SECONDARY_PHYS, SZ_8);
741 msm7627a_reserve();
742}
743
744static void msmqrd_adsp_add_pdev(void)
745{
746 int rc = 0;
747 struct rpc_board_dev *rpc_adsp_pdev;
748
749 rpc_adsp_pdev = kzalloc(sizeof(struct rpc_board_dev), GFP_KERNEL);
750 if (rpc_adsp_pdev == NULL) {
751 pr_err("%s: Memory Allocation failure\n", __func__);
752 return;
753 }
754 rpc_adsp_pdev->prog = ADSP_RPC_PROG;
755
756 if (cpu_is_msm8625())
757 rpc_adsp_pdev->pdev = msm8625_device_adsp;
758 else
759 rpc_adsp_pdev->pdev = msm_adsp_device;
760 rc = msm_rpc_add_board_dev(rpc_adsp_pdev, 1);
761 if (rc < 0) {
762 pr_err("%s: return val: %d\n", __func__, rc);
763 kfree(rpc_adsp_pdev);
764 }
765}
766
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530767static void __init msm7627a_device_i2c_init(void)
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530768{
769 msm_gsbi0_qup_i2c_device.dev.platform_data = &msm_gsbi0_qup_i2c_pdata;
770 msm_gsbi1_qup_i2c_device.dev.platform_data = &msm_gsbi1_qup_i2c_pdata;
771}
772
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530773static void __init msm8625_device_i2c_init(void)
774{
775 msm8625_gsbi0_qup_i2c_device.dev.platform_data
776 = &msm_gsbi0_qup_i2c_pdata;
777 msm8625_gsbi1_qup_i2c_device.dev.platform_data
778 = &msm_gsbi1_qup_i2c_pdata;
779}
780
Pankaj Kumar3cec0582011-11-18 11:13:29 +0530781static struct platform_device msm_proccomm_regulator_dev = {
782 .name = PROCCOMM_REGULATOR_DEV_NAME,
783 .id = -1,
784 .dev = {
785 .platform_data = &msm7x27a_proccomm_regulator_data
786 }
787};
788
789static void __init msm7627a_init_regulators(void)
790{
791 int rc = platform_device_register(&msm_proccomm_regulator_dev);
792 if (rc)
793 pr_err("%s: could not register regulator device: %d\n",
794 __func__, rc);
795}
796
Santosh Sajjan374d6592012-01-19 23:16:46 +0530797static int __init msm_qrd_init_ar6000pm(void)
798{
799 msm_wlan_ar6000_pm_device.dev.platform_data = &ar600x_wlan_power;
800 return platform_device_register(&msm_wlan_ar6000_pm_device);
801}
802
Taniya Dase380a2d2012-03-09 13:02:41 +0530803static void __init msm_add_footswitch_devices(void)
804{
805 platform_add_devices(msm_footswitch_devices,
806 msm_num_footswitch_devices);
807}
808
Stephen Boyd668d7652012-04-25 11:31:01 -0700809static void __init add_platform_devices(void)
Chintan Pandyab1bad0e2012-02-06 19:04:51 +0530810{
Taniya Dasbd096542012-03-15 17:43:45 +0530811 if (machine_is_msm8625_evb() || machine_is_msm8625_qrd7()) {
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530812 platform_add_devices(msm8625_evb_devices,
813 ARRAY_SIZE(msm8625_evb_devices));
Aparna Mallavarapubeafcbc2012-03-13 16:57:39 +0530814 platform_add_devices(qrd3_devices,
Taniya Dasbd096542012-03-15 17:43:45 +0530815 ARRAY_SIZE(qrd3_devices));
Aparna Mallavarapubeafcbc2012-03-13 16:57:39 +0530816 } else {
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530817 platform_add_devices(qrd7627a_devices,
818 ARRAY_SIZE(qrd7627a_devices));
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530819 }
Taniya Dasbd096542012-03-15 17:43:45 +0530820
Aparna Mallavarapu0b69ca22012-03-26 15:58:35 +0530821 if (machine_is_msm7627a_qrd3() || machine_is_msm7627a_evb())
Taniya Dasbd096542012-03-15 17:43:45 +0530822 platform_add_devices(qrd3_devices,
Aparna Mallavarapu0b69ca22012-03-26 15:58:35 +0530823 ARRAY_SIZE(qrd3_devices));
Taniya Dasbd096542012-03-15 17:43:45 +0530824
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530825 platform_add_devices(common_devices,
826 ARRAY_SIZE(common_devices));
Chintan Pandyab1bad0e2012-02-06 19:04:51 +0530827}
828
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530829#define UART1DM_RX_GPIO 45
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530830static void __init qrd7627a_uart1dm_config(void)
831{
832 msm_uart_dm1_pdata.wakeup_irq = gpio_to_irq(UART1DM_RX_GPIO);
833 if (cpu_is_msm8625())
834 msm8625_device_uart_dm1.dev.platform_data =
835 &msm_uart_dm1_pdata;
836 else
837 msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
838}
839
840static void __init qrd7627a_otg_gadget(void)
841{
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530842 if (cpu_is_msm8625()) {
Murali Nalajala6ff8fb12012-05-02 18:50:50 +0530843 msm_otg_pdata.swfi_latency = msm8625_pm_data
844 [MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT].latency;
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530845 msm8625_device_otg.dev.platform_data = &msm_otg_pdata;
846 msm8625_device_gadget_peripheral.dev.platform_data =
847 &msm_gadget_pdata;
848
849 } else {
Murali Nalajala6ff8fb12012-05-02 18:50:50 +0530850 msm_otg_pdata.swfi_latency = msm7627a_pm_data
851 [MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT].latency;
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530852 msm_device_otg.dev.platform_data = &msm_otg_pdata;
853 msm_device_gadget_peripheral.dev.platform_data =
854 &msm_gadget_pdata;
855 }
856}
857
Taniya Dasbd096542012-03-15 17:43:45 +0530858static void __init msm_pm_init(void)
859{
Taniya Dasbd096542012-03-15 17:43:45 +0530860
Aparna Mallavarapu6d969eb2012-04-03 15:10:25 +0530861 if (!cpu_is_msm8625()) {
Taniya Dasbd096542012-03-15 17:43:45 +0530862 msm_pm_set_platform_data(msm7627a_pm_data,
863 ARRAY_SIZE(msm7627a_pm_data));
864 BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata));
865 } else {
866 msm_pm_set_platform_data(msm8625_pm_data,
867 ARRAY_SIZE(msm8625_pm_data));
868 BUG_ON(msm_pm_boot_init(&msm_pm_8625_boot_pdata));
869 msm8x25_spm_device_init();
870 }
871}
872
Taniya Dasc868a2e2012-01-03 10:18:47 +0530873static void __init msm_qrd_init(void)
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530874{
875 msm7x2x_misc_init();
Pankaj Kumar3cec0582011-11-18 11:13:29 +0530876 msm7627a_init_regulators();
Trilok Sonib9410792012-04-07 15:37:13 +0530877 msmqrd_adsp_add_pdev();
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530878
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530879 if (cpu_is_msm8625())
880 msm8625_device_i2c_init();
881 else
882 msm7627a_device_i2c_init();
883
884 /* uart1dm*/
885 qrd7627a_uart1dm_config();
886 /*OTG gadget*/
887 qrd7627a_otg_gadget();
Taniya Dasc868a2e2012-01-03 10:18:47 +0530888
Taniya Dase380a2d2012-03-09 13:02:41 +0530889 msm_add_footswitch_devices();
Chintan Pandyab1bad0e2012-02-06 19:04:51 +0530890 add_platform_devices();
Taniya Dasc868a2e2012-01-03 10:18:47 +0530891
Santosh Sajjan374d6592012-01-19 23:16:46 +0530892 /* Ensure ar6000pm device is registered before MMC/SDC */
893 msm_qrd_init_ar6000pm();
Chintan Pandyacf467fc2011-12-01 17:11:11 +0530894 msm7627a_init_mmc();
895
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530896#ifdef CONFIG_USB_EHCI_MSM_72K
897 msm7627a_init_host();
898#endif
Taniya Dasbd096542012-03-15 17:43:45 +0530899 msm_pm_init();
Murali Nalajalaa1827842011-11-13 14:12:39 +0530900
Murali Nalajala2a0bbda2012-03-28 12:12:54 +0530901 msm_pm_register_irqs();
Taniya Das0a5303a2011-08-23 18:47:48 +0530902 msm_fb_add_devices();
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530903
904#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
Chintan Pandya13490c02011-12-20 13:03:36 +0530905 msm7627a_bt_power_init();
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530906#endif
Taniya Dasda408822011-09-06 12:54:06 +0530907
Chintan Pandya40762702011-12-06 13:47:06 +0530908 msm7627a_camera_init();
Chintan Pandya0d453192012-03-09 13:20:33 +0530909 qrd7627a_add_io_devices();
Aparna Mallavarapud95d8fc2012-03-08 12:07:37 +0530910 msm7x25a_kgsl_3d0_init();
Sudhakara Rao Tentu38ad6e12012-03-30 15:25:18 -0700911 msm8x25_kgsl_3d0_init();
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530912}
913
914static void __init qrd7627a_init_early(void)
915{
916 msm_msm7627a_allocate_memory_regions();
917}
918
919MACHINE_START(MSM7627A_QRD1, "QRD MSM7627a QRD1")
920 .boot_params = PHYS_OFFSET + 0x100,
921 .map_io = msm_common_io_init,
Trilok Sonib9410792012-04-07 15:37:13 +0530922 .reserve = msm7627a_reserve,
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530923 .init_irq = msm_init_irq,
Taniya Dasc868a2e2012-01-03 10:18:47 +0530924 .init_machine = msm_qrd_init,
925 .timer = &msm_timer,
926 .init_early = qrd7627a_init_early,
927 .handle_irq = vic_handle_irq,
928MACHINE_END
Chintan Pandyab1bad0e2012-02-06 19:04:51 +0530929MACHINE_START(MSM7627A_QRD3, "QRD MSM7627a QRD3")
930 .boot_params = PHYS_OFFSET + 0x100,
931 .map_io = msm_common_io_init,
Trilok Sonib9410792012-04-07 15:37:13 +0530932 .reserve = msm7627a_reserve,
Chintan Pandyab1bad0e2012-02-06 19:04:51 +0530933 .init_irq = msm_init_irq,
934 .init_machine = msm_qrd_init,
935 .timer = &msm_timer,
936 .init_early = qrd7627a_init_early,
937 .handle_irq = vic_handle_irq,
938MACHINE_END
Taniya Dasc868a2e2012-01-03 10:18:47 +0530939MACHINE_START(MSM7627A_EVB, "QRD MSM7627a EVB")
940 .boot_params = PHYS_OFFSET + 0x100,
941 .map_io = msm_common_io_init,
Trilok Sonib9410792012-04-07 15:37:13 +0530942 .reserve = msm7627a_reserve,
Taniya Dasc868a2e2012-01-03 10:18:47 +0530943 .init_irq = msm_init_irq,
944 .init_machine = msm_qrd_init,
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530945 .timer = &msm_timer,
946 .init_early = qrd7627a_init_early,
Pankaj Kumarbf8a2a32011-10-21 11:47:21 +0530947 .handle_irq = vic_handle_irq,
Taniya Dasc98bfbc2011-08-23 09:58:55 +0530948MACHINE_END
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530949MACHINE_START(MSM8625_EVB, "QRD MSM8625 EVB")
950 .boot_params = PHYS_OFFSET + 0x100,
951 .map_io = msm8625_map_io,
Trilok Sonib9410792012-04-07 15:37:13 +0530952 .reserve = msm8625_reserve,
Chintan Pandyaf4ad4002012-02-28 19:49:03 +0530953 .init_irq = msm8625_init_irq,
954 .init_machine = msm_qrd_init,
955 .timer = &msm_timer,
956 .init_early = qrd7627a_init_early,
957 .handle_irq = gic_handle_irq,
958MACHINE_END
Taniya Dasbd096542012-03-15 17:43:45 +0530959MACHINE_START(MSM8625_QRD7, "QRD MSM8625 QRD7")
960 .boot_params = PHYS_OFFSET + 0x100,
961 .map_io = msm8625_map_io,
Trilok Sonib9410792012-04-07 15:37:13 +0530962 .reserve = msm8625_reserve,
Taniya Dasbd096542012-03-15 17:43:45 +0530963 .init_irq = msm8625_init_irq,
964 .init_machine = msm_qrd_init,
965 .timer = &msm_timer,
966 .init_early = qrd7627a_init_early,
967 .handle_irq = gic_handle_irq,
968MACHINE_END