Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | /* 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> |
| 15 | #include <linux/io.h> |
| 16 | #include <linux/irq.h> |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 17 | #include <linux/i2c.h> |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 18 | #include <linux/slimbus/slimbus.h> |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 19 | #include <linux/mfd/wcd9310/core.h> |
| 20 | #include <linux/mfd/wcd9310/pdata.h> |
Kenneth Heitke | 36920d3 | 2011-07-20 16:44:30 -0600 | [diff] [blame] | 21 | #include <linux/msm_ssbi.h> |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 22 | #include <linux/spi/spi.h> |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 23 | #include <linux/dma-mapping.h> |
| 24 | #include <linux/platform_data/qcom_crypto_device.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 25 | #include <asm/mach-types.h> |
| 26 | #include <asm/mach/arch.h> |
| 27 | #include <asm/hardware/gic.h> |
Sahitya Tummala | 3586ed9 | 2011-08-03 09:13:23 +0530 | [diff] [blame] | 28 | #include <asm/mach/mmc.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 29 | |
| 30 | #include <mach/board.h> |
| 31 | #include <mach/msm_iomap.h> |
| 32 | #include <linux/usb/msm_hsusb.h> |
| 33 | #include <linux/usb/android.h> |
| 34 | #include <mach/socinfo.h> |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 35 | #include <mach/msm_spi.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 36 | #include "timer.h" |
| 37 | #include "devices.h" |
Joel King | 4ebccc6 | 2011-07-22 09:43:22 -0700 | [diff] [blame] | 38 | #include <mach/gpio.h> |
| 39 | #include <mach/gpiomux.h> |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 40 | #include <linux/android_pmem.h> |
| 41 | #include <mach/msm_memtypes.h> |
| 42 | #include <linux/bootmem.h> |
| 43 | #include <asm/setup.h> |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 44 | #include <mach/dma.h> |
Joel King | 4ebccc6 | 2011-07-22 09:43:22 -0700 | [diff] [blame] | 45 | |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 46 | #include "msm_watchdog.h" |
Stepan Moskovchenko | 5a83dba | 2011-12-05 17:30:17 -0800 | [diff] [blame^] | 47 | #include "board-8064.h" |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 48 | |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 49 | #define MSM_PMEM_KERNEL_EBI1_SIZE 0x600000 |
| 50 | #define MSM_PMEM_ADSP_SIZE 0x3800000 |
| 51 | #define MSM_PMEM_AUDIO_SIZE 0x28B000 |
| 52 | #define MSM_PMEM_SIZE 0x1800000 /* 24 Mbytes */ |
| 53 | |
| 54 | static struct memtype_reserve apq8064_reserve_table[] __initdata = { |
| 55 | [MEMTYPE_SMI] = { |
| 56 | }, |
| 57 | [MEMTYPE_EBI0] = { |
| 58 | .flags = MEMTYPE_FLAGS_1M_ALIGN, |
| 59 | }, |
| 60 | [MEMTYPE_EBI1] = { |
| 61 | .flags = MEMTYPE_FLAGS_1M_ALIGN, |
| 62 | }, |
| 63 | }; |
| 64 | |
| 65 | static int apq8064_paddr_to_memtype(unsigned int paddr) |
| 66 | { |
| 67 | return MEMTYPE_EBI1; |
| 68 | } |
| 69 | |
| 70 | static unsigned pmem_size = MSM_PMEM_SIZE; |
| 71 | static int __init pmem_size_setup(char *p) |
| 72 | { |
| 73 | pmem_size = memparse(p, NULL); |
| 74 | return 0; |
| 75 | } |
| 76 | early_param("pmem_size", pmem_size_setup); |
| 77 | |
| 78 | static unsigned pmem_adsp_size = MSM_PMEM_ADSP_SIZE; |
| 79 | |
| 80 | static int __init pmem_adsp_size_setup(char *p) |
| 81 | { |
| 82 | pmem_adsp_size = memparse(p, NULL); |
| 83 | return 0; |
| 84 | } |
| 85 | early_param("pmem_adsp_size", pmem_adsp_size_setup); |
| 86 | |
| 87 | static unsigned pmem_audio_size = MSM_PMEM_AUDIO_SIZE; |
| 88 | |
| 89 | static int __init pmem_audio_size_setup(char *p) |
| 90 | { |
| 91 | pmem_audio_size = memparse(p, NULL); |
| 92 | return 0; |
| 93 | } |
| 94 | early_param("pmem_audio_size", pmem_audio_size_setup); |
| 95 | |
| 96 | static struct android_pmem_platform_data android_pmem_pdata = { |
| 97 | .name = "pmem", |
| 98 | .allocator_type = PMEM_ALLOCATORTYPE_ALLORNOTHING, |
| 99 | .cached = 1, |
| 100 | .memory_type = MEMTYPE_EBI1, |
| 101 | }; |
| 102 | |
| 103 | static struct platform_device android_pmem_device = { |
| 104 | .name = "android_pmem", |
| 105 | .id = 0, |
| 106 | .dev = {.platform_data = &android_pmem_pdata}, |
| 107 | }; |
| 108 | |
| 109 | static struct android_pmem_platform_data android_pmem_adsp_pdata = { |
| 110 | .name = "pmem_adsp", |
| 111 | .allocator_type = PMEM_ALLOCATORTYPE_BITMAP, |
| 112 | .cached = 0, |
| 113 | .memory_type = MEMTYPE_EBI1, |
| 114 | }; |
| 115 | |
| 116 | static unsigned pmem_kernel_ebi1_size = MSM_PMEM_KERNEL_EBI1_SIZE; |
| 117 | static int __init pmem_kernel_ebi1_size_setup(char *p) |
| 118 | { |
| 119 | pmem_kernel_ebi1_size = memparse(p, NULL); |
| 120 | return 0; |
| 121 | } |
| 122 | early_param("pmem_kernel_ebi1_size", pmem_kernel_ebi1_size_setup); |
| 123 | |
| 124 | static struct platform_device android_pmem_adsp_device = { |
| 125 | .name = "android_pmem", |
| 126 | .id = 2, |
| 127 | .dev = { .platform_data = &android_pmem_adsp_pdata }, |
| 128 | }; |
| 129 | |
| 130 | static struct android_pmem_platform_data android_pmem_audio_pdata = { |
| 131 | .name = "pmem_audio", |
| 132 | .allocator_type = PMEM_ALLOCATORTYPE_BITMAP, |
| 133 | .cached = 0, |
| 134 | .memory_type = MEMTYPE_EBI1, |
| 135 | }; |
| 136 | |
| 137 | static struct platform_device android_pmem_audio_device = { |
| 138 | .name = "android_pmem", |
| 139 | .id = 4, |
| 140 | .dev = { .platform_data = &android_pmem_audio_pdata }, |
| 141 | }; |
| 142 | |
| 143 | static void __init size_pmem_devices(void) |
| 144 | { |
| 145 | android_pmem_adsp_pdata.size = pmem_adsp_size; |
| 146 | android_pmem_pdata.size = pmem_size; |
| 147 | android_pmem_audio_pdata.size = MSM_PMEM_AUDIO_SIZE; |
| 148 | } |
| 149 | |
| 150 | static void __init reserve_memory_for(struct android_pmem_platform_data *p) |
| 151 | { |
| 152 | apq8064_reserve_table[p->memory_type].size += p->size; |
| 153 | } |
| 154 | |
| 155 | |
| 156 | static void __init reserve_pmem_memory(void) |
| 157 | { |
| 158 | reserve_memory_for(&android_pmem_adsp_pdata); |
| 159 | reserve_memory_for(&android_pmem_pdata); |
| 160 | reserve_memory_for(&android_pmem_audio_pdata); |
| 161 | apq8064_reserve_table[MEMTYPE_EBI1].size += pmem_kernel_ebi1_size; |
| 162 | } |
| 163 | |
| 164 | static void __init apq8064_calculate_reserve_sizes(void) |
| 165 | { |
| 166 | size_pmem_devices(); |
| 167 | reserve_pmem_memory(); |
| 168 | } |
| 169 | |
| 170 | static struct reserve_info apq8064_reserve_info __initdata = { |
| 171 | .memtype_reserve_table = apq8064_reserve_table, |
| 172 | .calculate_reserve_sizes = apq8064_calculate_reserve_sizes, |
| 173 | .paddr_to_memtype = apq8064_paddr_to_memtype, |
| 174 | }; |
| 175 | |
| 176 | static int apq8064_memory_bank_size(void) |
| 177 | { |
| 178 | return 1<<29; |
| 179 | } |
| 180 | |
| 181 | static void __init locate_unstable_memory(void) |
| 182 | { |
| 183 | struct membank *mb = &meminfo.bank[meminfo.nr_banks - 1]; |
| 184 | unsigned long bank_size; |
| 185 | unsigned long low, high; |
| 186 | |
| 187 | bank_size = apq8064_memory_bank_size(); |
| 188 | low = meminfo.bank[0].start; |
| 189 | high = mb->start + mb->size; |
| 190 | low &= ~(bank_size - 1); |
| 191 | |
| 192 | if (high - low <= bank_size) |
| 193 | return; |
| 194 | apq8064_reserve_info.low_unstable_address = low + bank_size; |
| 195 | apq8064_reserve_info.max_unstable_size = high - low - bank_size; |
| 196 | apq8064_reserve_info.bank_size = bank_size; |
| 197 | pr_info("low unstable address %lx max size %lx bank size %lx\n", |
| 198 | apq8064_reserve_info.low_unstable_address, |
| 199 | apq8064_reserve_info.max_unstable_size, |
| 200 | apq8064_reserve_info.bank_size); |
| 201 | } |
| 202 | |
| 203 | static void __init apq8064_reserve(void) |
| 204 | { |
| 205 | reserve_info = &apq8064_reserve_info; |
| 206 | locate_unstable_memory(); |
| 207 | msm_reserve(); |
| 208 | } |
| 209 | |
Hemant Kumar | 4933b07 | 2011-10-17 23:43:11 -0700 | [diff] [blame] | 210 | static struct platform_device android_usb_device = { |
| 211 | .name = "android_usb", |
| 212 | .id = -1, |
| 213 | }; |
| 214 | |
| 215 | static struct msm_otg_platform_data msm_otg_pdata = { |
| 216 | .mode = USB_PERIPHERAL, |
| 217 | .otg_control = OTG_PHY_CONTROL, |
| 218 | .phy_type = SNPS_28NM_INTEGRATED_PHY, |
| 219 | .pclk_src_name = "dfab_usb_hs_clk", |
| 220 | }; |
| 221 | |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 222 | #define TABLA_INTERRUPT_BASE (NR_MSM_IRQS + NR_GPIO_IRQS + NR_PM8921_IRQS) |
| 223 | |
| 224 | /* Micbias setting is based on 8660 CDP/MTP/FLUID requirement |
| 225 | * 4 micbiases are used to power various analog and digital |
| 226 | * microphones operating at 1800 mV. Technically, all micbiases |
| 227 | * can source from single cfilter since all microphones operate |
| 228 | * at the same voltage level. The arrangement below is to make |
| 229 | * sure all cfilters are exercised. LDO_H regulator ouput level |
| 230 | * does not need to be as high as 2.85V. It is choosen for |
| 231 | * microphone sensitivity purpose. |
| 232 | */ |
| 233 | static struct tabla_pdata apq8064_tabla_platform_data = { |
| 234 | .slimbus_slave_device = { |
| 235 | .name = "tabla-slave", |
| 236 | .e_addr = {0, 0, 0x10, 0, 0x17, 2}, |
| 237 | }, |
| 238 | .irq = MSM_GPIO_TO_INT(62), |
| 239 | .irq_base = TABLA_INTERRUPT_BASE, |
| 240 | .num_irqs = NR_TABLA_IRQS, |
| 241 | .reset_gpio = PM8921_GPIO_PM_TO_SYS(34), |
| 242 | .micbias = { |
| 243 | .ldoh_v = TABLA_LDOH_2P85_V, |
| 244 | .cfilt1_mv = 1800, |
| 245 | .cfilt2_mv = 1800, |
| 246 | .cfilt3_mv = 1800, |
| 247 | .bias1_cfilt_sel = TABLA_CFILT1_SEL, |
| 248 | .bias2_cfilt_sel = TABLA_CFILT2_SEL, |
| 249 | .bias3_cfilt_sel = TABLA_CFILT3_SEL, |
| 250 | .bias4_cfilt_sel = TABLA_CFILT3_SEL, |
| 251 | } |
| 252 | }; |
| 253 | |
| 254 | static struct slim_device apq8064_slim_tabla = { |
| 255 | .name = "tabla-slim", |
| 256 | .e_addr = {0, 1, 0x10, 0, 0x17, 2}, |
| 257 | .dev = { |
| 258 | .platform_data = &apq8064_tabla_platform_data, |
| 259 | }, |
| 260 | }; |
| 261 | |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 262 | #if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \ |
| 263 | defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE) || \ |
| 264 | defined(CONFIG_CRYPTO_DEV_QCEDEV) || \ |
| 265 | defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE) |
| 266 | |
| 267 | #define QCE_SIZE 0x10000 |
| 268 | #define QCE_0_BASE 0x11000000 |
| 269 | |
| 270 | #define QCE_HW_KEY_SUPPORT 0 |
| 271 | #define QCE_SHA_HMAC_SUPPORT 1 |
| 272 | #define QCE_SHARE_CE_RESOURCE 3 |
| 273 | #define QCE_CE_SHARED 0 |
| 274 | |
| 275 | static struct resource qcrypto_resources[] = { |
| 276 | [0] = { |
| 277 | .start = QCE_0_BASE, |
| 278 | .end = QCE_0_BASE + QCE_SIZE - 1, |
| 279 | .flags = IORESOURCE_MEM, |
| 280 | }, |
| 281 | [1] = { |
| 282 | .name = "crypto_channels", |
| 283 | .start = DMOV8064_CE_IN_CHAN, |
| 284 | .end = DMOV8064_CE_OUT_CHAN, |
| 285 | .flags = IORESOURCE_DMA, |
| 286 | }, |
| 287 | [2] = { |
| 288 | .name = "crypto_crci_in", |
| 289 | .start = DMOV8064_CE_IN_CRCI, |
| 290 | .end = DMOV8064_CE_IN_CRCI, |
| 291 | .flags = IORESOURCE_DMA, |
| 292 | }, |
| 293 | [3] = { |
| 294 | .name = "crypto_crci_out", |
| 295 | .start = DMOV8064_CE_OUT_CRCI, |
| 296 | .end = DMOV8064_CE_OUT_CRCI, |
| 297 | .flags = IORESOURCE_DMA, |
| 298 | }, |
| 299 | }; |
| 300 | |
| 301 | static struct resource qcedev_resources[] = { |
| 302 | [0] = { |
| 303 | .start = QCE_0_BASE, |
| 304 | .end = QCE_0_BASE + QCE_SIZE - 1, |
| 305 | .flags = IORESOURCE_MEM, |
| 306 | }, |
| 307 | [1] = { |
| 308 | .name = "crypto_channels", |
| 309 | .start = DMOV8064_CE_IN_CHAN, |
| 310 | .end = DMOV8064_CE_OUT_CHAN, |
| 311 | .flags = IORESOURCE_DMA, |
| 312 | }, |
| 313 | [2] = { |
| 314 | .name = "crypto_crci_in", |
| 315 | .start = DMOV8064_CE_IN_CRCI, |
| 316 | .end = DMOV8064_CE_IN_CRCI, |
| 317 | .flags = IORESOURCE_DMA, |
| 318 | }, |
| 319 | [3] = { |
| 320 | .name = "crypto_crci_out", |
| 321 | .start = DMOV8064_CE_OUT_CRCI, |
| 322 | .end = DMOV8064_CE_OUT_CRCI, |
| 323 | .flags = IORESOURCE_DMA, |
| 324 | }, |
| 325 | }; |
| 326 | |
| 327 | #endif |
| 328 | |
| 329 | #if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \ |
| 330 | defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE) |
| 331 | |
| 332 | static struct msm_ce_hw_support qcrypto_ce_hw_suppport = { |
| 333 | .ce_shared = QCE_CE_SHARED, |
| 334 | .shared_ce_resource = QCE_SHARE_CE_RESOURCE, |
| 335 | .hw_key_support = QCE_HW_KEY_SUPPORT, |
| 336 | .sha_hmac = QCE_SHA_HMAC_SUPPORT, |
| 337 | }; |
| 338 | |
| 339 | static struct platform_device qcrypto_device = { |
| 340 | .name = "qcrypto", |
| 341 | .id = 0, |
| 342 | .num_resources = ARRAY_SIZE(qcrypto_resources), |
| 343 | .resource = qcrypto_resources, |
| 344 | .dev = { |
| 345 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 346 | .platform_data = &qcrypto_ce_hw_suppport, |
| 347 | }, |
| 348 | }; |
| 349 | #endif |
| 350 | |
| 351 | #if defined(CONFIG_CRYPTO_DEV_QCEDEV) || \ |
| 352 | defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE) |
| 353 | |
| 354 | static struct msm_ce_hw_support qcedev_ce_hw_suppport = { |
| 355 | .ce_shared = QCE_CE_SHARED, |
| 356 | .shared_ce_resource = QCE_SHARE_CE_RESOURCE, |
| 357 | .hw_key_support = QCE_HW_KEY_SUPPORT, |
| 358 | .sha_hmac = QCE_SHA_HMAC_SUPPORT, |
| 359 | }; |
| 360 | |
| 361 | static struct platform_device qcedev_device = { |
| 362 | .name = "qce", |
| 363 | .id = 0, |
| 364 | .num_resources = ARRAY_SIZE(qcedev_resources), |
| 365 | .resource = qcedev_resources, |
| 366 | .dev = { |
| 367 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 368 | .platform_data = &qcedev_ce_hw_suppport, |
| 369 | }, |
| 370 | }; |
| 371 | #endif |
| 372 | |
| 373 | |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 374 | #define MSM_SHARED_RAM_PHYS 0x80000000 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 375 | static void __init apq8064_map_io(void) |
| 376 | { |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 377 | msm_shared_ram_phys = MSM_SHARED_RAM_PHYS; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 378 | msm_map_apq8064_io(); |
Jeff Ohlstein | 3a77f9f | 2011-09-06 14:50:20 -0700 | [diff] [blame] | 379 | if (socinfo_init() < 0) |
| 380 | pr_err("socinfo_init() failed!\n"); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 381 | } |
| 382 | |
| 383 | static void __init apq8064_init_irq(void) |
| 384 | { |
| 385 | unsigned int i; |
| 386 | gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE, |
| 387 | (void *)MSM_QGIC_CPU_BASE); |
| 388 | |
| 389 | /* Edge trigger PPIs except AVS_SVICINT and AVS_SVICINTSWDONE */ |
| 390 | writel_relaxed(0xFFFFD7FF, MSM_QGIC_DIST_BASE + GIC_DIST_CONFIG + 4); |
| 391 | |
| 392 | writel_relaxed(0x0000FFFF, MSM_QGIC_DIST_BASE + GIC_DIST_ENABLE_SET); |
| 393 | mb(); |
| 394 | |
| 395 | /* |
| 396 | * FIXME: Not installing AVS_SVICINT and AVS_SVICINTSWDONE yet |
| 397 | * as they are configured as level, which does not play nice with |
| 398 | * handle_percpu_irq. |
| 399 | */ |
| 400 | for (i = GIC_PPI_START; i < GIC_SPI_START; i++) { |
| 401 | if (i != AVS_SVICINT && i != AVS_SVICINTSWDONE) |
| 402 | irq_set_handler(i, handle_percpu_irq); |
| 403 | } |
| 404 | } |
| 405 | |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 406 | static struct platform_device msm8064_device_saw_regulator_core0 = { |
| 407 | .name = "saw-regulator", |
| 408 | .id = 0, |
| 409 | .dev = { |
| 410 | .platform_data = &msm8064_saw_regulator_pdata_8921_s5, |
| 411 | }, |
| 412 | }; |
| 413 | |
| 414 | static struct platform_device msm8064_device_saw_regulator_core1 = { |
| 415 | .name = "saw-regulator", |
| 416 | .id = 1, |
| 417 | .dev = { |
| 418 | .platform_data = &msm8064_saw_regulator_pdata_8921_s6, |
| 419 | }, |
| 420 | }; |
| 421 | |
| 422 | static struct platform_device msm8064_device_saw_regulator_core2 = { |
| 423 | .name = "saw-regulator", |
| 424 | .id = 2, |
| 425 | .dev = { |
| 426 | .platform_data = &msm8064_saw_regulator_pdata_8821_s0, |
| 427 | }, |
| 428 | }; |
| 429 | |
| 430 | static struct platform_device msm8064_device_saw_regulator_core3 = { |
| 431 | .name = "saw-regulator", |
| 432 | .id = 3, |
| 433 | .dev = { |
| 434 | .platform_data = &msm8064_saw_regulator_pdata_8821_s1, |
| 435 | }, |
| 436 | }; |
| 437 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 438 | static struct platform_device *common_devices[] __initdata = { |
Jin Hong | 01f2dbb | 2011-11-03 22:13:51 -0700 | [diff] [blame] | 439 | &apq8064_device_dmov, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 440 | &apq8064_device_qup_i2c_gsbi4, |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 441 | &apq8064_device_qup_spi_gsbi5, |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 442 | &apq8064_slim_ctrl, |
Jay Chokshi | 9c25f07 | 2011-09-23 18:19:15 -0700 | [diff] [blame] | 443 | &apq8064_device_ssbi_pmic1, |
| 444 | &apq8064_device_ssbi_pmic2, |
Jeff Hugo | 0c0f5e9 | 2011-09-28 13:55:45 -0600 | [diff] [blame] | 445 | &msm_device_smd_apq8064, |
Hemant Kumar | 4933b07 | 2011-10-17 23:43:11 -0700 | [diff] [blame] | 446 | &apq8064_device_otg, |
| 447 | &apq8064_device_gadget_peripheral, |
| 448 | &android_usb_device, |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 449 | &android_pmem_device, |
| 450 | &android_pmem_adsp_device, |
| 451 | &android_pmem_audio_device, |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 452 | &msm8064_device_watchdog, |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 453 | &msm8064_device_saw_regulator_core0, |
| 454 | &msm8064_device_saw_regulator_core1, |
| 455 | &msm8064_device_saw_regulator_core2, |
| 456 | &msm8064_device_saw_regulator_core3, |
Ramesh Masavarapu | 2831191 | 2011-10-27 11:04:12 -0700 | [diff] [blame] | 457 | #if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \ |
| 458 | defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE) |
| 459 | &qcrypto_device, |
| 460 | #endif |
| 461 | |
| 462 | #if defined(CONFIG_CRYPTO_DEV_QCEDEV) || \ |
| 463 | defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE) |
| 464 | &qcedev_device, |
| 465 | #endif |
Ramesh Masavarapu | f46be1b | 2011-11-03 11:13:41 -0700 | [diff] [blame] | 466 | |
| 467 | #ifdef CONFIG_HW_RANDOM_MSM |
| 468 | &apq8064_device_rng, |
| 469 | #endif |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 470 | &msm_pcm, |
| 471 | &msm_pcm_routing, |
| 472 | &msm_cpudai0, |
| 473 | &msm_cpudai1, |
| 474 | &msm_cpudai_hdmi_rx, |
| 475 | &msm_cpudai_bt_rx, |
| 476 | &msm_cpudai_bt_tx, |
| 477 | &msm_cpudai_fm_rx, |
| 478 | &msm_cpudai_fm_tx, |
| 479 | &msm_cpu_fe, |
| 480 | &msm_stub_codec, |
| 481 | &msm_voice, |
| 482 | &msm_voip, |
| 483 | &msm_lpa_pcm, |
| 484 | &msm_cpudai_afe_01_rx, |
| 485 | &msm_cpudai_afe_01_tx, |
| 486 | &msm_cpudai_afe_02_rx, |
| 487 | &msm_cpudai_afe_02_tx, |
| 488 | &msm_pcm_afe, |
| 489 | &msm_cpudai_auxpcm_rx, |
| 490 | &msm_cpudai_auxpcm_tx, |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 491 | }; |
| 492 | |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 493 | static struct platform_device *sim_devices[] __initdata = { |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 494 | &apq8064_device_uart_gsbi3, |
Yan He | 06913ce | 2011-08-26 16:33:46 -0700 | [diff] [blame] | 495 | &msm_device_sps_apq8064, |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 496 | }; |
| 497 | |
| 498 | static struct platform_device *rumi3_devices[] __initdata = { |
| 499 | &apq8064_device_uart_gsbi1, |
Yan He | 435ed61 | 2011-11-23 17:34:59 -0800 | [diff] [blame] | 500 | &msm_device_sps_apq8064, |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 501 | &msm_cpudai_bt_rx, |
| 502 | &msm_cpudai_bt_tx, |
| 503 | &msm_cpudai_fm_rx, |
| 504 | &msm_cpudai_fm_tx, |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 505 | }; |
| 506 | |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 507 | static struct msm_spi_platform_data apq8064_qup_spi_gsbi5_pdata = { |
Harini Jayaraman | 60ee14c | 2011-11-09 18:53:27 -0700 | [diff] [blame] | 508 | .max_clock_speed = 24000000, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 509 | }; |
| 510 | |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 511 | #define KS8851_IRQ_GPIO 43 |
| 512 | |
| 513 | static struct spi_board_info spi_board_info[] __initdata = { |
| 514 | { |
| 515 | .modalias = "ks8851", |
| 516 | .irq = MSM_GPIO_TO_INT(KS8851_IRQ_GPIO), |
| 517 | .max_speed_hz = 19200000, |
| 518 | .bus_num = 0, |
| 519 | .chip_select = 2, |
| 520 | .mode = SPI_MODE_0, |
| 521 | }, |
| 522 | }; |
| 523 | |
| 524 | #ifdef CONFIG_KS8851 |
| 525 | static struct gpiomux_setting gpio_eth_config = { |
| 526 | .pull = GPIOMUX_PULL_NONE, |
| 527 | .drv = GPIOMUX_DRV_8MA, |
| 528 | .func = GPIOMUX_FUNC_GPIO, |
| 529 | }; |
| 530 | |
| 531 | /* The SPI configurations apply to GSBI 5*/ |
| 532 | static struct gpiomux_setting gpio_spi_config = { |
| 533 | .func = GPIOMUX_FUNC_2, |
| 534 | .drv = GPIOMUX_DRV_8MA, |
| 535 | .pull = GPIOMUX_PULL_NONE, |
| 536 | }; |
| 537 | |
| 538 | /* The SPI configurations apply to GSBI 5 chip select 2*/ |
| 539 | static struct gpiomux_setting gpio_spi_cs2_config = { |
| 540 | .func = GPIOMUX_FUNC_3, |
| 541 | .drv = GPIOMUX_DRV_8MA, |
| 542 | .pull = GPIOMUX_PULL_NONE, |
| 543 | }; |
| 544 | #endif |
| 545 | |
| 546 | struct msm_gpiomux_config apq8064_ethernet_configs[NR_GPIO_IRQS] = { |
| 547 | #ifdef CONFIG_KS8851 |
| 548 | { |
| 549 | .gpio = KS8851_IRQ_GPIO, |
| 550 | .settings = { |
| 551 | [GPIOMUX_SUSPENDED] = &gpio_eth_config, |
| 552 | [GPIOMUX_ACTIVE] = &gpio_eth_config, |
| 553 | } |
| 554 | }, |
| 555 | #endif |
| 556 | }; |
| 557 | |
| 558 | static struct msm_gpiomux_config apq8064_gsbi_configs[] __initdata = { |
| 559 | #ifdef CONFIG_KS8851 |
| 560 | { |
| 561 | .gpio = 51, /* GSBI5 QUP SPI_DATA_MOSI */ |
| 562 | .settings = { |
| 563 | [GPIOMUX_SUSPENDED] = &gpio_spi_config, |
| 564 | }, |
| 565 | }, |
| 566 | { |
| 567 | .gpio = 52, /* GSBI5 QUP SPI_DATA_MISO */ |
| 568 | .settings = { |
| 569 | [GPIOMUX_SUSPENDED] = &gpio_spi_config, |
| 570 | }, |
| 571 | }, |
| 572 | { |
| 573 | .gpio = 31, /* GSBI5 QUP SPI_CS2_N */ |
| 574 | .settings = { |
| 575 | [GPIOMUX_SUSPENDED] = &gpio_spi_cs2_config, |
| 576 | }, |
| 577 | }, |
| 578 | { |
| 579 | .gpio = 54, /* GSBI5 QUP SPI_CLK */ |
| 580 | .settings = { |
| 581 | [GPIOMUX_SUSPENDED] = &gpio_spi_config, |
| 582 | }, |
| 583 | }, |
| 584 | #endif |
| 585 | }; |
| 586 | |
Jay Chokshi | bc3d98d | 2011-08-10 17:14:23 -0700 | [diff] [blame] | 587 | static struct pm8xxx_mpp_platform_data |
| 588 | apq8064_pm8921_mpp_pdata __devinitdata = { |
| 589 | .mpp_base = PM8921_MPP_PM_TO_SYS(1), |
| 590 | }; |
| 591 | |
| 592 | static struct pm8xxx_gpio_platform_data |
| 593 | apq8064_pm8921_gpio_pdata __devinitdata = { |
| 594 | .gpio_base = PM8921_GPIO_PM_TO_SYS(1), |
| 595 | }; |
| 596 | |
| 597 | static struct pm8xxx_irq_platform_data |
| 598 | apq8064_pm8921_irq_pdata __devinitdata = { |
| 599 | .irq_base = PM8921_IRQ_BASE, |
Jay Chokshi | 44873f7 | 2011-08-30 17:24:26 -0700 | [diff] [blame] | 600 | .devirq = PM8921_USR_IRQ_N, |
| 601 | .irq_trigger_flag = IRQF_TRIGGER_HIGH, |
Jay Chokshi | 9e926e7 | 2011-09-23 19:19:58 -0700 | [diff] [blame] | 602 | .dev_id = 0, |
Jay Chokshi | bc3d98d | 2011-08-10 17:14:23 -0700 | [diff] [blame] | 603 | }; |
| 604 | |
| 605 | static struct pm8921_platform_data |
| 606 | apq8064_pm8921_platform_data __devinitdata = { |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 607 | .regulator_pdatas = msm8064_pm8921_regulator_pdata, |
Jay Chokshi | bc3d98d | 2011-08-10 17:14:23 -0700 | [diff] [blame] | 608 | .irq_pdata = &apq8064_pm8921_irq_pdata, |
| 609 | .gpio_pdata = &apq8064_pm8921_gpio_pdata, |
| 610 | .mpp_pdata = &apq8064_pm8921_mpp_pdata, |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 611 | }; |
| 612 | |
Jay Chokshi | 44873f7 | 2011-08-30 17:24:26 -0700 | [diff] [blame] | 613 | static struct pm8xxx_irq_platform_data |
| 614 | apq8064_pm8821_irq_pdata __devinitdata = { |
| 615 | .irq_base = PM8821_IRQ_BASE, |
| 616 | .devirq = PM8821_USR_IRQ_N, |
| 617 | .irq_trigger_flag = IRQF_TRIGGER_HIGH, |
Jay Chokshi | 9e926e7 | 2011-09-23 19:19:58 -0700 | [diff] [blame] | 618 | .dev_id = 1, |
Jay Chokshi | 44873f7 | 2011-08-30 17:24:26 -0700 | [diff] [blame] | 619 | }; |
| 620 | |
| 621 | static struct pm8xxx_mpp_platform_data |
| 622 | apq8064_pm8821_mpp_pdata __devinitdata = { |
| 623 | .mpp_base = PM8821_MPP_PM_TO_SYS(1), |
| 624 | }; |
| 625 | |
| 626 | static struct pm8821_platform_data |
| 627 | apq8064_pm8821_platform_data __devinitdata = { |
| 628 | .irq_pdata = &apq8064_pm8821_irq_pdata, |
| 629 | .mpp_pdata = &apq8064_pm8821_mpp_pdata, |
| 630 | }; |
| 631 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 632 | static struct msm_ssbi_platform_data apq8064_ssbi_pm8921_pdata __devinitdata = { |
| 633 | .controller_type = MSM_SBI_CTRL_PMIC_ARBITER, |
| 634 | .slave = { |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 635 | .name = "pm8921-core", |
Jay Chokshi | bc3d98d | 2011-08-10 17:14:23 -0700 | [diff] [blame] | 636 | .platform_data = &apq8064_pm8921_platform_data, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 637 | }, |
| 638 | }; |
| 639 | |
| 640 | static struct msm_ssbi_platform_data apq8064_ssbi_pm8821_pdata __devinitdata = { |
| 641 | .controller_type = MSM_SBI_CTRL_PMIC_ARBITER, |
| 642 | .slave = { |
Jay Chokshi | 44873f7 | 2011-08-30 17:24:26 -0700 | [diff] [blame] | 643 | .name = "pm8821-core", |
| 644 | .platform_data = &apq8064_pm8821_platform_data, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 645 | }, |
| 646 | }; |
| 647 | |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 648 | static struct slim_boardinfo apq8064_slim_devices[] = { |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 649 | { |
| 650 | .bus_num = 1, |
| 651 | .slim_slave = &apq8064_slim_tabla, |
| 652 | }, |
| 653 | /* add more slimbus slaves as needed */ |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 654 | }; |
| 655 | |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 656 | static struct msm_i2c_platform_data apq8064_i2c_qup_gsbi4_pdata = { |
| 657 | .clk_freq = 100000, |
| 658 | .src_clk_rate = 24000000, |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 659 | }; |
| 660 | |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 661 | |
| 662 | static struct gpiomux_setting audio_auxpcm[] = { |
| 663 | /* Suspended state */ |
| 664 | { |
| 665 | .func = GPIOMUX_FUNC_GPIO, |
| 666 | .drv = GPIOMUX_DRV_2MA, |
| 667 | .pull = GPIOMUX_PULL_NONE, |
| 668 | }, |
| 669 | /* Active state */ |
| 670 | { |
| 671 | .func = GPIOMUX_FUNC_1, |
| 672 | .drv = GPIOMUX_DRV_2MA, |
| 673 | .pull = GPIOMUX_PULL_NONE, |
| 674 | }, |
| 675 | }; |
| 676 | static struct msm_gpiomux_config apq8064_audio_auxpcm_configs[] __initdata = { |
| 677 | { |
| 678 | .gpio = 43, |
| 679 | .settings = { |
| 680 | [GPIOMUX_SUSPENDED] = &audio_auxpcm[0], |
| 681 | [GPIOMUX_ACTIVE] = &audio_auxpcm[1], |
| 682 | }, |
| 683 | }, |
| 684 | { |
| 685 | .gpio = 44, |
| 686 | .settings = { |
| 687 | [GPIOMUX_SUSPENDED] = &audio_auxpcm[0], |
| 688 | [GPIOMUX_ACTIVE] = &audio_auxpcm[1], |
| 689 | }, |
| 690 | }, |
| 691 | { |
| 692 | .gpio = 45, |
| 693 | .settings = { |
| 694 | [GPIOMUX_SUSPENDED] = &audio_auxpcm[0], |
| 695 | [GPIOMUX_ACTIVE] = &audio_auxpcm[1], |
| 696 | }, |
| 697 | }, |
| 698 | { |
| 699 | .gpio = 46, |
| 700 | .settings = { |
| 701 | [GPIOMUX_SUSPENDED] = &audio_auxpcm[0], |
| 702 | [GPIOMUX_ACTIVE] = &audio_auxpcm[1], |
| 703 | }, |
| 704 | }, |
| 705 | }; |
| 706 | |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 707 | static void __init apq8064_i2c_init(void) |
| 708 | { |
| 709 | apq8064_device_qup_i2c_gsbi4.dev.platform_data = |
| 710 | &apq8064_i2c_qup_gsbi4_pdata; |
| 711 | } |
| 712 | |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 713 | static int __init gpiomux_init(void) |
| 714 | { |
| 715 | int rc; |
| 716 | |
| 717 | rc = msm_gpiomux_init(NR_GPIO_IRQS); |
| 718 | if (rc) { |
| 719 | pr_err(KERN_ERR "msm_gpiomux_init failed %d\n", rc); |
| 720 | return rc; |
| 721 | } |
| 722 | msm_gpiomux_install(apq8064_ethernet_configs, |
| 723 | ARRAY_SIZE(apq8064_ethernet_configs)); |
| 724 | |
| 725 | msm_gpiomux_install(apq8064_gsbi_configs, |
| 726 | ARRAY_SIZE(apq8064_gsbi_configs)); |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 727 | msm_gpiomux_install(apq8064_audio_auxpcm_configs, |
| 728 | ARRAY_SIZE(apq8064_audio_auxpcm_configs)); |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 729 | return 0; |
| 730 | } |
| 731 | |
| 732 | #ifdef CONFIG_KS8851 |
| 733 | static int ethernet_init(void) |
| 734 | { |
| 735 | int ret; |
| 736 | ret = gpio_request(KS8851_IRQ_GPIO, "ks8851_irq"); |
| 737 | if (ret) { |
| 738 | pr_err("ks8851 gpio_request failed: %d\n", ret); |
| 739 | goto fail; |
| 740 | } |
| 741 | |
| 742 | return 0; |
| 743 | fail: |
| 744 | return ret; |
| 745 | } |
| 746 | #else |
| 747 | static int ethernet_init(void) |
| 748 | { |
| 749 | return 0; |
| 750 | } |
| 751 | #endif |
| 752 | |
Tianyi Gou | 41515e2 | 2011-09-01 19:37:43 -0700 | [diff] [blame] | 753 | static void __init apq8064_clock_init(void) |
| 754 | { |
| 755 | if (machine_is_apq8064_sim()) |
| 756 | msm_clock_init(&apq8064_clock_init_data); |
| 757 | else |
| 758 | msm_clock_init(&apq8064_dummy_clock_init_data); |
| 759 | } |
| 760 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 761 | static void __init apq8064_common_init(void) |
| 762 | { |
| 763 | if (socinfo_init() < 0) |
| 764 | pr_err("socinfo_init() failed!\n"); |
Tianyi Gou | 41515e2 | 2011-09-01 19:37:43 -0700 | [diff] [blame] | 765 | apq8064_clock_init(); |
Joel King | 4ebccc6 | 2011-07-22 09:43:22 -0700 | [diff] [blame] | 766 | gpiomux_init(); |
Kenneth Heitke | 748593a | 2011-07-15 15:45:11 -0600 | [diff] [blame] | 767 | apq8064_i2c_init(); |
Kenneth Heitke | 36920d3 | 2011-07-20 16:44:30 -0600 | [diff] [blame] | 768 | |
Harini Jayaraman | c4c5869 | 2011-07-19 14:50:10 -0600 | [diff] [blame] | 769 | apq8064_device_qup_spi_gsbi5.dev.platform_data = |
| 770 | &apq8064_qup_spi_gsbi5_pdata; |
Kenneth Heitke | 36920d3 | 2011-07-20 16:44:30 -0600 | [diff] [blame] | 771 | apq8064_device_ssbi_pmic1.dev.platform_data = |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 772 | &apq8064_ssbi_pm8921_pdata; |
Kenneth Heitke | 36920d3 | 2011-07-20 16:44:30 -0600 | [diff] [blame] | 773 | apq8064_device_ssbi_pmic2.dev.platform_data = |
| 774 | &apq8064_ssbi_pm8821_pdata; |
Stepan Moskovchenko | 14aa649 | 2011-08-08 15:15:01 -0700 | [diff] [blame] | 775 | apq8064_device_otg.dev.platform_data = &msm_otg_pdata; |
Jay Chokshi | bc3d98d | 2011-08-10 17:14:23 -0700 | [diff] [blame] | 776 | apq8064_pm8921_platform_data.num_regulators = |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 777 | msm8064_pm8921_regulator_pdata_len; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 778 | platform_add_devices(common_devices, ARRAY_SIZE(common_devices)); |
Sahitya Tummala | 3586ed9 | 2011-08-03 09:13:23 +0530 | [diff] [blame] | 779 | apq8064_init_mmc(); |
Sagar Dharia | 8bdcdaf | 2011-09-16 16:01:15 -0600 | [diff] [blame] | 780 | slim_register_board_info(apq8064_slim_devices, |
| 781 | ARRAY_SIZE(apq8064_slim_devices)); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 782 | } |
| 783 | |
| 784 | static void __init apq8064_sim_init(void) |
| 785 | { |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 786 | struct msm_watchdog_pdata *wdog_pdata = (struct msm_watchdog_pdata *) |
| 787 | &msm8064_device_watchdog.dev.platform_data; |
| 788 | |
| 789 | wdog_pdata->bark_time = 15000; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 790 | apq8064_common_init(); |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 791 | platform_add_devices(sim_devices, ARRAY_SIZE(sim_devices)); |
| 792 | } |
| 793 | |
| 794 | static void __init apq8064_rumi3_init(void) |
| 795 | { |
Jay Chokshi | 9c25f07 | 2011-09-23 18:19:15 -0700 | [diff] [blame] | 796 | apq8064_pm8921_irq_pdata.devirq = 0; |
| 797 | apq8064_pm8821_irq_pdata.devirq = 0; |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 798 | apq8064_common_init(); |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 799 | ethernet_init(); |
Stepan Moskovchenko | 2701a44 | 2011-08-19 13:47:22 -0700 | [diff] [blame] | 800 | platform_add_devices(rumi3_devices, ARRAY_SIZE(rumi3_devices)); |
Stepan Moskovchenko | eed82a5 | 2011-09-02 13:19:23 -0700 | [diff] [blame] | 801 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 802 | } |
| 803 | |
| 804 | MACHINE_START(APQ8064_SIM, "QCT APQ8064 SIMULATOR") |
| 805 | .map_io = apq8064_map_io, |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 806 | .reserve = apq8064_reserve, |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 807 | .init_irq = apq8064_init_irq, |
| 808 | .timer = &msm_timer, |
| 809 | .init_machine = apq8064_sim_init, |
| 810 | MACHINE_END |
| 811 | |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 812 | MACHINE_START(APQ8064_RUMI3, "QCT APQ8064 RUMI3") |
| 813 | .map_io = apq8064_map_io, |
Kevin Chan | 13be4e2 | 2011-10-20 11:30:32 -0700 | [diff] [blame] | 814 | .reserve = apq8064_reserve, |
Joel King | 4e7ad22 | 2011-08-17 15:47:38 -0700 | [diff] [blame] | 815 | .init_irq = apq8064_init_irq, |
| 816 | .timer = &msm_timer, |
| 817 | .init_machine = apq8064_rumi3_init, |
| 818 | MACHINE_END |
| 819 | |