blob: 91f1aaed8ef136c1b5131eece50cd1e099580581 [file] [log] [blame]
Sravan Kumar Ambapuramb22cf4d2012-01-02 21:45:04 +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#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/gpio_event.h>
Taniya Das2b16d1d2011-12-02 14:44:19 +053015#include <linux/memblock.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070016#include <asm/mach-types.h>
Murali Nalajala41786ab2012-03-06 10:47:32 +053017#include <linux/memblock.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070018#include <asm/mach/arch.h>
Taniya Das43bcdd62011-12-02 17:33:27 +053019#include <asm/hardware/gic.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070020#include <mach/board.h>
21#include <mach/msm_iomap.h>
22#include <mach/msm_hsusb.h>
23#include <mach/rpc_hsusb.h>
24#include <mach/rpc_pmapp.h>
25#include <mach/usbdiag.h>
26#include <mach/msm_memtypes.h>
27#include <mach/msm_serial_hs.h>
28#include <linux/usb/android.h>
29#include <linux/platform_device.h>
30#include <linux/io.h>
31#include <linux/gpio.h>
32#include <mach/vreg.h>
33#include <mach/pmic.h>
34#include <mach/socinfo.h>
35#include <linux/mtd/nand.h>
36#include <linux/mtd/partitions.h>
37#include <asm/mach/mmc.h>
38#include <linux/i2c.h>
39#include <linux/i2c/sx150x.h>
40#include <linux/gpio.h>
41#include <linux/android_pmem.h>
42#include <linux/bootmem.h>
43#include <linux/mfd/marimba.h>
44#include <mach/vreg.h>
45#include <linux/power_supply.h>
Justin Paupored98328e2011-08-19 13:48:31 -070046#include <linux/regulator/consumer.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070047#include <mach/rpc_pmapp.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070048#include <mach/msm_battery.h>
49#include <linux/smsc911x.h>
50#include <linux/atmel_maxtouch.h>
Siddartha Mohanadossbc2103f2012-03-20 11:41:48 -070051#include <linux/msm_adc.h>
Chintan Pandya43d0a342012-06-08 19:45:56 +053052#include <linux/ion.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070053#include "devices.h"
54#include "timer.h"
Justin Pauporeb3a33b72011-08-23 15:30:32 -070055#include "board-msm7x27a-regulator.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070056#include "devices-msm7x2xa.h"
Matt Wagantall7cca4642012-02-01 16:43:24 -080057#include "pm.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070058#include <mach/rpc_server_handset.h>
59#include <mach/socinfo.h>
Maheshkumar Sivasubramanian8ccc16e2011-10-25 15:59:57 -060060#include "pm-boot.h"
Chintan Pandyacf467fc2011-12-01 17:11:11 +053061#include "board-msm7627a.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070062
Trilok Sonib9410792012-04-07 15:37:13 +053063#define PMEM_KERNEL_EBI1_SIZE 0x3A000
Sidipotu Ashok554881c2012-04-12 11:42:02 +053064#define MSM_PMEM_AUDIO_SIZE 0x1F4000
Trilok Sonib9410792012-04-07 15:37:13 +053065
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070066#if defined(CONFIG_GPIO_SX150X)
67enum {
68 SX150X_CORE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070069};
70
71static struct sx150x_platform_data sx150x_data[] __initdata = {
72 [SX150X_CORE] = {
73 .gpio_base = GPIO_CORE_EXPANDER_BASE,
74 .oscio_is_gpo = false,
75 .io_pullup_ena = 0,
pankaj kumarc5c01392011-08-12 13:44:05 +053076 .io_pulldn_ena = 0x02,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070077 .io_open_drain_ena = 0xfef8,
78 .irq_summary = -1,
79 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070080};
81#endif
82
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070083
Steve Mucklef132c6c2012-06-06 18:30:57 -070084#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
Santosh Sajjan6822c682011-07-26 10:49:36 +053085static struct platform_device msm_wlan_ar6000_pm_device = {
86 .name = "wlan_ar6000_pm_dev",
87 .id = -1,
88};
Steve Mucklef132c6c2012-06-06 18:30:57 -070089#endif
Santosh Sajjan6822c682011-07-26 10:49:36 +053090
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070091#if defined(CONFIG_I2C) && defined(CONFIG_GPIO_SX150X)
92static struct i2c_board_info core_exp_i2c_info[] __initdata = {
93 {
94 I2C_BOARD_INFO("sx1509q", 0x3e),
95 },
96};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070097
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070098static void __init register_i2c_devices(void)
99{
Taniya Dase3027e22012-02-27 16:32:27 +0530100 if (machine_is_msm7x27a_surf() || machine_is_msm7625a_surf() ||
101 machine_is_msm8625_surf())
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700102 sx150x_data[SX150X_CORE].io_open_drain_ena = 0xe0f0;
103
104 core_exp_i2c_info[0].platform_data =
105 &sx150x_data[SX150X_CORE];
106
107 i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
108 core_exp_i2c_info,
109 ARRAY_SIZE(core_exp_i2c_info));
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700110}
111#endif
112
113static struct msm_gpio qup_i2c_gpios_io[] = {
114 { GPIO_CFG(60, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
115 "qup_scl" },
116 { GPIO_CFG(61, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
117 "qup_sda" },
118 { GPIO_CFG(131, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
119 "qup_scl" },
120 { GPIO_CFG(132, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
121 "qup_sda" },
122};
123
124static struct msm_gpio qup_i2c_gpios_hw[] = {
125 { GPIO_CFG(60, 1, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
126 "qup_scl" },
127 { GPIO_CFG(61, 1, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
128 "qup_sda" },
129 { GPIO_CFG(131, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
130 "qup_scl" },
131 { GPIO_CFG(132, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
132 "qup_sda" },
133};
134
135static void gsbi_qup_i2c_gpio_config(int adap_id, int config_type)
136{
137 int rc;
138
139 if (adap_id < 0 || adap_id > 1)
140 return;
141
142 /* Each adapter gets 2 lines from the table */
143 if (config_type)
144 rc = msm_gpios_request_enable(&qup_i2c_gpios_hw[adap_id*2], 2);
145 else
146 rc = msm_gpios_request_enable(&qup_i2c_gpios_io[adap_id*2], 2);
147 if (rc < 0)
148 pr_err("QUP GPIO request/enable failed: %d\n", rc);
149}
150
151static struct msm_i2c_platform_data msm_gsbi0_qup_i2c_pdata = {
152 .clk_freq = 100000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700153 .msm_i2c_config_gpio = gsbi_qup_i2c_gpio_config,
154};
155
156static struct msm_i2c_platform_data msm_gsbi1_qup_i2c_pdata = {
157 .clk_freq = 100000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700158 .msm_i2c_config_gpio = gsbi_qup_i2c_gpio_config,
159};
160
Trilok Sonib9410792012-04-07 15:37:13 +0530161#ifdef CONFIG_ARCH_MSM7X27A
Sravan Kumar D.V.N2655b112012-08-02 19:08:30 +0530162#define MSM_PMEM_MDP_SIZE 0x1B00000
Trilok Sonib9410792012-04-07 15:37:13 +0530163#define MSM7x25A_MSM_PMEM_MDP_SIZE 0x1500000
164
Rajeshwar Kurapaty20d7ad12012-06-22 16:11:06 +0530165#define MSM_PMEM_ADSP_SIZE 0x1200000
Trilok Sonib9410792012-04-07 15:37:13 +0530166#define MSM7x25A_MSM_PMEM_ADSP_SIZE 0xB91000
167
168#endif
169
Chintan Pandya43d0a342012-06-08 19:45:56 +0530170#ifdef CONFIG_ION_MSM
171#define MSM_ION_HEAP_NUM 4
172static struct platform_device ion_dev;
173static int msm_ion_camera_size;
174static int msm_ion_audio_size;
175static int msm_ion_sf_size;
176#endif
177
178
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700179static struct android_usb_platform_data android_usb_pdata = {
180 .update_pid_and_serial_num = usb_diag_update_pid_and_serial_num,
181};
182
183static struct platform_device android_usb_device = {
184 .name = "android_usb",
185 .id = -1,
186 .dev = {
187 .platform_data = &android_usb_pdata,
188 },
189};
190
191#ifdef CONFIG_USB_EHCI_MSM_72K
192static void msm_hsusb_vbus_power(unsigned phy_info, int on)
193{
194 int rc = 0;
195 unsigned gpio;
196
197 gpio = GPIO_HOST_VBUS_EN;
198
199 rc = gpio_request(gpio, "i2c_host_vbus_en");
200 if (rc < 0) {
201 pr_err("failed to request %d GPIO\n", gpio);
202 return;
203 }
204 gpio_direction_output(gpio, !!on);
205 gpio_set_value_cansleep(gpio, !!on);
206 gpio_free(gpio);
207}
208
209static struct msm_usb_host_platform_data msm_usb_host_pdata = {
210 .phy_info = (USB_PHY_INTEGRATED | USB_PHY_MODEL_45NM),
211};
212
213static void __init msm7x2x_init_host(void)
214{
215 msm_add_host(0, &msm_usb_host_pdata);
216}
217#endif
218
219#ifdef CONFIG_USB_MSM_OTG_72K
220static int hsusb_rpc_connect(int connect)
221{
222 if (connect)
223 return msm_hsusb_rpc_connect();
224 else
225 return msm_hsusb_rpc_close();
226}
227
Justin Paupored98328e2011-08-19 13:48:31 -0700228static struct regulator *reg_hsusb;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700229static int msm_hsusb_ldo_init(int init)
230{
Justin Paupored98328e2011-08-19 13:48:31 -0700231 int rc = 0;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700232
Justin Paupored98328e2011-08-19 13:48:31 -0700233 if (init) {
234 reg_hsusb = regulator_get(NULL, "usb");
235 if (IS_ERR(reg_hsusb)) {
236 rc = PTR_ERR(reg_hsusb);
237 pr_err("%s: could not get regulator: %d\n",
238 __func__, rc);
239 goto out;
240 }
241
242 rc = regulator_set_voltage(reg_hsusb, 3300000, 3300000);
243 if (rc) {
244 pr_err("%s: could not set voltage: %d\n",
245 __func__, rc);
246 goto reg_free;
247 }
248
249 return 0;
250 }
251 /* else fall through */
252reg_free:
253 regulator_put(reg_hsusb);
254out:
255 reg_hsusb = NULL;
256 return rc;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700257}
258
259static int msm_hsusb_ldo_enable(int enable)
260{
261 static int ldo_status;
262
Justin Paupored98328e2011-08-19 13:48:31 -0700263 if (IS_ERR_OR_NULL(reg_hsusb))
264 return reg_hsusb ? PTR_ERR(reg_hsusb) : -ENODEV;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700265
266 if (ldo_status == enable)
267 return 0;
268
269 ldo_status = enable;
270
Justin Paupored98328e2011-08-19 13:48:31 -0700271 return enable ?
272 regulator_enable(reg_hsusb) :
273 regulator_disable(reg_hsusb);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700274}
275
276#ifndef CONFIG_USB_EHCI_MSM_72K
277static int msm_hsusb_pmic_notif_init(void (*callback)(int online), int init)
278{
279 int ret = 0;
280
281 if (init)
282 ret = msm_pm_app_rpc_init(callback);
283 else
284 msm_pm_app_rpc_deinit(callback);
285
286 return ret;
287}
288#endif
289
290static struct msm_otg_platform_data msm_otg_pdata = {
291#ifndef CONFIG_USB_EHCI_MSM_72K
292 .pmic_vbus_notif_init = msm_hsusb_pmic_notif_init,
293#else
294 .vbus_power = msm_hsusb_vbus_power,
295#endif
296 .rpc_connect = hsusb_rpc_connect,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700297 .pemp_level = PRE_EMPHASIS_WITH_20_PERCENT,
298 .cdr_autoreset = CDR_AUTO_RESET_DISABLE,
299 .drv_ampl = HS_DRV_AMPLITUDE_DEFAULT,
300 .se1_gating = SE1_GATING_DISABLE,
301 .ldo_init = msm_hsusb_ldo_init,
302 .ldo_enable = msm_hsusb_ldo_enable,
303 .chg_init = hsusb_chg_init,
304 .chg_connected = hsusb_chg_connected,
305 .chg_vbus_draw = hsusb_chg_vbus_draw,
306};
307#endif
308
309static struct msm_hsusb_gadget_platform_data msm_gadget_pdata = {
310 .is_phy_status_timer_on = 1,
311};
312
313static struct resource smc91x_resources[] = {
314 [0] = {
315 .start = 0x90000300,
316 .end = 0x900003ff,
317 .flags = IORESOURCE_MEM,
318 },
319 [1] = {
320 .start = MSM_GPIO_TO_INT(4),
321 .end = MSM_GPIO_TO_INT(4),
322 .flags = IORESOURCE_IRQ,
323 },
324};
325
326static struct platform_device smc91x_device = {
327 .name = "smc91x",
328 .id = 0,
329 .num_resources = ARRAY_SIZE(smc91x_resources),
330 .resource = smc91x_resources,
331};
332
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700333#ifdef CONFIG_SERIAL_MSM_HS
334static struct msm_serial_hs_platform_data msm_uart_dm1_pdata = {
335 .inject_rx_on_wakeup = 1,
336 .rx_to_inject = 0xFD,
337};
338#endif
339static struct msm_pm_platform_data msm7x27a_pm_data[MSM_PM_SLEEP_MODE_NR] = {
Murali Nalajalab10363d2012-01-12 16:29:01 +0530340 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700341 .idle_supported = 1,
342 .suspend_supported = 1,
343 .idle_enabled = 1,
344 .suspend_enabled = 1,
345 .latency = 16000,
346 .residency = 20000,
347 },
Murali Nalajalab10363d2012-01-12 16:29:01 +0530348 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_NO_XO_SHUTDOWN)] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700349 .idle_supported = 1,
350 .suspend_supported = 1,
351 .idle_enabled = 1,
352 .suspend_enabled = 1,
353 .latency = 12000,
354 .residency = 20000,
355 },
Murali Nalajalab10363d2012-01-12 16:29:01 +0530356 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT)] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700357 .idle_supported = 1,
358 .suspend_supported = 1,
359 .idle_enabled = 0,
360 .suspend_enabled = 1,
361 .latency = 2000,
362 .residency = 0,
363 },
Murali Nalajalab10363d2012-01-12 16:29:01 +0530364 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700365 .idle_supported = 1,
366 .suspend_supported = 1,
367 .idle_enabled = 1,
368 .suspend_enabled = 1,
369 .latency = 2,
370 .residency = 0,
371 },
372};
373
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -0600374static struct msm_pm_boot_platform_data msm_pm_boot_pdata __initdata = {
Sravan Kumar Ambapuramb22cf4d2012-01-02 21:45:04 +0530375 .mode = MSM_PM_BOOT_CONFIG_RESET_VECTOR_PHYS,
376 .p_addr = 0,
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -0600377};
378
Murali Nalajalad1f67b02012-02-10 00:23:49 +0530379/* 8625 PM platform data */
380static struct msm_pm_platform_data msm8625_pm_data[MSM_PM_SLEEP_MODE_NR * 2] = {
381 /* CORE0 entries */
382 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = {
383 .idle_supported = 1,
384 .suspend_supported = 1,
385 .idle_enabled = 0,
386 .suspend_enabled = 0,
387 .latency = 16000,
388 .residency = 20000,
389 },
390
391 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_NO_XO_SHUTDOWN)] = {
392 .idle_supported = 1,
393 .suspend_supported = 1,
394 .idle_enabled = 0,
395 .suspend_enabled = 0,
396 .latency = 12000,
397 .residency = 20000,
398 },
399
400 /* picked latency & redisdency values from 7x30 */
401 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
402 .idle_supported = 1,
403 .suspend_supported = 1,
404 .idle_enabled = 0,
405 .suspend_enabled = 0,
406 .latency = 500,
407 .residency = 6000,
408 },
409
410 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
411 .idle_supported = 1,
412 .suspend_supported = 1,
413 .idle_enabled = 1,
414 .suspend_enabled = 1,
415 .latency = 2,
416 .residency = 10,
417 },
418
419 /* picked latency & redisdency values from 7x30 */
420 [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
421 .idle_supported = 1,
422 .suspend_supported = 1,
423 .idle_enabled = 0,
424 .suspend_enabled = 0,
425 .latency = 500,
426 .residency = 6000,
427 },
428
429 [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
430 .idle_supported = 1,
431 .suspend_supported = 1,
432 .idle_enabled = 1,
433 .suspend_enabled = 1,
434 .latency = 2,
435 .residency = 10,
436 },
437
438};
439
Murali Nalajala41786ab2012-03-06 10:47:32 +0530440static struct msm_pm_boot_platform_data msm_pm_8625_boot_pdata __initdata = {
441 .mode = MSM_PM_BOOT_CONFIG_REMAP_BOOT_ADDR,
442 .v_addr = MSM_CFG_CTL_BASE,
443};
444
Trilok Sonib9410792012-04-07 15:37:13 +0530445static struct android_pmem_platform_data android_pmem_adsp_pdata = {
446 .name = "pmem_adsp",
447 .allocator_type = PMEM_ALLOCATORTYPE_BITMAP,
448 .cached = 1,
449 .memory_type = MEMTYPE_EBI1,
Trilok Sonib9410792012-04-07 15:37:13 +0530450};
451
452static struct platform_device android_pmem_adsp_device = {
453 .name = "android_pmem",
454 .id = 1,
455 .dev = { .platform_data = &android_pmem_adsp_pdata },
456};
457
458static unsigned pmem_mdp_size = MSM_PMEM_MDP_SIZE;
459static int __init pmem_mdp_size_setup(char *p)
460{
461 pmem_mdp_size = memparse(p, NULL);
462 return 0;
463}
464
465early_param("pmem_mdp_size", pmem_mdp_size_setup);
466
467static unsigned pmem_adsp_size = MSM_PMEM_ADSP_SIZE;
468static int __init pmem_adsp_size_setup(char *p)
469{
470 pmem_adsp_size = memparse(p, NULL);
471 return 0;
472}
473
474early_param("pmem_adsp_size", pmem_adsp_size_setup);
475
476#define SND(desc, num) { .name = #desc, .id = num }
477static struct snd_endpoint snd_endpoints_list[] = {
478 SND(HANDSET, 0),
479 SND(MONO_HEADSET, 2),
480 SND(HEADSET, 3),
481 SND(SPEAKER, 6),
482 SND(TTY_HEADSET, 8),
483 SND(TTY_VCO, 9),
484 SND(TTY_HCO, 10),
485 SND(BT, 12),
486 SND(IN_S_SADC_OUT_HANDSET, 16),
487 SND(IN_S_SADC_OUT_SPEAKER_PHONE, 25),
488 SND(FM_DIGITAL_STEREO_HEADSET, 26),
489 SND(FM_DIGITAL_SPEAKER_PHONE, 27),
490 SND(FM_DIGITAL_BT_A2DP_HEADSET, 28),
491 SND(STEREO_HEADSET_AND_SPEAKER, 31),
492 SND(CURRENT, 0x7FFFFFFE),
493 SND(FM_ANALOG_STEREO_HEADSET, 35),
494 SND(FM_ANALOG_STEREO_HEADSET_CODEC, 36),
495};
496#undef SND
497
498static struct msm_snd_endpoints msm_device_snd_endpoints = {
499 .endpoints = snd_endpoints_list,
500 .num = sizeof(snd_endpoints_list) / sizeof(struct snd_endpoint)
501};
502
503static struct platform_device msm_device_snd = {
504 .name = "msm_snd",
505 .id = -1,
506 .dev = {
507 .platform_data = &msm_device_snd_endpoints
508 },
509};
510
511#define DEC0_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
512 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
513 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
514 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
515 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
Chaithanya Krishna Bacharaju8e838cc2012-08-16 11:32:46 +0530516 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))| \
517 (1<<MSM_ADSP_CODEC_AC3)
Trilok Sonib9410792012-04-07 15:37:13 +0530518#define DEC1_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
519 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
520 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
521 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
522 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
523 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
524#define DEC2_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
525 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
526 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
527 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
528 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
529 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
530#define DEC3_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
531 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
532 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
533 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
534 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
535 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
536#define DEC4_FORMAT (1<<MSM_ADSP_CODEC_MIDI)
537
538static unsigned int dec_concurrency_table[] = {
539 /* Audio LP */
540 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DMA)), 0,
541 0, 0, 0,
542
543 /* Concurrency 1 */
544 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
545 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
546 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
547 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
548 (DEC4_FORMAT),
549
550 /* Concurrency 2 */
551 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
552 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
553 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
554 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
555 (DEC4_FORMAT),
556
557 /* Concurrency 3 */
558 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
559 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
560 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
561 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
562 (DEC4_FORMAT),
563
564 /* Concurrency 4 */
565 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
566 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
567 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
568 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
569 (DEC4_FORMAT),
570
571 /* Concurrency 5 */
572 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
573 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
574 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
575 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
576 (DEC4_FORMAT),
577
578 /* Concurrency 6 */
Chaithanya Krishna Bacharaju72ab89b2012-05-11 14:24:04 +0530579 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|
580 (1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
581 0, 0, 0, 0,
Trilok Sonib9410792012-04-07 15:37:13 +0530582
583 /* Concurrency 7 */
584 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
585 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
586 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
587 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
588 (DEC4_FORMAT),
589};
590
591#define DEC_INFO(name, queueid, decid, nr_codec) { .module_name = name, \
592 .module_queueid = queueid, .module_decid = decid, \
593 .nr_codec_support = nr_codec}
594
595static struct msm_adspdec_info dec_info_list[] = {
596 DEC_INFO("AUDPLAY0TASK", 13, 0, 11), /* AudPlay0BitStreamCtrlQueue */
597 DEC_INFO("AUDPLAY1TASK", 14, 1, 11), /* AudPlay1BitStreamCtrlQueue */
598 DEC_INFO("AUDPLAY2TASK", 15, 2, 11), /* AudPlay2BitStreamCtrlQueue */
599 DEC_INFO("AUDPLAY3TASK", 16, 3, 11), /* AudPlay3BitStreamCtrlQueue */
600 DEC_INFO("AUDPLAY4TASK", 17, 4, 1), /* AudPlay4BitStreamCtrlQueue */
601};
602
603static struct msm_adspdec_database msm_device_adspdec_database = {
604 .num_dec = ARRAY_SIZE(dec_info_list),
605 .num_concurrency_support = (ARRAY_SIZE(dec_concurrency_table) / \
606 ARRAY_SIZE(dec_info_list)),
607 .dec_concurrency_table = dec_concurrency_table,
608 .dec_info_list = dec_info_list,
609};
610
611static struct platform_device msm_device_adspdec = {
612 .name = "msm_adspdec",
613 .id = -1,
614 .dev = {
615 .platform_data = &msm_device_adspdec_database
616 },
617};
618
619static struct android_pmem_platform_data android_pmem_audio_pdata = {
620 .name = "pmem_audio",
621 .allocator_type = PMEM_ALLOCATORTYPE_BITMAP,
622 .cached = 0,
623 .memory_type = MEMTYPE_EBI1,
624};
625
626static struct platform_device android_pmem_audio_device = {
627 .name = "android_pmem",
628 .id = 2,
629 .dev = { .platform_data = &android_pmem_audio_pdata },
630};
631
632static struct android_pmem_platform_data android_pmem_pdata = {
633 .name = "pmem",
634 .allocator_type = PMEM_ALLOCATORTYPE_BITMAP,
635 .cached = 1,
636 .memory_type = MEMTYPE_EBI1,
637};
638static struct platform_device android_pmem_device = {
639 .name = "android_pmem",
640 .id = 0,
641 .dev = { .platform_data = &android_pmem_pdata },
642};
643
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700644static u32 msm_calculate_batt_capacity(u32 current_voltage);
645
646static struct msm_psy_batt_pdata msm_psy_batt_data = {
Krishna Vanka9a265e12012-06-04 23:24:26 +0530647 .voltage_min_design = 3200,
648 .voltage_max_design = 4200,
649 .voltage_fail_safe = 3340,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700650 .avail_chg_sources = AC_CHG | USB_CHG ,
651 .batt_technology = POWER_SUPPLY_TECHNOLOGY_LION,
652 .calculate_capacity = &msm_calculate_batt_capacity,
653};
654
655static u32 msm_calculate_batt_capacity(u32 current_voltage)
656{
657 u32 low_voltage = msm_psy_batt_data.voltage_min_design;
658 u32 high_voltage = msm_psy_batt_data.voltage_max_design;
659
Krishna Vankab3494692012-06-12 15:06:43 +0530660 if (current_voltage <= low_voltage)
661 return 0;
662 else if (current_voltage >= high_voltage)
663 return 100;
664 else
665 return (current_voltage - low_voltage) * 100
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700666 / (high_voltage - low_voltage);
667}
668
669static struct platform_device msm_batt_device = {
670 .name = "msm-battery",
671 .id = -1,
672 .dev.platform_data = &msm_psy_batt_data,
673};
674
675static struct smsc911x_platform_config smsc911x_config = {
676 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
677 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
678 .flags = SMSC911X_USE_16BIT,
679};
680
681static struct resource smsc911x_resources[] = {
682 [0] = {
683 .start = 0x90000000,
684 .end = 0x90007fff,
685 .flags = IORESOURCE_MEM,
686 },
687 [1] = {
688 .start = MSM_GPIO_TO_INT(48),
689 .end = MSM_GPIO_TO_INT(48),
690 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
691 },
692};
693
694static struct platform_device smsc911x_device = {
695 .name = "smsc911x",
696 .id = 0,
697 .num_resources = ARRAY_SIZE(smsc911x_resources),
698 .resource = smsc911x_resources,
699 .dev = {
700 .platform_data = &smsc911x_config,
701 },
702};
703
704static struct msm_gpio smsc911x_gpios[] = {
705 { GPIO_CFG(48, 0, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_6MA),
706 "smsc911x_irq" },
707 { GPIO_CFG(49, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_6MA),
708 "eth_fifo_sel" },
709};
710
Siddartha Mohanadossbc2103f2012-03-20 11:41:48 -0700711static char *msm_adc_surf_device_names[] = {
712 "XO_ADC",
713};
714
715static struct msm_adc_platform_data msm_adc_pdata = {
716 .dev_names = msm_adc_surf_device_names,
717 .num_adc = ARRAY_SIZE(msm_adc_surf_device_names),
718 .target_hw = MSM_8x25,
719};
720
721static struct platform_device msm_adc_device = {
722 .name = "msm_adc",
723 .id = -1,
724 .dev = {
725 .platform_data = &msm_adc_pdata,
726 },
727};
728
Utsab Bosecd0bb5e2012-08-07 13:07:28 +0530729#ifdef CONFIG_MSM_RTB
730static struct msm_rtb_platform_data msm7x27a_rtb_pdata = {
731 .size = SZ_1M,
732};
733
734static int __init msm_rtb_set_buffer_size(char *p)
735{
736 int s;
737
738 s = memparse(p, NULL);
739 msm7x27a_rtb_pdata.size = ALIGN(s, SZ_4K);
740 return 0;
741}
742early_param("msm_rtb_size", msm_rtb_set_buffer_size);
743
744struct platform_device msm7x27a_rtb_device = {
745 .name = "msm_rtb",
746 .id = -1,
747 .dev = {
748 .platform_data = &msm7x27a_rtb_pdata,
749 },
750};
751#endif
752
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700753#define ETH_FIFO_SEL_GPIO 49
754static void msm7x27a_cfg_smsc911x(void)
755{
756 int res;
757
758 res = msm_gpios_request_enable(smsc911x_gpios,
759 ARRAY_SIZE(smsc911x_gpios));
760 if (res) {
761 pr_err("%s: unable to enable gpios for SMSC911x\n", __func__);
762 return;
763 }
764
765 /* ETH_FIFO_SEL */
766 res = gpio_direction_output(ETH_FIFO_SEL_GPIO, 0);
767 if (res) {
768 pr_err("%s: unable to get direction for gpio %d\n", __func__,
769 ETH_FIFO_SEL_GPIO);
770 msm_gpios_disable_free(smsc911x_gpios,
771 ARRAY_SIZE(smsc911x_gpios));
772 return;
773 }
774 gpio_set_value(ETH_FIFO_SEL_GPIO, 0);
775}
776
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700777#if defined(CONFIG_SERIAL_MSM_HSL_CONSOLE) \
778 && defined(CONFIG_MSM_SHARED_GPIO_FOR_UART2DM)
779static struct msm_gpio uart2dm_gpios[] = {
780 {GPIO_CFG(19, 2, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
781 "uart2dm_rfr_n" },
782 {GPIO_CFG(20, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
783 "uart2dm_cts_n" },
784 {GPIO_CFG(21, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
785 "uart2dm_rx" },
786 {GPIO_CFG(108, 2, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
787 "uart2dm_tx" },
788};
789
790static void msm7x27a_cfg_uart2dm_serial(void)
791{
792 int ret;
793 ret = msm_gpios_request_enable(uart2dm_gpios,
794 ARRAY_SIZE(uart2dm_gpios));
795 if (ret)
796 pr_err("%s: unable to enable gpios for uart2dm\n", __func__);
797}
798#else
799static void msm7x27a_cfg_uart2dm_serial(void) { }
800#endif
801
802static struct platform_device *rumi_sim_devices[] __initdata = {
803 &msm_device_dmov,
804 &msm_device_smd,
805 &smc91x_device,
806 &msm_device_uart1,
807 &msm_device_nand,
808 &msm_device_uart_dm1,
809 &msm_gsbi0_qup_i2c_device,
810 &msm_gsbi1_qup_i2c_device,
811};
812
Taniya Das43bcdd62011-12-02 17:33:27 +0530813static struct platform_device *msm8625_rumi3_devices[] __initdata = {
814 &msm8625_device_dmov,
Angshuman Sarkarfb1cce92012-02-21 15:20:43 +0530815 &msm8625_device_smd,
Taniya Das43bcdd62011-12-02 17:33:27 +0530816 &msm8625_device_uart1,
Taniya Dase3027e22012-02-27 16:32:27 +0530817 &msm8625_gsbi0_qup_i2c_device,
Taniya Das43bcdd62011-12-02 17:33:27 +0530818};
819
Taniya Dase3027e22012-02-27 16:32:27 +0530820static struct platform_device *msm7627a_surf_ffa_devices[] __initdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700821 &msm_device_dmov,
822 &msm_device_smd,
823 &msm_device_uart1,
824 &msm_device_uart_dm1,
825 &msm_device_uart_dm2,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700826 &msm_gsbi0_qup_i2c_device,
827 &msm_gsbi1_qup_i2c_device,
828 &msm_device_otg,
829 &msm_device_gadget_peripheral,
Taniya Dase3027e22012-02-27 16:32:27 +0530830 &smsc911x_device,
831 &msm_kgsl_3d0,
832};
833
834static struct platform_device *common_devices[] __initdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700835 &android_usb_device,
Trilok Sonib9410792012-04-07 15:37:13 +0530836 &android_pmem_device,
837 &android_pmem_adsp_device,
838 &android_pmem_audio_device,
Taniya Dase3027e22012-02-27 16:32:27 +0530839 &msm_device_nand,
Trilok Sonib9410792012-04-07 15:37:13 +0530840 &msm_device_snd,
841 &msm_device_adspdec,
Manish Dewangan3a260992011-06-24 18:01:34 +0530842 &asoc_msm_pcm,
843 &asoc_msm_dai0,
844 &asoc_msm_dai1,
Taniya Dase3027e22012-02-27 16:32:27 +0530845 &msm_batt_device,
Siddartha Mohanadossbc2103f2012-03-20 11:41:48 -0700846 &msm_adc_device,
Utsab Bosecd0bb5e2012-08-07 13:07:28 +0530847#ifdef CONFIG_MSM_RTB
848 &msm7x27a_rtb_device,
849#endif
Chintan Pandya43d0a342012-06-08 19:45:56 +0530850#ifdef CONFIG_ION_MSM
851 &ion_dev,
852#endif
Taniya Dase3027e22012-02-27 16:32:27 +0530853};
854
855static struct platform_device *msm8625_surf_devices[] __initdata = {
856 &msm8625_device_dmov,
857 &msm8625_device_uart1,
858 &msm8625_device_uart_dm1,
859 &msm8625_device_uart_dm2,
860 &msm8625_gsbi0_qup_i2c_device,
861 &msm8625_gsbi1_qup_i2c_device,
Taniya Dasf2665302012-02-28 16:54:54 +0530862 &msm8625_device_smd,
Taniya Dase3027e22012-02-27 16:32:27 +0530863 &msm8625_device_otg,
864 &msm8625_device_gadget_peripheral,
Ranjhith Kalisamy4ec2e102012-03-06 12:27:50 +0530865 &msm8625_kgsl_3d0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700866};
867
Trilok Sonib9410792012-04-07 15:37:13 +0530868static unsigned pmem_kernel_ebi1_size = PMEM_KERNEL_EBI1_SIZE;
869static int __init pmem_kernel_ebi1_size_setup(char *p)
870{
871 pmem_kernel_ebi1_size = memparse(p, NULL);
872 return 0;
873}
874early_param("pmem_kernel_ebi1_size", pmem_kernel_ebi1_size_setup);
875
876static unsigned pmem_audio_size = MSM_PMEM_AUDIO_SIZE;
877static int __init pmem_audio_size_setup(char *p)
878{
879 pmem_audio_size = memparse(p, NULL);
880 return 0;
881}
882early_param("pmem_audio_size", pmem_audio_size_setup);
883
Chintan Pandya43d0a342012-06-08 19:45:56 +0530884static void fix_sizes(void)
885{
886 if (machine_is_msm7625a_surf() || machine_is_msm7625a_ffa()) {
887 pmem_mdp_size = MSM7x25A_MSM_PMEM_MDP_SIZE;
888 pmem_adsp_size = MSM7x25A_MSM_PMEM_ADSP_SIZE;
889 } else {
890 pmem_mdp_size = MSM_PMEM_MDP_SIZE;
891 pmem_adsp_size = MSM_PMEM_ADSP_SIZE;
892 }
893#ifdef CONFIG_ION_MSM
894 msm_ion_camera_size = pmem_adsp_size;
895 msm_ion_audio_size = (MSM_PMEM_AUDIO_SIZE + PMEM_KERNEL_EBI1_SIZE);
896 msm_ion_sf_size = pmem_mdp_size;
897#endif
898}
899
900#ifdef CONFIG_ION_MSM
901#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
902static struct ion_co_heap_pdata co_ion_pdata = {
903 .adjacent_mem_id = INVALID_HEAP_ID,
904 .align = PAGE_SIZE,
905};
906#endif
907
908/**
909 * These heaps are listed in the order they will be allocated.
910 * Don't swap the order unless you know what you are doing!
911 */
912static struct ion_platform_data ion_pdata = {
913 .nr = MSM_ION_HEAP_NUM,
Chintan Pandya8ce738d2012-07-27 13:21:06 +0530914 .has_outer_cache = 1,
Chintan Pandya43d0a342012-06-08 19:45:56 +0530915 .heaps = {
916 {
917 .id = ION_SYSTEM_HEAP_ID,
918 .type = ION_HEAP_TYPE_SYSTEM,
919 .name = ION_VMALLOC_HEAP_NAME,
920 },
921#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
922 /* PMEM_ADSP = CAMERA */
923 {
924 .id = ION_CAMERA_HEAP_ID,
925 .type = ION_HEAP_TYPE_CARVEOUT,
926 .name = ION_CAMERA_HEAP_NAME,
927 .memory_type = ION_EBI_TYPE,
Chintan Pandya43d0a342012-06-08 19:45:56 +0530928 .extra_data = (void *)&co_ion_pdata,
929 },
930 /* PMEM_AUDIO */
931 {
932 .id = ION_AUDIO_HEAP_ID,
933 .type = ION_HEAP_TYPE_CARVEOUT,
934 .name = ION_AUDIO_HEAP_NAME,
935 .memory_type = ION_EBI_TYPE,
Chintan Pandya43d0a342012-06-08 19:45:56 +0530936 .extra_data = (void *)&co_ion_pdata,
937 },
938 /* PMEM_MDP = SF */
939 {
940 .id = ION_SF_HEAP_ID,
941 .type = ION_HEAP_TYPE_CARVEOUT,
942 .name = ION_SF_HEAP_NAME,
943 .memory_type = ION_EBI_TYPE,
Chintan Pandya43d0a342012-06-08 19:45:56 +0530944 .extra_data = (void *)&co_ion_pdata,
945 },
946#endif
947 }
948};
949
950static struct platform_device ion_dev = {
951 .name = "ion-msm",
952 .id = 1,
953 .dev = { .platform_data = &ion_pdata },
954};
955#endif
956
Trilok Sonib9410792012-04-07 15:37:13 +0530957static struct memtype_reserve msm7x27a_reserve_table[] __initdata = {
958 [MEMTYPE_SMI] = {
959 },
960 [MEMTYPE_EBI0] = {
961 .flags = MEMTYPE_FLAGS_1M_ALIGN,
962 },
963 [MEMTYPE_EBI1] = {
964 .flags = MEMTYPE_FLAGS_1M_ALIGN,
965 },
966};
967
Utsab Bosecd0bb5e2012-08-07 13:07:28 +0530968#ifdef CONFIG_MSM_RTB
969static void __init reserve_rtb_memory(void)
970{
971 msm7x27a_reserve_table[MEMTYPE_EBI1].size += msm7x27a_rtb_pdata.size;
972}
973#else
974static void __init reserve_rtb_memory(void)
975{
976}
977#endif
978
Larry Bassel861985f2012-05-02 15:54:52 -0700979#ifdef CONFIG_ANDROID_PMEM
Chintan Pandya43d0a342012-06-08 19:45:56 +0530980#ifndef CONFIG_MSM_MULTIMEDIA_USE_ION
Larry Bassel861985f2012-05-02 15:54:52 -0700981static struct android_pmem_platform_data *pmem_pdata_array[] __initdata = {
982 &android_pmem_adsp_pdata,
983 &android_pmem_audio_pdata,
984 &android_pmem_pdata,
985};
986#endif
Chintan Pandya43d0a342012-06-08 19:45:56 +0530987#endif
Larry Bassel861985f2012-05-02 15:54:52 -0700988
Trilok Sonib9410792012-04-07 15:37:13 +0530989static void __init size_pmem_devices(void)
990{
Larry Bassel861985f2012-05-02 15:54:52 -0700991#ifdef CONFIG_ANDROID_PMEM
Chintan Pandya43d0a342012-06-08 19:45:56 +0530992#ifndef CONFIG_MSM_MULTIMEDIA_USE_ION
Trilok Sonib9410792012-04-07 15:37:13 +0530993 android_pmem_adsp_pdata.size = pmem_adsp_size;
994 android_pmem_pdata.size = pmem_mdp_size;
995 android_pmem_audio_pdata.size = pmem_audio_size;
Larry Bassel861985f2012-05-02 15:54:52 -0700996
Trilok Sonib9410792012-04-07 15:37:13 +0530997#endif
Chintan Pandya43d0a342012-06-08 19:45:56 +0530998#endif
Trilok Sonib9410792012-04-07 15:37:13 +0530999}
1000
Chintan Pandya43d0a342012-06-08 19:45:56 +05301001#ifdef CONFIG_ANDROID_PMEM
1002#ifndef CONFIG_MSM_MULTIMEDIA_USE_ION
Trilok Sonib9410792012-04-07 15:37:13 +05301003static void __init reserve_memory_for(struct android_pmem_platform_data *p)
1004{
1005 msm7x27a_reserve_table[p->memory_type].size += p->size;
1006}
Chintan Pandya43d0a342012-06-08 19:45:56 +05301007#endif
1008#endif
Trilok Sonib9410792012-04-07 15:37:13 +05301009
1010static void __init reserve_pmem_memory(void)
1011{
1012#ifdef CONFIG_ANDROID_PMEM
Chintan Pandya43d0a342012-06-08 19:45:56 +05301013#ifndef CONFIG_MSM_MULTIMEDIA_USE_ION
Larry Bassel861985f2012-05-02 15:54:52 -07001014 unsigned int i;
1015 for (i = 0; i < ARRAY_SIZE(pmem_pdata_array); ++i)
1016 reserve_memory_for(pmem_pdata_array[i]);
1017
Trilok Sonib9410792012-04-07 15:37:13 +05301018 msm7x27a_reserve_table[MEMTYPE_EBI1].size += pmem_kernel_ebi1_size;
1019#endif
Chintan Pandya43d0a342012-06-08 19:45:56 +05301020#endif
1021}
1022
1023static void __init size_ion_devices(void)
1024{
1025#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
1026 ion_pdata.heaps[1].size = msm_ion_camera_size;
1027 ion_pdata.heaps[2].size = msm_ion_audio_size;
1028 ion_pdata.heaps[3].size = msm_ion_sf_size;
1029#endif
1030}
1031
1032static void __init reserve_ion_memory(void)
1033{
1034#if defined(CONFIG_ION_MSM) && defined(CONFIG_MSM_MULTIMEDIA_USE_ION)
1035 msm7x27a_reserve_table[MEMTYPE_EBI1].size += msm_ion_camera_size;
1036 msm7x27a_reserve_table[MEMTYPE_EBI1].size += msm_ion_audio_size;
1037 msm7x27a_reserve_table[MEMTYPE_EBI1].size += msm_ion_sf_size;
1038#endif
Trilok Sonib9410792012-04-07 15:37:13 +05301039}
1040
1041static void __init msm7x27a_calculate_reserve_sizes(void)
1042{
Chintan Pandya43d0a342012-06-08 19:45:56 +05301043 fix_sizes();
Trilok Sonib9410792012-04-07 15:37:13 +05301044 size_pmem_devices();
1045 reserve_pmem_memory();
Chintan Pandya43d0a342012-06-08 19:45:56 +05301046 size_ion_devices();
1047 reserve_ion_memory();
Utsab Bosecd0bb5e2012-08-07 13:07:28 +05301048 reserve_rtb_memory();
Trilok Sonib9410792012-04-07 15:37:13 +05301049}
1050
1051static int msm7x27a_paddr_to_memtype(unsigned int paddr)
1052{
1053 return MEMTYPE_EBI1;
1054}
1055
1056static struct reserve_info msm7x27a_reserve_info __initdata = {
1057 .memtype_reserve_table = msm7x27a_reserve_table,
1058 .calculate_reserve_sizes = msm7x27a_calculate_reserve_sizes,
1059 .paddr_to_memtype = msm7x27a_paddr_to_memtype,
1060};
1061
1062static void __init msm7x27a_reserve(void)
1063{
1064 reserve_info = &msm7x27a_reserve_info;
1065 msm_reserve();
Trilok Sonib9410792012-04-07 15:37:13 +05301066}
1067
Taniya Das2b16d1d2011-12-02 14:44:19 +05301068static void __init msm8625_reserve(void)
1069{
Trilok Sonib9410792012-04-07 15:37:13 +05301070 msm7x27a_reserve();
Taniya Dasfe04d4f2012-03-14 11:13:21 +05301071 memblock_remove(MSM8625_SECONDARY_PHYS, SZ_8);
Murali Nalajalafeedeae2012-03-28 16:15:32 +05301072 memblock_remove(MSM8625_WARM_BOOT_PHYS, SZ_32);
Taniya Das2b16d1d2011-12-02 14:44:19 +05301073}
1074
Taniya Dase3027e22012-02-27 16:32:27 +05301075static void __init msm7x27a_device_i2c_init(void)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001076{
1077 msm_gsbi0_qup_i2c_device.dev.platform_data = &msm_gsbi0_qup_i2c_pdata;
1078 msm_gsbi1_qup_i2c_device.dev.platform_data = &msm_gsbi1_qup_i2c_pdata;
1079}
1080
Taniya Dase3027e22012-02-27 16:32:27 +05301081static void __init msm8625_device_i2c_init(void)
1082{
1083 msm8625_gsbi0_qup_i2c_device.dev.platform_data =
1084 &msm_gsbi0_qup_i2c_pdata;
1085 msm8625_gsbi1_qup_i2c_device.dev.platform_data =
1086 &msm_gsbi1_qup_i2c_pdata;
1087}
1088
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001089#define MSM_EBI2_PHYS 0xa0d00000
1090#define MSM_EBI2_XMEM_CS2_CFG1 0xa0d10030
1091
1092static void __init msm7x27a_init_ebi2(void)
1093{
1094 uint32_t ebi2_cfg;
1095 void __iomem *ebi2_cfg_ptr;
1096
1097 ebi2_cfg_ptr = ioremap_nocache(MSM_EBI2_PHYS, sizeof(uint32_t));
1098 if (!ebi2_cfg_ptr)
1099 return;
1100
1101 ebi2_cfg = readl(ebi2_cfg_ptr);
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301102 if (machine_is_msm7x27a_rumi3() || machine_is_msm7x27a_surf() ||
Taniya Dase3027e22012-02-27 16:32:27 +05301103 machine_is_msm7625a_surf() || machine_is_msm8625_surf())
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001104 ebi2_cfg |= (1 << 4); /* CS2 */
1105
1106 writel(ebi2_cfg, ebi2_cfg_ptr);
1107 iounmap(ebi2_cfg_ptr);
1108
1109 /* Enable A/D MUX[bit 31] from EBI2_XMEM_CS2_CFG1 */
1110 ebi2_cfg_ptr = ioremap_nocache(MSM_EBI2_XMEM_CS2_CFG1,
1111 sizeof(uint32_t));
1112 if (!ebi2_cfg_ptr)
1113 return;
1114
1115 ebi2_cfg = readl(ebi2_cfg_ptr);
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301116 if (machine_is_msm7x27a_surf() || machine_is_msm7625a_surf())
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001117 ebi2_cfg |= (1 << 31);
1118
1119 writel(ebi2_cfg, ebi2_cfg_ptr);
1120 iounmap(ebi2_cfg_ptr);
1121}
1122
Justin Pauporeb3a33b72011-08-23 15:30:32 -07001123static struct platform_device msm_proccomm_regulator_dev = {
1124 .name = PROCCOMM_REGULATOR_DEV_NAME,
1125 .id = -1,
1126 .dev = {
1127 .platform_data = &msm7x27a_proccomm_regulator_data
1128 }
1129};
1130
Trilok Sonib9410792012-04-07 15:37:13 +05301131static void msm_adsp_add_pdev(void)
1132{
1133 int rc = 0;
1134 struct rpc_board_dev *rpc_adsp_pdev;
1135
1136 rpc_adsp_pdev = kzalloc(sizeof(struct rpc_board_dev), GFP_KERNEL);
1137 if (rpc_adsp_pdev == NULL) {
1138 pr_err("%s: Memory Allocation failure\n", __func__);
1139 return;
1140 }
1141 rpc_adsp_pdev->prog = ADSP_RPC_PROG;
1142
1143 if (cpu_is_msm8625())
1144 rpc_adsp_pdev->pdev = msm8625_device_adsp;
1145 else
1146 rpc_adsp_pdev->pdev = msm_adsp_device;
1147 rc = msm_rpc_add_board_dev(rpc_adsp_pdev, 1);
1148 if (rc < 0) {
1149 pr_err("%s: return val: %d\n", __func__, rc);
1150 kfree(rpc_adsp_pdev);
1151 }
1152}
1153
Trilok Soni16f61af2011-07-26 16:06:58 +05301154static void __init msm7627a_rumi3_init(void)
1155{
1156 msm7x27a_init_ebi2();
1157 platform_add_devices(rumi_sim_devices,
1158 ARRAY_SIZE(rumi_sim_devices));
1159}
1160
Taniya Das43bcdd62011-12-02 17:33:27 +05301161static void __init msm8625_rumi3_init(void)
1162{
1163 msm7x2x_misc_init();
Taniya Dase3027e22012-02-27 16:32:27 +05301164 msm_adsp_add_pdev();
1165 msm8625_device_i2c_init();
Taniya Das43bcdd62011-12-02 17:33:27 +05301166 platform_add_devices(msm8625_rumi3_devices,
1167 ARRAY_SIZE(msm8625_rumi3_devices));
Murali Nalajala41786ab2012-03-06 10:47:32 +05301168
Murali Nalajalad1f67b02012-02-10 00:23:49 +05301169 msm_pm_set_platform_data(msm8625_pm_data,
1170 ARRAY_SIZE(msm8625_pm_data));
Murali Nalajala41786ab2012-03-06 10:47:32 +05301171 BUG_ON(msm_pm_boot_init(&msm_pm_8625_boot_pdata));
1172 msm8x25_spm_device_init();
Taniya Das43bcdd62011-12-02 17:33:27 +05301173}
1174
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001175#define UART1DM_RX_GPIO 45
Santosh Sajjanb479f0f2011-08-18 21:00:44 +05301176
1177#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
1178static int __init msm7x27a_init_ar6000pm(void)
1179{
Santosh Sajjan374d6592012-01-19 23:16:46 +05301180 msm_wlan_ar6000_pm_device.dev.platform_data = &ar600x_wlan_power;
Santosh Sajjanb479f0f2011-08-18 21:00:44 +05301181 return platform_device_register(&msm_wlan_ar6000_pm_device);
1182}
1183#else
1184static int __init msm7x27a_init_ar6000pm(void) { return 0; }
1185#endif
1186
Justin Pauporeb3a33b72011-08-23 15:30:32 -07001187static void __init msm7x27a_init_regulators(void)
1188{
1189 int rc = platform_device_register(&msm_proccomm_regulator_dev);
1190 if (rc)
1191 pr_err("%s: could not register regulator device: %d\n",
1192 __func__, rc);
1193}
1194
Taniya Dase3027e22012-02-27 16:32:27 +05301195static void __init msm7x27a_add_footswitch_devices(void)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001196{
Trilok Soni16f61af2011-07-26 16:06:58 +05301197 platform_add_devices(msm_footswitch_devices,
1198 msm_num_footswitch_devices);
Taniya Dase3027e22012-02-27 16:32:27 +05301199}
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001200
Taniya Dase3027e22012-02-27 16:32:27 +05301201static void __init msm7x27a_add_platform_devices(void)
1202{
Aparna Mallavarapu9f000a72012-04-20 15:37:57 +05301203 if (machine_is_msm8625_surf() || machine_is_msm8625_ffa()) {
Taniya Dase3027e22012-02-27 16:32:27 +05301204 platform_add_devices(msm8625_surf_devices,
1205 ARRAY_SIZE(msm8625_surf_devices));
1206 } else {
1207 platform_add_devices(msm7627a_surf_ffa_devices,
1208 ARRAY_SIZE(msm7627a_surf_ffa_devices));
1209 }
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001210
Taniya Dase3027e22012-02-27 16:32:27 +05301211 platform_add_devices(common_devices,
1212 ARRAY_SIZE(common_devices));
1213}
1214
1215static void __init msm7x27a_uartdm_config(void)
1216{
1217 msm7x27a_cfg_uart2dm_serial();
1218 msm_uart_dm1_pdata.wakeup_irq = gpio_to_irq(UART1DM_RX_GPIO);
1219 if (cpu_is_msm8625())
1220 msm8625_device_uart_dm1.dev.platform_data =
1221 &msm_uart_dm1_pdata;
1222 else
1223 msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
1224}
1225
1226static void __init msm7x27a_otg_gadget(void)
1227{
Taniya Dase3027e22012-02-27 16:32:27 +05301228 if (cpu_is_msm8625()) {
Murali Nalajala6ff8fb12012-05-02 18:50:50 +05301229 msm_otg_pdata.swfi_latency =
1230 msm8625_pm_data[MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT].latency;
Taniya Dase3027e22012-02-27 16:32:27 +05301231 msm8625_device_otg.dev.platform_data = &msm_otg_pdata;
1232 msm8625_device_gadget_peripheral.dev.platform_data =
1233 &msm_gadget_pdata;
1234 } else {
Murali Nalajala6ff8fb12012-05-02 18:50:50 +05301235 msm_otg_pdata.swfi_latency =
1236 msm7x27a_pm_data[
1237 MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT].latency;
Taniya Dase3027e22012-02-27 16:32:27 +05301238 msm_device_otg.dev.platform_data = &msm_otg_pdata;
1239 msm_device_gadget_peripheral.dev.platform_data =
1240 &msm_gadget_pdata;
1241 }
1242}
1243
Taniya Dase3027e22012-02-27 16:32:27 +05301244static void __init msm7x27a_pm_init(void)
1245{
Aparna Mallavarapu9f000a72012-04-20 15:37:57 +05301246 if (machine_is_msm8625_surf() || machine_is_msm8625_ffa()) {
Murali Nalajala8ee084e2012-03-07 00:09:38 +05301247 msm_pm_set_platform_data(msm8625_pm_data,
1248 ARRAY_SIZE(msm8625_pm_data));
1249 BUG_ON(msm_pm_boot_init(&msm_pm_8625_boot_pdata));
1250 msm8x25_spm_device_init();
1251 } else {
1252 msm_pm_set_platform_data(msm7x27a_pm_data,
1253 ARRAY_SIZE(msm7x27a_pm_data));
1254 BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata));
1255 }
Murali Nalajala2a0bbda2012-03-28 12:12:54 +05301256
1257 msm_pm_register_irqs();
Taniya Dase3027e22012-02-27 16:32:27 +05301258}
1259
1260static void __init msm7x2x_init(void)
1261{
1262 msm7x2x_misc_init();
1263
1264 /* Initialize regulators first so that other devices can use them */
1265 msm7x27a_init_regulators();
1266 msm_adsp_add_pdev();
1267 if (cpu_is_msm8625())
1268 msm8625_device_i2c_init();
1269 else
1270 msm7x27a_device_i2c_init();
1271 msm7x27a_init_ebi2();
1272 msm7x27a_uartdm_config();
1273
1274 msm7x27a_otg_gadget();
1275 msm7x27a_cfg_smsc911x();
1276
1277 msm7x27a_add_footswitch_devices();
1278 msm7x27a_add_platform_devices();
1279 /* Ensure ar6000pm device is registered before MMC/SDC */
1280 msm7x27a_init_ar6000pm();
1281 msm7627a_init_mmc();
1282 msm_fb_add_devices();
1283 msm7x2x_init_host();
1284 msm7x27a_pm_init();
1285 register_i2c_devices();
Steve Mucklef132c6c2012-06-06 18:30:57 -07001286#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
Taniya Dase3027e22012-02-27 16:32:27 +05301287 msm7627a_bt_power_init();
Steve Mucklef132c6c2012-06-06 18:30:57 -07001288#endif
Taniya Dase3027e22012-02-27 16:32:27 +05301289 msm7627a_camera_init();
Chintan Pandya0d453192012-03-09 13:20:33 +05301290 msm7627a_add_io_devices();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001291 /*7x25a kgsl initializations*/
1292 msm7x25a_kgsl_3d0_init();
Sudhakara Rao Tentu38ad6e12012-03-30 15:25:18 -07001293 /*8x25 kgsl initializations*/
1294 msm8x25_kgsl_3d0_init();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001295}
1296
1297static void __init msm7x2x_init_early(void)
1298{
Chintan Pandya250c2e52012-01-19 17:15:49 +05301299 msm_msm7627a_allocate_memory_regions();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001300}
1301
1302MACHINE_START(MSM7X27A_RUMI3, "QCT MSM7x27a RUMI3")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001303 .atag_offset = 0x100,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001304 .map_io = msm_common_io_init,
Trilok Sonib9410792012-04-07 15:37:13 +05301305 .reserve = msm7x27a_reserve,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001306 .init_irq = msm_init_irq,
Trilok Soni16f61af2011-07-26 16:06:58 +05301307 .init_machine = msm7627a_rumi3_init,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001308 .timer = &msm_timer,
1309 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301310 .handle_irq = vic_handle_irq,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001311MACHINE_END
1312MACHINE_START(MSM7X27A_SURF, "QCT MSM7x27a SURF")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001313 .atag_offset = 0x100,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001314 .map_io = msm_common_io_init,
Trilok Sonib9410792012-04-07 15:37:13 +05301315 .reserve = msm7x27a_reserve,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001316 .init_irq = msm_init_irq,
1317 .init_machine = msm7x2x_init,
1318 .timer = &msm_timer,
1319 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301320 .handle_irq = vic_handle_irq,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001321MACHINE_END
1322MACHINE_START(MSM7X27A_FFA, "QCT MSM7x27a FFA")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001323 .atag_offset = 0x100,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001324 .map_io = msm_common_io_init,
Trilok Sonib9410792012-04-07 15:37:13 +05301325 .reserve = msm7x27a_reserve,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001326 .init_irq = msm_init_irq,
1327 .init_machine = msm7x2x_init,
1328 .timer = &msm_timer,
1329 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301330 .handle_irq = vic_handle_irq,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001331MACHINE_END
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301332MACHINE_START(MSM7625A_SURF, "QCT MSM7625a SURF")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001333 .atag_offset = 0x100,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301334 .map_io = msm_common_io_init,
Trilok Sonib9410792012-04-07 15:37:13 +05301335 .reserve = msm7x27a_reserve,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301336 .init_irq = msm_init_irq,
1337 .init_machine = msm7x2x_init,
1338 .timer = &msm_timer,
1339 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301340 .handle_irq = vic_handle_irq,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301341MACHINE_END
1342MACHINE_START(MSM7625A_FFA, "QCT MSM7625a FFA")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001343 .atag_offset = 0x100,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301344 .map_io = msm_common_io_init,
Trilok Sonib9410792012-04-07 15:37:13 +05301345 .reserve = msm7x27a_reserve,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301346 .init_irq = msm_init_irq,
1347 .init_machine = msm7x2x_init,
1348 .timer = &msm_timer,
1349 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301350 .handle_irq = vic_handle_irq,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301351MACHINE_END
Taniya Das43bcdd62011-12-02 17:33:27 +05301352MACHINE_START(MSM8625_RUMI3, "QCT MSM8625 RUMI3")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001353 .atag_offset = 0x100,
Taniya Das43bcdd62011-12-02 17:33:27 +05301354 .map_io = msm8625_map_io,
Taniya Das2b16d1d2011-12-02 14:44:19 +05301355 .reserve = msm8625_reserve,
Taniya Das43bcdd62011-12-02 17:33:27 +05301356 .init_irq = msm8625_init_irq,
1357 .init_machine = msm8625_rumi3_init,
1358 .timer = &msm_timer,
1359 .handle_irq = gic_handle_irq,
1360MACHINE_END
Taniya Dase3027e22012-02-27 16:32:27 +05301361MACHINE_START(MSM8625_SURF, "QCT MSM8625 SURF")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001362 .atag_offset = 0x100,
Taniya Dase3027e22012-02-27 16:32:27 +05301363 .map_io = msm8625_map_io,
1364 .reserve = msm8625_reserve,
1365 .init_irq = msm8625_init_irq,
1366 .init_machine = msm7x2x_init,
1367 .timer = &msm_timer,
1368 .init_early = msm7x2x_init_early,
1369 .handle_irq = gic_handle_irq,
1370MACHINE_END
Aparna Mallavarapu9f000a72012-04-20 15:37:57 +05301371MACHINE_START(MSM8625_FFA, "QCT MSM8625 FFA")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001372 .atag_offset = 0x100,
Aparna Mallavarapu9f000a72012-04-20 15:37:57 +05301373 .map_io = msm8625_map_io,
1374 .reserve = msm8625_reserve,
1375 .init_irq = msm8625_init_irq,
1376 .init_machine = msm7x2x_init,
1377 .timer = &msm_timer,
1378 .init_early = msm7x2x_init_early,
1379 .handle_irq = gic_handle_irq,
1380MACHINE_END