blob: c7aa00093619d7b01f204fad5c708f9f790843c1 [file] [log] [blame]
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -07001/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13#include <linux/kernel.h>
14#include <linux/platform_device.h>
Harini Jayaramaneba52672011-09-08 15:13:00 -060015#include <linux/i2c.h>
Kenneth Heitkeaf3d3cf2011-09-08 11:45:31 -070016#include <linux/msm_ssbi.h>
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -060017#include <linux/memblock.h>
Rohit Vaswania6815892011-12-15 20:20:39 -080018#include <linux/usb/android.h>
19#include <linux/usb/msm_hsusb.h>
20#include <linux/mfd/pm8xxx/pm8xxx-adc.h>
21#include <linux/leds.h>
22#include <linux/leds-pm8xxx.h>
23#include <linux/power/ltc4088-charger.h>
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -070024#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26#include <mach/board.h>
27#include <mach/msm_iomap.h>
28#include <mach/gpio.h>
Harini Jayaraman738c9312011-09-08 15:22:38 -060029#include <mach/msm_spi.h>
Gagan Mac7a827642011-09-22 19:42:21 -060030#include <mach/msm_bus_board.h>
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -070031#include "timer.h"
32#include "devices.h"
David Collinsfb88c432011-08-25 15:12:47 -070033#include "board-9615.h"
Maheshkumar Sivasubramanian4923db22011-09-15 09:28:15 -060034#include "cpuidle.h"
35#include "pm.h"
Vikram Mulukutlab5e1cda2011-10-04 16:17:22 -070036#include "acpuclock.h"
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -060037#include "pm-boot.h"
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -070038
Siddartha Mohanadoss5f60b452011-10-05 11:49:00 -070039static struct pm8xxx_adc_amux pm8018_adc_channels_data[] = {
40 {"vcoin", CHANNEL_VCOIN, CHAN_PATH_SCALING2, AMUX_RSV1,
41 ADC_DECIMATION_TYPE2, ADC_SCALE_DEFAULT},
42 {"vbat", CHANNEL_VBAT, CHAN_PATH_SCALING2, AMUX_RSV1,
43 ADC_DECIMATION_TYPE2, ADC_SCALE_DEFAULT},
44 {"vph_pwr", CHANNEL_VPH_PWR, CHAN_PATH_SCALING2, AMUX_RSV1,
45 ADC_DECIMATION_TYPE2, ADC_SCALE_DEFAULT},
46 {"batt_therm", CHANNEL_BATT_THERM, CHAN_PATH_SCALING1, AMUX_RSV2,
47 ADC_DECIMATION_TYPE2, ADC_SCALE_BATT_THERM},
48 {"batt_id", CHANNEL_BATT_ID, CHAN_PATH_SCALING1, AMUX_RSV2,
49 ADC_DECIMATION_TYPE2, ADC_SCALE_DEFAULT},
50 {"pmic_therm", CHANNEL_DIE_TEMP, CHAN_PATH_SCALING1, AMUX_RSV1,
51 ADC_DECIMATION_TYPE2, ADC_SCALE_PMIC_THERM},
52 {"625mv", CHANNEL_625MV, CHAN_PATH_SCALING1, AMUX_RSV1,
53 ADC_DECIMATION_TYPE2, ADC_SCALE_DEFAULT},
54 {"125v", CHANNEL_125V, CHAN_PATH_SCALING1, AMUX_RSV1,
55 ADC_DECIMATION_TYPE2, ADC_SCALE_DEFAULT},
56 {"pa_therm0", ADC_MPP_1_AMUX3, CHAN_PATH_SCALING1, AMUX_RSV1,
57 ADC_DECIMATION_TYPE2, ADC_SCALE_PA_THERM},
58};
59
60static struct pm8xxx_adc_properties pm8018_adc_data = {
61 .adc_vdd_reference = 1800, /* milli-voltage for this adc */
62 .bitresolution = 15,
63 .bipolar = 0,
64};
65
66static struct pm8xxx_adc_platform_data pm8018_adc_pdata = {
67 .adc_channel = pm8018_adc_channels_data,
68 .adc_num_board_channel = ARRAY_SIZE(pm8018_adc_channels_data),
69 .adc_prop = &pm8018_adc_data,
70};
71
David Collinsfb88c432011-08-25 15:12:47 -070072static struct pm8xxx_irq_platform_data pm8xxx_irq_pdata __devinitdata = {
73 .irq_base = PM8018_IRQ_BASE,
74 .devirq = MSM_GPIO_TO_INT(87),
75 .irq_trigger_flag = IRQF_TRIGGER_LOW,
76};
77
78static struct pm8xxx_gpio_platform_data pm8xxx_gpio_pdata __devinitdata = {
79 .gpio_base = PM8018_GPIO_PM_TO_SYS(1),
80};
81
82static struct pm8xxx_mpp_platform_data pm8xxx_mpp_pdata __devinitdata = {
83 .mpp_base = PM8018_MPP_PM_TO_SYS(1),
84};
85
86static struct pm8xxx_rtc_platform_data pm8xxx_rtc_pdata __devinitdata = {
87 .rtc_write_enable = false,
Ashay Jaiswaldb5e6dc2011-10-12 11:02:47 +053088 .rtc_alarm_powerup = false,
David Collinsfb88c432011-08-25 15:12:47 -070089};
90
91static struct pm8xxx_pwrkey_platform_data pm8xxx_pwrkey_pdata = {
92 .pull_up = 1,
Jing Lineecdc062011-11-17 09:47:09 -080093 .kpd_trigger_delay_us = 15625,
David Collinsfb88c432011-08-25 15:12:47 -070094 .wakeup = 1,
95};
96
97static struct pm8xxx_misc_platform_data pm8xxx_misc_pdata = {
98 .priority = 0,
99};
100
Jay Chokshieb5d0d52011-09-28 17:16:20 -0700101#define PM8018_LED_KB_MAX_CURRENT 20 /* I = 20mA */
102#define PM8XXX_LED_PWM_PERIOD_US 1000
103
104/**
105 * PM8XXX_PWM_CHANNEL_NONE shall be used when LED shall not be
106 * driven using PWM feature.
107 */
108#define PM8XXX_PWM_CHANNEL_NONE -1
109
110static struct led_info pm8018_led_info[] = {
111 [0] = {
112 .name = "led:kb",
113 },
114};
115
116static struct led_platform_data pm8018_led_core_pdata = {
117 .num_leds = ARRAY_SIZE(pm8018_led_info),
118 .leds = pm8018_led_info,
119};
120
121static struct pm8xxx_led_config pm8018_led_configs[] = {
122 [0] = {
123 .id = PM8XXX_ID_LED_KB_LIGHT,
124 .mode = PM8XXX_LED_MODE_PWM3,
125 .max_current = PM8018_LED_KB_MAX_CURRENT,
126 .pwm_channel = 2,
127 .pwm_period_us = PM8XXX_LED_PWM_PERIOD_US,
128 },
129};
130
131static struct pm8xxx_led_platform_data pm8xxx_leds_pdata = {
132 .led_core = &pm8018_led_core_pdata,
133 .configs = pm8018_led_configs,
134 .num_configs = ARRAY_SIZE(pm8018_led_configs),
135};
136
Jay Chokshidc8028b2011-12-01 16:17:34 -0800137#ifdef CONFIG_LTC4088_CHARGER
138static struct ltc4088_charger_platform_data ltc4088_chg_pdata = {
139 .gpio_mode_select_d0 = 7,
140 .gpio_mode_select_d1 = 6,
141 .gpio_mode_select_d2 = 4,
142};
143#endif
144
David Collinsfb88c432011-08-25 15:12:47 -0700145static struct pm8018_platform_data pm8018_platform_data __devinitdata = {
146 .irq_pdata = &pm8xxx_irq_pdata,
147 .gpio_pdata = &pm8xxx_gpio_pdata,
148 .mpp_pdata = &pm8xxx_mpp_pdata,
149 .rtc_pdata = &pm8xxx_rtc_pdata,
150 .pwrkey_pdata = &pm8xxx_pwrkey_pdata,
151 .misc_pdata = &pm8xxx_misc_pdata,
David Collins00b31e62011-08-31 20:00:10 -0700152 .regulator_pdatas = msm_pm8018_regulator_pdata,
Siddartha Mohanadoss5f60b452011-10-05 11:49:00 -0700153 .adc_pdata = &pm8018_adc_pdata,
Jay Chokshieb5d0d52011-09-28 17:16:20 -0700154 .leds_pdata = &pm8xxx_leds_pdata,
David Collinsfb88c432011-08-25 15:12:47 -0700155};
156
Kenneth Heitkeaf3d3cf2011-09-08 11:45:31 -0700157static struct msm_ssbi_platform_data msm9615_ssbi_pm8018_pdata __devinitdata = {
158 .controller_type = MSM_SBI_CTRL_PMIC_ARBITER,
159 .slave = {
David Collinsfb88c432011-08-25 15:12:47 -0700160 .name = PM8018_CORE_DEV_NAME,
161 .platform_data = &pm8018_platform_data,
Kenneth Heitkeaf3d3cf2011-09-08 11:45:31 -0700162 },
163};
164
David Collinsbea297a2011-09-28 13:11:14 -0700165static struct platform_device msm9615_device_rpm_regulator __devinitdata = {
166 .name = "rpm-regulator",
167 .id = -1,
168 .dev = {
169 .platform_data = &msm_rpm_regulator_9615_pdata,
170 },
171};
172
David Collins0f9942a2011-10-31 09:47:34 -0700173static struct platform_device msm9615_device_ext_2p95v_vreg = {
174 .name = GPIO_REGULATOR_DEV_NAME,
175 .id = 18,
176 .dev = {
177 .platform_data =
178 &msm_gpio_regulator_pdata[GPIO_VREG_ID_EXT_2P95V],
179 },
180};
181
Maheshkumar Sivasubramanian4923db22011-09-15 09:28:15 -0600182static struct msm_cpuidle_state msm_cstates[] __initdata = {
183 {0, 0, "C0", "WFI",
184 MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT},
185
186 {0, 1, "C1", "STANDALONE_POWER_COLLAPSE",
187 MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE},
188
189 {0, 2, "C2", "POWER_COLLAPSE",
190 MSM_PM_SLEEP_MODE_POWER_COLLAPSE},
191};
192static struct msm_pm_platform_data msm_pm_data[MSM_PM_SLEEP_MODE_NR] = {
193 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = {
194 .idle_supported = 1,
195 .suspend_supported = 1,
196 .idle_enabled = 0,
197 .suspend_enabled = 0,
198 },
199 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
200 .idle_supported = 1,
201 .suspend_supported = 1,
202 .idle_enabled = 0,
203 .suspend_enabled = 0,
204 },
205 [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
206 .idle_supported = 1,
207 .suspend_supported = 1,
208 .idle_enabled = 1,
209 .suspend_enabled = 1,
210 },
211};
Krishna Kondadd794462011-10-01 00:19:29 -0700212
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -0600213static struct msm_pm_boot_platform_data msm_pm_boot_pdata __initdata = {
214 .mode = MSM_PM_BOOT_CONFIG_REMAP_BOOT_ADDR,
215 .v_addr = MSM_APCS_GLB_BASE + 0x24,
216};
217
Gagan Mac7a827642011-09-22 19:42:21 -0600218static void __init msm9615_init_buses(void)
219{
220#ifdef CONFIG_MSM_BUS_SCALING
221 msm_bus_rpm_set_mt_mask();
222 msm_bus_9615_sys_fabric_pdata.rpm_enabled = 1;
223 msm_bus_9615_sys_fabric.dev.platform_data =
224 &msm_bus_9615_sys_fabric_pdata;
225 msm_bus_def_fab.dev.platform_data = &msm_bus_9615_def_fab_pdata;
226#endif
227}
228
Harini Jayaraman738c9312011-09-08 15:22:38 -0600229static struct msm_spi_platform_data msm9615_qup_spi_gsbi3_pdata = {
230 .max_clock_speed = 24000000,
231};
232
Harini Jayaramaneba52672011-09-08 15:13:00 -0600233static struct msm_i2c_platform_data msm9615_i2c_qup_gsbi5_pdata = {
234 .clk_freq = 100000,
235 .src_clk_rate = 24000000,
236};
237
Amit Blay6a8d4f32011-11-21 10:36:25 +0200238#define USB_5V_EN 3
239#define PM_USB_5V_EN PM8018_GPIO_PM_TO_SYS(USB_5V_EN)
240
241static void msm_hsusb_vbus_power(bool on)
242{
243 int rc;
244 static bool vbus_is_on;
245 struct pm_gpio usb_vbus = {
246 .direction = PM_GPIO_DIR_OUT,
247 .pull = PM_GPIO_PULL_NO,
248 .output_buffer = PM_GPIO_OUT_BUF_CMOS,
249 .output_value = 0,
250 .vin_sel = 2,
251 .out_strength = PM_GPIO_STRENGTH_HIGH,
252 .function = PM_GPIO_FUNC_NORMAL,
253 .inv_int_pol = 0,
254 };
255
256 if (vbus_is_on == on)
257 return;
258
259 if (on) {
260 rc = pm8xxx_gpio_config(PM_USB_5V_EN, &usb_vbus);
261 if (rc) {
262 pr_err("failed to config usb_5v_en gpio\n");
263 return;
264 }
265
266 rc = gpio_request(PM_USB_5V_EN,
267 "usb_5v_en");
268 if (rc < 0) {
269 pr_err("failed to request usb_5v_en gpio\n");
270 return;
271 }
272
273 rc = gpio_direction_output(PM_USB_5V_EN, 1);
274 if (rc) {
275 pr_err("%s: unable to set_direction for gpio [%d]\n",
276 __func__, PM_USB_5V_EN);
277 goto free_usb_5v_en;
278 }
279
280 vbus_is_on = true;
281 return;
282 }
283 gpio_set_value(PM_USB_5V_EN, 0);
284free_usb_5v_en:
285 gpio_free(PM_USB_5V_EN);
286 vbus_is_on = false;
287}
288
Anji jonnalaa8b8d732011-12-06 10:03:24 +0530289static int shelby_phy_init_seq[] = {
290 0x44, 0x80,/* set VBUS valid threshold and
291 disconnect valid threshold */
292 0x38, 0x81, /* update DC voltage level */
293 0x14, 0x82,/* set preemphasis and rise/fall time */
294 0x13, 0x83,/* set source impedance adjustment */
295 -1};
296
Ofir Cohen40a4e862011-12-08 15:17:52 +0200297#define USB_BAM_PHY_BASE 0x12502000
298#define USB_BAM_PHY_SIZE 0x10000
299#define A2_BAM_PHY_BASE 0x124C2000
300static struct usb_bam_pipe_connect msm_usb_bam_connections[4][2] = {
301 [0][USB_TO_PEER_PERIPHERAL] = {
302 .src_phy_addr = USB_BAM_PHY_BASE,
303 .src_pipe_index = 11,
304 .dst_phy_addr = A2_BAM_PHY_BASE,
305 .dst_pipe_index = 0,
Ofir Cohen29cd5752011-12-14 17:20:30 +0200306 .data_fifo_base_offset = 0x1100,
307 .data_fifo_size = 0x600,
308 .desc_fifo_base_offset = 0x1700,
Ofir Cohen40a4e862011-12-08 15:17:52 +0200309 .desc_fifo_size = 0x300,
310 },
311 [0][PEER_PERIPHERAL_TO_USB] = {
312 .src_phy_addr = A2_BAM_PHY_BASE,
313 .src_pipe_index = 1,
314 .dst_phy_addr = USB_BAM_PHY_BASE,
315 .dst_pipe_index = 10,
316 .data_fifo_base_offset = 0xa00,
Ofir Cohen29cd5752011-12-14 17:20:30 +0200317 .data_fifo_size = 0x600,
318 .desc_fifo_base_offset = 0x1000,
Ofir Cohen40a4e862011-12-08 15:17:52 +0200319 .desc_fifo_size = 0x100,
320 },
321};
322
323static struct msm_usb_bam_platform_data msm_usb_bam_pdata = {
324 .connections = &msm_usb_bam_connections[0][0],
325 .usb_bam_phy_base = USB_BAM_PHY_BASE,
326 .usb_bam_phy_size = USB_BAM_PHY_SIZE,
327 .usb_bam_num_pipes = 32,
328};
329
Amit Blay5e4ec192011-10-20 09:16:54 +0200330static struct msm_otg_platform_data msm_otg_pdata = {
Amit Blay6a8d4f32011-11-21 10:36:25 +0200331 .mode = USB_OTG,
332 .otg_control = OTG_PHY_CONTROL,
Amit Blay5e4ec192011-10-20 09:16:54 +0200333 .phy_type = SNPS_28NM_INTEGRATED_PHY,
Amit Blay6a8d4f32011-11-21 10:36:25 +0200334 .pclk_src_name = "dfab_usb_hs_clk",
335 .vbus_power = msm_hsusb_vbus_power,
Amit Blay5e4ec192011-10-20 09:16:54 +0200336};
337
338static int usb_diag_update_pid_and_serial_num(uint32_t pid, const char *snum)
339{
340 return 0;
341}
342
343static struct android_usb_platform_data android_usb_pdata = {
344 .update_pid_and_serial_num = usb_diag_update_pid_and_serial_num,
345};
346
347static struct platform_device android_usb_device = {
348 .name = "android_usb",
349 .id = -1,
350 .dev = {
351 .platform_data = &android_usb_pdata,
352 },
353};
354
Rohit Vaswani149f0a72011-11-09 15:21:28 -0800355static struct platform_device msm_wlan_ar6000_pm_device = {
356 .name = "wlan_ar6000_pm_dev",
357 .id = -1,
358};
359
360static int __init msm9615_init_ar6000pm(void)
361{
362 return platform_device_register(&msm_wlan_ar6000_pm_device);
363}
364
Jay Chokshidc8028b2011-12-01 16:17:34 -0800365#ifdef CONFIG_LTC4088_CHARGER
366static struct platform_device msm_device_charger = {
367 .name = LTC4088_CHARGER_DEV_NAME,
368 .id = -1,
369 .dev = {
370 .platform_data = &ltc4088_chg_pdata,
371 },
372};
373#endif
374
Amit Blay5e4ec192011-10-20 09:16:54 +0200375static struct platform_device *common_devices[] = {
376 &msm9615_device_dmov,
377 &msm_device_smd,
Jay Chokshidc8028b2011-12-01 16:17:34 -0800378#ifdef CONFIG_LTC4088_CHARGER
379 &msm_device_charger,
380#endif
Amit Blay5e4ec192011-10-20 09:16:54 +0200381 &msm_device_otg,
382 &msm_device_gadget_peripheral,
Amit Blay6a8d4f32011-11-21 10:36:25 +0200383 &msm_device_hsusb_host,
Ofir Cohen40a4e862011-12-08 15:17:52 +0200384 &msm_device_usb_bam,
Amit Blay5e4ec192011-10-20 09:16:54 +0200385 &android_usb_device,
386 &msm9615_device_uart_gsbi4,
David Collins0f9942a2011-10-31 09:47:34 -0700387 &msm9615_device_ext_2p95v_vreg,
Amit Blay5e4ec192011-10-20 09:16:54 +0200388 &msm9615_device_ssbi_pmic1,
389 &msm9615_device_qup_i2c_gsbi5,
390 &msm9615_device_qup_spi_gsbi3,
391 &msm_device_sps,
392 &msm9615_device_tsens,
393 &msm_device_nand,
Eric Holmberg0c96e702011-11-08 18:04:31 -0700394 &msm_device_bam_dmux,
Amit Blay5e4ec192011-10-20 09:16:54 +0200395 &msm_rpm_device,
396#ifdef CONFIG_HW_RANDOM_MSM
397 &msm_device_rng,
398#endif
399
400#if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \
401 defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE)
Ramesh Masavarapuaa28b5b2011-10-21 10:26:03 -0700402 &msm9615_qcrypto_device,
Amit Blay5e4ec192011-10-20 09:16:54 +0200403#endif
404
405#if defined(CONFIG_CRYPTO_DEV_QCEDEV) || \
406 defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE)
Ramesh Masavarapuaa28b5b2011-10-21 10:26:03 -0700407 &msm9615_qcedev_device,
Amit Blay5e4ec192011-10-20 09:16:54 +0200408#endif
Jeff Ohlstein7e668552011-10-06 16:17:25 -0700409 &msm9615_device_watchdog,
Gagan Mac7a827642011-09-22 19:42:21 -0600410 &msm_bus_9615_sys_fabric,
411 &msm_bus_def_fab,
Amit Blay5e4ec192011-10-20 09:16:54 +0200412};
413
Harini Jayaramaneba52672011-09-08 15:13:00 -0600414static void __init msm9615_i2c_init(void)
415{
416 msm9615_device_qup_i2c_gsbi5.dev.platform_data =
417 &msm9615_i2c_qup_gsbi5_pdata;
418}
419
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -0600420static void __init msm9615_reserve(void)
421{
422 msm_pm_boot_pdata.p_addr = memblock_alloc(SZ_8, SZ_64K);
423}
424
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -0700425static void __init msm9615_common_init(void)
426{
427 msm9615_device_init();
Rohit Vaswania6815892011-12-15 20:20:39 -0800428 msm9615_init_gpiomux();
Harini Jayaramaneba52672011-09-08 15:13:00 -0600429 msm9615_i2c_init();
David Collins00b31e62011-08-31 20:00:10 -0700430 regulator_suppress_info_printing();
David Collinsbea297a2011-09-28 13:11:14 -0700431 platform_device_register(&msm9615_device_rpm_regulator);
Gagan Mac7a827642011-09-22 19:42:21 -0600432 msm_clock_init(&msm9615_clock_init_data);
433 msm9615_init_buses();
Harini Jayaraman738c9312011-09-08 15:22:38 -0600434 msm9615_device_qup_spi_gsbi3.dev.platform_data =
435 &msm9615_qup_spi_gsbi3_pdata;
Kenneth Heitkeaf3d3cf2011-09-08 11:45:31 -0700436 msm9615_device_ssbi_pmic1.dev.platform_data =
437 &msm9615_ssbi_pm8018_pdata;
David Collins00b31e62011-08-31 20:00:10 -0700438 pm8018_platform_data.num_regulators = msm_pm8018_regulator_pdata_len;
Amit Blay5e4ec192011-10-20 09:16:54 +0200439
440 msm_device_otg.dev.platform_data = &msm_otg_pdata;
Anji jonnalaa8b8d732011-12-06 10:03:24 +0530441 msm_otg_pdata.phy_init_seq = shelby_phy_init_seq;
Ofir Cohen40a4e862011-12-08 15:17:52 +0200442 msm_device_usb_bam.dev.platform_data = &msm_usb_bam_pdata;
Rohit Vaswani09666872011-08-23 17:41:54 -0700443 platform_add_devices(common_devices, ARRAY_SIZE(common_devices));
Krishna Kondadd794462011-10-01 00:19:29 -0700444
Vikram Mulukutlab5e1cda2011-10-04 16:17:22 -0700445 acpuclk_init(&acpuclk_9615_soc_data);
446
Rohit Vaswani149f0a72011-11-09 15:21:28 -0800447 /* Ensure ar6000pm device is registered before MMC/SDC */
448 msm9615_init_ar6000pm();
449
Krishna Kondadd794462011-10-01 00:19:29 -0700450 msm9615_init_mmc();
Maheshkumar Sivasubramanian4923db22011-09-15 09:28:15 -0600451 msm_pm_set_platform_data(msm_pm_data, ARRAY_SIZE(msm_pm_data));
452 msm_pm_set_rpm_wakeup_irq(RPM_APCC_CPU0_WAKE_UP_IRQ);
453 msm_cpuidle_set_states(msm_cstates, ARRAY_SIZE(msm_cstates),
454 msm_pm_data);
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -0600455 BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata));
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -0700456}
457
458static void __init msm9615_cdp_init(void)
459{
460 msm9615_common_init();
461}
462
463static void __init msm9615_mtp_init(void)
464{
465 msm9615_common_init();
466}
467
468MACHINE_START(MSM9615_CDP, "QCT MSM9615 CDP")
469 .map_io = msm9615_map_io,
470 .init_irq = msm9615_init_irq,
471 .timer = &msm_timer,
472 .init_machine = msm9615_cdp_init,
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -0600473 .reserve = msm9615_reserve,
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -0700474MACHINE_END
475
476MACHINE_START(MSM9615_MTP, "QCT MSM9615 MTP")
477 .map_io = msm9615_map_io,
478 .init_irq = msm9615_init_irq,
479 .timer = &msm_timer,
480 .init_machine = msm9615_mtp_init,
Maheshkumar Sivasubramanianc6c55032011-10-25 16:01:32 -0600481 .reserve = msm9615_reserve,
Rohit Vaswaniced9b3b2011-08-23 17:21:49 -0700482MACHINE_END