Sravan Kumar Ambapuram | b22cf4d | 2012-01-02 21:45:04 +0530 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | #include <linux/kernel.h> |
| 13 | #include <linux/init.h> |
| 14 | #include <linux/gpio_event.h> |
Taniya Das | 2b16d1d | 2011-12-02 14:44:19 +0530 | [diff] [blame] | 15 | #include <linux/memblock.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 16 | #include <asm/mach-types.h> |
Murali Nalajala | 41786ab | 2012-03-06 10:47:32 +0530 | [diff] [blame] | 17 | #include <linux/memblock.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 18 | #include <asm/mach/arch.h> |
Taniya Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 19 | #include <asm/hardware/gic.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 20 | #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 Paupore | d98328e | 2011-08-19 13:48:31 -0700 | [diff] [blame] | 46 | #include <linux/regulator/consumer.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 47 | #include <mach/rpc_pmapp.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 48 | #include <mach/msm_battery.h> |
| 49 | #include <linux/smsc911x.h> |
| 50 | #include <linux/atmel_maxtouch.h> |
Larry Bassel | 861985f | 2012-05-02 15:54:52 -0700 | [diff] [blame] | 51 | #include <linux/fmem.h> |
Siddartha Mohanadoss | bc2103f | 2012-03-20 11:41:48 -0700 | [diff] [blame] | 52 | #include <linux/msm_adc.h> |
Chintan Pandya | 43d0a34 | 2012-06-08 19:45:56 +0530 | [diff] [blame^] | 53 | #include <linux/ion.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 54 | #include "devices.h" |
| 55 | #include "timer.h" |
Justin Paupore | b3a33b7 | 2011-08-23 15:30:32 -0700 | [diff] [blame] | 56 | #include "board-msm7x27a-regulator.h" |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 57 | #include "devices-msm7x2xa.h" |
Matt Wagantall | 7cca464 | 2012-02-01 16:43:24 -0800 | [diff] [blame] | 58 | #include "pm.h" |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 59 | #include <mach/rpc_server_handset.h> |
| 60 | #include <mach/socinfo.h> |
Maheshkumar Sivasubramanian | 8ccc16e | 2011-10-25 15:59:57 -0600 | [diff] [blame] | 61 | #include "pm-boot.h" |
Chintan Pandya | cf467fc | 2011-12-01 17:11:11 +0530 | [diff] [blame] | 62 | #include "board-msm7627a.h" |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 63 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 64 | #define PMEM_KERNEL_EBI1_SIZE 0x3A000 |
Sidipotu Ashok | 554881c | 2012-04-12 11:42:02 +0530 | [diff] [blame] | 65 | #define MSM_PMEM_AUDIO_SIZE 0x1F4000 |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 66 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 67 | #if defined(CONFIG_GPIO_SX150X) |
| 68 | enum { |
| 69 | SX150X_CORE, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 70 | }; |
| 71 | |
| 72 | static 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 kumar | c5c0139 | 2011-08-12 13:44:05 +0530 | [diff] [blame] | 77 | .io_pulldn_ena = 0x02, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 78 | .io_open_drain_ena = 0xfef8, |
| 79 | .irq_summary = -1, |
| 80 | }, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 81 | }; |
| 82 | #endif |
| 83 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 84 | |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 85 | #if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE) |
Santosh Sajjan | 6822c68 | 2011-07-26 10:49:36 +0530 | [diff] [blame] | 86 | static struct platform_device msm_wlan_ar6000_pm_device = { |
| 87 | .name = "wlan_ar6000_pm_dev", |
| 88 | .id = -1, |
| 89 | }; |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 90 | #endif |
Santosh Sajjan | 6822c68 | 2011-07-26 10:49:36 +0530 | [diff] [blame] | 91 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 92 | #if defined(CONFIG_I2C) && defined(CONFIG_GPIO_SX150X) |
| 93 | static struct i2c_board_info core_exp_i2c_info[] __initdata = { |
| 94 | { |
| 95 | I2C_BOARD_INFO("sx1509q", 0x3e), |
| 96 | }, |
| 97 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 98 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 99 | static void __init register_i2c_devices(void) |
| 100 | { |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 101 | if (machine_is_msm7x27a_surf() || machine_is_msm7625a_surf() || |
| 102 | machine_is_msm8625_surf()) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 103 | 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 Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 111 | } |
| 112 | #endif |
| 113 | |
| 114 | static 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 | |
| 125 | static 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 | |
| 136 | static 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 | |
| 152 | static struct msm_i2c_platform_data msm_gsbi0_qup_i2c_pdata = { |
| 153 | .clk_freq = 100000, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 154 | .msm_i2c_config_gpio = gsbi_qup_i2c_gpio_config, |
| 155 | }; |
| 156 | |
| 157 | static struct msm_i2c_platform_data msm_gsbi1_qup_i2c_pdata = { |
| 158 | .clk_freq = 100000, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 159 | .msm_i2c_config_gpio = gsbi_qup_i2c_gpio_config, |
| 160 | }; |
| 161 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 162 | #ifdef CONFIG_ARCH_MSM7X27A |
| 163 | #define MSM_PMEM_MDP_SIZE 0x2300000 |
| 164 | #define MSM7x25A_MSM_PMEM_MDP_SIZE 0x1500000 |
| 165 | |
Rajeshwar Kurapaty | 20d7ad1 | 2012-06-22 16:11:06 +0530 | [diff] [blame] | 166 | #define MSM_PMEM_ADSP_SIZE 0x1200000 |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 167 | #define MSM7x25A_MSM_PMEM_ADSP_SIZE 0xB91000 |
| 168 | |
| 169 | #endif |
| 170 | |
Chintan Pandya | 43d0a34 | 2012-06-08 19:45:56 +0530 | [diff] [blame^] | 171 | #ifdef CONFIG_ION_MSM |
| 172 | #define MSM_ION_HEAP_NUM 4 |
| 173 | static struct platform_device ion_dev; |
| 174 | static int msm_ion_camera_size; |
| 175 | static int msm_ion_audio_size; |
| 176 | static int msm_ion_sf_size; |
| 177 | #endif |
| 178 | |
| 179 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 180 | static struct android_usb_platform_data android_usb_pdata = { |
| 181 | .update_pid_and_serial_num = usb_diag_update_pid_and_serial_num, |
| 182 | }; |
| 183 | |
| 184 | static 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 |
| 193 | static 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 | |
| 210 | static struct msm_usb_host_platform_data msm_usb_host_pdata = { |
| 211 | .phy_info = (USB_PHY_INTEGRATED | USB_PHY_MODEL_45NM), |
| 212 | }; |
| 213 | |
| 214 | static 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 |
| 221 | static 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 Paupore | d98328e | 2011-08-19 13:48:31 -0700 | [diff] [blame] | 229 | static struct regulator *reg_hsusb; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 230 | static int msm_hsusb_ldo_init(int init) |
| 231 | { |
Justin Paupore | d98328e | 2011-08-19 13:48:31 -0700 | [diff] [blame] | 232 | int rc = 0; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 233 | |
Justin Paupore | d98328e | 2011-08-19 13:48:31 -0700 | [diff] [blame] | 234 | 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 */ |
| 253 | reg_free: |
| 254 | regulator_put(reg_hsusb); |
| 255 | out: |
| 256 | reg_hsusb = NULL; |
| 257 | return rc; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 258 | } |
| 259 | |
| 260 | static int msm_hsusb_ldo_enable(int enable) |
| 261 | { |
| 262 | static int ldo_status; |
| 263 | |
Justin Paupore | d98328e | 2011-08-19 13:48:31 -0700 | [diff] [blame] | 264 | if (IS_ERR_OR_NULL(reg_hsusb)) |
| 265 | return reg_hsusb ? PTR_ERR(reg_hsusb) : -ENODEV; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 266 | |
| 267 | if (ldo_status == enable) |
| 268 | return 0; |
| 269 | |
| 270 | ldo_status = enable; |
| 271 | |
Justin Paupore | d98328e | 2011-08-19 13:48:31 -0700 | [diff] [blame] | 272 | return enable ? |
| 273 | regulator_enable(reg_hsusb) : |
| 274 | regulator_disable(reg_hsusb); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 275 | } |
| 276 | |
| 277 | #ifndef CONFIG_USB_EHCI_MSM_72K |
| 278 | static 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 | |
| 291 | static 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 Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 298 | .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 | |
| 310 | static struct msm_hsusb_gadget_platform_data msm_gadget_pdata = { |
| 311 | .is_phy_status_timer_on = 1, |
| 312 | }; |
| 313 | |
| 314 | static 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 | |
| 327 | static 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 Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 334 | #ifdef CONFIG_SERIAL_MSM_HS |
| 335 | static struct msm_serial_hs_platform_data msm_uart_dm1_pdata = { |
| 336 | .inject_rx_on_wakeup = 1, |
| 337 | .rx_to_inject = 0xFD, |
| 338 | }; |
| 339 | #endif |
| 340 | static struct msm_pm_platform_data msm7x27a_pm_data[MSM_PM_SLEEP_MODE_NR] = { |
Murali Nalajala | b10363d | 2012-01-12 16:29:01 +0530 | [diff] [blame] | 341 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 342 | .idle_supported = 1, |
| 343 | .suspend_supported = 1, |
| 344 | .idle_enabled = 1, |
| 345 | .suspend_enabled = 1, |
| 346 | .latency = 16000, |
| 347 | .residency = 20000, |
| 348 | }, |
Murali Nalajala | b10363d | 2012-01-12 16:29:01 +0530 | [diff] [blame] | 349 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_NO_XO_SHUTDOWN)] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 350 | .idle_supported = 1, |
| 351 | .suspend_supported = 1, |
| 352 | .idle_enabled = 1, |
| 353 | .suspend_enabled = 1, |
| 354 | .latency = 12000, |
| 355 | .residency = 20000, |
| 356 | }, |
Murali Nalajala | b10363d | 2012-01-12 16:29:01 +0530 | [diff] [blame] | 357 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT)] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 358 | .idle_supported = 1, |
| 359 | .suspend_supported = 1, |
| 360 | .idle_enabled = 0, |
| 361 | .suspend_enabled = 1, |
| 362 | .latency = 2000, |
| 363 | .residency = 0, |
| 364 | }, |
Murali Nalajala | b10363d | 2012-01-12 16:29:01 +0530 | [diff] [blame] | 365 | [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 366 | .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 Sivasubramanian | c6c5503 | 2011-10-25 16:01:32 -0600 | [diff] [blame] | 375 | static struct msm_pm_boot_platform_data msm_pm_boot_pdata __initdata = { |
Sravan Kumar Ambapuram | b22cf4d | 2012-01-02 21:45:04 +0530 | [diff] [blame] | 376 | .mode = MSM_PM_BOOT_CONFIG_RESET_VECTOR_PHYS, |
| 377 | .p_addr = 0, |
Maheshkumar Sivasubramanian | c6c5503 | 2011-10-25 16:01:32 -0600 | [diff] [blame] | 378 | }; |
| 379 | |
Murali Nalajala | d1f67b0 | 2012-02-10 00:23:49 +0530 | [diff] [blame] | 380 | /* 8625 PM platform data */ |
| 381 | static 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 Nalajala | 41786ab | 2012-03-06 10:47:32 +0530 | [diff] [blame] | 441 | static 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 Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 446 | static 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 Bassel | 861985f | 2012-05-02 15:54:52 -0700 | [diff] [blame] | 451 | .request_region = request_fmem_c_region, |
| 452 | .release_region = release_fmem_c_region, |
| 453 | .reusable = 1, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 454 | }; |
| 455 | |
| 456 | static struct platform_device android_pmem_adsp_device = { |
| 457 | .name = "android_pmem", |
| 458 | .id = 1, |
| 459 | .dev = { .platform_data = &android_pmem_adsp_pdata }, |
| 460 | }; |
| 461 | |
| 462 | static unsigned pmem_mdp_size = MSM_PMEM_MDP_SIZE; |
| 463 | static int __init pmem_mdp_size_setup(char *p) |
| 464 | { |
| 465 | pmem_mdp_size = memparse(p, NULL); |
| 466 | return 0; |
| 467 | } |
| 468 | |
| 469 | early_param("pmem_mdp_size", pmem_mdp_size_setup); |
| 470 | |
| 471 | static unsigned pmem_adsp_size = MSM_PMEM_ADSP_SIZE; |
| 472 | static int __init pmem_adsp_size_setup(char *p) |
| 473 | { |
| 474 | pmem_adsp_size = memparse(p, NULL); |
| 475 | return 0; |
| 476 | } |
| 477 | |
| 478 | early_param("pmem_adsp_size", pmem_adsp_size_setup); |
| 479 | |
| 480 | #define SND(desc, num) { .name = #desc, .id = num } |
| 481 | static 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 | |
| 502 | static 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 | |
| 507 | static 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 | |
| 541 | static 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 Bacharaju | 72ab89b | 2012-05-11 14:24:04 +0530 | [diff] [blame] | 582 | (DEC0_FORMAT|(1<<MSM_ADSP_MODE_TUNNEL)| |
| 583 | (1<<MSM_ADSP_MODE_NONTUNNEL)|(1<<MSM_ADSP_OP_DM)), |
| 584 | 0, 0, 0, 0, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 585 | |
| 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 | |
| 598 | static 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 | |
| 606 | static 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 | |
| 614 | static 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 | |
| 622 | static 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 | |
| 629 | static struct platform_device android_pmem_audio_device = { |
| 630 | .name = "android_pmem", |
| 631 | .id = 2, |
| 632 | .dev = { .platform_data = &android_pmem_audio_pdata }, |
| 633 | }; |
| 634 | |
| 635 | static 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 | }; |
| 641 | static struct platform_device android_pmem_device = { |
| 642 | .name = "android_pmem", |
| 643 | .id = 0, |
| 644 | .dev = { .platform_data = &android_pmem_pdata }, |
| 645 | }; |
| 646 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 647 | static u32 msm_calculate_batt_capacity(u32 current_voltage); |
| 648 | |
| 649 | static struct msm_psy_batt_pdata msm_psy_batt_data = { |
Krishna Vanka | 9a265e1 | 2012-06-04 23:24:26 +0530 | [diff] [blame] | 650 | .voltage_min_design = 3200, |
| 651 | .voltage_max_design = 4200, |
| 652 | .voltage_fail_safe = 3340, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 653 | .avail_chg_sources = AC_CHG | USB_CHG , |
| 654 | .batt_technology = POWER_SUPPLY_TECHNOLOGY_LION, |
| 655 | .calculate_capacity = &msm_calculate_batt_capacity, |
| 656 | }; |
| 657 | |
| 658 | static 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 Vanka | b349469 | 2012-06-12 15:06:43 +0530 | [diff] [blame] | 663 | 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 Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 669 | / (high_voltage - low_voltage); |
| 670 | } |
| 671 | |
| 672 | static struct platform_device msm_batt_device = { |
| 673 | .name = "msm-battery", |
| 674 | .id = -1, |
| 675 | .dev.platform_data = &msm_psy_batt_data, |
| 676 | }; |
| 677 | |
| 678 | static 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 | |
| 684 | static 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 | |
| 697 | static 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 | |
| 707 | static 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 Mohanadoss | bc2103f | 2012-03-20 11:41:48 -0700 | [diff] [blame] | 714 | static char *msm_adc_surf_device_names[] = { |
| 715 | "XO_ADC", |
| 716 | }; |
| 717 | |
| 718 | static 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 | |
| 724 | static 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 Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 732 | #define ETH_FIFO_SEL_GPIO 49 |
| 733 | static 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 Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 756 | #if defined(CONFIG_SERIAL_MSM_HSL_CONSOLE) \ |
| 757 | && defined(CONFIG_MSM_SHARED_GPIO_FOR_UART2DM) |
| 758 | static 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 | |
| 769 | static 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 |
| 778 | static void msm7x27a_cfg_uart2dm_serial(void) { } |
| 779 | #endif |
| 780 | |
Taniya Das | 720c5c3 | 2012-05-18 14:08:14 +0530 | [diff] [blame] | 781 | static struct fmem_platform_data fmem_pdata; |
Larry Bassel | 861985f | 2012-05-02 15:54:52 -0700 | [diff] [blame] | 782 | |
Taniya Das | 720c5c3 | 2012-05-18 14:08:14 +0530 | [diff] [blame] | 783 | static struct platform_device fmem_device = { |
Larry Bassel | 861985f | 2012-05-02 15:54:52 -0700 | [diff] [blame] | 784 | .name = "fmem", |
| 785 | .id = 1, |
| 786 | .dev = { .platform_data = &fmem_pdata }, |
| 787 | }; |
| 788 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 789 | static 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 Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 800 | static struct platform_device *msm8625_rumi3_devices[] __initdata = { |
| 801 | &msm8625_device_dmov, |
Angshuman Sarkar | fb1cce9 | 2012-02-21 15:20:43 +0530 | [diff] [blame] | 802 | &msm8625_device_smd, |
Taniya Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 803 | &msm8625_device_uart1, |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 804 | &msm8625_gsbi0_qup_i2c_device, |
Taniya Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 805 | }; |
| 806 | |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 807 | static struct platform_device *msm7627a_surf_ffa_devices[] __initdata = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 808 | &msm_device_dmov, |
| 809 | &msm_device_smd, |
| 810 | &msm_device_uart1, |
| 811 | &msm_device_uart_dm1, |
| 812 | &msm_device_uart_dm2, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 813 | &msm_gsbi0_qup_i2c_device, |
| 814 | &msm_gsbi1_qup_i2c_device, |
| 815 | &msm_device_otg, |
| 816 | &msm_device_gadget_peripheral, |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 817 | &smsc911x_device, |
| 818 | &msm_kgsl_3d0, |
| 819 | }; |
| 820 | |
| 821 | static struct platform_device *common_devices[] __initdata = { |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 822 | &android_usb_device, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 823 | &android_pmem_device, |
| 824 | &android_pmem_adsp_device, |
| 825 | &android_pmem_audio_device, |
Larry Bassel | 861985f | 2012-05-02 15:54:52 -0700 | [diff] [blame] | 826 | &fmem_device, |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 827 | &msm_device_nand, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 828 | &msm_device_snd, |
| 829 | &msm_device_adspdec, |
Manish Dewangan | 3a26099 | 2011-06-24 18:01:34 +0530 | [diff] [blame] | 830 | &asoc_msm_pcm, |
| 831 | &asoc_msm_dai0, |
| 832 | &asoc_msm_dai1, |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 833 | &msm_batt_device, |
Siddartha Mohanadoss | bc2103f | 2012-03-20 11:41:48 -0700 | [diff] [blame] | 834 | &msm_adc_device, |
Chintan Pandya | 43d0a34 | 2012-06-08 19:45:56 +0530 | [diff] [blame^] | 835 | #ifdef CONFIG_ION_MSM |
| 836 | &ion_dev, |
| 837 | #endif |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 838 | }; |
| 839 | |
| 840 | static 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 Das | f266530 | 2012-02-28 16:54:54 +0530 | [diff] [blame] | 847 | &msm8625_device_smd, |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 848 | &msm8625_device_otg, |
| 849 | &msm8625_device_gadget_peripheral, |
Ranjhith Kalisamy | 4ec2e10 | 2012-03-06 12:27:50 +0530 | [diff] [blame] | 850 | &msm8625_kgsl_3d0, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 851 | }; |
| 852 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 853 | static unsigned pmem_kernel_ebi1_size = PMEM_KERNEL_EBI1_SIZE; |
| 854 | static int __init pmem_kernel_ebi1_size_setup(char *p) |
| 855 | { |
| 856 | pmem_kernel_ebi1_size = memparse(p, NULL); |
| 857 | return 0; |
| 858 | } |
| 859 | early_param("pmem_kernel_ebi1_size", pmem_kernel_ebi1_size_setup); |
| 860 | |
| 861 | static unsigned pmem_audio_size = MSM_PMEM_AUDIO_SIZE; |
| 862 | static int __init pmem_audio_size_setup(char *p) |
| 863 | { |
| 864 | pmem_audio_size = memparse(p, NULL); |
| 865 | return 0; |
| 866 | } |
| 867 | early_param("pmem_audio_size", pmem_audio_size_setup); |
| 868 | |
Chintan Pandya | 43d0a34 | 2012-06-08 19:45:56 +0530 | [diff] [blame^] | 869 | static 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 |
| 887 | static 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 | */ |
| 897 | static 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 | |
| 937 | static struct platform_device ion_dev = { |
| 938 | .name = "ion-msm", |
| 939 | .id = 1, |
| 940 | .dev = { .platform_data = &ion_pdata }, |
| 941 | }; |
| 942 | #endif |
| 943 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 944 | static 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 Bassel | 861985f | 2012-05-02 15:54:52 -0700 | [diff] [blame] | 955 | #ifdef CONFIG_ANDROID_PMEM |
Chintan Pandya | 43d0a34 | 2012-06-08 19:45:56 +0530 | [diff] [blame^] | 956 | #ifndef CONFIG_MSM_MULTIMEDIA_USE_ION |
Larry Bassel | 861985f | 2012-05-02 15:54:52 -0700 | [diff] [blame] | 957 | static 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 Pandya | 43d0a34 | 2012-06-08 19:45:56 +0530 | [diff] [blame^] | 963 | #endif |
Larry Bassel | 861985f | 2012-05-02 15:54:52 -0700 | [diff] [blame] | 964 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 965 | static void __init size_pmem_devices(void) |
| 966 | { |
Larry Bassel | 861985f | 2012-05-02 15:54:52 -0700 | [diff] [blame] | 967 | #ifdef CONFIG_ANDROID_PMEM |
Chintan Pandya | 43d0a34 | 2012-06-08 19:45:56 +0530 | [diff] [blame^] | 968 | #ifndef CONFIG_MSM_MULTIMEDIA_USE_ION |
Larry Bassel | 861985f | 2012-05-02 15:54:52 -0700 | [diff] [blame] | 969 | unsigned int i; |
| 970 | unsigned int reusable_count = 0; |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 971 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 972 | 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 Bassel | 861985f | 2012-05-02 15:54:52 -0700 | [diff] [blame] | 975 | |
| 976 | fmem_pdata.size = 0; |
Olav Haugan | 6243625 | 2012-05-16 09:09:43 -0700 | [diff] [blame] | 977 | fmem_pdata.align = PAGE_SIZE; |
Larry Bassel | 861985f | 2012-05-02 15:54:52 -0700 | [diff] [blame] | 978 | |
| 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 Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 995 | #endif |
Chintan Pandya | 43d0a34 | 2012-06-08 19:45:56 +0530 | [diff] [blame^] | 996 | #endif |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 997 | } |
| 998 | |
Chintan Pandya | 43d0a34 | 2012-06-08 19:45:56 +0530 | [diff] [blame^] | 999 | #ifdef CONFIG_ANDROID_PMEM |
| 1000 | #ifndef CONFIG_MSM_MULTIMEDIA_USE_ION |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1001 | static void __init reserve_memory_for(struct android_pmem_platform_data *p) |
| 1002 | { |
| 1003 | msm7x27a_reserve_table[p->memory_type].size += p->size; |
| 1004 | } |
Chintan Pandya | 43d0a34 | 2012-06-08 19:45:56 +0530 | [diff] [blame^] | 1005 | #endif |
| 1006 | #endif |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1007 | |
| 1008 | static void __init reserve_pmem_memory(void) |
| 1009 | { |
| 1010 | #ifdef CONFIG_ANDROID_PMEM |
Chintan Pandya | 43d0a34 | 2012-06-08 19:45:56 +0530 | [diff] [blame^] | 1011 | #ifndef CONFIG_MSM_MULTIMEDIA_USE_ION |
Larry Bassel | 861985f | 2012-05-02 15:54:52 -0700 | [diff] [blame] | 1012 | unsigned int i; |
| 1013 | for (i = 0; i < ARRAY_SIZE(pmem_pdata_array); ++i) |
| 1014 | reserve_memory_for(pmem_pdata_array[i]); |
| 1015 | |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1016 | msm7x27a_reserve_table[MEMTYPE_EBI1].size += pmem_kernel_ebi1_size; |
| 1017 | #endif |
Chintan Pandya | 43d0a34 | 2012-06-08 19:45:56 +0530 | [diff] [blame^] | 1018 | #endif |
| 1019 | } |
| 1020 | |
| 1021 | static 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 | |
| 1030 | static 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 Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1037 | } |
| 1038 | |
| 1039 | static void __init msm7x27a_calculate_reserve_sizes(void) |
| 1040 | { |
Chintan Pandya | 43d0a34 | 2012-06-08 19:45:56 +0530 | [diff] [blame^] | 1041 | fix_sizes(); |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1042 | size_pmem_devices(); |
| 1043 | reserve_pmem_memory(); |
Chintan Pandya | 43d0a34 | 2012-06-08 19:45:56 +0530 | [diff] [blame^] | 1044 | size_ion_devices(); |
| 1045 | reserve_ion_memory(); |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1046 | } |
| 1047 | |
| 1048 | static int msm7x27a_paddr_to_memtype(unsigned int paddr) |
| 1049 | { |
| 1050 | return MEMTYPE_EBI1; |
| 1051 | } |
| 1052 | |
| 1053 | static 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 | |
| 1059 | static void __init msm7x27a_reserve(void) |
| 1060 | { |
| 1061 | reserve_info = &msm7x27a_reserve_info; |
| 1062 | msm_reserve(); |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1063 | } |
| 1064 | |
Taniya Das | 2b16d1d | 2011-12-02 14:44:19 +0530 | [diff] [blame] | 1065 | static void __init msm8625_reserve(void) |
| 1066 | { |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1067 | msm7x27a_reserve(); |
Taniya Das | fe04d4f | 2012-03-14 11:13:21 +0530 | [diff] [blame] | 1068 | memblock_remove(MSM8625_SECONDARY_PHYS, SZ_8); |
Murali Nalajala | feedeae | 2012-03-28 16:15:32 +0530 | [diff] [blame] | 1069 | memblock_remove(MSM8625_WARM_BOOT_PHYS, SZ_32); |
Taniya Das | 2b16d1d | 2011-12-02 14:44:19 +0530 | [diff] [blame] | 1070 | } |
| 1071 | |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1072 | static void __init msm7x27a_device_i2c_init(void) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1073 | { |
| 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 Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1078 | static 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 Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1086 | #define MSM_EBI2_PHYS 0xa0d00000 |
| 1087 | #define MSM_EBI2_XMEM_CS2_CFG1 0xa0d10030 |
| 1088 | |
| 1089 | static 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 Soni | 3d0f6c5 | 2011-07-26 16:06:58 +0530 | [diff] [blame] | 1099 | if (machine_is_msm7x27a_rumi3() || machine_is_msm7x27a_surf() || |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1100 | machine_is_msm7625a_surf() || machine_is_msm8625_surf()) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1101 | 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 Soni | 3d0f6c5 | 2011-07-26 16:06:58 +0530 | [diff] [blame] | 1113 | if (machine_is_msm7x27a_surf() || machine_is_msm7625a_surf()) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1114 | ebi2_cfg |= (1 << 31); |
| 1115 | |
| 1116 | writel(ebi2_cfg, ebi2_cfg_ptr); |
| 1117 | iounmap(ebi2_cfg_ptr); |
| 1118 | } |
| 1119 | |
Justin Paupore | b3a33b7 | 2011-08-23 15:30:32 -0700 | [diff] [blame] | 1120 | static 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 Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1128 | static 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 Soni | 16f61af | 2011-07-26 16:06:58 +0530 | [diff] [blame] | 1151 | static 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 Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 1158 | static void __init msm8625_rumi3_init(void) |
| 1159 | { |
| 1160 | msm7x2x_misc_init(); |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1161 | msm_adsp_add_pdev(); |
| 1162 | msm8625_device_i2c_init(); |
Taniya Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 1163 | platform_add_devices(msm8625_rumi3_devices, |
| 1164 | ARRAY_SIZE(msm8625_rumi3_devices)); |
Murali Nalajala | 41786ab | 2012-03-06 10:47:32 +0530 | [diff] [blame] | 1165 | |
Murali Nalajala | d1f67b0 | 2012-02-10 00:23:49 +0530 | [diff] [blame] | 1166 | msm_pm_set_platform_data(msm8625_pm_data, |
| 1167 | ARRAY_SIZE(msm8625_pm_data)); |
Murali Nalajala | 41786ab | 2012-03-06 10:47:32 +0530 | [diff] [blame] | 1168 | BUG_ON(msm_pm_boot_init(&msm_pm_8625_boot_pdata)); |
| 1169 | msm8x25_spm_device_init(); |
Taniya Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 1170 | } |
| 1171 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1172 | #define UART1DM_RX_GPIO 45 |
Santosh Sajjan | b479f0f | 2011-08-18 21:00:44 +0530 | [diff] [blame] | 1173 | |
| 1174 | #if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE) |
| 1175 | static int __init msm7x27a_init_ar6000pm(void) |
| 1176 | { |
Santosh Sajjan | 374d659 | 2012-01-19 23:16:46 +0530 | [diff] [blame] | 1177 | msm_wlan_ar6000_pm_device.dev.platform_data = &ar600x_wlan_power; |
Santosh Sajjan | b479f0f | 2011-08-18 21:00:44 +0530 | [diff] [blame] | 1178 | return platform_device_register(&msm_wlan_ar6000_pm_device); |
| 1179 | } |
| 1180 | #else |
| 1181 | static int __init msm7x27a_init_ar6000pm(void) { return 0; } |
| 1182 | #endif |
| 1183 | |
Justin Paupore | b3a33b7 | 2011-08-23 15:30:32 -0700 | [diff] [blame] | 1184 | static 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 Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1192 | static void __init msm7x27a_add_footswitch_devices(void) |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1193 | { |
Trilok Soni | 16f61af | 2011-07-26 16:06:58 +0530 | [diff] [blame] | 1194 | platform_add_devices(msm_footswitch_devices, |
| 1195 | msm_num_footswitch_devices); |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1196 | } |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1197 | |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1198 | static void __init msm7x27a_add_platform_devices(void) |
| 1199 | { |
Aparna Mallavarapu | 9f000a7 | 2012-04-20 15:37:57 +0530 | [diff] [blame] | 1200 | if (machine_is_msm8625_surf() || machine_is_msm8625_ffa()) { |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1201 | 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 Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1207 | |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1208 | platform_add_devices(common_devices, |
| 1209 | ARRAY_SIZE(common_devices)); |
| 1210 | } |
| 1211 | |
| 1212 | static 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 | |
| 1223 | static void __init msm7x27a_otg_gadget(void) |
| 1224 | { |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1225 | if (cpu_is_msm8625()) { |
Murali Nalajala | 6ff8fb1 | 2012-05-02 18:50:50 +0530 | [diff] [blame] | 1226 | msm_otg_pdata.swfi_latency = |
| 1227 | msm8625_pm_data[MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT].latency; |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1228 | msm8625_device_otg.dev.platform_data = &msm_otg_pdata; |
| 1229 | msm8625_device_gadget_peripheral.dev.platform_data = |
| 1230 | &msm_gadget_pdata; |
| 1231 | } else { |
Murali Nalajala | 6ff8fb1 | 2012-05-02 18:50:50 +0530 | [diff] [blame] | 1232 | msm_otg_pdata.swfi_latency = |
| 1233 | msm7x27a_pm_data[ |
| 1234 | MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT].latency; |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1235 | 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 Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1241 | static void __init msm7x27a_pm_init(void) |
| 1242 | { |
Aparna Mallavarapu | 9f000a7 | 2012-04-20 15:37:57 +0530 | [diff] [blame] | 1243 | if (machine_is_msm8625_surf() || machine_is_msm8625_ffa()) { |
Murali Nalajala | 8ee084e | 2012-03-07 00:09:38 +0530 | [diff] [blame] | 1244 | 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 Nalajala | 2a0bbda | 2012-03-28 12:12:54 +0530 | [diff] [blame] | 1253 | |
| 1254 | msm_pm_register_irqs(); |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1255 | } |
| 1256 | |
| 1257 | static 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 Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1283 | #if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE) |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1284 | msm7627a_bt_power_init(); |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1285 | #endif |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1286 | msm7627a_camera_init(); |
Chintan Pandya | 0d45319 | 2012-03-09 13:20:33 +0530 | [diff] [blame] | 1287 | msm7627a_add_io_devices(); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1288 | /*7x25a kgsl initializations*/ |
| 1289 | msm7x25a_kgsl_3d0_init(); |
Sudhakara Rao Tentu | 38ad6e1 | 2012-03-30 15:25:18 -0700 | [diff] [blame] | 1290 | /*8x25 kgsl initializations*/ |
| 1291 | msm8x25_kgsl_3d0_init(); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1292 | } |
| 1293 | |
| 1294 | static void __init msm7x2x_init_early(void) |
| 1295 | { |
Chintan Pandya | 250c2e5 | 2012-01-19 17:15:49 +0530 | [diff] [blame] | 1296 | msm_msm7627a_allocate_memory_regions(); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1297 | } |
| 1298 | |
| 1299 | MACHINE_START(MSM7X27A_RUMI3, "QCT MSM7x27a RUMI3") |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1300 | .atag_offset = 0x100, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1301 | .map_io = msm_common_io_init, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1302 | .reserve = msm7x27a_reserve, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1303 | .init_irq = msm_init_irq, |
Trilok Soni | 16f61af | 2011-07-26 16:06:58 +0530 | [diff] [blame] | 1304 | .init_machine = msm7627a_rumi3_init, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1305 | .timer = &msm_timer, |
| 1306 | .init_early = msm7x2x_init_early, |
Taniya Das | 86e0e13 | 2011-10-19 11:32:00 +0530 | [diff] [blame] | 1307 | .handle_irq = vic_handle_irq, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1308 | MACHINE_END |
| 1309 | MACHINE_START(MSM7X27A_SURF, "QCT MSM7x27a SURF") |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1310 | .atag_offset = 0x100, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1311 | .map_io = msm_common_io_init, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1312 | .reserve = msm7x27a_reserve, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1313 | .init_irq = msm_init_irq, |
| 1314 | .init_machine = msm7x2x_init, |
| 1315 | .timer = &msm_timer, |
| 1316 | .init_early = msm7x2x_init_early, |
Taniya Das | 86e0e13 | 2011-10-19 11:32:00 +0530 | [diff] [blame] | 1317 | .handle_irq = vic_handle_irq, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1318 | MACHINE_END |
| 1319 | MACHINE_START(MSM7X27A_FFA, "QCT MSM7x27a FFA") |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1320 | .atag_offset = 0x100, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1321 | .map_io = msm_common_io_init, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1322 | .reserve = msm7x27a_reserve, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1323 | .init_irq = msm_init_irq, |
| 1324 | .init_machine = msm7x2x_init, |
| 1325 | .timer = &msm_timer, |
| 1326 | .init_early = msm7x2x_init_early, |
Taniya Das | 86e0e13 | 2011-10-19 11:32:00 +0530 | [diff] [blame] | 1327 | .handle_irq = vic_handle_irq, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1328 | MACHINE_END |
Trilok Soni | 3d0f6c5 | 2011-07-26 16:06:58 +0530 | [diff] [blame] | 1329 | MACHINE_START(MSM7625A_SURF, "QCT MSM7625a SURF") |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1330 | .atag_offset = 0x100, |
Trilok Soni | 3d0f6c5 | 2011-07-26 16:06:58 +0530 | [diff] [blame] | 1331 | .map_io = msm_common_io_init, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1332 | .reserve = msm7x27a_reserve, |
Trilok Soni | 3d0f6c5 | 2011-07-26 16:06:58 +0530 | [diff] [blame] | 1333 | .init_irq = msm_init_irq, |
| 1334 | .init_machine = msm7x2x_init, |
| 1335 | .timer = &msm_timer, |
| 1336 | .init_early = msm7x2x_init_early, |
Taniya Das | 86e0e13 | 2011-10-19 11:32:00 +0530 | [diff] [blame] | 1337 | .handle_irq = vic_handle_irq, |
Trilok Soni | 3d0f6c5 | 2011-07-26 16:06:58 +0530 | [diff] [blame] | 1338 | MACHINE_END |
| 1339 | MACHINE_START(MSM7625A_FFA, "QCT MSM7625a FFA") |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1340 | .atag_offset = 0x100, |
Trilok Soni | 3d0f6c5 | 2011-07-26 16:06:58 +0530 | [diff] [blame] | 1341 | .map_io = msm_common_io_init, |
Trilok Soni | b941079 | 2012-04-07 15:37:13 +0530 | [diff] [blame] | 1342 | .reserve = msm7x27a_reserve, |
Trilok Soni | 3d0f6c5 | 2011-07-26 16:06:58 +0530 | [diff] [blame] | 1343 | .init_irq = msm_init_irq, |
| 1344 | .init_machine = msm7x2x_init, |
| 1345 | .timer = &msm_timer, |
| 1346 | .init_early = msm7x2x_init_early, |
Taniya Das | 86e0e13 | 2011-10-19 11:32:00 +0530 | [diff] [blame] | 1347 | .handle_irq = vic_handle_irq, |
Trilok Soni | 3d0f6c5 | 2011-07-26 16:06:58 +0530 | [diff] [blame] | 1348 | MACHINE_END |
Taniya Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 1349 | MACHINE_START(MSM8625_RUMI3, "QCT MSM8625 RUMI3") |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1350 | .atag_offset = 0x100, |
Taniya Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 1351 | .map_io = msm8625_map_io, |
Taniya Das | 2b16d1d | 2011-12-02 14:44:19 +0530 | [diff] [blame] | 1352 | .reserve = msm8625_reserve, |
Taniya Das | 43bcdd6 | 2011-12-02 17:33:27 +0530 | [diff] [blame] | 1353 | .init_irq = msm8625_init_irq, |
| 1354 | .init_machine = msm8625_rumi3_init, |
| 1355 | .timer = &msm_timer, |
| 1356 | .handle_irq = gic_handle_irq, |
| 1357 | MACHINE_END |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1358 | MACHINE_START(MSM8625_SURF, "QCT MSM8625 SURF") |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1359 | .atag_offset = 0x100, |
Taniya Das | e3027e2 | 2012-02-27 16:32:27 +0530 | [diff] [blame] | 1360 | .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, |
| 1367 | MACHINE_END |
Aparna Mallavarapu | 9f000a7 | 2012-04-20 15:37:57 +0530 | [diff] [blame] | 1368 | MACHINE_START(MSM8625_FFA, "QCT MSM8625 FFA") |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 1369 | .atag_offset = 0x100, |
Aparna Mallavarapu | 9f000a7 | 2012-04-20 15:37:57 +0530 | [diff] [blame] | 1370 | .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, |
| 1377 | MACHINE_END |