board-msm7x27a.c 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201
  1. /* Copyright (c) 2011-2012, The Linux Foundation. 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. #include <linux/kernel.h>
  13. #include <linux/init.h>
  14. #include <linux/gpio_event.h>
  15. #include <linux/memblock.h>
  16. #include <asm/mach-types.h>
  17. #include <linux/memblock.h>
  18. #include <asm/mach/arch.h>
  19. #include <asm/hardware/gic.h>
  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/bootmem.h>
  42. #include <linux/mfd/marimba.h>
  43. #include <mach/vreg.h>
  44. #include <linux/power_supply.h>
  45. #include <linux/regulator/consumer.h>
  46. #include <mach/rpc_pmapp.h>
  47. #include <mach/msm_battery.h>
  48. #include <linux/smsc911x.h>
  49. #include <linux/atmel_maxtouch.h>
  50. #include <linux/msm_adc.h>
  51. #include <linux/msm_ion.h>
  52. #include "devices.h"
  53. #include "timer.h"
  54. #include "board-msm7x27a-regulator.h"
  55. #include "devices-msm7x2xa.h"
  56. #include "pm.h"
  57. #include <mach/rpc_server_handset.h>
  58. #include <mach/socinfo.h>
  59. #include "pm-boot.h"
  60. #include "board-msm7627a.h"
  61. #include "platsmp.h"
  62. #define RESERVE_KERNEL_EBI1_SIZE 0x3A000
  63. #define MSM_RESERVE_AUDIO_SIZE 0x1F4000
  64. #if defined(CONFIG_GPIO_SX150X)
  65. enum {
  66. SX150X_CORE,
  67. };
  68. static struct sx150x_platform_data sx150x_data[] __initdata = {
  69. [SX150X_CORE] = {
  70. .gpio_base = GPIO_CORE_EXPANDER_BASE,
  71. .oscio_is_gpo = false,
  72. .io_pullup_ena = 0,
  73. .io_pulldn_ena = 0x02,
  74. .io_open_drain_ena = 0xfef8,
  75. .irq_summary = -1,
  76. },
  77. };
  78. #endif
  79. #if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
  80. static struct platform_device msm_wlan_ar6000_pm_device = {
  81. .name = "wlan_ar6000_pm_dev",
  82. .id = -1,
  83. };
  84. #endif
  85. #if defined(CONFIG_I2C) && defined(CONFIG_GPIO_SX150X)
  86. static struct i2c_board_info core_exp_i2c_info[] __initdata = {
  87. {
  88. I2C_BOARD_INFO("sx1509q", 0x3e),
  89. },
  90. };
  91. static void __init register_i2c_devices(void)
  92. {
  93. if (machine_is_msm7x27a_surf() || machine_is_msm7625a_surf() ||
  94. machine_is_msm8625_surf())
  95. sx150x_data[SX150X_CORE].io_open_drain_ena = 0xe0f0;
  96. core_exp_i2c_info[0].platform_data =
  97. &sx150x_data[SX150X_CORE];
  98. i2c_register_board_info(MSM_GSBI1_QUP_I2C_BUS_ID,
  99. core_exp_i2c_info,
  100. ARRAY_SIZE(core_exp_i2c_info));
  101. }
  102. #endif
  103. static struct msm_gpio qup_i2c_gpios_io[] = {
  104. { GPIO_CFG(60, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
  105. "qup_scl" },
  106. { GPIO_CFG(61, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
  107. "qup_sda" },
  108. { GPIO_CFG(131, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
  109. "qup_scl" },
  110. { GPIO_CFG(132, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
  111. "qup_sda" },
  112. };
  113. static struct msm_gpio qup_i2c_gpios_hw[] = {
  114. { GPIO_CFG(60, 1, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
  115. "qup_scl" },
  116. { GPIO_CFG(61, 1, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
  117. "qup_sda" },
  118. { GPIO_CFG(131, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
  119. "qup_scl" },
  120. { GPIO_CFG(132, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_8MA),
  121. "qup_sda" },
  122. };
  123. static void gsbi_qup_i2c_gpio_config(int adap_id, int config_type)
  124. {
  125. int rc;
  126. if (adap_id < 0 || adap_id > 1)
  127. return;
  128. /* Each adapter gets 2 lines from the table */
  129. if (config_type)
  130. rc = msm_gpios_request_enable(&qup_i2c_gpios_hw[adap_id*2], 2);
  131. else
  132. rc = msm_gpios_request_enable(&qup_i2c_gpios_io[adap_id*2], 2);
  133. if (rc < 0)
  134. pr_err("QUP GPIO request/enable failed: %d\n", rc);
  135. }
  136. static struct msm_i2c_platform_data msm_gsbi0_qup_i2c_pdata = {
  137. .clk_freq = 100000,
  138. .msm_i2c_config_gpio = gsbi_qup_i2c_gpio_config,
  139. };
  140. static struct msm_i2c_platform_data msm_gsbi1_qup_i2c_pdata = {
  141. .clk_freq = 100000,
  142. .msm_i2c_config_gpio = gsbi_qup_i2c_gpio_config,
  143. };
  144. #ifdef CONFIG_ARCH_MSM7X27A
  145. #define MSM_RESERVE_MDP_SIZE 0x1B00000
  146. #define MSM7x25A_MSM_RESERVE_MDP_SIZE 0x1500000
  147. #define MSM_RESERVE_ADSP_SIZE 0x1200000
  148. #define MSM7x25A_MSM_RESERVE_ADSP_SIZE 0xB91000
  149. #define CAMERA_ZSL_SIZE (SZ_1M * 60)
  150. #endif
  151. #ifdef CONFIG_ION_MSM
  152. #define MSM_ION_HEAP_NUM 4
  153. static struct platform_device ion_dev;
  154. static int msm_ion_camera_size;
  155. static int msm_ion_audio_size;
  156. static int msm_ion_sf_size;
  157. #endif
  158. static struct android_usb_platform_data android_usb_pdata = {
  159. .update_pid_and_serial_num = usb_diag_update_pid_and_serial_num,
  160. };
  161. static struct platform_device android_usb_device = {
  162. .name = "android_usb",
  163. .id = -1,
  164. .dev = {
  165. .platform_data = &android_usb_pdata,
  166. },
  167. };
  168. #ifdef CONFIG_USB_EHCI_MSM_72K
  169. static void msm_hsusb_vbus_power(unsigned phy_info, int on)
  170. {
  171. int rc = 0;
  172. unsigned gpio;
  173. gpio = GPIO_HOST_VBUS_EN;
  174. rc = gpio_request(gpio, "i2c_host_vbus_en");
  175. if (rc < 0) {
  176. pr_err("failed to request %d GPIO\n", gpio);
  177. return;
  178. }
  179. gpio_direction_output(gpio, !!on);
  180. gpio_set_value_cansleep(gpio, !!on);
  181. gpio_free(gpio);
  182. }
  183. static struct msm_usb_host_platform_data msm_usb_host_pdata = {
  184. .phy_info = (USB_PHY_INTEGRATED | USB_PHY_MODEL_45NM),
  185. };
  186. static void __init msm7x2x_init_host(void)
  187. {
  188. msm_add_host(0, &msm_usb_host_pdata);
  189. }
  190. #endif
  191. #ifdef CONFIG_USB_MSM_OTG_72K
  192. static int hsusb_rpc_connect(int connect)
  193. {
  194. if (connect)
  195. return msm_hsusb_rpc_connect();
  196. else
  197. return msm_hsusb_rpc_close();
  198. }
  199. static struct regulator *reg_hsusb;
  200. static int msm_hsusb_ldo_init(int init)
  201. {
  202. int rc = 0;
  203. if (init) {
  204. reg_hsusb = regulator_get(NULL, "usb");
  205. if (IS_ERR(reg_hsusb)) {
  206. rc = PTR_ERR(reg_hsusb);
  207. pr_err("%s: could not get regulator: %d\n",
  208. __func__, rc);
  209. goto out;
  210. }
  211. rc = regulator_set_voltage(reg_hsusb, 3300000, 3300000);
  212. if (rc) {
  213. pr_err("%s: could not set voltage: %d\n",
  214. __func__, rc);
  215. goto reg_free;
  216. }
  217. return 0;
  218. }
  219. /* else fall through */
  220. reg_free:
  221. regulator_put(reg_hsusb);
  222. out:
  223. reg_hsusb = NULL;
  224. return rc;
  225. }
  226. static int msm_hsusb_ldo_enable(int enable)
  227. {
  228. static int ldo_status;
  229. if (IS_ERR_OR_NULL(reg_hsusb))
  230. return reg_hsusb ? PTR_ERR(reg_hsusb) : -ENODEV;
  231. if (ldo_status == enable)
  232. return 0;
  233. ldo_status = enable;
  234. return enable ?
  235. regulator_enable(reg_hsusb) :
  236. regulator_disable(reg_hsusb);
  237. }
  238. #ifndef CONFIG_USB_EHCI_MSM_72K
  239. static int msm_hsusb_pmic_notif_init(void (*callback)(int online), int init)
  240. {
  241. int ret = 0;
  242. if (init)
  243. ret = msm_pm_app_rpc_init(callback);
  244. else
  245. msm_pm_app_rpc_deinit(callback);
  246. return ret;
  247. }
  248. #endif
  249. static struct msm_otg_platform_data msm_otg_pdata = {
  250. #ifndef CONFIG_USB_EHCI_MSM_72K
  251. .pmic_vbus_notif_init = msm_hsusb_pmic_notif_init,
  252. #else
  253. .vbus_power = msm_hsusb_vbus_power,
  254. #endif
  255. .rpc_connect = hsusb_rpc_connect,
  256. .pemp_level = PRE_EMPHASIS_WITH_20_PERCENT,
  257. .cdr_autoreset = CDR_AUTO_RESET_DISABLE,
  258. .drv_ampl = HS_DRV_AMPLITUDE_DEFAULT,
  259. .se1_gating = SE1_GATING_DISABLE,
  260. .ldo_init = msm_hsusb_ldo_init,
  261. .ldo_enable = msm_hsusb_ldo_enable,
  262. .chg_init = hsusb_chg_init,
  263. .chg_connected = hsusb_chg_connected,
  264. .chg_vbus_draw = hsusb_chg_vbus_draw,
  265. };
  266. #endif
  267. static struct msm_hsusb_gadget_platform_data msm_gadget_pdata = {
  268. .is_phy_status_timer_on = 1,
  269. };
  270. static struct resource smc91x_resources[] = {
  271. [0] = {
  272. .start = 0x90000300,
  273. .end = 0x900003ff,
  274. .flags = IORESOURCE_MEM,
  275. },
  276. [1] = {
  277. .start = MSM_GPIO_TO_INT(4),
  278. .end = MSM_GPIO_TO_INT(4),
  279. .flags = IORESOURCE_IRQ,
  280. },
  281. };
  282. static struct platform_device smc91x_device = {
  283. .name = "smc91x",
  284. .id = 0,
  285. .num_resources = ARRAY_SIZE(smc91x_resources),
  286. .resource = smc91x_resources,
  287. };
  288. #ifdef CONFIG_SERIAL_MSM_HS
  289. static struct msm_serial_hs_platform_data msm_uart_dm1_pdata = {
  290. .inject_rx_on_wakeup = 1,
  291. .rx_to_inject = 0xFD,
  292. };
  293. #endif
  294. static struct msm_pm_platform_data msm7x27a_pm_data[MSM_PM_SLEEP_MODE_NR] = {
  295. [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = {
  296. .idle_supported = 1,
  297. .suspend_supported = 1,
  298. .idle_enabled = 1,
  299. .suspend_enabled = 1,
  300. .latency = 16000,
  301. .residency = 20000,
  302. },
  303. [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_NO_XO_SHUTDOWN)] = {
  304. .idle_supported = 1,
  305. .suspend_supported = 1,
  306. .idle_enabled = 1,
  307. .suspend_enabled = 1,
  308. .latency = 12000,
  309. .residency = 20000,
  310. },
  311. [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT)] = {
  312. .idle_supported = 1,
  313. .suspend_supported = 1,
  314. .idle_enabled = 0,
  315. .suspend_enabled = 1,
  316. .latency = 2000,
  317. .residency = 0,
  318. },
  319. [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
  320. .idle_supported = 1,
  321. .suspend_supported = 1,
  322. .idle_enabled = 1,
  323. .suspend_enabled = 1,
  324. .latency = 2,
  325. .residency = 0,
  326. },
  327. };
  328. static struct msm_pm_boot_platform_data msm_pm_boot_pdata __initdata = {
  329. .mode = MSM_PM_BOOT_CONFIG_RESET_VECTOR_PHYS,
  330. .p_addr = 0,
  331. };
  332. /* 8625 PM platform data */
  333. static struct msm_pm_platform_data
  334. msm8625_pm_data[MSM_PM_SLEEP_MODE_NR * CONFIG_NR_CPUS] = {
  335. /* CORE0 entries */
  336. [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = {
  337. .idle_supported = 1,
  338. .suspend_supported = 1,
  339. .idle_enabled = 0,
  340. .suspend_enabled = 0,
  341. .latency = 16000,
  342. .residency = 20000,
  343. },
  344. [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_NO_XO_SHUTDOWN)] = {
  345. .idle_supported = 1,
  346. .suspend_supported = 1,
  347. .idle_enabled = 0,
  348. .suspend_enabled = 0,
  349. .latency = 12000,
  350. .residency = 20000,
  351. },
  352. /* picked latency & redisdency values from 7x30 */
  353. [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
  354. .idle_supported = 1,
  355. .suspend_supported = 1,
  356. .idle_enabled = 0,
  357. .suspend_enabled = 0,
  358. .latency = 500,
  359. .residency = 500,
  360. },
  361. [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
  362. .idle_supported = 1,
  363. .suspend_supported = 1,
  364. .idle_enabled = 1,
  365. .suspend_enabled = 1,
  366. .latency = 2,
  367. .residency = 10,
  368. },
  369. /* picked latency & redisdency values from 7x30 */
  370. [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
  371. .idle_supported = 1,
  372. .suspend_supported = 1,
  373. .idle_enabled = 0,
  374. .suspend_enabled = 0,
  375. .latency = 500,
  376. .residency = 500,
  377. },
  378. [MSM_PM_MODE(1, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
  379. .idle_supported = 1,
  380. .suspend_supported = 1,
  381. .idle_enabled = 1,
  382. .suspend_enabled = 1,
  383. .latency = 2,
  384. .residency = 10,
  385. },
  386. /* picked latency & redisdency values from 7x30 */
  387. [MSM_PM_MODE(2, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
  388. .idle_supported = 1,
  389. .suspend_supported = 1,
  390. .idle_enabled = 0,
  391. .suspend_enabled = 0,
  392. .latency = 500,
  393. .residency = 500,
  394. },
  395. [MSM_PM_MODE(2, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
  396. .idle_supported = 1,
  397. .suspend_supported = 1,
  398. .idle_enabled = 1,
  399. .suspend_enabled = 1,
  400. .latency = 2,
  401. .residency = 10,
  402. },
  403. /* picked latency & redisdency values from 7x30 */
  404. [MSM_PM_MODE(3, MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE)] = {
  405. .idle_supported = 1,
  406. .suspend_supported = 1,
  407. .idle_enabled = 0,
  408. .suspend_enabled = 0,
  409. .latency = 500,
  410. .residency = 500,
  411. },
  412. [MSM_PM_MODE(3, MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT)] = {
  413. .idle_supported = 1,
  414. .suspend_supported = 1,
  415. .idle_enabled = 1,
  416. .suspend_enabled = 1,
  417. .latency = 2,
  418. .residency = 10,
  419. },
  420. };
  421. static struct msm_pm_boot_platform_data msm_pm_8625_boot_pdata __initdata = {
  422. .mode = MSM_PM_BOOT_CONFIG_REMAP_BOOT_ADDR,
  423. .v_addr = MSM_CFG_CTL_BASE,
  424. };
  425. static unsigned reserve_mdp_size = MSM_RESERVE_MDP_SIZE;
  426. static int __init reserve_mdp_size_setup(char *p)
  427. {
  428. reserve_mdp_size = memparse(p, NULL);
  429. return 0;
  430. }
  431. early_param("reserve_mdp_size", reserve_mdp_size_setup);
  432. static unsigned reserve_adsp_size = MSM_RESERVE_ADSP_SIZE;
  433. static int __init reserve_adsp_size_setup(char *p)
  434. {
  435. reserve_adsp_size = memparse(p, NULL);
  436. return 0;
  437. }
  438. early_param("reserve_adsp_size", reserve_adsp_size_setup);
  439. static u32 msm_calculate_batt_capacity(u32 current_voltage);
  440. static struct msm_psy_batt_pdata msm_psy_batt_data = {
  441. .voltage_min_design = 3200,
  442. .voltage_max_design = 4200,
  443. .voltage_fail_safe = 3340,
  444. .avail_chg_sources = AC_CHG | USB_CHG ,
  445. .batt_technology = POWER_SUPPLY_TECHNOLOGY_LION,
  446. .calculate_capacity = &msm_calculate_batt_capacity,
  447. };
  448. static u32 msm_calculate_batt_capacity(u32 current_voltage)
  449. {
  450. u32 low_voltage = msm_psy_batt_data.voltage_min_design;
  451. u32 high_voltage = msm_psy_batt_data.voltage_max_design;
  452. if (current_voltage <= low_voltage)
  453. return 0;
  454. else if (current_voltage >= high_voltage)
  455. return 100;
  456. else
  457. return (current_voltage - low_voltage) * 100
  458. / (high_voltage - low_voltage);
  459. }
  460. static struct platform_device msm_batt_device = {
  461. .name = "msm-battery",
  462. .id = -1,
  463. .dev.platform_data = &msm_psy_batt_data,
  464. };
  465. static struct smsc911x_platform_config smsc911x_config = {
  466. .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
  467. .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
  468. .flags = SMSC911X_USE_16BIT,
  469. };
  470. static struct resource smsc911x_resources[] = {
  471. [0] = {
  472. .start = 0x90000000,
  473. .end = 0x90007fff,
  474. .flags = IORESOURCE_MEM,
  475. },
  476. [1] = {
  477. .start = MSM_GPIO_TO_INT(48),
  478. .end = MSM_GPIO_TO_INT(48),
  479. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  480. },
  481. };
  482. static struct platform_device smsc911x_device = {
  483. .name = "smsc911x",
  484. .id = 0,
  485. .num_resources = ARRAY_SIZE(smsc911x_resources),
  486. .resource = smsc911x_resources,
  487. .dev = {
  488. .platform_data = &smsc911x_config,
  489. },
  490. };
  491. static struct msm_gpio smsc911x_gpios[] = {
  492. { GPIO_CFG(48, 0, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_6MA),
  493. "smsc911x_irq" },
  494. { GPIO_CFG(49, 0, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_6MA),
  495. "eth_fifo_sel" },
  496. };
  497. static char *msm_adc_surf_device_names[] = {
  498. "XO_ADC",
  499. };
  500. static struct msm_adc_platform_data msm_adc_pdata = {
  501. .dev_names = msm_adc_surf_device_names,
  502. .num_adc = ARRAY_SIZE(msm_adc_surf_device_names),
  503. .target_hw = MSM_8x25,
  504. };
  505. static struct platform_device msm_adc_device = {
  506. .name = "msm_adc",
  507. .id = -1,
  508. .dev = {
  509. .platform_data = &msm_adc_pdata,
  510. },
  511. };
  512. #ifdef CONFIG_MSM_RTB
  513. static struct msm_rtb_platform_data msm7x27a_rtb_pdata = {
  514. .size = SZ_1M,
  515. };
  516. static int __init msm_rtb_set_buffer_size(char *p)
  517. {
  518. int s;
  519. s = memparse(p, NULL);
  520. msm7x27a_rtb_pdata.size = ALIGN(s, SZ_4K);
  521. return 0;
  522. }
  523. early_param("msm_rtb_size", msm_rtb_set_buffer_size);
  524. struct platform_device msm7x27a_rtb_device = {
  525. .name = "msm_rtb",
  526. .id = -1,
  527. .dev = {
  528. .platform_data = &msm7x27a_rtb_pdata,
  529. },
  530. };
  531. #endif
  532. #define ETH_FIFO_SEL_GPIO 49
  533. static void msm7x27a_cfg_smsc911x(void)
  534. {
  535. int res;
  536. res = msm_gpios_request_enable(smsc911x_gpios,
  537. ARRAY_SIZE(smsc911x_gpios));
  538. if (res) {
  539. pr_err("%s: unable to enable gpios for SMSC911x\n", __func__);
  540. return;
  541. }
  542. /* ETH_FIFO_SEL */
  543. res = gpio_direction_output(ETH_FIFO_SEL_GPIO, 0);
  544. if (res) {
  545. pr_err("%s: unable to get direction for gpio %d\n", __func__,
  546. ETH_FIFO_SEL_GPIO);
  547. msm_gpios_disable_free(smsc911x_gpios,
  548. ARRAY_SIZE(smsc911x_gpios));
  549. return;
  550. }
  551. gpio_set_value(ETH_FIFO_SEL_GPIO, 0);
  552. }
  553. #if defined(CONFIG_SERIAL_MSM_HSL_CONSOLE) \
  554. && defined(CONFIG_MSM_SHARED_GPIO_FOR_UART2DM)
  555. static struct msm_gpio uart2dm_gpios[] = {
  556. {GPIO_CFG(19, 2, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
  557. "uart2dm_rfr_n" },
  558. {GPIO_CFG(20, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
  559. "uart2dm_cts_n" },
  560. {GPIO_CFG(21, 2, GPIO_CFG_INPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
  561. "uart2dm_rx" },
  562. {GPIO_CFG(108, 2, GPIO_CFG_OUTPUT, GPIO_CFG_NO_PULL, GPIO_CFG_2MA),
  563. "uart2dm_tx" },
  564. };
  565. static void msm7x27a_cfg_uart2dm_serial(void)
  566. {
  567. int ret;
  568. ret = msm_gpios_request_enable(uart2dm_gpios,
  569. ARRAY_SIZE(uart2dm_gpios));
  570. if (ret)
  571. pr_err("%s: unable to enable gpios for uart2dm\n", __func__);
  572. }
  573. #else
  574. static void msm7x27a_cfg_uart2dm_serial(void) { }
  575. #endif
  576. static struct platform_device *rumi_sim_devices[] __initdata = {
  577. &msm_device_dmov,
  578. &msm_device_smd,
  579. &smc91x_device,
  580. &msm_device_uart1,
  581. &msm_device_nand,
  582. &msm_device_uart_dm1,
  583. &msm_gsbi0_qup_i2c_device,
  584. &msm_gsbi1_qup_i2c_device,
  585. };
  586. static struct platform_device *msm8625_rumi3_devices[] __initdata = {
  587. &msm8625_device_dmov,
  588. &msm8625_device_smd,
  589. &msm8625_device_uart1,
  590. &msm8625_gsbi0_qup_i2c_device,
  591. };
  592. static struct platform_device *msm7627a_surf_ffa_devices[] __initdata = {
  593. &msm_device_dmov,
  594. &msm_device_smd,
  595. &msm_device_uart1,
  596. &msm_device_uart_dm1,
  597. &msm_device_uart_dm2,
  598. &msm_gsbi0_qup_i2c_device,
  599. &msm_gsbi1_qup_i2c_device,
  600. &msm_device_otg,
  601. &msm_device_gadget_peripheral,
  602. &smsc911x_device,
  603. &msm_kgsl_3d0,
  604. };
  605. static struct platform_device *common_devices[] __initdata = {
  606. &android_usb_device,
  607. &msm_device_nand,
  608. &msm_device_snd,
  609. &msm_device_cad,
  610. &msm_device_adspdec,
  611. &asoc_msm_pcm,
  612. &asoc_msm_dai0,
  613. &asoc_msm_dai1,
  614. &msm_batt_device,
  615. &msm_adc_device,
  616. #ifdef CONFIG_MSM_RTB
  617. &msm7x27a_rtb_device,
  618. #endif
  619. #ifdef CONFIG_ION_MSM
  620. &ion_dev,
  621. #endif
  622. };
  623. static struct platform_device *msm8625_surf_devices[] __initdata = {
  624. &msm8625_device_dmov,
  625. &msm8625_device_uart1,
  626. &msm8625_device_uart_dm1,
  627. &msm8625_device_uart_dm2,
  628. &msm8625_gsbi0_qup_i2c_device,
  629. &msm8625_gsbi1_qup_i2c_device,
  630. &msm8625_device_smd,
  631. &msm8625_device_otg,
  632. &msm8625_device_gadget_peripheral,
  633. &msm8625_kgsl_3d0,
  634. };
  635. static unsigned reserve_kernel_ebi1_size = RESERVE_KERNEL_EBI1_SIZE;
  636. static int __init reserve_kernel_ebi1_size_setup(char *p)
  637. {
  638. reserve_kernel_ebi1_size = memparse(p, NULL);
  639. return 0;
  640. }
  641. early_param("reserve_kernel_ebi1_size", reserve_kernel_ebi1_size_setup);
  642. static unsigned reserve_audio_size = MSM_RESERVE_AUDIO_SIZE;
  643. static int __init reserve_audio_size_setup(char *p)
  644. {
  645. reserve_audio_size = memparse(p, NULL);
  646. return 0;
  647. }
  648. early_param("reserve_audio_size", reserve_audio_size_setup);
  649. static void fix_sizes(void)
  650. {
  651. if (machine_is_msm7625a_surf() || machine_is_msm7625a_ffa()) {
  652. reserve_mdp_size = MSM7x25A_MSM_RESERVE_MDP_SIZE;
  653. reserve_adsp_size = MSM7x25A_MSM_RESERVE_ADSP_SIZE;
  654. } else {
  655. reserve_mdp_size = MSM_RESERVE_MDP_SIZE;
  656. reserve_adsp_size = MSM_RESERVE_ADSP_SIZE;
  657. }
  658. if (get_ddr_size() > SZ_512M)
  659. reserve_adsp_size = CAMERA_ZSL_SIZE;
  660. #ifdef CONFIG_ION_MSM
  661. msm_ion_camera_size = reserve_adsp_size;
  662. msm_ion_audio_size = (MSM_RESERVE_AUDIO_SIZE +
  663. RESERVE_KERNEL_EBI1_SIZE);
  664. msm_ion_sf_size = reserve_mdp_size;
  665. #endif
  666. }
  667. #ifdef CONFIG_ION_MSM
  668. #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
  669. static struct ion_co_heap_pdata co_ion_pdata = {
  670. .adjacent_mem_id = INVALID_HEAP_ID,
  671. .align = PAGE_SIZE,
  672. };
  673. #endif
  674. /**
  675. * These heaps are listed in the order they will be allocated.
  676. * Don't swap the order unless you know what you are doing!
  677. */
  678. struct ion_platform_heap msm7627a_heaps[] = {
  679. {
  680. .id = ION_SYSTEM_HEAP_ID,
  681. .type = ION_HEAP_TYPE_SYSTEM,
  682. .name = ION_VMALLOC_HEAP_NAME,
  683. },
  684. #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
  685. /* ION_ADSP = CAMERA */
  686. {
  687. .id = ION_CAMERA_HEAP_ID,
  688. .type = ION_HEAP_TYPE_CARVEOUT,
  689. .name = ION_CAMERA_HEAP_NAME,
  690. .memory_type = ION_EBI_TYPE,
  691. .extra_data = (void *)&co_ion_pdata,
  692. },
  693. /* ION_AUDIO */
  694. {
  695. .id = ION_AUDIO_HEAP_ID,
  696. .type = ION_HEAP_TYPE_CARVEOUT,
  697. .name = ION_AUDIO_HEAP_NAME,
  698. .memory_type = ION_EBI_TYPE,
  699. .extra_data = (void *)&co_ion_pdata,
  700. },
  701. /* ION_MDP = SF */
  702. {
  703. .id = ION_SF_HEAP_ID,
  704. .type = ION_HEAP_TYPE_CARVEOUT,
  705. .name = ION_SF_HEAP_NAME,
  706. .memory_type = ION_EBI_TYPE,
  707. .extra_data = (void *)&co_ion_pdata,
  708. },
  709. #endif
  710. };
  711. static struct ion_platform_data ion_pdata = {
  712. .nr = MSM_ION_HEAP_NUM,
  713. .has_outer_cache = 1,
  714. .heaps = msm7627a_heaps,
  715. };
  716. static struct platform_device ion_dev = {
  717. .name = "ion-msm",
  718. .id = 1,
  719. .dev = { .platform_data = &ion_pdata },
  720. };
  721. #endif
  722. static struct memtype_reserve msm7x27a_reserve_table[] __initdata = {
  723. [MEMTYPE_SMI] = {
  724. },
  725. [MEMTYPE_EBI0] = {
  726. .flags = MEMTYPE_FLAGS_1M_ALIGN,
  727. },
  728. [MEMTYPE_EBI1] = {
  729. .flags = MEMTYPE_FLAGS_1M_ALIGN,
  730. },
  731. };
  732. #ifdef CONFIG_MSM_RTB
  733. static void __init reserve_rtb_memory(void)
  734. {
  735. msm7x27a_reserve_table[MEMTYPE_EBI1].size += msm7x27a_rtb_pdata.size;
  736. }
  737. #else
  738. static void __init reserve_rtb_memory(void)
  739. {
  740. }
  741. #endif
  742. static void __init size_ion_devices(void)
  743. {
  744. #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION
  745. ion_pdata.heaps[1].size = msm_ion_camera_size;
  746. ion_pdata.heaps[2].size = msm_ion_audio_size;
  747. ion_pdata.heaps[3].size = msm_ion_sf_size;
  748. #endif
  749. }
  750. static void __init reserve_ion_memory(void)
  751. {
  752. #if defined(CONFIG_ION_MSM) && defined(CONFIG_MSM_MULTIMEDIA_USE_ION)
  753. msm7x27a_reserve_table[MEMTYPE_EBI1].size += msm_ion_camera_size;
  754. msm7x27a_reserve_table[MEMTYPE_EBI1].size += msm_ion_audio_size;
  755. msm7x27a_reserve_table[MEMTYPE_EBI1].size += msm_ion_sf_size;
  756. #endif
  757. }
  758. static void __init msm7x27a_calculate_reserve_sizes(void)
  759. {
  760. fix_sizes();
  761. size_ion_devices();
  762. reserve_ion_memory();
  763. reserve_rtb_memory();
  764. }
  765. static int msm7x27a_paddr_to_memtype(unsigned int paddr)
  766. {
  767. return MEMTYPE_EBI1;
  768. }
  769. static struct reserve_info msm7x27a_reserve_info __initdata = {
  770. .memtype_reserve_table = msm7x27a_reserve_table,
  771. .calculate_reserve_sizes = msm7x27a_calculate_reserve_sizes,
  772. .paddr_to_memtype = msm7x27a_paddr_to_memtype,
  773. };
  774. static void __init msm7x27a_reserve(void)
  775. {
  776. reserve_info = &msm7x27a_reserve_info;
  777. msm_reserve();
  778. }
  779. static void __init msm8625_reserve(void)
  780. {
  781. msm7x27a_reserve();
  782. memblock_remove(MSM8625_CPU_PHYS, SZ_8);
  783. memblock_remove(MSM8625_WARM_BOOT_PHYS, SZ_32);
  784. }
  785. static void __init msm7x27a_device_i2c_init(void)
  786. {
  787. msm_gsbi0_qup_i2c_device.dev.platform_data = &msm_gsbi0_qup_i2c_pdata;
  788. msm_gsbi1_qup_i2c_device.dev.platform_data = &msm_gsbi1_qup_i2c_pdata;
  789. }
  790. static void __init msm8625_device_i2c_init(void)
  791. {
  792. msm8625_gsbi0_qup_i2c_device.dev.platform_data =
  793. &msm_gsbi0_qup_i2c_pdata;
  794. msm8625_gsbi1_qup_i2c_device.dev.platform_data =
  795. &msm_gsbi1_qup_i2c_pdata;
  796. }
  797. #define MSM_EBI2_PHYS 0xa0d00000
  798. #define MSM_EBI2_XMEM_CS2_CFG1 0xa0d10030
  799. static void __init msm7x27a_init_ebi2(void)
  800. {
  801. uint32_t ebi2_cfg;
  802. void __iomem *ebi2_cfg_ptr;
  803. ebi2_cfg_ptr = ioremap_nocache(MSM_EBI2_PHYS, sizeof(uint32_t));
  804. if (!ebi2_cfg_ptr)
  805. return;
  806. ebi2_cfg = readl(ebi2_cfg_ptr);
  807. if (machine_is_msm7x27a_rumi3() || machine_is_msm7x27a_surf() ||
  808. machine_is_msm7625a_surf() || machine_is_msm8625_surf())
  809. ebi2_cfg |= (1 << 4); /* CS2 */
  810. writel(ebi2_cfg, ebi2_cfg_ptr);
  811. iounmap(ebi2_cfg_ptr);
  812. /* Enable A/D MUX[bit 31] from EBI2_XMEM_CS2_CFG1 */
  813. ebi2_cfg_ptr = ioremap_nocache(MSM_EBI2_XMEM_CS2_CFG1,
  814. sizeof(uint32_t));
  815. if (!ebi2_cfg_ptr)
  816. return;
  817. ebi2_cfg = readl(ebi2_cfg_ptr);
  818. if (machine_is_msm7x27a_surf() || machine_is_msm7625a_surf())
  819. ebi2_cfg |= (1 << 31);
  820. writel(ebi2_cfg, ebi2_cfg_ptr);
  821. iounmap(ebi2_cfg_ptr);
  822. }
  823. static struct platform_device msm_proccomm_regulator_dev = {
  824. .name = PROCCOMM_REGULATOR_DEV_NAME,
  825. .id = -1,
  826. .dev = {
  827. .platform_data = &msm7x27a_proccomm_regulator_data
  828. }
  829. };
  830. static void msm_adsp_add_pdev(void)
  831. {
  832. int rc = 0;
  833. struct rpc_board_dev *rpc_adsp_pdev;
  834. rpc_adsp_pdev = kzalloc(sizeof(struct rpc_board_dev), GFP_KERNEL);
  835. if (rpc_adsp_pdev == NULL) {
  836. pr_err("%s: Memory Allocation failure\n", __func__);
  837. return;
  838. }
  839. rpc_adsp_pdev->prog = ADSP_RPC_PROG;
  840. if (cpu_is_msm8625() || cpu_is_msm8625q())
  841. rpc_adsp_pdev->pdev = msm8625_device_adsp;
  842. else
  843. rpc_adsp_pdev->pdev = msm_adsp_device;
  844. rc = msm_rpc_add_board_dev(rpc_adsp_pdev, 1);
  845. if (rc < 0) {
  846. pr_err("%s: return val: %d\n", __func__, rc);
  847. kfree(rpc_adsp_pdev);
  848. }
  849. }
  850. static void __init msm7627a_rumi3_init(void)
  851. {
  852. msm7x27a_init_ebi2();
  853. platform_add_devices(rumi_sim_devices,
  854. ARRAY_SIZE(rumi_sim_devices));
  855. }
  856. static void __init msm8625_rumi3_init(void)
  857. {
  858. msm7x2x_misc_init();
  859. msm_adsp_add_pdev();
  860. msm8625_device_i2c_init();
  861. platform_add_devices(msm8625_rumi3_devices,
  862. ARRAY_SIZE(msm8625_rumi3_devices));
  863. msm_pm_set_platform_data(msm8625_pm_data,
  864. ARRAY_SIZE(msm8625_pm_data));
  865. BUG_ON(msm_pm_boot_init(&msm_pm_8625_boot_pdata));
  866. msm8x25_spm_device_init();
  867. msm_pm_register_cpr_ops();
  868. }
  869. #define UART1DM_RX_GPIO 45
  870. #if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
  871. static int __init msm7x27a_init_ar6000pm(void)
  872. {
  873. msm_wlan_ar6000_pm_device.dev.platform_data = &ar600x_wlan_power;
  874. return platform_device_register(&msm_wlan_ar6000_pm_device);
  875. }
  876. #else
  877. static int __init msm7x27a_init_ar6000pm(void) { return 0; }
  878. #endif
  879. static void __init msm7x27a_init_regulators(void)
  880. {
  881. int rc = platform_device_register(&msm_proccomm_regulator_dev);
  882. if (rc)
  883. pr_err("%s: could not register regulator device: %d\n",
  884. __func__, rc);
  885. }
  886. static void __init msm7x27a_add_footswitch_devices(void)
  887. {
  888. platform_add_devices(msm_footswitch_devices,
  889. msm_num_footswitch_devices);
  890. }
  891. static void __init msm7x27a_add_platform_devices(void)
  892. {
  893. if (machine_is_msm8625_surf() || machine_is_msm8625_ffa()) {
  894. platform_add_devices(msm8625_surf_devices,
  895. ARRAY_SIZE(msm8625_surf_devices));
  896. } else {
  897. platform_add_devices(msm7627a_surf_ffa_devices,
  898. ARRAY_SIZE(msm7627a_surf_ffa_devices));
  899. }
  900. platform_add_devices(common_devices,
  901. ARRAY_SIZE(common_devices));
  902. }
  903. static void __init msm7x27a_uartdm_config(void)
  904. {
  905. msm7x27a_cfg_uart2dm_serial();
  906. msm_uart_dm1_pdata.wakeup_irq = gpio_to_irq(UART1DM_RX_GPIO);
  907. if (cpu_is_msm8625() || cpu_is_msm8625q())
  908. msm8625_device_uart_dm1.dev.platform_data =
  909. &msm_uart_dm1_pdata;
  910. else
  911. msm_device_uart_dm1.dev.platform_data = &msm_uart_dm1_pdata;
  912. }
  913. static void __init msm7x27a_otg_gadget(void)
  914. {
  915. if (cpu_is_msm8625() || cpu_is_msm8625q()) {
  916. msm_otg_pdata.swfi_latency =
  917. msm8625_pm_data[MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT].latency;
  918. msm8625_device_otg.dev.platform_data = &msm_otg_pdata;
  919. msm8625_device_gadget_peripheral.dev.platform_data =
  920. &msm_gadget_pdata;
  921. } else {
  922. msm_otg_pdata.swfi_latency =
  923. msm7x27a_pm_data[
  924. MSM_PM_SLEEP_MODE_RAMP_DOWN_AND_WAIT_FOR_INTERRUPT].latency;
  925. msm_device_otg.dev.platform_data = &msm_otg_pdata;
  926. msm_device_gadget_peripheral.dev.platform_data =
  927. &msm_gadget_pdata;
  928. }
  929. }
  930. static void __init msm7x27a_pm_init(void)
  931. {
  932. if (machine_is_msm8625_surf() || machine_is_msm8625_ffa()) {
  933. msm_pm_set_platform_data(msm8625_pm_data,
  934. ARRAY_SIZE(msm8625_pm_data));
  935. BUG_ON(msm_pm_boot_init(&msm_pm_8625_boot_pdata));
  936. msm8x25_spm_device_init();
  937. msm_pm_register_cpr_ops();
  938. } else {
  939. msm_pm_set_platform_data(msm7x27a_pm_data,
  940. ARRAY_SIZE(msm7x27a_pm_data));
  941. BUG_ON(msm_pm_boot_init(&msm_pm_boot_pdata));
  942. }
  943. msm_pm_register_irqs();
  944. }
  945. static void __init msm7x2x_init(void)
  946. {
  947. msm7x2x_misc_init();
  948. /* Initialize regulators first so that other devices can use them */
  949. msm7x27a_init_regulators();
  950. msm_adsp_add_pdev();
  951. if (cpu_is_msm8625() || cpu_is_msm8625q())
  952. msm8625_device_i2c_init();
  953. else
  954. msm7x27a_device_i2c_init();
  955. msm7x27a_init_ebi2();
  956. msm7x27a_uartdm_config();
  957. msm7x27a_otg_gadget();
  958. msm7x27a_cfg_smsc911x();
  959. msm7x27a_add_footswitch_devices();
  960. msm7x27a_add_platform_devices();
  961. /* Ensure ar6000pm device is registered before MMC/SDC */
  962. msm7x27a_init_ar6000pm();
  963. msm7627a_init_mmc();
  964. msm_fb_add_devices();
  965. msm7x2x_init_host();
  966. msm7x27a_pm_init();
  967. register_i2c_devices();
  968. #if defined(CONFIG_BT) && defined(CONFIG_MARIMBA_CORE)
  969. msm7627a_bt_power_init();
  970. #endif
  971. msm7627a_camera_init();
  972. msm7627a_add_io_devices();
  973. /*7x25a kgsl initializations*/
  974. msm7x25a_kgsl_3d0_init();
  975. /*8x25 kgsl initializations*/
  976. msm8x25_kgsl_3d0_init();
  977. }
  978. static void __init msm7x2x_init_early(void)
  979. {
  980. msm_msm7627a_allocate_memory_regions();
  981. }
  982. MACHINE_START(MSM7X27A_RUMI3, "QCT MSM7x27a RUMI3")
  983. .atag_offset = 0x100,
  984. .map_io = msm_common_io_init,
  985. .reserve = msm7x27a_reserve,
  986. .init_irq = msm_init_irq,
  987. .init_machine = msm7627a_rumi3_init,
  988. .timer = &msm_timer,
  989. .init_early = msm7x2x_init_early,
  990. .handle_irq = vic_handle_irq,
  991. MACHINE_END
  992. MACHINE_START(MSM7X27A_SURF, "QCT MSM7x27a SURF")
  993. .atag_offset = 0x100,
  994. .map_io = msm_common_io_init,
  995. .reserve = msm7x27a_reserve,
  996. .init_irq = msm_init_irq,
  997. .init_machine = msm7x2x_init,
  998. .timer = &msm_timer,
  999. .init_early = msm7x2x_init_early,
  1000. .handle_irq = vic_handle_irq,
  1001. MACHINE_END
  1002. MACHINE_START(MSM7X27A_FFA, "QCT MSM7x27a FFA")
  1003. .atag_offset = 0x100,
  1004. .map_io = msm_common_io_init,
  1005. .reserve = msm7x27a_reserve,
  1006. .init_irq = msm_init_irq,
  1007. .init_machine = msm7x2x_init,
  1008. .timer = &msm_timer,
  1009. .init_early = msm7x2x_init_early,
  1010. .handle_irq = vic_handle_irq,
  1011. MACHINE_END
  1012. MACHINE_START(MSM7625A_SURF, "QCT MSM7625a SURF")
  1013. .atag_offset = 0x100,
  1014. .map_io = msm_common_io_init,
  1015. .reserve = msm7x27a_reserve,
  1016. .init_irq = msm_init_irq,
  1017. .init_machine = msm7x2x_init,
  1018. .timer = &msm_timer,
  1019. .init_early = msm7x2x_init_early,
  1020. .handle_irq = vic_handle_irq,
  1021. MACHINE_END
  1022. MACHINE_START(MSM7625A_FFA, "QCT MSM7625a FFA")
  1023. .atag_offset = 0x100,
  1024. .map_io = msm_common_io_init,
  1025. .reserve = msm7x27a_reserve,
  1026. .init_irq = msm_init_irq,
  1027. .init_machine = msm7x2x_init,
  1028. .timer = &msm_timer,
  1029. .init_early = msm7x2x_init_early,
  1030. .handle_irq = vic_handle_irq,
  1031. MACHINE_END
  1032. MACHINE_START(MSM8625_RUMI3, "QCT MSM8625 RUMI3")
  1033. .atag_offset = 0x100,
  1034. .map_io = msm8625_map_io,
  1035. .reserve = msm8625_reserve,
  1036. .init_irq = msm8625_init_irq,
  1037. .init_machine = msm8625_rumi3_init,
  1038. .timer = &msm_timer,
  1039. .handle_irq = gic_handle_irq,
  1040. .smp = &msm8625_smp_ops,
  1041. MACHINE_END
  1042. MACHINE_START(MSM8625_SURF, "QCT MSM8625 SURF")
  1043. .atag_offset = 0x100,
  1044. .map_io = msm8625_map_io,
  1045. .reserve = msm8625_reserve,
  1046. .init_irq = msm8625_init_irq,
  1047. .init_machine = msm7x2x_init,
  1048. .timer = &msm_timer,
  1049. .init_early = msm7x2x_init_early,
  1050. .handle_irq = gic_handle_irq,
  1051. .smp = &msm8625_smp_ops,
  1052. MACHINE_END
  1053. MACHINE_START(MSM8625_FFA, "QCT MSM8625 FFA")
  1054. .atag_offset = 0x100,
  1055. .map_io = msm8625_map_io,
  1056. .reserve = msm8625_reserve,
  1057. .init_irq = msm8625_init_irq,
  1058. .init_machine = msm7x2x_init,
  1059. .timer = &msm_timer,
  1060. .init_early = msm7x2x_init_early,
  1061. .handle_irq = gic_handle_irq,
  1062. .smp = &msm8625_smp_ops,
  1063. MACHINE_END