blob: 7db4bda5156a7ee79836bbcf879d30770356cd72 [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>
Larry Bassel861985f2012-05-02 15:54:52 -070051#include <linux/fmem.h>
Siddartha Mohanadossbc2103f2012-03-20 11:41:48 -070052#include <linux/msm_adc.h>
Chintan Pandya43d0a342012-06-08 19:45:56 +053053#include <linux/ion.h>
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070054#include "devices.h"
55#include "timer.h"
Justin Pauporeb3a33b72011-08-23 15:30:32 -070056#include "board-msm7x27a-regulator.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070057#include "devices-msm7x2xa.h"
Matt Wagantall7cca4642012-02-01 16:43:24 -080058#include "pm.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070059#include <mach/rpc_server_handset.h>
60#include <mach/socinfo.h>
Maheshkumar Sivasubramanian8ccc16e2011-10-25 15:59:57 -060061#include "pm-boot.h"
Chintan Pandyacf467fc2011-12-01 17:11:11 +053062#include "board-msm7627a.h"
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070063
Trilok Sonib9410792012-04-07 15:37:13 +053064#define PMEM_KERNEL_EBI1_SIZE 0x3A000
Sidipotu Ashok554881c2012-04-12 11:42:02 +053065#define MSM_PMEM_AUDIO_SIZE 0x1F4000
Trilok Sonib9410792012-04-07 15:37:13 +053066
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070067#if defined(CONFIG_GPIO_SX150X)
68enum {
69 SX150X_CORE,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070070};
71
72static struct sx150x_platform_data sx150x_data[] __initdata = {
73 [SX150X_CORE] = {
74 .gpio_base = GPIO_CORE_EXPANDER_BASE,
75 .oscio_is_gpo = false,
76 .io_pullup_ena = 0,
pankaj kumarc5c01392011-08-12 13:44:05 +053077 .io_pulldn_ena = 0x02,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070078 .io_open_drain_ena = 0xfef8,
79 .irq_summary = -1,
80 },
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070081};
82#endif
83
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070084
Steve Mucklef132c6c2012-06-06 18:30:57 -070085#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
Santosh Sajjan6822c682011-07-26 10:49:36 +053086static struct platform_device msm_wlan_ar6000_pm_device = {
87 .name = "wlan_ar6000_pm_dev",
88 .id = -1,
89};
Steve Mucklef132c6c2012-06-06 18:30:57 -070090#endif
Santosh Sajjan6822c682011-07-26 10:49:36 +053091
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070092#if defined(CONFIG_I2C) && defined(CONFIG_GPIO_SX150X)
93static struct i2c_board_info core_exp_i2c_info[] __initdata = {
94 {
95 I2C_BOARD_INFO("sx1509q", 0x3e),
96 },
97};
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070098
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -070099static void __init register_i2c_devices(void)
100{
Taniya Dase3027e22012-02-27 16:32:27 +0530101 if (machine_is_msm7x27a_surf() || machine_is_msm7625a_surf() ||
102 machine_is_msm8625_surf())
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700103 sx150x_data[SX150X_CORE].io_open_drain_ena = 0xe0f0;
104
105 core_exp_i2c_info[0].platform_data =
106 &sx150x_data[SX150X_CORE];
107
108 i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
109 core_exp_i2c_info,
110 ARRAY_SIZE(core_exp_i2c_info));
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700111}
112#endif
113
114static struct msm_gpio qup_i2c_gpios_io[] = {
115 { GPIO_CFG(60, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
116 "qup_scl" },
117 { GPIO_CFG(61, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
118 "qup_sda" },
119 { GPIO_CFG(131, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
120 "qup_scl" },
121 { GPIO_CFG(132, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
122 "qup_sda" },
123};
124
125static struct msm_gpio qup_i2c_gpios_hw[] = {
126 { GPIO_CFG(60, 1, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
127 "qup_scl" },
128 { GPIO_CFG(61, 1, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
129 "qup_sda" },
130 { GPIO_CFG(131, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
131 "qup_scl" },
132 { GPIO_CFG(132, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
133 "qup_sda" },
134};
135
136static void gsbi_qup_i2c_gpio_config(int adap_id, int config_type)
137{
138 int rc;
139
140 if (adap_id < 0 || adap_id > 1)
141 return;
142
143 /* Each adapter gets 2 lines from the table */
144 if (config_type)
145 rc = msm_gpios_request_enable(&qup_i2c_gpios_hw[adap_id*2], 2);
146 else
147 rc = msm_gpios_request_enable(&qup_i2c_gpios_io[adap_id*2], 2);
148 if (rc < 0)
149 pr_err("QUP GPIO request/enable failed: %d\n", rc);
150}
151
152static struct msm_i2c_platform_data msm_gsbi0_qup_i2c_pdata = {
153 .clk_freq = 100000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700154 .msm_i2c_config_gpio = gsbi_qup_i2c_gpio_config,
155};
156
157static struct msm_i2c_platform_data msm_gsbi1_qup_i2c_pdata = {
158 .clk_freq = 100000,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700159 .msm_i2c_config_gpio = gsbi_qup_i2c_gpio_config,
160};
161
Trilok Sonib9410792012-04-07 15:37:13 +0530162#ifdef CONFIG_ARCH_MSM7X27A
163#define MSM_PMEM_MDP_SIZE 0x2300000
164#define MSM7x25A_MSM_PMEM_MDP_SIZE 0x1500000
165
Rajeshwar Kurapaty20d7ad12012-06-22 16:11:06 +0530166#define MSM_PMEM_ADSP_SIZE 0x1200000
Trilok Sonib9410792012-04-07 15:37:13 +0530167#define MSM7x25A_MSM_PMEM_ADSP_SIZE 0xB91000
168
169#endif
170
Chintan Pandya43d0a342012-06-08 19:45:56 +0530171#ifdef CONFIG_ION_MSM
172#define MSM_ION_HEAP_NUM 4
173static struct platform_device ion_dev;
174static int msm_ion_camera_size;
175static int msm_ion_audio_size;
176static int msm_ion_sf_size;
177#endif
178
179
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700180static struct android_usb_platform_data android_usb_pdata = {
181 .update_pid_and_serial_num = usb_diag_update_pid_and_serial_num,
182};
183
184static struct platform_device android_usb_device = {
185 .name = "android_usb",
186 .id = -1,
187 .dev = {
188 .platform_data = &android_usb_pdata,
189 },
190};
191
192#ifdef CONFIG_USB_EHCI_MSM_72K
193static void msm_hsusb_vbus_power(unsigned phy_info, int on)
194{
195 int rc = 0;
196 unsigned gpio;
197
198 gpio = GPIO_HOST_VBUS_EN;
199
200 rc = gpio_request(gpio, "i2c_host_vbus_en");
201 if (rc < 0) {
202 pr_err("failed to request %d GPIO\n", gpio);
203 return;
204 }
205 gpio_direction_output(gpio, !!on);
206 gpio_set_value_cansleep(gpio, !!on);
207 gpio_free(gpio);
208}
209
210static struct msm_usb_host_platform_data msm_usb_host_pdata = {
211 .phy_info = (USB_PHY_INTEGRATED | USB_PHY_MODEL_45NM),
212};
213
214static void __init msm7x2x_init_host(void)
215{
216 msm_add_host(0, &msm_usb_host_pdata);
217}
218#endif
219
220#ifdef CONFIG_USB_MSM_OTG_72K
221static int hsusb_rpc_connect(int connect)
222{
223 if (connect)
224 return msm_hsusb_rpc_connect();
225 else
226 return msm_hsusb_rpc_close();
227}
228
Justin Paupored98328e2011-08-19 13:48:31 -0700229static struct regulator *reg_hsusb;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700230static int msm_hsusb_ldo_init(int init)
231{
Justin Paupored98328e2011-08-19 13:48:31 -0700232 int rc = 0;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700233
Justin Paupored98328e2011-08-19 13:48:31 -0700234 if (init) {
235 reg_hsusb = regulator_get(NULL, "usb");
236 if (IS_ERR(reg_hsusb)) {
237 rc = PTR_ERR(reg_hsusb);
238 pr_err("%s: could not get regulator: %d\n",
239 __func__, rc);
240 goto out;
241 }
242
243 rc = regulator_set_voltage(reg_hsusb, 3300000, 3300000);
244 if (rc) {
245 pr_err("%s: could not set voltage: %d\n",
246 __func__, rc);
247 goto reg_free;
248 }
249
250 return 0;
251 }
252 /* else fall through */
253reg_free:
254 regulator_put(reg_hsusb);
255out:
256 reg_hsusb = NULL;
257 return rc;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700258}
259
260static int msm_hsusb_ldo_enable(int enable)
261{
262 static int ldo_status;
263
Justin Paupored98328e2011-08-19 13:48:31 -0700264 if (IS_ERR_OR_NULL(reg_hsusb))
265 return reg_hsusb ? PTR_ERR(reg_hsusb) : -ENODEV;
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700266
267 if (ldo_status == enable)
268 return 0;
269
270 ldo_status = enable;
271
Justin Paupored98328e2011-08-19 13:48:31 -0700272 return enable ?
273 regulator_enable(reg_hsusb) :
274 regulator_disable(reg_hsusb);
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700275}
276
277#ifndef CONFIG_USB_EHCI_MSM_72K
278static int msm_hsusb_pmic_notif_init(void (*callback)(int online), int init)
279{
280 int ret = 0;
281
282 if (init)
283 ret = msm_pm_app_rpc_init(callback);
284 else
285 msm_pm_app_rpc_deinit(callback);
286
287 return ret;
288}
289#endif
290
291static struct msm_otg_platform_data msm_otg_pdata = {
292#ifndef CONFIG_USB_EHCI_MSM_72K
293 .pmic_vbus_notif_init = msm_hsusb_pmic_notif_init,
294#else
295 .vbus_power = msm_hsusb_vbus_power,
296#endif
297 .rpc_connect = hsusb_rpc_connect,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700298 .pemp_level = PRE_EMPHASIS_WITH_20_PERCENT,
299 .cdr_autoreset = CDR_AUTO_RESET_DISABLE,
300 .drv_ampl = HS_DRV_AMPLITUDE_DEFAULT,
301 .se1_gating = SE1_GATING_DISABLE,
302 .ldo_init = msm_hsusb_ldo_init,
303 .ldo_enable = msm_hsusb_ldo_enable,
304 .chg_init = hsusb_chg_init,
305 .chg_connected = hsusb_chg_connected,
306 .chg_vbus_draw = hsusb_chg_vbus_draw,
307};
308#endif
309
310static struct msm_hsusb_gadget_platform_data msm_gadget_pdata = {
311 .is_phy_status_timer_on = 1,
312};
313
314static struct resource smc91x_resources[] = {
315 [0] = {
316 .start = 0x90000300,
317 .end = 0x900003ff,
318 .flags = IORESOURCE_MEM,
319 },
320 [1] = {
321 .start = MSM_GPIO_TO_INT(4),
322 .end = MSM_GPIO_TO_INT(4),
323 .flags = IORESOURCE_IRQ,
324 },
325};
326
327static struct platform_device smc91x_device = {
328 .name = "smc91x",
329 .id = 0,
330 .num_resources = ARRAY_SIZE(smc91x_resources),
331 .resource = smc91x_resources,
332};
333
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700334#ifdef CONFIG_SERIAL_MSM_HS
335static struct msm_serial_hs_platform_data msm_uart_dm1_pdata = {
336 .inject_rx_on_wakeup = 1,
337 .rx_to_inject = 0xFD,
338};
339#endif
340static struct msm_pm_platform_data msm7x27a_pm_data[MSM_PM_SLEEP_MODE_NR] = {
Murali Nalajalab10363d2012-01-12 16:29:01 +0530341 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700342 .idle_supported = 1,
343 .suspend_supported = 1,
344 .idle_enabled = 1,
345 .suspend_enabled = 1,
346 .latency = 16000,
347 .residency = 20000,
348 },
Murali Nalajalab10363d2012-01-12 16:29:01 +0530349 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_NO_XO_SHUTDOWN)] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700350 .idle_supported = 1,
351 .suspend_supported = 1,
352 .idle_enabled = 1,
353 .suspend_enabled = 1,
354 .latency = 12000,
355 .residency = 20000,
356 },
Murali Nalajalab10363d2012-01-12 16:29:01 +0530357 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT)] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700358 .idle_supported = 1,
359 .suspend_supported = 1,
360 .idle_enabled = 0,
361 .suspend_enabled = 1,
362 .latency = 2000,
363 .residency = 0,
364 },
Murali Nalajalab10363d2012-01-12 16:29:01 +0530365 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700366 .idle_supported = 1,
367 .suspend_supported = 1,
368 .idle_enabled = 1,
369 .suspend_enabled = 1,
370 .latency = 2,
371 .residency = 0,
372 },
373};
374
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -0600375static struct msm_pm_boot_platform_data msm_pm_boot_pdata __initdata = {
Sravan Kumar Ambapuramb22cf4d2012-01-02 21:45:04 +0530376 .mode = MSM_PM_BOOT_CONFIG_RESET_VECTOR_PHYS,
377 .p_addr = 0,
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -0600378};
379
Murali Nalajalad1f67b02012-02-10 00:23:49 +0530380/* 8625 PM platform data */
381static struct msm_pm_platform_data msm8625_pm_data[MSM_PM_SLEEP_MODE_NR * 2] = {
382 /* CORE0 entries */
383 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = {
384 .idle_supported = 1,
385 .suspend_supported = 1,
386 .idle_enabled = 0,
387 .suspend_enabled = 0,
388 .latency = 16000,
389 .residency = 20000,
390 },
391
392 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_NO_XO_SHUTDOWN)] = {
393 .idle_supported = 1,
394 .suspend_supported = 1,
395 .idle_enabled = 0,
396 .suspend_enabled = 0,
397 .latency = 12000,
398 .residency = 20000,
399 },
400
401 /* picked latency & redisdency values from 7x30 */
402 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
403 .idle_supported = 1,
404 .suspend_supported = 1,
405 .idle_enabled = 0,
406 .suspend_enabled = 0,
407 .latency = 500,
408 .residency = 6000,
409 },
410
411 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
412 .idle_supported = 1,
413 .suspend_supported = 1,
414 .idle_enabled = 1,
415 .suspend_enabled = 1,
416 .latency = 2,
417 .residency = 10,
418 },
419
420 /* picked latency & redisdency values from 7x30 */
421 [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
422 .idle_supported = 1,
423 .suspend_supported = 1,
424 .idle_enabled = 0,
425 .suspend_enabled = 0,
426 .latency = 500,
427 .residency = 6000,
428 },
429
430 [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
431 .idle_supported = 1,
432 .suspend_supported = 1,
433 .idle_enabled = 1,
434 .suspend_enabled = 1,
435 .latency = 2,
436 .residency = 10,
437 },
438
439};
440
Murali Nalajala41786ab2012-03-06 10:47:32 +0530441static struct msm_pm_boot_platform_data msm_pm_8625_boot_pdata __initdata = {
442 .mode = MSM_PM_BOOT_CONFIG_REMAP_BOOT_ADDR,
443 .v_addr = MSM_CFG_CTL_BASE,
444};
445
Trilok Sonib9410792012-04-07 15:37:13 +0530446static struct android_pmem_platform_data android_pmem_adsp_pdata = {
447 .name = "pmem_adsp",
448 .allocator_type = PMEM_ALLOCATORTYPE_BITMAP,
449 .cached = 1,
450 .memory_type = MEMTYPE_EBI1,
Larry Bassel861985f2012-05-02 15:54:52 -0700451 .request_region = request_fmem_c_region,
452 .release_region = release_fmem_c_region,
453 .reusable = 1,
Trilok Sonib9410792012-04-07 15:37:13 +0530454};
455
456static struct platform_device android_pmem_adsp_device = {
457 .name = "android_pmem",
458 .id = 1,
459 .dev = { .platform_data = &android_pmem_adsp_pdata },
460};
461
462static unsigned pmem_mdp_size = MSM_PMEM_MDP_SIZE;
463static int __init pmem_mdp_size_setup(char *p)
464{
465 pmem_mdp_size = memparse(p, NULL);
466 return 0;
467}
468
469early_param("pmem_mdp_size", pmem_mdp_size_setup);
470
471static unsigned pmem_adsp_size = MSM_PMEM_ADSP_SIZE;
472static int __init pmem_adsp_size_setup(char *p)
473{
474 pmem_adsp_size = memparse(p, NULL);
475 return 0;
476}
477
478early_param("pmem_adsp_size", pmem_adsp_size_setup);
479
480#define SND(desc, num) { .name = #desc, .id = num }
481static struct snd_endpoint snd_endpoints_list[] = {
482 SND(HANDSET, 0),
483 SND(MONO_HEADSET, 2),
484 SND(HEADSET, 3),
485 SND(SPEAKER, 6),
486 SND(TTY_HEADSET, 8),
487 SND(TTY_VCO, 9),
488 SND(TTY_HCO, 10),
489 SND(BT, 12),
490 SND(IN_S_SADC_OUT_HANDSET, 16),
491 SND(IN_S_SADC_OUT_SPEAKER_PHONE, 25),
492 SND(FM_DIGITAL_STEREO_HEADSET, 26),
493 SND(FM_DIGITAL_SPEAKER_PHONE, 27),
494 SND(FM_DIGITAL_BT_A2DP_HEADSET, 28),
495 SND(STEREO_HEADSET_AND_SPEAKER, 31),
496 SND(CURRENT, 0x7FFFFFFE),
497 SND(FM_ANALOG_STEREO_HEADSET, 35),
498 SND(FM_ANALOG_STEREO_HEADSET_CODEC, 36),
499};
500#undef SND
501
502static struct msm_snd_endpoints msm_device_snd_endpoints = {
503 .endpoints = snd_endpoints_list,
504 .num = sizeof(snd_endpoints_list) / sizeof(struct snd_endpoint)
505};
506
507static struct platform_device msm_device_snd = {
508 .name = "msm_snd",
509 .id = -1,
510 .dev = {
511 .platform_data = &msm_device_snd_endpoints
512 },
513};
514
515#define DEC0_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
516 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
517 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
518 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
519 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
520 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
521#define DEC1_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
522 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
523 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
524 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
525 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
526 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
527#define DEC2_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
528 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
529 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
530 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
531 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
532 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
533#define DEC3_FORMAT ((1<<MSM_ADSP_CODEC_MP3)| \
534 (1<<MSM_ADSP_CODEC_AAC)|(1<<MSM_ADSP_CODEC_WMA)| \
535 (1<<MSM_ADSP_CODEC_WMAPRO)|(1<<MSM_ADSP_CODEC_AMRWB)| \
536 (1<<MSM_ADSP_CODEC_AMRNB)|(1<<MSM_ADSP_CODEC_WAV)| \
537 (1<<MSM_ADSP_CODEC_ADPCM)|(1<<MSM_ADSP_CODEC_YADPCM)| \
538 (1<<MSM_ADSP_CODEC_EVRC)|(1<<MSM_ADSP_CODEC_QCELP))
539#define DEC4_FORMAT (1<<MSM_ADSP_CODEC_MIDI)
540
541static unsigned int dec_concurrency_table[] = {
542 /* Audio LP */
543 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DMA)), 0,
544 0, 0, 0,
545
546 /* Concurrency 1 */
547 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
548 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
549 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
550 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
551 (DEC4_FORMAT),
552
553 /* Concurrency 2 */
554 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
555 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
556 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
557 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
558 (DEC4_FORMAT),
559
560 /* Concurrency 3 */
561 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
562 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
563 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
564 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
565 (DEC4_FORMAT),
566
567 /* Concurrency 4 */
568 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
569 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
570 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
571 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
572 (DEC4_FORMAT),
573
574 /* Concurrency 5 */
575 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|(1<<MSM_ADSP_OP_DM)),
576 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
577 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
578 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
579 (DEC4_FORMAT),
580
581 /* Concurrency 6 */
Chaithanya Krishna Bacharaju72ab89b2012-05-11 14:24:04 +0530582 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)|
583 (1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
584 0, 0, 0, 0,
Trilok Sonib9410792012-04-07 15:37:13 +0530585
586 /* Concurrency 7 */
587 (DEC0_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
588 (DEC1_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
589 (DEC2_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
590 (DEC3_FORMAT|(1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)),
591 (DEC4_FORMAT),
592};
593
594#define DEC_INFO(name, queueid, decid, nr_codec) { .module_name = name, \
595 .module_queueid = queueid, .module_decid = decid, \
596 .nr_codec_support = nr_codec}
597
598static struct msm_adspdec_info dec_info_list[] = {
599 DEC_INFO("AUDPLAY0TASK", 13, 0, 11), /* AudPlay0BitStreamCtrlQueue */
600 DEC_INFO("AUDPLAY1TASK", 14, 1, 11), /* AudPlay1BitStreamCtrlQueue */
601 DEC_INFO("AUDPLAY2TASK", 15, 2, 11), /* AudPlay2BitStreamCtrlQueue */
602 DEC_INFO("AUDPLAY3TASK", 16, 3, 11), /* AudPlay3BitStreamCtrlQueue */
603 DEC_INFO("AUDPLAY4TASK", 17, 4, 1), /* AudPlay4BitStreamCtrlQueue */
604};
605
606static struct msm_adspdec_database msm_device_adspdec_database = {
607 .num_dec = ARRAY_SIZE(dec_info_list),
608 .num_concurrency_support = (ARRAY_SIZE(dec_concurrency_table) / \
609 ARRAY_SIZE(dec_info_list)),
610 .dec_concurrency_table = dec_concurrency_table,
611 .dec_info_list = dec_info_list,
612};
613
614static struct platform_device msm_device_adspdec = {
615 .name = "msm_adspdec",
616 .id = -1,
617 .dev = {
618 .platform_data = &msm_device_adspdec_database
619 },
620};
621
622static struct android_pmem_platform_data android_pmem_audio_pdata = {
623 .name = "pmem_audio",
624 .allocator_type = PMEM_ALLOCATORTYPE_BITMAP,
625 .cached = 0,
626 .memory_type = MEMTYPE_EBI1,
627};
628
629static struct platform_device android_pmem_audio_device = {
630 .name = "android_pmem",
631 .id = 2,
632 .dev = { .platform_data = &android_pmem_audio_pdata },
633};
634
635static struct android_pmem_platform_data android_pmem_pdata = {
636 .name = "pmem",
637 .allocator_type = PMEM_ALLOCATORTYPE_BITMAP,
638 .cached = 1,
639 .memory_type = MEMTYPE_EBI1,
640};
641static struct platform_device android_pmem_device = {
642 .name = "android_pmem",
643 .id = 0,
644 .dev = { .platform_data = &android_pmem_pdata },
645};
646
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700647static u32 msm_calculate_batt_capacity(u32 current_voltage);
648
649static struct msm_psy_batt_pdata msm_psy_batt_data = {
Krishna Vanka9a265e12012-06-04 23:24:26 +0530650 .voltage_min_design = 3200,
651 .voltage_max_design = 4200,
652 .voltage_fail_safe = 3340,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700653 .avail_chg_sources = AC_CHG | USB_CHG ,
654 .batt_technology = POWER_SUPPLY_TECHNOLOGY_LION,
655 .calculate_capacity = &msm_calculate_batt_capacity,
656};
657
658static u32 msm_calculate_batt_capacity(u32 current_voltage)
659{
660 u32 low_voltage = msm_psy_batt_data.voltage_min_design;
661 u32 high_voltage = msm_psy_batt_data.voltage_max_design;
662
Krishna Vankab3494692012-06-12 15:06:43 +0530663 if (current_voltage <= low_voltage)
664 return 0;
665 else if (current_voltage >= high_voltage)
666 return 100;
667 else
668 return (current_voltage - low_voltage) * 100
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700669 / (high_voltage - low_voltage);
670}
671
672static struct platform_device msm_batt_device = {
673 .name = "msm-battery",
674 .id = -1,
675 .dev.platform_data = &msm_psy_batt_data,
676};
677
678static struct smsc911x_platform_config smsc911x_config = {
679 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
680 .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
681 .flags = SMSC911X_USE_16BIT,
682};
683
684static struct resource smsc911x_resources[] = {
685 [0] = {
686 .start = 0x90000000,
687 .end = 0x90007fff,
688 .flags = IORESOURCE_MEM,
689 },
690 [1] = {
691 .start = MSM_GPIO_TO_INT(48),
692 .end = MSM_GPIO_TO_INT(48),
693 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
694 },
695};
696
697static struct platform_device smsc911x_device = {
698 .name = "smsc911x",
699 .id = 0,
700 .num_resources = ARRAY_SIZE(smsc911x_resources),
701 .resource = smsc911x_resources,
702 .dev = {
703 .platform_data = &smsc911x_config,
704 },
705};
706
707static struct msm_gpio smsc911x_gpios[] = {
708 { GPIO_CFG(48, 0, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_6MA),
709 "smsc911x_irq" },
710 { GPIO_CFG(49, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_6MA),
711 "eth_fifo_sel" },
712};
713
Siddartha Mohanadossbc2103f2012-03-20 11:41:48 -0700714static char *msm_adc_surf_device_names[] = {
715 "XO_ADC",
716};
717
718static struct msm_adc_platform_data msm_adc_pdata = {
719 .dev_names = msm_adc_surf_device_names,
720 .num_adc = ARRAY_SIZE(msm_adc_surf_device_names),
721 .target_hw = MSM_8x25,
722};
723
724static struct platform_device msm_adc_device = {
725 .name = "msm_adc",
726 .id = -1,
727 .dev = {
728 .platform_data = &msm_adc_pdata,
729 },
730};
731
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700732#define ETH_FIFO_SEL_GPIO 49
733static void msm7x27a_cfg_smsc911x(void)
734{
735 int res;
736
737 res = msm_gpios_request_enable(smsc911x_gpios,
738 ARRAY_SIZE(smsc911x_gpios));
739 if (res) {
740 pr_err("%s: unable to enable gpios for SMSC911x\n", __func__);
741 return;
742 }
743
744 /* ETH_FIFO_SEL */
745 res = gpio_direction_output(ETH_FIFO_SEL_GPIO, 0);
746 if (res) {
747 pr_err("%s: unable to get direction for gpio %d\n", __func__,
748 ETH_FIFO_SEL_GPIO);
749 msm_gpios_disable_free(smsc911x_gpios,
750 ARRAY_SIZE(smsc911x_gpios));
751 return;
752 }
753 gpio_set_value(ETH_FIFO_SEL_GPIO, 0);
754}
755
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700756#if defined(CONFIG_SERIAL_MSM_HSL_CONSOLE) \
757 && defined(CONFIG_MSM_SHARED_GPIO_FOR_UART2DM)
758static struct msm_gpio uart2dm_gpios[] = {
759 {GPIO_CFG(19, 2, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
760 "uart2dm_rfr_n" },
761 {GPIO_CFG(20, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
762 "uart2dm_cts_n" },
763 {GPIO_CFG(21, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
764 "uart2dm_rx" },
765 {GPIO_CFG(108, 2, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
766 "uart2dm_tx" },
767};
768
769static void msm7x27a_cfg_uart2dm_serial(void)
770{
771 int ret;
772 ret = msm_gpios_request_enable(uart2dm_gpios,
773 ARRAY_SIZE(uart2dm_gpios));
774 if (ret)
775 pr_err("%s: unable to enable gpios for uart2dm\n", __func__);
776}
777#else
778static void msm7x27a_cfg_uart2dm_serial(void) { }
779#endif
780
Taniya Das720c5c32012-05-18 14:08:14 +0530781static struct fmem_platform_data fmem_pdata;
Larry Bassel861985f2012-05-02 15:54:52 -0700782
Taniya Das720c5c32012-05-18 14:08:14 +0530783static struct platform_device fmem_device = {
Larry Bassel861985f2012-05-02 15:54:52 -0700784 .name = "fmem",
785 .id = 1,
786 .dev = { .platform_data = &fmem_pdata },
787};
788
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700789static struct platform_device *rumi_sim_devices[] __initdata = {
790 &msm_device_dmov,
791 &msm_device_smd,
792 &smc91x_device,
793 &msm_device_uart1,
794 &msm_device_nand,
795 &msm_device_uart_dm1,
796 &msm_gsbi0_qup_i2c_device,
797 &msm_gsbi1_qup_i2c_device,
798};
799
Taniya Das43bcdd62011-12-02 17:33:27 +0530800static struct platform_device *msm8625_rumi3_devices[] __initdata = {
801 &msm8625_device_dmov,
Angshuman Sarkarfb1cce92012-02-21 15:20:43 +0530802 &msm8625_device_smd,
Taniya Das43bcdd62011-12-02 17:33:27 +0530803 &msm8625_device_uart1,
Taniya Dase3027e22012-02-27 16:32:27 +0530804 &msm8625_gsbi0_qup_i2c_device,
Taniya Das43bcdd62011-12-02 17:33:27 +0530805};
806
Taniya Dase3027e22012-02-27 16:32:27 +0530807static struct platform_device *msm7627a_surf_ffa_devices[] __initdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700808 &msm_device_dmov,
809 &msm_device_smd,
810 &msm_device_uart1,
811 &msm_device_uart_dm1,
812 &msm_device_uart_dm2,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700813 &msm_gsbi0_qup_i2c_device,
814 &msm_gsbi1_qup_i2c_device,
815 &msm_device_otg,
816 &msm_device_gadget_peripheral,
Taniya Dase3027e22012-02-27 16:32:27 +0530817 &smsc911x_device,
818 &msm_kgsl_3d0,
819};
820
821static struct platform_device *common_devices[] __initdata = {
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700822 &android_usb_device,
Trilok Sonib9410792012-04-07 15:37:13 +0530823 &android_pmem_device,
824 &android_pmem_adsp_device,
825 &android_pmem_audio_device,
Larry Bassel861985f2012-05-02 15:54:52 -0700826 &fmem_device,
Taniya Dase3027e22012-02-27 16:32:27 +0530827 &msm_device_nand,
Trilok Sonib9410792012-04-07 15:37:13 +0530828 &msm_device_snd,
829 &msm_device_adspdec,
Manish Dewangan3a260992011-06-24 18:01:34 +0530830 &asoc_msm_pcm,
831 &asoc_msm_dai0,
832 &asoc_msm_dai1,
Taniya Dase3027e22012-02-27 16:32:27 +0530833 &msm_batt_device,
Siddartha Mohanadossbc2103f2012-03-20 11:41:48 -0700834 &msm_adc_device,
Chintan Pandya43d0a342012-06-08 19:45:56 +0530835#ifdef CONFIG_ION_MSM
836 &ion_dev,
837#endif
Taniya Dase3027e22012-02-27 16:32:27 +0530838};
839
840static struct platform_device *msm8625_surf_devices[] __initdata = {
841 &msm8625_device_dmov,
842 &msm8625_device_uart1,
843 &msm8625_device_uart_dm1,
844 &msm8625_device_uart_dm2,
845 &msm8625_gsbi0_qup_i2c_device,
846 &msm8625_gsbi1_qup_i2c_device,
Taniya Dasf2665302012-02-28 16:54:54 +0530847 &msm8625_device_smd,
Taniya Dase3027e22012-02-27 16:32:27 +0530848 &msm8625_device_otg,
849 &msm8625_device_gadget_peripheral,
Ranjhith Kalisamy4ec2e102012-03-06 12:27:50 +0530850 &msm8625_kgsl_3d0,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -0700851};
852
Trilok Sonib9410792012-04-07 15:37:13 +0530853static unsigned pmem_kernel_ebi1_size = PMEM_KERNEL_EBI1_SIZE;
854static int __init pmem_kernel_ebi1_size_setup(char *p)
855{
856 pmem_kernel_ebi1_size = memparse(p, NULL);
857 return 0;
858}
859early_param("pmem_kernel_ebi1_size", pmem_kernel_ebi1_size_setup);
860
861static unsigned pmem_audio_size = MSM_PMEM_AUDIO_SIZE;
862static int __init pmem_audio_size_setup(char *p)
863{
864 pmem_audio_size = memparse(p, NULL);
865 return 0;
866}
867early_param("pmem_audio_size", pmem_audio_size_setup);
868
Chintan Pandya43d0a342012-06-08 19:45:56 +0530869static void fix_sizes(void)
870{
871 if (machine_is_msm7625a_surf() || machine_is_msm7625a_ffa()) {
872 pmem_mdp_size = MSM7x25A_MSM_PMEM_MDP_SIZE;
873 pmem_adsp_size = MSM7x25A_MSM_PMEM_ADSP_SIZE;
874 } else {
875 pmem_mdp_size = MSM_PMEM_MDP_SIZE;
876 pmem_adsp_size = MSM_PMEM_ADSP_SIZE;
877 }
878#ifdef CONFIG_ION_MSM
879 msm_ion_camera_size = pmem_adsp_size;
880 msm_ion_audio_size = (MSM_PMEM_AUDIO_SIZE + PMEM_KERNEL_EBI1_SIZE);
881 msm_ion_sf_size = pmem_mdp_size;
882#endif
883}
884
885#ifdef CONFIG_ION_MSM
886#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
887static struct ion_co_heap_pdata co_ion_pdata = {
888 .adjacent_mem_id = INVALID_HEAP_ID,
889 .align = PAGE_SIZE,
890};
891#endif
892
893/**
894 * These heaps are listed in the order they will be allocated.
895 * Don't swap the order unless you know what you are doing!
896 */
897static struct ion_platform_data ion_pdata = {
898 .nr = MSM_ION_HEAP_NUM,
899 .heaps = {
900 {
901 .id = ION_SYSTEM_HEAP_ID,
902 .type = ION_HEAP_TYPE_SYSTEM,
903 .name = ION_VMALLOC_HEAP_NAME,
904 },
905#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
906 /* PMEM_ADSP = CAMERA */
907 {
908 .id = ION_CAMERA_HEAP_ID,
909 .type = ION_HEAP_TYPE_CARVEOUT,
910 .name = ION_CAMERA_HEAP_NAME,
911 .memory_type = ION_EBI_TYPE,
912 .has_outer_cache = 1,
913 .extra_data = (void *)&co_ion_pdata,
914 },
915 /* PMEM_AUDIO */
916 {
917 .id = ION_AUDIO_HEAP_ID,
918 .type = ION_HEAP_TYPE_CARVEOUT,
919 .name = ION_AUDIO_HEAP_NAME,
920 .memory_type = ION_EBI_TYPE,
921 .has_outer_cache = 1,
922 .extra_data = (void *)&co_ion_pdata,
923 },
924 /* PMEM_MDP = SF */
925 {
926 .id = ION_SF_HEAP_ID,
927 .type = ION_HEAP_TYPE_CARVEOUT,
928 .name = ION_SF_HEAP_NAME,
929 .memory_type = ION_EBI_TYPE,
930 .has_outer_cache = 1,
931 .extra_data = (void *)&co_ion_pdata,
932 },
933#endif
934 }
935};
936
937static struct platform_device ion_dev = {
938 .name = "ion-msm",
939 .id = 1,
940 .dev = { .platform_data = &ion_pdata },
941};
942#endif
943
Trilok Sonib9410792012-04-07 15:37:13 +0530944static struct memtype_reserve msm7x27a_reserve_table[] __initdata = {
945 [MEMTYPE_SMI] = {
946 },
947 [MEMTYPE_EBI0] = {
948 .flags = MEMTYPE_FLAGS_1M_ALIGN,
949 },
950 [MEMTYPE_EBI1] = {
951 .flags = MEMTYPE_FLAGS_1M_ALIGN,
952 },
953};
954
Larry Bassel861985f2012-05-02 15:54:52 -0700955#ifdef CONFIG_ANDROID_PMEM
Chintan Pandya43d0a342012-06-08 19:45:56 +0530956#ifndef CONFIG_MSM_MULTIMEDIA_USE_ION
Larry Bassel861985f2012-05-02 15:54:52 -0700957static struct android_pmem_platform_data *pmem_pdata_array[] __initdata = {
958 &android_pmem_adsp_pdata,
959 &android_pmem_audio_pdata,
960 &android_pmem_pdata,
961};
962#endif
Chintan Pandya43d0a342012-06-08 19:45:56 +0530963#endif
Larry Bassel861985f2012-05-02 15:54:52 -0700964
Trilok Sonib9410792012-04-07 15:37:13 +0530965static void __init size_pmem_devices(void)
966{
Larry Bassel861985f2012-05-02 15:54:52 -0700967#ifdef CONFIG_ANDROID_PMEM
Chintan Pandya43d0a342012-06-08 19:45:56 +0530968#ifndef CONFIG_MSM_MULTIMEDIA_USE_ION
Larry Bassel861985f2012-05-02 15:54:52 -0700969 unsigned int i;
970 unsigned int reusable_count = 0;
Trilok Sonib9410792012-04-07 15:37:13 +0530971
Trilok Sonib9410792012-04-07 15:37:13 +0530972 android_pmem_adsp_pdata.size = pmem_adsp_size;
973 android_pmem_pdata.size = pmem_mdp_size;
974 android_pmem_audio_pdata.size = pmem_audio_size;
Larry Bassel861985f2012-05-02 15:54:52 -0700975
976 fmem_pdata.size = 0;
Olav Haugan62436252012-05-16 09:09:43 -0700977 fmem_pdata.align = PAGE_SIZE;
Larry Bassel861985f2012-05-02 15:54:52 -0700978
979 /* Find pmem devices that should use FMEM (reusable) memory.
980 */
981 for (i = 0; i < ARRAY_SIZE(pmem_pdata_array); ++i) {
982 struct android_pmem_platform_data *pdata = pmem_pdata_array[i];
983
984 if (!reusable_count && pdata->reusable)
985 fmem_pdata.size += pdata->size;
986
987 reusable_count += (pdata->reusable) ? 1 : 0;
988
989 if (pdata->reusable && reusable_count > 1) {
990 pr_err("%s: Too many PMEM devices specified as reusable. PMEM device %s was not configured as reusable.\n",
991 __func__, pdata->name);
992 pdata->reusable = 0;
993 }
994 }
Trilok Sonib9410792012-04-07 15:37:13 +0530995#endif
Chintan Pandya43d0a342012-06-08 19:45:56 +0530996#endif
Trilok Sonib9410792012-04-07 15:37:13 +0530997}
998
Chintan Pandya43d0a342012-06-08 19:45:56 +0530999#ifdef CONFIG_ANDROID_PMEM
1000#ifndef CONFIG_MSM_MULTIMEDIA_USE_ION
Trilok Sonib9410792012-04-07 15:37:13 +05301001static void __init reserve_memory_for(struct android_pmem_platform_data *p)
1002{
1003 msm7x27a_reserve_table[p->memory_type].size += p->size;
1004}
Chintan Pandya43d0a342012-06-08 19:45:56 +05301005#endif
1006#endif
Trilok Sonib9410792012-04-07 15:37:13 +05301007
1008static void __init reserve_pmem_memory(void)
1009{
1010#ifdef CONFIG_ANDROID_PMEM
Chintan Pandya43d0a342012-06-08 19:45:56 +05301011#ifndef CONFIG_MSM_MULTIMEDIA_USE_ION
Larry Bassel861985f2012-05-02 15:54:52 -07001012 unsigned int i;
1013 for (i = 0; i < ARRAY_SIZE(pmem_pdata_array); ++i)
1014 reserve_memory_for(pmem_pdata_array[i]);
1015
Trilok Sonib9410792012-04-07 15:37:13 +05301016 msm7x27a_reserve_table[MEMTYPE_EBI1].size += pmem_kernel_ebi1_size;
1017#endif
Chintan Pandya43d0a342012-06-08 19:45:56 +05301018#endif
1019}
1020
1021static void __init size_ion_devices(void)
1022{
1023#ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
1024 ion_pdata.heaps[1].size = msm_ion_camera_size;
1025 ion_pdata.heaps[2].size = msm_ion_audio_size;
1026 ion_pdata.heaps[3].size = msm_ion_sf_size;
1027#endif
1028}
1029
1030static void __init reserve_ion_memory(void)
1031{
1032#if defined(CONFIG_ION_MSM) && defined(CONFIG_MSM_MULTIMEDIA_USE_ION)
1033 msm7x27a_reserve_table[MEMTYPE_EBI1].size += msm_ion_camera_size;
1034 msm7x27a_reserve_table[MEMTYPE_EBI1].size += msm_ion_audio_size;
1035 msm7x27a_reserve_table[MEMTYPE_EBI1].size += msm_ion_sf_size;
1036#endif
Trilok Sonib9410792012-04-07 15:37:13 +05301037}
1038
1039static void __init msm7x27a_calculate_reserve_sizes(void)
1040{
Chintan Pandya43d0a342012-06-08 19:45:56 +05301041 fix_sizes();
Trilok Sonib9410792012-04-07 15:37:13 +05301042 size_pmem_devices();
1043 reserve_pmem_memory();
Chintan Pandya43d0a342012-06-08 19:45:56 +05301044 size_ion_devices();
1045 reserve_ion_memory();
Trilok Sonib9410792012-04-07 15:37:13 +05301046}
1047
1048static int msm7x27a_paddr_to_memtype(unsigned int paddr)
1049{
1050 return MEMTYPE_EBI1;
1051}
1052
1053static struct reserve_info msm7x27a_reserve_info __initdata = {
1054 .memtype_reserve_table = msm7x27a_reserve_table,
1055 .calculate_reserve_sizes = msm7x27a_calculate_reserve_sizes,
1056 .paddr_to_memtype = msm7x27a_paddr_to_memtype,
1057};
1058
1059static void __init msm7x27a_reserve(void)
1060{
1061 reserve_info = &msm7x27a_reserve_info;
1062 msm_reserve();
Trilok Sonib9410792012-04-07 15:37:13 +05301063}
1064
Taniya Das2b16d1d2011-12-02 14:44:19 +05301065static void __init msm8625_reserve(void)
1066{
Trilok Sonib9410792012-04-07 15:37:13 +05301067 msm7x27a_reserve();
Taniya Dasfe04d4f2012-03-14 11:13:21 +05301068 memblock_remove(MSM8625_SECONDARY_PHYS, SZ_8);
Murali Nalajalafeedeae2012-03-28 16:15:32 +05301069 memblock_remove(MSM8625_WARM_BOOT_PHYS, SZ_32);
Taniya Das2b16d1d2011-12-02 14:44:19 +05301070}
1071
Taniya Dase3027e22012-02-27 16:32:27 +05301072static void __init msm7x27a_device_i2c_init(void)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001073{
1074 msm_gsbi0_qup_i2c_device.dev.platform_data = &msm_gsbi0_qup_i2c_pdata;
1075 msm_gsbi1_qup_i2c_device.dev.platform_data = &msm_gsbi1_qup_i2c_pdata;
1076}
1077
Taniya Dase3027e22012-02-27 16:32:27 +05301078static void __init msm8625_device_i2c_init(void)
1079{
1080 msm8625_gsbi0_qup_i2c_device.dev.platform_data =
1081 &msm_gsbi0_qup_i2c_pdata;
1082 msm8625_gsbi1_qup_i2c_device.dev.platform_data =
1083 &msm_gsbi1_qup_i2c_pdata;
1084}
1085
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001086#define MSM_EBI2_PHYS 0xa0d00000
1087#define MSM_EBI2_XMEM_CS2_CFG1 0xa0d10030
1088
1089static void __init msm7x27a_init_ebi2(void)
1090{
1091 uint32_t ebi2_cfg;
1092 void __iomem *ebi2_cfg_ptr;
1093
1094 ebi2_cfg_ptr = ioremap_nocache(MSM_EBI2_PHYS, sizeof(uint32_t));
1095 if (!ebi2_cfg_ptr)
1096 return;
1097
1098 ebi2_cfg = readl(ebi2_cfg_ptr);
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301099 if (machine_is_msm7x27a_rumi3() || machine_is_msm7x27a_surf() ||
Taniya Dase3027e22012-02-27 16:32:27 +05301100 machine_is_msm7625a_surf() || machine_is_msm8625_surf())
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001101 ebi2_cfg |= (1 << 4); /* CS2 */
1102
1103 writel(ebi2_cfg, ebi2_cfg_ptr);
1104 iounmap(ebi2_cfg_ptr);
1105
1106 /* Enable A/D MUX[bit 31] from EBI2_XMEM_CS2_CFG1 */
1107 ebi2_cfg_ptr = ioremap_nocache(MSM_EBI2_XMEM_CS2_CFG1,
1108 sizeof(uint32_t));
1109 if (!ebi2_cfg_ptr)
1110 return;
1111
1112 ebi2_cfg = readl(ebi2_cfg_ptr);
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301113 if (machine_is_msm7x27a_surf() || machine_is_msm7625a_surf())
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001114 ebi2_cfg |= (1 << 31);
1115
1116 writel(ebi2_cfg, ebi2_cfg_ptr);
1117 iounmap(ebi2_cfg_ptr);
1118}
1119
Justin Pauporeb3a33b72011-08-23 15:30:32 -07001120static struct platform_device msm_proccomm_regulator_dev = {
1121 .name = PROCCOMM_REGULATOR_DEV_NAME,
1122 .id = -1,
1123 .dev = {
1124 .platform_data = &msm7x27a_proccomm_regulator_data
1125 }
1126};
1127
Trilok Sonib9410792012-04-07 15:37:13 +05301128static void msm_adsp_add_pdev(void)
1129{
1130 int rc = 0;
1131 struct rpc_board_dev *rpc_adsp_pdev;
1132
1133 rpc_adsp_pdev = kzalloc(sizeof(struct rpc_board_dev), GFP_KERNEL);
1134 if (rpc_adsp_pdev == NULL) {
1135 pr_err("%s: Memory Allocation failure\n", __func__);
1136 return;
1137 }
1138 rpc_adsp_pdev->prog = ADSP_RPC_PROG;
1139
1140 if (cpu_is_msm8625())
1141 rpc_adsp_pdev->pdev = msm8625_device_adsp;
1142 else
1143 rpc_adsp_pdev->pdev = msm_adsp_device;
1144 rc = msm_rpc_add_board_dev(rpc_adsp_pdev, 1);
1145 if (rc < 0) {
1146 pr_err("%s: return val: %d\n", __func__, rc);
1147 kfree(rpc_adsp_pdev);
1148 }
1149}
1150
Trilok Soni16f61af2011-07-26 16:06:58 +05301151static void __init msm7627a_rumi3_init(void)
1152{
1153 msm7x27a_init_ebi2();
1154 platform_add_devices(rumi_sim_devices,
1155 ARRAY_SIZE(rumi_sim_devices));
1156}
1157
Taniya Das43bcdd62011-12-02 17:33:27 +05301158static void __init msm8625_rumi3_init(void)
1159{
1160 msm7x2x_misc_init();
Taniya Dase3027e22012-02-27 16:32:27 +05301161 msm_adsp_add_pdev();
1162 msm8625_device_i2c_init();
Taniya Das43bcdd62011-12-02 17:33:27 +05301163 platform_add_devices(msm8625_rumi3_devices,
1164 ARRAY_SIZE(msm8625_rumi3_devices));
Murali Nalajala41786ab2012-03-06 10:47:32 +05301165
Murali Nalajalad1f67b02012-02-10 00:23:49 +05301166 msm_pm_set_platform_data(msm8625_pm_data,
1167 ARRAY_SIZE(msm8625_pm_data));
Murali Nalajala41786ab2012-03-06 10:47:32 +05301168 BUG_ON(msm_pm_boot_init(&msm_pm_8625_boot_pdata));
1169 msm8x25_spm_device_init();
Taniya Das43bcdd62011-12-02 17:33:27 +05301170}
1171
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001172#define UART1DM_RX_GPIO 45
Santosh Sajjanb479f0f2011-08-18 21:00:44 +05301173
1174#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
1175static int __init msm7x27a_init_ar6000pm(void)
1176{
Santosh Sajjan374d6592012-01-19 23:16:46 +05301177 msm_wlan_ar6000_pm_device.dev.platform_data = &ar600x_wlan_power;
Santosh Sajjanb479f0f2011-08-18 21:00:44 +05301178 return platform_device_register(&msm_wlan_ar6000_pm_device);
1179}
1180#else
1181static int __init msm7x27a_init_ar6000pm(void) { return 0; }
1182#endif
1183
Justin Pauporeb3a33b72011-08-23 15:30:32 -07001184static void __init msm7x27a_init_regulators(void)
1185{
1186 int rc = platform_device_register(&msm_proccomm_regulator_dev);
1187 if (rc)
1188 pr_err("%s: could not register regulator device: %d\n",
1189 __func__, rc);
1190}
1191
Taniya Dase3027e22012-02-27 16:32:27 +05301192static void __init msm7x27a_add_footswitch_devices(void)
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001193{
Trilok Soni16f61af2011-07-26 16:06:58 +05301194 platform_add_devices(msm_footswitch_devices,
1195 msm_num_footswitch_devices);
Taniya Dase3027e22012-02-27 16:32:27 +05301196}
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001197
Taniya Dase3027e22012-02-27 16:32:27 +05301198static void __init msm7x27a_add_platform_devices(void)
1199{
Aparna Mallavarapu9f000a72012-04-20 15:37:57 +05301200 if (machine_is_msm8625_surf() || machine_is_msm8625_ffa()) {
Taniya Dase3027e22012-02-27 16:32:27 +05301201 platform_add_devices(msm8625_surf_devices,
1202 ARRAY_SIZE(msm8625_surf_devices));
1203 } else {
1204 platform_add_devices(msm7627a_surf_ffa_devices,
1205 ARRAY_SIZE(msm7627a_surf_ffa_devices));
1206 }
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001207
Taniya Dase3027e22012-02-27 16:32:27 +05301208 platform_add_devices(common_devices,
1209 ARRAY_SIZE(common_devices));
1210}
1211
1212static void __init msm7x27a_uartdm_config(void)
1213{
1214 msm7x27a_cfg_uart2dm_serial();
1215 msm_uart_dm1_pdata.wakeup_irq = gpio_to_irq(UART1DM_RX_GPIO);
1216 if (cpu_is_msm8625())
1217 msm8625_device_uart_dm1.dev.platform_data =
1218 &msm_uart_dm1_pdata;
1219 else
1220 msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
1221}
1222
1223static void __init msm7x27a_otg_gadget(void)
1224{
Taniya Dase3027e22012-02-27 16:32:27 +05301225 if (cpu_is_msm8625()) {
Murali Nalajala6ff8fb12012-05-02 18:50:50 +05301226 msm_otg_pdata.swfi_latency =
1227 msm8625_pm_data[MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT].latency;
Taniya Dase3027e22012-02-27 16:32:27 +05301228 msm8625_device_otg.dev.platform_data = &msm_otg_pdata;
1229 msm8625_device_gadget_peripheral.dev.platform_data =
1230 &msm_gadget_pdata;
1231 } else {
Murali Nalajala6ff8fb12012-05-02 18:50:50 +05301232 msm_otg_pdata.swfi_latency =
1233 msm7x27a_pm_data[
1234 MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT].latency;
Taniya Dase3027e22012-02-27 16:32:27 +05301235 msm_device_otg.dev.platform_data = &msm_otg_pdata;
1236 msm_device_gadget_peripheral.dev.platform_data =
1237 &msm_gadget_pdata;
1238 }
1239}
1240
Taniya Dase3027e22012-02-27 16:32:27 +05301241static void __init msm7x27a_pm_init(void)
1242{
Aparna Mallavarapu9f000a72012-04-20 15:37:57 +05301243 if (machine_is_msm8625_surf() || machine_is_msm8625_ffa()) {
Murali Nalajala8ee084e2012-03-07 00:09:38 +05301244 msm_pm_set_platform_data(msm8625_pm_data,
1245 ARRAY_SIZE(msm8625_pm_data));
1246 BUG_ON(msm_pm_boot_init(&msm_pm_8625_boot_pdata));
1247 msm8x25_spm_device_init();
1248 } else {
1249 msm_pm_set_platform_data(msm7x27a_pm_data,
1250 ARRAY_SIZE(msm7x27a_pm_data));
1251 BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata));
1252 }
Murali Nalajala2a0bbda2012-03-28 12:12:54 +05301253
1254 msm_pm_register_irqs();
Taniya Dase3027e22012-02-27 16:32:27 +05301255}
1256
1257static void __init msm7x2x_init(void)
1258{
1259 msm7x2x_misc_init();
1260
1261 /* Initialize regulators first so that other devices can use them */
1262 msm7x27a_init_regulators();
1263 msm_adsp_add_pdev();
1264 if (cpu_is_msm8625())
1265 msm8625_device_i2c_init();
1266 else
1267 msm7x27a_device_i2c_init();
1268 msm7x27a_init_ebi2();
1269 msm7x27a_uartdm_config();
1270
1271 msm7x27a_otg_gadget();
1272 msm7x27a_cfg_smsc911x();
1273
1274 msm7x27a_add_footswitch_devices();
1275 msm7x27a_add_platform_devices();
1276 /* Ensure ar6000pm device is registered before MMC/SDC */
1277 msm7x27a_init_ar6000pm();
1278 msm7627a_init_mmc();
1279 msm_fb_add_devices();
1280 msm7x2x_init_host();
1281 msm7x27a_pm_init();
1282 register_i2c_devices();
Steve Mucklef132c6c2012-06-06 18:30:57 -07001283#if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
Taniya Dase3027e22012-02-27 16:32:27 +05301284 msm7627a_bt_power_init();
Steve Mucklef132c6c2012-06-06 18:30:57 -07001285#endif
Taniya Dase3027e22012-02-27 16:32:27 +05301286 msm7627a_camera_init();
Chintan Pandya0d453192012-03-09 13:20:33 +05301287 msm7627a_add_io_devices();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001288 /*7x25a kgsl initializations*/
1289 msm7x25a_kgsl_3d0_init();
Sudhakara Rao Tentu38ad6e12012-03-30 15:25:18 -07001290 /*8x25 kgsl initializations*/
1291 msm8x25_kgsl_3d0_init();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001292}
1293
1294static void __init msm7x2x_init_early(void)
1295{
Chintan Pandya250c2e52012-01-19 17:15:49 +05301296 msm_msm7627a_allocate_memory_regions();
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001297}
1298
1299MACHINE_START(MSM7X27A_RUMI3, "QCT MSM7x27a RUMI3")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001300 .atag_offset = 0x100,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001301 .map_io = msm_common_io_init,
Trilok Sonib9410792012-04-07 15:37:13 +05301302 .reserve = msm7x27a_reserve,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001303 .init_irq = msm_init_irq,
Trilok Soni16f61af2011-07-26 16:06:58 +05301304 .init_machine = msm7627a_rumi3_init,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001305 .timer = &msm_timer,
1306 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301307 .handle_irq = vic_handle_irq,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001308MACHINE_END
1309MACHINE_START(MSM7X27A_SURF, "QCT MSM7x27a SURF")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001310 .atag_offset = 0x100,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001311 .map_io = msm_common_io_init,
Trilok Sonib9410792012-04-07 15:37:13 +05301312 .reserve = msm7x27a_reserve,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001313 .init_irq = msm_init_irq,
1314 .init_machine = msm7x2x_init,
1315 .timer = &msm_timer,
1316 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301317 .handle_irq = vic_handle_irq,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001318MACHINE_END
1319MACHINE_START(MSM7X27A_FFA, "QCT MSM7x27a FFA")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001320 .atag_offset = 0x100,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001321 .map_io = msm_common_io_init,
Trilok Sonib9410792012-04-07 15:37:13 +05301322 .reserve = msm7x27a_reserve,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001323 .init_irq = msm_init_irq,
1324 .init_machine = msm7x2x_init,
1325 .timer = &msm_timer,
1326 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301327 .handle_irq = vic_handle_irq,
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001328MACHINE_END
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301329MACHINE_START(MSM7625A_SURF, "QCT MSM7625a SURF")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001330 .atag_offset = 0x100,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301331 .map_io = msm_common_io_init,
Trilok Sonib9410792012-04-07 15:37:13 +05301332 .reserve = msm7x27a_reserve,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301333 .init_irq = msm_init_irq,
1334 .init_machine = msm7x2x_init,
1335 .timer = &msm_timer,
1336 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301337 .handle_irq = vic_handle_irq,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301338MACHINE_END
1339MACHINE_START(MSM7625A_FFA, "QCT MSM7625a FFA")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001340 .atag_offset = 0x100,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301341 .map_io = msm_common_io_init,
Trilok Sonib9410792012-04-07 15:37:13 +05301342 .reserve = msm7x27a_reserve,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301343 .init_irq = msm_init_irq,
1344 .init_machine = msm7x2x_init,
1345 .timer = &msm_timer,
1346 .init_early = msm7x2x_init_early,
Taniya Das86e0e132011-10-19 11:32:00 +05301347 .handle_irq = vic_handle_irq,
Trilok Soni3d0f6c52011-07-26 16:06:58 +05301348MACHINE_END
Taniya Das43bcdd62011-12-02 17:33:27 +05301349MACHINE_START(MSM8625_RUMI3, "QCT MSM8625 RUMI3")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001350 .atag_offset = 0x100,
Taniya Das43bcdd62011-12-02 17:33:27 +05301351 .map_io = msm8625_map_io,
Taniya Das2b16d1d2011-12-02 14:44:19 +05301352 .reserve = msm8625_reserve,
Taniya Das43bcdd62011-12-02 17:33:27 +05301353 .init_irq = msm8625_init_irq,
1354 .init_machine = msm8625_rumi3_init,
1355 .timer = &msm_timer,
1356 .handle_irq = gic_handle_irq,
1357MACHINE_END
Taniya Dase3027e22012-02-27 16:32:27 +05301358MACHINE_START(MSM8625_SURF, "QCT MSM8625 SURF")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001359 .atag_offset = 0x100,
Taniya Dase3027e22012-02-27 16:32:27 +05301360 .map_io = msm8625_map_io,
1361 .reserve = msm8625_reserve,
1362 .init_irq = msm8625_init_irq,
1363 .init_machine = msm7x2x_init,
1364 .timer = &msm_timer,
1365 .init_early = msm7x2x_init_early,
1366 .handle_irq = gic_handle_irq,
1367MACHINE_END
Aparna Mallavarapu9f000a72012-04-20 15:37:57 +05301368MACHINE_START(MSM8625_FFA, "QCT MSM8625 FFA")
Steve Mucklef132c6c2012-06-06 18:30:57 -07001369 .atag_offset = 0x100,
Aparna Mallavarapu9f000a72012-04-20 15:37:57 +05301370 .map_io = msm8625_map_io,
1371 .reserve = msm8625_reserve,
1372 .init_irq = msm8625_init_irq,
1373 .init_machine = msm7x2x_init,
1374 .timer = &msm_timer,
1375 .init_early = msm7x2x_init_early,
1376 .handle_irq = gic_handle_irq,
1377MACHINE_END