Duy Truong | e833aca | 2013-02-12 13:35:08 -0800 | [diff] [blame^] | 1 | /* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved. |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | #include <linux/kernel.h> |
| 15 | #include <linux/platform_device.h> |
| 16 | #include <linux/irq.h> |
| 17 | #include <linux/io.h> |
Ramesh Masavarapu | aa28b5b | 2011-10-21 10:26:03 -0700 | [diff] [blame] | 18 | #include <linux/platform_data/qcom_crypto_device.h> |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 19 | #include <linux/dma-mapping.h> |
Shiv Maliyappanahalli | 9ec55e9 | 2012-01-09 14:44:59 -0800 | [diff] [blame] | 20 | #include <sound/msm-dai-q6.h> |
| 21 | #include <sound/apr_audio.h> |
Ofir Cohen | 94213a7 | 2012-05-03 14:26:32 +0300 | [diff] [blame] | 22 | #include <linux/usb/android.h> |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 23 | #include <asm/hardware/gic.h> |
Sahitya Tummala | 3829543 | 2011-09-29 10:08:45 +0530 | [diff] [blame] | 24 | #include <asm/mach/flash.h> |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 25 | #include <mach/board.h> |
| 26 | #include <mach/msm_iomap.h> |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 27 | #include <mach/msm_hsusb.h> |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 28 | #include <mach/irqs.h> |
| 29 | #include <mach/socinfo.h> |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 30 | #include <mach/rpm.h> |
Gagan Mac | 7a82764 | 2011-09-22 19:42:21 -0600 | [diff] [blame] | 31 | #include <mach/msm_bus_board.h> |
Rohit Vaswani | f0ce9ae | 2011-08-23 22:18:38 -0700 | [diff] [blame] | 32 | #include <asm/hardware/cache-l2x0.h> |
Yan He | 092b727 | 2011-09-21 15:25:03 -0700 | [diff] [blame] | 33 | #include <mach/msm_sps.h> |
Jeff Ohlstein | d19bf44 | 2011-09-09 12:48:18 -0700 | [diff] [blame] | 34 | #include <mach/dma.h> |
Matt Wagantall | 7cca464 | 2012-02-01 16:43:24 -0800 | [diff] [blame] | 35 | #include "pm.h" |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 36 | #include "devices.h" |
Subhash Jadavani | 909e04f | 2012-04-12 10:52:50 +0530 | [diff] [blame] | 37 | #include <mach/mpm.h> |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 38 | #include "spm.h" |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 39 | #include "rpm_resources.h" |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 40 | #include "msm_watchdog.h" |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 41 | #include "rpm_stats.h" |
| 42 | #include "rpm_log.h" |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 43 | |
Harini Jayaraman | eba5267 | 2011-09-08 15:13:00 -0600 | [diff] [blame] | 44 | /* Address of GSBI blocks */ |
| 45 | #define MSM_GSBI1_PHYS 0x16000000 |
| 46 | #define MSM_GSBI2_PHYS 0x16100000 |
| 47 | #define MSM_GSBI3_PHYS 0x16200000 |
Rohit Vaswani | 0966687 | 2011-08-23 17:41:54 -0700 | [diff] [blame] | 48 | #define MSM_GSBI4_PHYS 0x16300000 |
Harini Jayaraman | eba5267 | 2011-09-08 15:13:00 -0600 | [diff] [blame] | 49 | #define MSM_GSBI5_PHYS 0x16400000 |
| 50 | |
Rohit Vaswani | 0966687 | 2011-08-23 17:41:54 -0700 | [diff] [blame] | 51 | #define MSM_UART4DM_PHYS (MSM_GSBI4_PHYS + 0x40000) |
| 52 | |
Harini Jayaraman | eba5267 | 2011-09-08 15:13:00 -0600 | [diff] [blame] | 53 | /* GSBI QUP devices */ |
| 54 | #define MSM_GSBI1_QUP_PHYS (MSM_GSBI1_PHYS + 0x80000) |
| 55 | #define MSM_GSBI2_QUP_PHYS (MSM_GSBI2_PHYS + 0x80000) |
| 56 | #define MSM_GSBI3_QUP_PHYS (MSM_GSBI3_PHYS + 0x80000) |
| 57 | #define MSM_GSBI4_QUP_PHYS (MSM_GSBI4_PHYS + 0x80000) |
| 58 | #define MSM_GSBI5_QUP_PHYS (MSM_GSBI5_PHYS + 0x80000) |
| 59 | #define MSM_QUP_SIZE SZ_4K |
| 60 | |
Kenneth Heitke | af3d3cf | 2011-09-08 11:45:31 -0700 | [diff] [blame] | 61 | /* Address of SSBI CMD */ |
| 62 | #define MSM_PMIC1_SSBI_CMD_PHYS 0x00500000 |
| 63 | #define MSM_PMIC_SSBI_SIZE SZ_4K |
| 64 | |
Venkat Sudhir | 5efc491 | 2012-05-15 17:10:35 -0700 | [diff] [blame] | 65 | #define MSM_GPIO_I2C_CLK 16 |
| 66 | #define MSM_GPIO_I2C_SDA 17 |
Anji Jonnala | 2a8bd31 | 2012-11-01 13:11:42 +0530 | [diff] [blame] | 67 | #define MSM9615_RPM_MASTER_STATS_BASE 0x10A700 |
Venkat Sudhir | 5efc491 | 2012-05-15 17:10:35 -0700 | [diff] [blame] | 68 | |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 69 | static struct msm_watchdog_pdata msm_watchdog_pdata = { |
| 70 | .pet_time = 10000, |
| 71 | .bark_time = 11000, |
Rohit Vaswani | ead426f | 2012-01-05 20:24:52 -0800 | [diff] [blame] | 72 | .has_secure = false, |
| 73 | .use_kernel_fiq = true, |
Rohit Vaswani | c77e4a6 | 2012-08-09 18:10:28 -0700 | [diff] [blame] | 74 | .base = MSM_TMR_BASE + WDT0_OFFSET, |
| 75 | }; |
| 76 | |
| 77 | static struct resource msm_watchdog_resources[] = { |
| 78 | { |
| 79 | .start = WDT0_ACCSCSSNBARK_INT, |
| 80 | .end = WDT0_ACCSCSSNBARK_INT, |
| 81 | .flags = IORESOURCE_IRQ, |
| 82 | }, |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 83 | }; |
| 84 | |
| 85 | struct platform_device msm9615_device_watchdog = { |
| 86 | .name = "msm_watchdog", |
| 87 | .id = -1, |
| 88 | .dev = { |
| 89 | .platform_data = &msm_watchdog_pdata, |
| 90 | }, |
Rohit Vaswani | c77e4a6 | 2012-08-09 18:10:28 -0700 | [diff] [blame] | 91 | .num_resources = ARRAY_SIZE(msm_watchdog_resources), |
| 92 | .resource = msm_watchdog_resources, |
Jeff Ohlstein | 7e66855 | 2011-10-06 16:17:25 -0700 | [diff] [blame] | 93 | }; |
| 94 | |
Jeff Ohlstein | d19bf44 | 2011-09-09 12:48:18 -0700 | [diff] [blame] | 95 | static struct resource msm_dmov_resource[] = { |
| 96 | { |
| 97 | .start = ADM_0_SCSS_1_IRQ, |
Jeff Ohlstein | d19bf44 | 2011-09-09 12:48:18 -0700 | [diff] [blame] | 98 | .flags = IORESOURCE_IRQ, |
| 99 | }, |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 100 | { |
| 101 | .start = 0x18320000, |
| 102 | .end = 0x18320000 + SZ_1M - 1, |
| 103 | .flags = IORESOURCE_MEM, |
| 104 | }, |
| 105 | }; |
| 106 | |
| 107 | static struct msm_dmov_pdata msm_dmov_pdata = { |
| 108 | .sd = 1, |
| 109 | .sd_size = 0x800, |
Jeff Ohlstein | d19bf44 | 2011-09-09 12:48:18 -0700 | [diff] [blame] | 110 | }; |
| 111 | |
| 112 | struct platform_device msm9615_device_dmov = { |
| 113 | .name = "msm_dmov", |
| 114 | .id = -1, |
| 115 | .resource = msm_dmov_resource, |
| 116 | .num_resources = ARRAY_SIZE(msm_dmov_resource), |
Jeff Ohlstein | 905f1ce | 2011-09-07 18:50:18 -0700 | [diff] [blame] | 117 | .dev = { |
| 118 | .platform_data = &msm_dmov_pdata, |
| 119 | }, |
Jeff Ohlstein | d19bf44 | 2011-09-09 12:48:18 -0700 | [diff] [blame] | 120 | }; |
| 121 | |
Matt Wagantall | bf430eb | 2012-03-22 11:45:49 -0700 | [diff] [blame] | 122 | struct platform_device msm9615_device_acpuclk = { |
| 123 | .name = "acpuclk-9615", |
| 124 | .id = -1, |
| 125 | }; |
| 126 | |
Ofir Cohen | 40a4e86 | 2011-12-08 15:17:52 +0200 | [diff] [blame] | 127 | #define MSM_USB_BAM_BASE 0x12502000 |
Ofir Cohen | 010009b | 2012-01-26 16:49:17 +0200 | [diff] [blame] | 128 | #define MSM_USB_BAM_SIZE SZ_16K |
| 129 | #define MSM_HSIC_BAM_BASE 0x12542000 |
| 130 | #define MSM_HSIC_BAM_SIZE SZ_16K |
Ofir Cohen | 40a4e86 | 2011-12-08 15:17:52 +0200 | [diff] [blame] | 131 | |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 132 | static struct resource resources_otg[] = { |
| 133 | { |
| 134 | .start = MSM9615_HSUSB_PHYS, |
| 135 | .end = MSM9615_HSUSB_PHYS + MSM9615_HSUSB_SIZE - 1, |
| 136 | .flags = IORESOURCE_MEM, |
| 137 | }, |
| 138 | { |
| 139 | .start = USB1_HS_IRQ, |
| 140 | .end = USB1_HS_IRQ, |
| 141 | .flags = IORESOURCE_IRQ, |
| 142 | }, |
| 143 | }; |
| 144 | |
| 145 | struct platform_device msm_device_otg = { |
| 146 | .name = "msm_otg", |
| 147 | .id = -1, |
| 148 | .num_resources = ARRAY_SIZE(resources_otg), |
| 149 | .resource = resources_otg, |
| 150 | .dev = { |
| 151 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 152 | }, |
| 153 | }; |
| 154 | |
Amit Blay | 9b03368 | 2012-05-24 16:59:23 +0300 | [diff] [blame] | 155 | #define MSM_HSUSB_RESUME_GPIO 79 |
| 156 | |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 157 | static struct resource resources_hsusb[] = { |
| 158 | { |
| 159 | .start = MSM9615_HSUSB_PHYS, |
| 160 | .end = MSM9615_HSUSB_PHYS + MSM9615_HSUSB_SIZE - 1, |
| 161 | .flags = IORESOURCE_MEM, |
| 162 | }, |
| 163 | { |
| 164 | .start = USB1_HS_IRQ, |
| 165 | .end = USB1_HS_IRQ, |
| 166 | .flags = IORESOURCE_IRQ, |
| 167 | }, |
Amit Blay | 9b03368 | 2012-05-24 16:59:23 +0300 | [diff] [blame] | 168 | { |
| 169 | .start = MSM_HSUSB_RESUME_GPIO, |
| 170 | .end = MSM_HSUSB_RESUME_GPIO, |
| 171 | .name = "USB_RESUME", |
| 172 | .flags = IORESOURCE_IO, |
| 173 | }, |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 174 | }; |
| 175 | |
Ofir Cohen | 40a4e86 | 2011-12-08 15:17:52 +0200 | [diff] [blame] | 176 | static struct resource resources_usb_bam[] = { |
| 177 | { |
| 178 | .name = "usb_bam_addr", |
| 179 | .start = MSM_USB_BAM_BASE, |
Ofir Cohen | 010009b | 2012-01-26 16:49:17 +0200 | [diff] [blame] | 180 | .end = MSM_USB_BAM_BASE + MSM_USB_BAM_SIZE - 1, |
Ofir Cohen | 40a4e86 | 2011-12-08 15:17:52 +0200 | [diff] [blame] | 181 | .flags = IORESOURCE_MEM, |
| 182 | }, |
| 183 | { |
| 184 | .name = "usb_bam_irq", |
| 185 | .start = USB1_HS_BAM_IRQ, |
| 186 | .end = USB1_HS_BAM_IRQ, |
| 187 | .flags = IORESOURCE_IRQ, |
| 188 | }, |
Ofir Cohen | 010009b | 2012-01-26 16:49:17 +0200 | [diff] [blame] | 189 | { |
| 190 | .name = "hsic_bam_addr", |
| 191 | .start = MSM_HSIC_BAM_BASE, |
| 192 | .end = MSM_HSIC_BAM_BASE + MSM_HSIC_BAM_SIZE - 1, |
| 193 | .flags = IORESOURCE_MEM, |
| 194 | }, |
| 195 | { |
| 196 | .name = "hsic_bam_irq", |
| 197 | .start = USB_HSIC_BAM_IRQ, |
| 198 | .end = USB_HSIC_BAM_IRQ, |
| 199 | .flags = IORESOURCE_IRQ, |
| 200 | }, |
Ofir Cohen | 40a4e86 | 2011-12-08 15:17:52 +0200 | [diff] [blame] | 201 | }; |
| 202 | |
| 203 | struct platform_device msm_device_usb_bam = { |
| 204 | .name = "usb_bam", |
| 205 | .id = -1, |
| 206 | .num_resources = ARRAY_SIZE(resources_usb_bam), |
| 207 | .resource = resources_usb_bam, |
| 208 | }; |
| 209 | |
Amit Blay | 5e4ec19 | 2011-10-20 09:16:54 +0200 | [diff] [blame] | 210 | struct platform_device msm_device_gadget_peripheral = { |
| 211 | .name = "msm_hsusb", |
| 212 | .id = -1, |
| 213 | .num_resources = ARRAY_SIZE(resources_hsusb), |
| 214 | .resource = resources_hsusb, |
| 215 | .dev = { |
| 216 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 217 | }, |
| 218 | }; |
| 219 | |
Ofir Cohen | 06789f1 | 2012-01-16 09:43:13 +0200 | [diff] [blame] | 220 | static struct resource resources_hsic_peripheral[] = { |
| 221 | { |
| 222 | .start = MSM9615_HSIC_PHYS, |
| 223 | .end = MSM9615_HSIC_PHYS + MSM9615_HSIC_SIZE - 1, |
| 224 | .flags = IORESOURCE_MEM, |
| 225 | }, |
| 226 | { |
| 227 | .start = USB_HSIC_IRQ, |
| 228 | .end = USB_HSIC_IRQ, |
| 229 | .flags = IORESOURCE_IRQ, |
| 230 | }, |
| 231 | }; |
| 232 | |
| 233 | struct platform_device msm_device_hsic_peripheral = { |
| 234 | .name = "msm_hsic_peripheral", |
| 235 | .id = -1, |
| 236 | .num_resources = ARRAY_SIZE(resources_hsic_peripheral), |
| 237 | .resource = resources_hsic_peripheral, |
| 238 | .dev = { |
| 239 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 240 | }, |
| 241 | }; |
| 242 | |
Amit Blay | 6a8d4f3 | 2011-11-21 10:36:25 +0200 | [diff] [blame] | 243 | static struct resource resources_hsusb_host[] = { |
| 244 | { |
| 245 | .start = MSM9615_HSUSB_PHYS, |
| 246 | .end = MSM9615_HSUSB_PHYS + MSM9615_HSUSB_PHYS - 1, |
| 247 | .flags = IORESOURCE_MEM, |
| 248 | }, |
| 249 | { |
| 250 | .start = USB1_HS_IRQ, |
| 251 | .end = USB1_HS_IRQ, |
| 252 | .flags = IORESOURCE_IRQ, |
| 253 | }, |
| 254 | }; |
| 255 | |
| 256 | static u64 dma_mask = DMA_BIT_MASK(32); |
| 257 | struct platform_device msm_device_hsusb_host = { |
| 258 | .name = "msm_hsusb_host", |
| 259 | .id = -1, |
| 260 | .num_resources = ARRAY_SIZE(resources_hsusb_host), |
| 261 | .resource = resources_hsusb_host, |
| 262 | .dev = { |
| 263 | .dma_mask = &dma_mask, |
| 264 | .coherent_dma_mask = 0xffffffff, |
| 265 | }, |
| 266 | }; |
| 267 | |
Lena Salman | 65bcf37 | 2012-02-14 15:33:32 +0200 | [diff] [blame] | 268 | static struct resource resources_hsic_host[] = { |
| 269 | { |
| 270 | .start = MSM9615_HSIC_PHYS, |
| 271 | .end = MSM9615_HSIC_PHYS + MSM9615_HSIC_SIZE - 1, |
| 272 | .flags = IORESOURCE_MEM, |
| 273 | }, |
| 274 | { |
| 275 | .start = USB_HSIC_IRQ, |
| 276 | .end = USB_HSIC_IRQ, |
| 277 | .flags = IORESOURCE_IRQ, |
| 278 | }, |
| 279 | }; |
| 280 | |
| 281 | struct platform_device msm_device_hsic_host = { |
| 282 | .name = "msm_hsic_host", |
| 283 | .id = -1, |
| 284 | .num_resources = ARRAY_SIZE(resources_hsic_host), |
| 285 | .resource = resources_hsic_host, |
| 286 | .dev = { |
| 287 | .dma_mask = &dma_mask, |
| 288 | .coherent_dma_mask = 0xffffffff, |
| 289 | }, |
| 290 | }; |
| 291 | |
Rohit Vaswani | 0966687 | 2011-08-23 17:41:54 -0700 | [diff] [blame] | 292 | static struct resource resources_uart_gsbi4[] = { |
| 293 | { |
| 294 | .start = GSBI4_UARTDM_IRQ, |
| 295 | .end = GSBI4_UARTDM_IRQ, |
| 296 | .flags = IORESOURCE_IRQ, |
| 297 | }, |
| 298 | { |
| 299 | .start = MSM_UART4DM_PHYS, |
| 300 | .end = MSM_UART4DM_PHYS + PAGE_SIZE - 1, |
| 301 | .name = "uartdm_resource", |
| 302 | .flags = IORESOURCE_MEM, |
| 303 | }, |
| 304 | { |
| 305 | .start = MSM_GSBI4_PHYS, |
| 306 | .end = MSM_GSBI4_PHYS + PAGE_SIZE - 1, |
| 307 | .name = "gsbi_resource", |
| 308 | .flags = IORESOURCE_MEM, |
| 309 | }, |
| 310 | }; |
| 311 | |
| 312 | struct platform_device msm9615_device_uart_gsbi4 = { |
| 313 | .name = "msm_serial_hsl", |
| 314 | .id = 0, |
| 315 | .num_resources = ARRAY_SIZE(resources_uart_gsbi4), |
| 316 | .resource = resources_uart_gsbi4, |
| 317 | }; |
| 318 | |
Harini Jayaraman | eba5267 | 2011-09-08 15:13:00 -0600 | [diff] [blame] | 319 | static struct resource resources_qup_i2c_gsbi5[] = { |
| 320 | { |
| 321 | .name = "gsbi_qup_i2c_addr", |
| 322 | .start = MSM_GSBI5_PHYS, |
Harini Jayaraman | 7a60bc1 | 2011-09-15 14:58:54 -0600 | [diff] [blame] | 323 | .end = MSM_GSBI5_PHYS + 4 - 1, |
Harini Jayaraman | eba5267 | 2011-09-08 15:13:00 -0600 | [diff] [blame] | 324 | .flags = IORESOURCE_MEM, |
| 325 | }, |
| 326 | { |
| 327 | .name = "qup_phys_addr", |
| 328 | .start = MSM_GSBI5_QUP_PHYS, |
Harini Jayaraman | 7a60bc1 | 2011-09-15 14:58:54 -0600 | [diff] [blame] | 329 | .end = MSM_GSBI5_QUP_PHYS + MSM_QUP_SIZE - 1, |
Harini Jayaraman | eba5267 | 2011-09-08 15:13:00 -0600 | [diff] [blame] | 330 | .flags = IORESOURCE_MEM, |
| 331 | }, |
| 332 | { |
| 333 | .name = "qup_err_intr", |
| 334 | .start = GSBI5_QUP_IRQ, |
| 335 | .end = GSBI5_QUP_IRQ, |
| 336 | .flags = IORESOURCE_IRQ, |
| 337 | }, |
Venkat Sudhir | 5efc491 | 2012-05-15 17:10:35 -0700 | [diff] [blame] | 338 | { |
| 339 | .name = "i2c_clk", |
| 340 | .start = MSM_GPIO_I2C_CLK, |
| 341 | .end = MSM_GPIO_I2C_CLK, |
| 342 | .flags = IORESOURCE_IO, |
| 343 | }, |
| 344 | { |
| 345 | .name = "i2c_sda", |
| 346 | .start = MSM_GPIO_I2C_SDA, |
| 347 | .end = MSM_GPIO_I2C_SDA, |
| 348 | .flags = IORESOURCE_IO, |
| 349 | |
| 350 | }, |
Harini Jayaraman | eba5267 | 2011-09-08 15:13:00 -0600 | [diff] [blame] | 351 | }; |
| 352 | |
| 353 | struct platform_device msm9615_device_qup_i2c_gsbi5 = { |
| 354 | .name = "qup_i2c", |
| 355 | .id = 0, |
| 356 | .num_resources = ARRAY_SIZE(resources_qup_i2c_gsbi5), |
| 357 | .resource = resources_qup_i2c_gsbi5, |
| 358 | }; |
| 359 | |
Harini Jayaraman | 738c931 | 2011-09-08 15:22:38 -0600 | [diff] [blame] | 360 | static struct resource resources_qup_spi_gsbi3[] = { |
| 361 | { |
| 362 | .name = "spi_base", |
| 363 | .start = MSM_GSBI3_QUP_PHYS, |
| 364 | .end = MSM_GSBI3_QUP_PHYS + SZ_4K - 1, |
| 365 | .flags = IORESOURCE_MEM, |
| 366 | }, |
| 367 | { |
| 368 | .name = "gsbi_base", |
| 369 | .start = MSM_GSBI3_PHYS, |
| 370 | .end = MSM_GSBI3_PHYS + 4 - 1, |
| 371 | .flags = IORESOURCE_MEM, |
| 372 | }, |
| 373 | { |
| 374 | .name = "spi_irq_in", |
| 375 | .start = GSBI3_QUP_IRQ, |
| 376 | .end = GSBI3_QUP_IRQ, |
| 377 | .flags = IORESOURCE_IRQ, |
| 378 | }, |
| 379 | }; |
| 380 | |
| 381 | struct platform_device msm9615_device_qup_spi_gsbi3 = { |
| 382 | .name = "spi_qsd", |
| 383 | .id = 0, |
| 384 | .num_resources = ARRAY_SIZE(resources_qup_spi_gsbi3), |
| 385 | .resource = resources_qup_spi_gsbi3, |
| 386 | }; |
| 387 | |
Sagar Dharia | 2a5378d | 2011-12-01 20:00:11 -0700 | [diff] [blame] | 388 | #define LPASS_SLIMBUS_PHYS 0x28080000 |
| 389 | #define LPASS_SLIMBUS_BAM_PHYS 0x28084000 |
| 390 | #define LPASS_SLIMBUS_SLEW (MSM9615_TLMM_PHYS + 0x207C) |
| 391 | /* Board info for the slimbus slave device */ |
| 392 | static struct resource slimbus_res[] = { |
| 393 | { |
| 394 | .start = LPASS_SLIMBUS_PHYS, |
| 395 | .end = LPASS_SLIMBUS_PHYS + 8191, |
| 396 | .flags = IORESOURCE_MEM, |
| 397 | .name = "slimbus_physical", |
| 398 | }, |
| 399 | { |
| 400 | .start = LPASS_SLIMBUS_BAM_PHYS, |
| 401 | .end = LPASS_SLIMBUS_BAM_PHYS + 8191, |
| 402 | .flags = IORESOURCE_MEM, |
| 403 | .name = "slimbus_bam_physical", |
| 404 | }, |
| 405 | { |
| 406 | .start = LPASS_SLIMBUS_SLEW, |
| 407 | .end = LPASS_SLIMBUS_SLEW + 4 - 1, |
| 408 | .flags = IORESOURCE_MEM, |
| 409 | .name = "slimbus_slew_reg", |
| 410 | }, |
| 411 | { |
| 412 | .start = SLIMBUS0_CORE_EE1_IRQ, |
| 413 | .end = SLIMBUS0_CORE_EE1_IRQ, |
| 414 | .flags = IORESOURCE_IRQ, |
| 415 | .name = "slimbus_irq", |
| 416 | }, |
| 417 | { |
| 418 | .start = SLIMBUS0_BAM_EE1_IRQ, |
| 419 | .end = SLIMBUS0_BAM_EE1_IRQ, |
| 420 | .flags = IORESOURCE_IRQ, |
| 421 | .name = "slimbus_bam_irq", |
| 422 | }, |
| 423 | }; |
| 424 | |
| 425 | struct platform_device msm9615_slim_ctrl = { |
| 426 | .name = "msm_slim_ctrl", |
| 427 | .id = 1, |
| 428 | .num_resources = ARRAY_SIZE(slimbus_res), |
| 429 | .resource = slimbus_res, |
| 430 | .dev = { |
| 431 | .coherent_dma_mask = 0xffffffffULL, |
| 432 | }, |
| 433 | }; |
| 434 | |
Shiv Maliyappanahalli | 9ec55e9 | 2012-01-09 14:44:59 -0800 | [diff] [blame] | 435 | struct platform_device msm_pcm = { |
| 436 | .name = "msm-pcm-dsp", |
| 437 | .id = -1, |
| 438 | }; |
| 439 | |
| 440 | struct platform_device msm_multi_ch_pcm = { |
| 441 | .name = "msm-multi-ch-pcm-dsp", |
| 442 | .id = -1, |
| 443 | }; |
| 444 | |
| 445 | struct platform_device msm_pcm_routing = { |
| 446 | .name = "msm-pcm-routing", |
| 447 | .id = -1, |
| 448 | }; |
| 449 | |
| 450 | struct platform_device msm_cpudai0 = { |
| 451 | .name = "msm-dai-q6", |
| 452 | .id = 0x4000, |
| 453 | }; |
| 454 | |
| 455 | struct platform_device msm_cpudai1 = { |
| 456 | .name = "msm-dai-q6", |
| 457 | .id = 0x4001, |
| 458 | }; |
| 459 | |
| 460 | struct platform_device msm_cpudai_bt_rx = { |
| 461 | .name = "msm-dai-q6", |
| 462 | .id = 0x3000, |
| 463 | }; |
| 464 | |
| 465 | struct platform_device msm_cpudai_bt_tx = { |
| 466 | .name = "msm-dai-q6", |
| 467 | .id = 0x3001, |
| 468 | }; |
| 469 | |
| 470 | /* |
| 471 | * Machine specific data for AUX PCM Interface |
| 472 | * which the driver will be unware of. |
| 473 | */ |
Shiv Maliyappanahalli | 19e86e2 | 2012-03-28 17:27:26 -0700 | [diff] [blame] | 474 | struct msm_dai_auxpcm_pdata auxpcm_pdata = { |
Shiv Maliyappanahalli | 9ec55e9 | 2012-01-09 14:44:59 -0800 | [diff] [blame] | 475 | .clk = "pcm_clk", |
Kuirong Wang | 547a998 | 2012-05-04 18:29:11 -0700 | [diff] [blame] | 476 | .mode_8k = { |
| 477 | .mode = AFE_PCM_CFG_MODE_PCM, |
| 478 | .sync = AFE_PCM_CFG_SYNC_INT, |
| 479 | .frame = AFE_PCM_CFG_FRM_256BPF, |
| 480 | .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD, |
| 481 | .slot = 0, |
| 482 | .data = AFE_PCM_CFG_CDATAOE_MASTER, |
| 483 | .pcm_clk_rate = 2048000, |
| 484 | }, |
| 485 | .mode_16k = { |
| 486 | .mode = AFE_PCM_CFG_MODE_PCM, |
| 487 | .sync = AFE_PCM_CFG_SYNC_INT, |
| 488 | .frame = AFE_PCM_CFG_FRM_256BPF, |
| 489 | .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD, |
| 490 | .slot = 0, |
| 491 | .data = AFE_PCM_CFG_CDATAOE_MASTER, |
| 492 | .pcm_clk_rate = 4096000, |
| 493 | } |
Shiv Maliyappanahalli | 9ec55e9 | 2012-01-09 14:44:59 -0800 | [diff] [blame] | 494 | }; |
| 495 | |
| 496 | struct platform_device msm_cpudai_auxpcm_rx = { |
| 497 | .name = "msm-dai-q6", |
| 498 | .id = 2, |
| 499 | .dev = { |
Shiv Maliyappanahalli | 19e86e2 | 2012-03-28 17:27:26 -0700 | [diff] [blame] | 500 | .platform_data = &auxpcm_pdata, |
Shiv Maliyappanahalli | 9ec55e9 | 2012-01-09 14:44:59 -0800 | [diff] [blame] | 501 | }, |
| 502 | }; |
| 503 | |
| 504 | struct platform_device msm_cpudai_auxpcm_tx = { |
| 505 | .name = "msm-dai-q6", |
| 506 | .id = 3, |
Shiv Maliyappanahalli | 19e86e2 | 2012-03-28 17:27:26 -0700 | [diff] [blame] | 507 | .dev = { |
| 508 | .platform_data = &auxpcm_pdata, |
| 509 | }, |
Shiv Maliyappanahalli | 9ec55e9 | 2012-01-09 14:44:59 -0800 | [diff] [blame] | 510 | }; |
| 511 | |
Shiv Maliyappanahalli | 7f4dec5 | 2012-06-01 16:06:08 -0700 | [diff] [blame] | 512 | struct msm_dai_auxpcm_pdata sec_auxpcm_pdata = { |
| 513 | .clk = "sec_pcm_clk", |
| 514 | .mode_8k = { |
| 515 | .mode = AFE_PCM_CFG_MODE_PCM, |
| 516 | .sync = AFE_PCM_CFG_SYNC_INT, |
| 517 | .frame = AFE_PCM_CFG_FRM_256BPF, |
| 518 | .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD, |
| 519 | .slot = 0, |
| 520 | .data = AFE_PCM_CFG_CDATAOE_MASTER, |
| 521 | .pcm_clk_rate = 2048000, |
| 522 | }, |
| 523 | .mode_16k = { |
| 524 | .mode = AFE_PCM_CFG_MODE_PCM, |
| 525 | .sync = AFE_PCM_CFG_SYNC_INT, |
| 526 | .frame = AFE_PCM_CFG_FRM_256BPF, |
| 527 | .quant = AFE_PCM_CFG_QUANT_LINEAR_NOPAD, |
| 528 | .slot = 0, |
| 529 | .data = AFE_PCM_CFG_CDATAOE_MASTER, |
| 530 | .pcm_clk_rate = 4096000, |
| 531 | } |
| 532 | }; |
| 533 | |
| 534 | struct platform_device msm_cpudai_sec_auxpcm_rx = { |
| 535 | .name = "msm-dai-q6", |
| 536 | .id = 12, |
| 537 | .dev = { |
| 538 | .platform_data = &sec_auxpcm_pdata, |
| 539 | }, |
| 540 | }; |
| 541 | |
| 542 | struct platform_device msm_cpudai_sec_auxpcm_tx = { |
| 543 | .name = "msm-dai-q6", |
| 544 | .id = 13, |
| 545 | .dev = { |
| 546 | .platform_data = &sec_auxpcm_pdata, |
| 547 | }, |
| 548 | }; |
| 549 | |
Shiv Maliyappanahalli | 9ec55e9 | 2012-01-09 14:44:59 -0800 | [diff] [blame] | 550 | struct platform_device msm_cpu_fe = { |
| 551 | .name = "msm-dai-fe", |
| 552 | .id = -1, |
| 553 | }; |
| 554 | |
| 555 | struct platform_device msm_stub_codec = { |
| 556 | .name = "msm-stub-codec", |
| 557 | .id = 1, |
| 558 | }; |
| 559 | |
| 560 | struct platform_device msm_voice = { |
| 561 | .name = "msm-pcm-voice", |
| 562 | .id = -1, |
| 563 | }; |
| 564 | |
Venkat Sudhir | 5efc491 | 2012-05-15 17:10:35 -0700 | [diff] [blame] | 565 | struct platform_device msm_i2s_cpudai0 = { |
| 566 | .name = "msm-dai-q6", |
| 567 | .id = PRIMARY_I2S_RX, |
| 568 | }; |
| 569 | |
| 570 | struct platform_device msm_i2s_cpudai1 = { |
| 571 | .name = "msm-dai-q6", |
| 572 | .id = PRIMARY_I2S_TX, |
| 573 | }; |
Shiv Maliyappanahalli | 9ec55e9 | 2012-01-09 14:44:59 -0800 | [diff] [blame] | 574 | struct platform_device msm_voip = { |
| 575 | .name = "msm-voip-dsp", |
| 576 | .id = -1, |
| 577 | }; |
| 578 | |
| 579 | struct platform_device msm_compr_dsp = { |
| 580 | .name = "msm-compr-dsp", |
| 581 | .id = -1, |
| 582 | }; |
| 583 | |
| 584 | struct platform_device msm_pcm_hostless = { |
| 585 | .name = "msm-pcm-hostless", |
| 586 | .id = -1, |
| 587 | }; |
| 588 | |
| 589 | struct platform_device msm_cpudai_afe_01_rx = { |
| 590 | .name = "msm-dai-q6", |
| 591 | .id = 0xE0, |
| 592 | }; |
| 593 | |
| 594 | struct platform_device msm_cpudai_afe_01_tx = { |
| 595 | .name = "msm-dai-q6", |
| 596 | .id = 0xF0, |
| 597 | }; |
| 598 | |
| 599 | struct platform_device msm_cpudai_afe_02_rx = { |
| 600 | .name = "msm-dai-q6", |
| 601 | .id = 0xF1, |
| 602 | }; |
| 603 | |
| 604 | struct platform_device msm_cpudai_afe_02_tx = { |
| 605 | .name = "msm-dai-q6", |
| 606 | .id = 0xE1, |
| 607 | }; |
| 608 | |
| 609 | struct platform_device msm_pcm_afe = { |
| 610 | .name = "msm-pcm-afe", |
| 611 | .id = -1, |
| 612 | }; |
| 613 | |
Kenneth Heitke | af3d3cf | 2011-09-08 11:45:31 -0700 | [diff] [blame] | 614 | static struct resource resources_ssbi_pmic1[] = { |
| 615 | { |
| 616 | .start = MSM_PMIC1_SSBI_CMD_PHYS, |
| 617 | .end = MSM_PMIC1_SSBI_CMD_PHYS + MSM_PMIC_SSBI_SIZE - 1, |
| 618 | .flags = IORESOURCE_MEM, |
| 619 | }, |
| 620 | }; |
| 621 | |
| 622 | struct platform_device msm9615_device_ssbi_pmic1 = { |
| 623 | .name = "msm_ssbi", |
| 624 | .id = 0, |
| 625 | .resource = resources_ssbi_pmic1, |
| 626 | .num_resources = ARRAY_SIZE(resources_ssbi_pmic1), |
| 627 | }; |
| 628 | |
Yan He | 092b727 | 2011-09-21 15:25:03 -0700 | [diff] [blame] | 629 | static struct resource resources_sps[] = { |
| 630 | { |
| 631 | .name = "pipe_mem", |
| 632 | .start = 0x12800000, |
| 633 | .end = 0x12800000 + 0x4000 - 1, |
| 634 | .flags = IORESOURCE_MEM, |
| 635 | }, |
| 636 | { |
| 637 | .name = "bamdma_dma", |
| 638 | .start = 0x12240000, |
| 639 | .end = 0x12240000 + 0x1000 - 1, |
| 640 | .flags = IORESOURCE_MEM, |
| 641 | }, |
| 642 | { |
| 643 | .name = "bamdma_bam", |
| 644 | .start = 0x12244000, |
| 645 | .end = 0x12244000 + 0x4000 - 1, |
| 646 | .flags = IORESOURCE_MEM, |
| 647 | }, |
| 648 | { |
| 649 | .name = "bamdma_irq", |
| 650 | .start = SPS_BAM_DMA_IRQ, |
| 651 | .end = SPS_BAM_DMA_IRQ, |
| 652 | .flags = IORESOURCE_IRQ, |
| 653 | }, |
| 654 | }; |
| 655 | |
| 656 | struct msm_sps_platform_data msm_sps_pdata = { |
| 657 | .bamdma_restricted_pipes = 0x06, |
| 658 | }; |
| 659 | |
| 660 | struct platform_device msm_device_sps = { |
| 661 | .name = "msm_sps", |
| 662 | .id = -1, |
| 663 | .num_resources = ARRAY_SIZE(resources_sps), |
| 664 | .resource = resources_sps, |
| 665 | .dev.platform_data = &msm_sps_pdata, |
| 666 | }; |
| 667 | |
Sahitya Tummala | 3829543 | 2011-09-29 10:08:45 +0530 | [diff] [blame] | 668 | #define MSM_NAND_PHYS 0x1B400000 |
| 669 | static struct resource resources_nand[] = { |
| 670 | [0] = { |
| 671 | .name = "msm_nand_dmac", |
| 672 | .start = DMOV_NAND_CHAN, |
| 673 | .end = DMOV_NAND_CHAN, |
| 674 | .flags = IORESOURCE_DMA, |
| 675 | }, |
| 676 | [1] = { |
| 677 | .name = "msm_nand_phys", |
| 678 | .start = MSM_NAND_PHYS, |
| 679 | .end = MSM_NAND_PHYS + 0x7FF, |
| 680 | .flags = IORESOURCE_MEM, |
| 681 | }, |
| 682 | }; |
| 683 | |
| 684 | struct flash_platform_data msm_nand_data = { |
Sujit Reddy Thumma | ec9b325 | 2012-04-23 15:53:45 +0530 | [diff] [blame] | 685 | .version = VERSION_2, |
Sahitya Tummala | 3829543 | 2011-09-29 10:08:45 +0530 | [diff] [blame] | 686 | }; |
| 687 | |
| 688 | struct platform_device msm_device_nand = { |
| 689 | .name = "msm_nand", |
| 690 | .id = -1, |
| 691 | .num_resources = ARRAY_SIZE(resources_nand), |
| 692 | .resource = resources_nand, |
Siddartha Mohanadoss | 5d49cec | 2011-09-21 10:26:15 -0700 | [diff] [blame] | 693 | .dev = { |
Sahitya Tummala | 3829543 | 2011-09-29 10:08:45 +0530 | [diff] [blame] | 694 | .platform_data = &msm_nand_data, |
Siddartha Mohanadoss | 5d49cec | 2011-09-21 10:26:15 -0700 | [diff] [blame] | 695 | }, |
| 696 | }; |
| 697 | |
Jeff Hugo | 56b933a | 2011-09-28 14:42:05 -0600 | [diff] [blame] | 698 | struct platform_device msm_device_smd = { |
| 699 | .name = "msm_smd", |
| 700 | .id = -1, |
| 701 | }; |
| 702 | |
Eric Holmberg | 0c96e70 | 2011-11-08 18:04:31 -0700 | [diff] [blame] | 703 | struct platform_device msm_device_bam_dmux = { |
| 704 | .name = "BAM_RMNT", |
| 705 | .id = -1, |
| 706 | }; |
| 707 | |
Ramesh Masavarapu | 5ad3739 | 2011-10-10 10:44:10 -0700 | [diff] [blame] | 708 | #ifdef CONFIG_HW_RANDOM_MSM |
| 709 | /* PRNG device */ |
| 710 | #define MSM_PRNG_PHYS 0x1A500000 |
| 711 | static struct resource rng_resources = { |
| 712 | .flags = IORESOURCE_MEM, |
| 713 | .start = MSM_PRNG_PHYS, |
| 714 | .end = MSM_PRNG_PHYS + SZ_512 - 1, |
| 715 | }; |
| 716 | |
| 717 | struct platform_device msm_device_rng = { |
| 718 | .name = "msm_rng", |
| 719 | .id = 0, |
| 720 | .num_resources = 1, |
| 721 | .resource = &rng_resources, |
| 722 | }; |
| 723 | #endif |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 724 | |
Ramesh Masavarapu | aa28b5b | 2011-10-21 10:26:03 -0700 | [diff] [blame] | 725 | #if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \ |
| 726 | defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE) || \ |
| 727 | defined(CONFIG_CRYPTO_DEV_QCEDEV) || \ |
| 728 | defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE) |
| 729 | |
| 730 | #define QCE_SIZE 0x10000 |
| 731 | #define QCE_0_BASE 0x18500000 |
| 732 | |
| 733 | #define QCE_HW_KEY_SUPPORT 0 |
| 734 | #define QCE_SHA_HMAC_SUPPORT 1 |
| 735 | #define QCE_SHARE_CE_RESOURCE 1 |
| 736 | #define QCE_CE_SHARED 0 |
| 737 | |
| 738 | static struct resource qcrypto_resources[] = { |
| 739 | [0] = { |
| 740 | .start = QCE_0_BASE, |
| 741 | .end = QCE_0_BASE + QCE_SIZE - 1, |
| 742 | .flags = IORESOURCE_MEM, |
| 743 | }, |
| 744 | [1] = { |
| 745 | .name = "crypto_channels", |
| 746 | .start = DMOV_CE_IN_CHAN, |
| 747 | .end = DMOV_CE_OUT_CHAN, |
| 748 | .flags = IORESOURCE_DMA, |
| 749 | }, |
| 750 | [2] = { |
| 751 | .name = "crypto_crci_in", |
| 752 | .start = DMOV_CE_IN_CRCI, |
| 753 | .end = DMOV_CE_IN_CRCI, |
| 754 | .flags = IORESOURCE_DMA, |
| 755 | }, |
| 756 | [3] = { |
| 757 | .name = "crypto_crci_out", |
| 758 | .start = DMOV_CE_OUT_CRCI, |
| 759 | .end = DMOV_CE_OUT_CRCI, |
| 760 | .flags = IORESOURCE_DMA, |
| 761 | }, |
| 762 | }; |
| 763 | |
| 764 | static struct resource qcedev_resources[] = { |
| 765 | [0] = { |
| 766 | .start = QCE_0_BASE, |
| 767 | .end = QCE_0_BASE + QCE_SIZE - 1, |
| 768 | .flags = IORESOURCE_MEM, |
| 769 | }, |
| 770 | [1] = { |
| 771 | .name = "crypto_channels", |
| 772 | .start = DMOV_CE_IN_CHAN, |
| 773 | .end = DMOV_CE_OUT_CHAN, |
| 774 | .flags = IORESOURCE_DMA, |
| 775 | }, |
| 776 | [2] = { |
| 777 | .name = "crypto_crci_in", |
| 778 | .start = DMOV_CE_IN_CRCI, |
| 779 | .end = DMOV_CE_IN_CRCI, |
| 780 | .flags = IORESOURCE_DMA, |
| 781 | }, |
| 782 | [3] = { |
| 783 | .name = "crypto_crci_out", |
| 784 | .start = DMOV_CE_OUT_CRCI, |
| 785 | .end = DMOV_CE_OUT_CRCI, |
| 786 | .flags = IORESOURCE_DMA, |
| 787 | }, |
| 788 | }; |
| 789 | |
| 790 | #endif |
| 791 | |
| 792 | #if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \ |
| 793 | defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE) |
| 794 | |
| 795 | static struct msm_ce_hw_support qcrypto_ce_hw_suppport = { |
| 796 | .ce_shared = QCE_CE_SHARED, |
| 797 | .shared_ce_resource = QCE_SHARE_CE_RESOURCE, |
| 798 | .hw_key_support = QCE_HW_KEY_SUPPORT, |
| 799 | .sha_hmac = QCE_SHA_HMAC_SUPPORT, |
Ramesh Masavarapu | 4925968 | 2011-12-02 14:00:18 -0800 | [diff] [blame] | 800 | .bus_scale_table = NULL, |
Ramesh Masavarapu | aa28b5b | 2011-10-21 10:26:03 -0700 | [diff] [blame] | 801 | }; |
| 802 | |
| 803 | struct platform_device msm9615_qcrypto_device = { |
| 804 | .name = "qcrypto", |
| 805 | .id = 0, |
| 806 | .num_resources = ARRAY_SIZE(qcrypto_resources), |
| 807 | .resource = qcrypto_resources, |
| 808 | .dev = { |
| 809 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 810 | .platform_data = &qcrypto_ce_hw_suppport, |
| 811 | }, |
| 812 | }; |
| 813 | #endif |
| 814 | |
| 815 | #if defined(CONFIG_CRYPTO_DEV_QCEDEV) || \ |
| 816 | defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE) |
| 817 | |
| 818 | static struct msm_ce_hw_support qcedev_ce_hw_suppport = { |
| 819 | .ce_shared = QCE_CE_SHARED, |
| 820 | .shared_ce_resource = QCE_SHARE_CE_RESOURCE, |
| 821 | .hw_key_support = QCE_HW_KEY_SUPPORT, |
| 822 | .sha_hmac = QCE_SHA_HMAC_SUPPORT, |
Ramesh Masavarapu | 4925968 | 2011-12-02 14:00:18 -0800 | [diff] [blame] | 823 | .bus_scale_table = NULL, |
Ramesh Masavarapu | aa28b5b | 2011-10-21 10:26:03 -0700 | [diff] [blame] | 824 | }; |
| 825 | |
| 826 | struct platform_device msm9615_qcedev_device = { |
| 827 | .name = "qce", |
| 828 | .id = 0, |
| 829 | .num_resources = ARRAY_SIZE(qcedev_resources), |
| 830 | .resource = qcedev_resources, |
| 831 | .dev = { |
| 832 | .coherent_dma_mask = DMA_BIT_MASK(32), |
| 833 | .platform_data = &qcedev_ce_hw_suppport, |
| 834 | }, |
| 835 | }; |
| 836 | #endif |
| 837 | |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 838 | #define MSM_SDC1_BASE 0x12180000 |
| 839 | #define MSM_SDC1_DML_BASE (MSM_SDC1_BASE + 0x800) |
| 840 | #define MSM_SDC1_BAM_BASE (MSM_SDC1_BASE + 0x2000) |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 841 | #define MSM_SDC2_BASE 0x12140000 |
| 842 | #define MSM_SDC2_DML_BASE (MSM_SDC2_BASE + 0x800) |
| 843 | #define MSM_SDC2_BAM_BASE (MSM_SDC2_BASE + 0x2000) |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 844 | |
| 845 | static struct resource resources_sdc1[] = { |
| 846 | { |
| 847 | .name = "core_mem", |
| 848 | .flags = IORESOURCE_MEM, |
| 849 | .start = MSM_SDC1_BASE, |
| 850 | .end = MSM_SDC1_DML_BASE - 1, |
| 851 | }, |
| 852 | { |
| 853 | .name = "core_irq", |
| 854 | .flags = IORESOURCE_IRQ, |
| 855 | .start = SDC1_IRQ_0, |
| 856 | .end = SDC1_IRQ_0 |
| 857 | }, |
| 858 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 859 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 860 | .name = "dml_mem", |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 861 | .start = MSM_SDC1_DML_BASE, |
| 862 | .end = MSM_SDC1_BAM_BASE - 1, |
| 863 | .flags = IORESOURCE_MEM, |
| 864 | }, |
| 865 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 866 | .name = "bam_mem", |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 867 | .start = MSM_SDC1_BAM_BASE, |
| 868 | .end = MSM_SDC1_BAM_BASE + (2 * SZ_4K) - 1, |
| 869 | .flags = IORESOURCE_MEM, |
| 870 | }, |
| 871 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 872 | .name = "bam_irq", |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 873 | .start = SDC1_BAM_IRQ, |
| 874 | .end = SDC1_BAM_IRQ, |
| 875 | .flags = IORESOURCE_IRQ, |
| 876 | }, |
| 877 | #endif |
| 878 | }; |
| 879 | |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 880 | static struct resource resources_sdc2[] = { |
| 881 | { |
| 882 | .name = "core_mem", |
| 883 | .flags = IORESOURCE_MEM, |
| 884 | .start = MSM_SDC2_BASE, |
| 885 | .end = MSM_SDC2_DML_BASE - 1, |
| 886 | }, |
| 887 | { |
| 888 | .name = "core_irq", |
| 889 | .flags = IORESOURCE_IRQ, |
| 890 | .start = SDC2_IRQ_0, |
| 891 | .end = SDC2_IRQ_0 |
| 892 | }, |
| 893 | #ifdef CONFIG_MMC_MSM_SPS_SUPPORT |
| 894 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 895 | .name = "dml_mem", |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 896 | .start = MSM_SDC2_DML_BASE, |
| 897 | .end = MSM_SDC2_BAM_BASE - 1, |
| 898 | .flags = IORESOURCE_MEM, |
| 899 | }, |
| 900 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 901 | .name = "bam_mem", |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 902 | .start = MSM_SDC2_BAM_BASE, |
| 903 | .end = MSM_SDC2_BAM_BASE + (2 * SZ_4K) - 1, |
| 904 | .flags = IORESOURCE_MEM, |
| 905 | }, |
| 906 | { |
Sujit Reddy Thumma | 1dfac2c | 2012-07-30 10:15:39 +0530 | [diff] [blame] | 907 | .name = "bam_irq", |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 908 | .start = SDC2_BAM_IRQ, |
| 909 | .end = SDC2_BAM_IRQ, |
| 910 | .flags = IORESOURCE_IRQ, |
| 911 | }, |
| 912 | #endif |
| 913 | }; |
| 914 | |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 915 | struct platform_device msm_device_sdc1 = { |
| 916 | .name = "msm_sdcc", |
| 917 | .id = 1, |
| 918 | .num_resources = ARRAY_SIZE(resources_sdc1), |
| 919 | .resource = resources_sdc1, |
| 920 | .dev = { |
| 921 | .coherent_dma_mask = 0xffffffff, |
| 922 | }, |
| 923 | }; |
| 924 | |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 925 | struct platform_device msm_device_sdc2 = { |
| 926 | .name = "msm_sdcc", |
| 927 | .id = 2, |
| 928 | .num_resources = ARRAY_SIZE(resources_sdc2), |
| 929 | .resource = resources_sdc2, |
| 930 | .dev = { |
| 931 | .coherent_dma_mask = 0xffffffff, |
| 932 | }, |
| 933 | }; |
| 934 | |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 935 | static struct platform_device *msm_sdcc_devices[] __initdata = { |
| 936 | &msm_device_sdc1, |
Krishna Konda | 71aef18 | 2011-10-01 02:27:51 -0700 | [diff] [blame] | 937 | &msm_device_sdc2, |
Krishna Konda | dd79446 | 2011-10-01 00:19:29 -0700 | [diff] [blame] | 938 | }; |
| 939 | |
| 940 | int __init msm_add_sdcc(unsigned int controller, struct mmc_platform_data *plat) |
| 941 | { |
| 942 | struct platform_device *pdev; |
| 943 | |
| 944 | if (controller < 1 || controller > 2) |
| 945 | return -EINVAL; |
| 946 | |
| 947 | pdev = msm_sdcc_devices[controller - 1]; |
| 948 | pdev->dev.platform_data = plat; |
| 949 | return platform_device_register(pdev); |
| 950 | } |
| 951 | |
Zhang Chang Ken | c2f2bcc | 2012-03-30 18:32:02 -0400 | [diff] [blame] | 952 | #ifdef CONFIG_FB_MSM_EBI2 |
| 953 | static struct resource msm_ebi2_lcdc_resources[] = { |
| 954 | { |
| 955 | .name = "base", |
| 956 | .start = 0x1B300000, |
| 957 | .end = 0x1B300000 + PAGE_SIZE - 1, |
| 958 | .flags = IORESOURCE_MEM, |
| 959 | }, |
| 960 | { |
| 961 | .name = "lcd01", |
| 962 | .start = 0x1FC00000, |
| 963 | .end = 0x1FC00000 + 0x80000 - 1, |
| 964 | .flags = IORESOURCE_MEM, |
| 965 | }, |
| 966 | }; |
| 967 | |
| 968 | struct platform_device msm_ebi2_lcdc_device = { |
| 969 | .name = "ebi2_lcd", |
| 970 | .id = 0, |
| 971 | .num_resources = ARRAY_SIZE(msm_ebi2_lcdc_resources), |
| 972 | .resource = msm_ebi2_lcdc_resources, |
| 973 | }; |
| 974 | #endif |
| 975 | |
Rohit Vaswani | f0ce9ae | 2011-08-23 22:18:38 -0700 | [diff] [blame] | 976 | #ifdef CONFIG_CACHE_L2X0 |
| 977 | static int __init l2x0_cache_init(void) |
| 978 | { |
| 979 | int aux_ctrl = 0; |
| 980 | |
| 981 | /* Way Size 010(0x2) 32KB */ |
| 982 | aux_ctrl = (0x1 << L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT) | \ |
| 983 | (0x2 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT) | \ |
| 984 | (0x1 << L2X0_AUX_CTRL_EVNT_MON_BUS_EN_SHIFT); |
| 985 | |
| 986 | /* L2 Latency setting required by hardware. Default is 0x20 |
| 987 | which is no good. |
| 988 | */ |
| 989 | writel_relaxed(0x220, MSM_L2CC_BASE + L2X0_DATA_LATENCY_CTRL); |
| 990 | l2x0_init(MSM_L2CC_BASE, aux_ctrl, L2X0_AUX_CTRL_MASK); |
| 991 | |
| 992 | return 0; |
| 993 | } |
| 994 | #else |
| 995 | static int __init l2x0_cache_init(void){ return 0; } |
| 996 | #endif |
| 997 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 998 | struct msm_rpm_platform_data msm9615_rpm_data __initdata = { |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 999 | .reg_base_addrs = { |
| 1000 | [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE, |
| 1001 | [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400, |
| 1002 | [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600, |
| 1003 | [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00, |
| 1004 | }, |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 1005 | .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ, |
Stephen Boyd | f61255e | 2012-02-24 14:31:09 -0800 | [diff] [blame] | 1006 | .irq_err = RPM_APCC_CPU0_GP_LOW_IRQ, |
Praveen Chidambaram | e396ce6 | 2012-03-30 11:15:57 -0600 | [diff] [blame] | 1007 | .irq_wakeup = RPM_APCC_CPU0_WAKE_UP_IRQ, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1008 | .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008, |
| 1009 | .ipc_rpm_val = 4, |
| 1010 | .target_id = { |
| 1011 | MSM_RPM_MAP(9615, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4), |
| 1012 | MSM_RPM_MAP(9615, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4), |
| 1013 | MSM_RPM_MAP(9615, INVALIDATE_0, INVALIDATE, 8), |
| 1014 | MSM_RPM_MAP(9615, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1), |
| 1015 | MSM_RPM_MAP(9615, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1), |
| 1016 | MSM_RPM_MAP(9615, RPM_CTL, RPM_CTL, 1), |
| 1017 | MSM_RPM_MAP(9615, CXO_CLK, CXO_CLK, 1), |
| 1018 | MSM_RPM_MAP(9615, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1), |
| 1019 | MSM_RPM_MAP(9615, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1), |
| 1020 | MSM_RPM_MAP(9615, SFPB_CLK, SFPB_CLK, 1), |
| 1021 | MSM_RPM_MAP(9615, CFPB_CLK, CFPB_CLK, 1), |
| 1022 | MSM_RPM_MAP(9615, EBI1_CLK, EBI1_CLK, 1), |
| 1023 | MSM_RPM_MAP(9615, SYS_FABRIC_CFG_HALT_0, |
| 1024 | SYS_FABRIC_CFG_HALT, 2), |
| 1025 | MSM_RPM_MAP(9615, SYS_FABRIC_CFG_CLKMOD_0, |
| 1026 | SYS_FABRIC_CFG_CLKMOD, 3), |
| 1027 | MSM_RPM_MAP(9615, SYS_FABRIC_CFG_IOCTL, |
| 1028 | SYS_FABRIC_CFG_IOCTL, 1), |
| 1029 | MSM_RPM_MAP(9615, SYSTEM_FABRIC_ARB_0, |
| 1030 | SYSTEM_FABRIC_ARB, 27), |
| 1031 | MSM_RPM_MAP(9615, PM8018_S1_0, PM8018_S1, 2), |
| 1032 | MSM_RPM_MAP(9615, PM8018_S2_0, PM8018_S2, 2), |
| 1033 | MSM_RPM_MAP(9615, PM8018_S3_0, PM8018_S3, 2), |
| 1034 | MSM_RPM_MAP(9615, PM8018_S4_0, PM8018_S4, 2), |
| 1035 | MSM_RPM_MAP(9615, PM8018_S5_0, PM8018_S5, 2), |
| 1036 | MSM_RPM_MAP(9615, PM8018_L1_0, PM8018_L1, 2), |
| 1037 | MSM_RPM_MAP(9615, PM8018_L2_0, PM8018_L2, 2), |
| 1038 | MSM_RPM_MAP(9615, PM8018_L3_0, PM8018_L3, 2), |
| 1039 | MSM_RPM_MAP(9615, PM8018_L4_0, PM8018_L4, 2), |
| 1040 | MSM_RPM_MAP(9615, PM8018_L5_0, PM8018_L5, 2), |
| 1041 | MSM_RPM_MAP(9615, PM8018_L6_0, PM8018_L6, 2), |
| 1042 | MSM_RPM_MAP(9615, PM8018_L7_0, PM8018_L7, 2), |
| 1043 | MSM_RPM_MAP(9615, PM8018_L8_0, PM8018_L8, 2), |
| 1044 | MSM_RPM_MAP(9615, PM8018_L9_0, PM8018_L9, 2), |
| 1045 | MSM_RPM_MAP(9615, PM8018_L10_0, PM8018_L10, 2), |
| 1046 | MSM_RPM_MAP(9615, PM8018_L11_0, PM8018_L11, 2), |
| 1047 | MSM_RPM_MAP(9615, PM8018_L12_0, PM8018_L12, 2), |
| 1048 | MSM_RPM_MAP(9615, PM8018_L13_0, PM8018_L13, 2), |
| 1049 | MSM_RPM_MAP(9615, PM8018_L14_0, PM8018_L14, 2), |
| 1050 | MSM_RPM_MAP(9615, PM8018_LVS1, PM8018_LVS1, 1), |
| 1051 | MSM_RPM_MAP(9615, NCP_0, NCP, 2), |
| 1052 | MSM_RPM_MAP(9615, CXO_BUFFERS, CXO_BUFFERS, 1), |
| 1053 | MSM_RPM_MAP(9615, USB_OTG_SWITCH, USB_OTG_SWITCH, 1), |
| 1054 | MSM_RPM_MAP(9615, HDMI_SWITCH, HDMI_SWITCH, 1), |
Mahesh Sivasubramanian | 36f361b | 2012-02-01 16:00:19 -0700 | [diff] [blame] | 1055 | MSM_RPM_MAP(9615, VOLTAGE_CORNER, VOLTAGE_CORNER, 1), |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1056 | }, |
| 1057 | .target_status = { |
| 1058 | MSM_RPM_STATUS_ID_MAP(9615, VERSION_MAJOR), |
| 1059 | MSM_RPM_STATUS_ID_MAP(9615, VERSION_MINOR), |
| 1060 | MSM_RPM_STATUS_ID_MAP(9615, VERSION_BUILD), |
| 1061 | MSM_RPM_STATUS_ID_MAP(9615, SUPPORTED_RESOURCES_0), |
| 1062 | MSM_RPM_STATUS_ID_MAP(9615, SUPPORTED_RESOURCES_1), |
| 1063 | MSM_RPM_STATUS_ID_MAP(9615, SUPPORTED_RESOURCES_2), |
| 1064 | MSM_RPM_STATUS_ID_MAP(9615, RESERVED_SUPPORTED_RESOURCES_0), |
| 1065 | MSM_RPM_STATUS_ID_MAP(9615, SEQUENCE), |
| 1066 | MSM_RPM_STATUS_ID_MAP(9615, RPM_CTL), |
| 1067 | MSM_RPM_STATUS_ID_MAP(9615, CXO_CLK), |
| 1068 | MSM_RPM_STATUS_ID_MAP(9615, SYSTEM_FABRIC_CLK), |
| 1069 | MSM_RPM_STATUS_ID_MAP(9615, DAYTONA_FABRIC_CLK), |
| 1070 | MSM_RPM_STATUS_ID_MAP(9615, SFPB_CLK), |
| 1071 | MSM_RPM_STATUS_ID_MAP(9615, CFPB_CLK), |
| 1072 | MSM_RPM_STATUS_ID_MAP(9615, EBI1_CLK), |
| 1073 | MSM_RPM_STATUS_ID_MAP(9615, SYS_FABRIC_CFG_HALT), |
| 1074 | MSM_RPM_STATUS_ID_MAP(9615, SYS_FABRIC_CFG_CLKMOD), |
| 1075 | MSM_RPM_STATUS_ID_MAP(9615, SYS_FABRIC_CFG_IOCTL), |
| 1076 | MSM_RPM_STATUS_ID_MAP(9615, SYSTEM_FABRIC_ARB), |
| 1077 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_S1_0), |
| 1078 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_S1_1), |
| 1079 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_S2_0), |
| 1080 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_S2_1), |
| 1081 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_S3_0), |
| 1082 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_S3_1), |
| 1083 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_S4_0), |
| 1084 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_S4_1), |
| 1085 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_S5_0), |
| 1086 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_S5_1), |
| 1087 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L1_0), |
| 1088 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L1_1), |
| 1089 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L2_0), |
| 1090 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L2_1), |
| 1091 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L3_0), |
| 1092 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L3_1), |
| 1093 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L4_0), |
| 1094 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L4_1), |
| 1095 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L5_0), |
| 1096 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L5_1), |
| 1097 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L6_0), |
| 1098 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L6_1), |
| 1099 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L7_0), |
| 1100 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L7_1), |
| 1101 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L8_0), |
| 1102 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L8_1), |
| 1103 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L9_0), |
| 1104 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L9_1), |
| 1105 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L10_0), |
| 1106 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L10_1), |
| 1107 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L11_0), |
| 1108 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L11_1), |
| 1109 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L12_0), |
| 1110 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L12_1), |
| 1111 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L13_0), |
| 1112 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L13_1), |
| 1113 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L14_0), |
| 1114 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_L14_1), |
| 1115 | MSM_RPM_STATUS_ID_MAP(9615, PM8018_LVS1), |
| 1116 | MSM_RPM_STATUS_ID_MAP(9615, NCP_0), |
| 1117 | MSM_RPM_STATUS_ID_MAP(9615, NCP_1), |
| 1118 | MSM_RPM_STATUS_ID_MAP(9615, CXO_BUFFERS), |
| 1119 | MSM_RPM_STATUS_ID_MAP(9615, USB_OTG_SWITCH), |
| 1120 | MSM_RPM_STATUS_ID_MAP(9615, HDMI_SWITCH), |
Mahesh Sivasubramanian | 36f361b | 2012-02-01 16:00:19 -0700 | [diff] [blame] | 1121 | MSM_RPM_STATUS_ID_MAP(9615, VOLTAGE_CORNER), |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1122 | }, |
| 1123 | .target_ctrl_id = { |
| 1124 | MSM_RPM_CTRL_MAP(9615, VERSION_MAJOR), |
| 1125 | MSM_RPM_CTRL_MAP(9615, VERSION_MINOR), |
| 1126 | MSM_RPM_CTRL_MAP(9615, VERSION_BUILD), |
| 1127 | MSM_RPM_CTRL_MAP(9615, REQ_CTX_0), |
| 1128 | MSM_RPM_CTRL_MAP(9615, REQ_SEL_0), |
| 1129 | MSM_RPM_CTRL_MAP(9615, ACK_CTX_0), |
| 1130 | MSM_RPM_CTRL_MAP(9615, ACK_SEL_0), |
| 1131 | }, |
| 1132 | .sel_invalidate = MSM_RPM_9615_SEL_INVALIDATE, |
| 1133 | .sel_notification = MSM_RPM_9615_SEL_NOTIFICATION, |
| 1134 | .sel_last = MSM_RPM_9615_SEL_LAST, |
| 1135 | .ver = {3, 0, 0}, |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 1136 | }; |
| 1137 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1138 | struct platform_device msm9615_rpm_device = { |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 1139 | .name = "msm_rpm", |
| 1140 | .id = -1, |
| 1141 | }; |
| 1142 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1143 | static uint16_t msm_mpm_irqs_m2a[MSM_MPM_NR_MPM_IRQS] __initdata = { |
Maheshkumar Sivasubramanian | 9745083 | 2011-10-31 12:27:25 -0600 | [diff] [blame] | 1144 | [4] = MSM_GPIO_TO_INT(30), |
| 1145 | [5] = MSM_GPIO_TO_INT(59), |
| 1146 | [6] = MSM_GPIO_TO_INT(81), |
| 1147 | [7] = MSM_GPIO_TO_INT(87), |
| 1148 | [8] = MSM_GPIO_TO_INT(86), |
| 1149 | [9] = MSM_GPIO_TO_INT(2), |
| 1150 | [10] = MSM_GPIO_TO_INT(6), |
| 1151 | [11] = MSM_GPIO_TO_INT(10), |
| 1152 | [12] = MSM_GPIO_TO_INT(14), |
| 1153 | [13] = MSM_GPIO_TO_INT(18), |
| 1154 | [14] = MSM_GPIO_TO_INT(7), |
| 1155 | [15] = MSM_GPIO_TO_INT(11), |
| 1156 | [16] = MSM_GPIO_TO_INT(15), |
| 1157 | [19] = MSM_GPIO_TO_INT(26), |
| 1158 | [20] = MSM_GPIO_TO_INT(28), |
Ofir Cohen | dca06cb | 2012-03-08 16:37:45 +0200 | [diff] [blame] | 1159 | [22] = USB_HSIC_IRQ, |
Maheshkumar Sivasubramanian | 9745083 | 2011-10-31 12:27:25 -0600 | [diff] [blame] | 1160 | [23] = MSM_GPIO_TO_INT(19), |
| 1161 | [24] = MSM_GPIO_TO_INT(23), |
Maheshkumar Sivasubramanian | 9745083 | 2011-10-31 12:27:25 -0600 | [diff] [blame] | 1162 | [26] = MSM_GPIO_TO_INT(3), |
| 1163 | [27] = MSM_GPIO_TO_INT(68), |
| 1164 | [29] = MSM_GPIO_TO_INT(78), |
| 1165 | [31] = MSM_GPIO_TO_INT(0), |
| 1166 | [32] = MSM_GPIO_TO_INT(4), |
| 1167 | [33] = MSM_GPIO_TO_INT(22), |
| 1168 | [34] = MSM_GPIO_TO_INT(17), |
| 1169 | [37] = MSM_GPIO_TO_INT(20), |
| 1170 | [39] = MSM_GPIO_TO_INT(84), |
Mahesh Sivasubramanian | 4ce8218 | 2012-01-04 14:34:42 -0700 | [diff] [blame] | 1171 | [40] = USB1_HS_IRQ, |
Maheshkumar Sivasubramanian | 9745083 | 2011-10-31 12:27:25 -0600 | [diff] [blame] | 1172 | [42] = MSM_GPIO_TO_INT(24), |
| 1173 | [43] = MSM_GPIO_TO_INT(79), |
| 1174 | [44] = MSM_GPIO_TO_INT(80), |
| 1175 | [45] = MSM_GPIO_TO_INT(82), |
| 1176 | [46] = MSM_GPIO_TO_INT(85), |
| 1177 | [47] = MSM_GPIO_TO_INT(45), |
| 1178 | [48] = MSM_GPIO_TO_INT(50), |
| 1179 | [49] = MSM_GPIO_TO_INT(51), |
| 1180 | [50] = MSM_GPIO_TO_INT(69), |
| 1181 | [51] = MSM_GPIO_TO_INT(77), |
| 1182 | [52] = MSM_GPIO_TO_INT(1), |
| 1183 | [53] = MSM_GPIO_TO_INT(5), |
| 1184 | [54] = MSM_GPIO_TO_INT(40), |
| 1185 | [55] = MSM_GPIO_TO_INT(27), |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 1186 | }; |
| 1187 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1188 | static uint16_t msm_mpm_bypassed_apps_irqs[] __initdata = { |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 1189 | TLMM_MSM_SUMMARY_IRQ, |
| 1190 | RPM_APCC_CPU0_GP_HIGH_IRQ, |
| 1191 | RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
| 1192 | RPM_APCC_CPU0_GP_LOW_IRQ, |
| 1193 | RPM_APCC_CPU0_WAKE_UP_IRQ, |
Mahesh Sivasubramanian | dbf2bb6 | 2011-12-12 16:03:40 -0700 | [diff] [blame] | 1194 | MSS_TO_APPS_IRQ_0, |
| 1195 | MSS_TO_APPS_IRQ_1, |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 1196 | LPASS_SCSS_GP_LOW_IRQ, |
| 1197 | LPASS_SCSS_GP_MEDIUM_IRQ, |
| 1198 | LPASS_SCSS_GP_HIGH_IRQ, |
| 1199 | SPS_MTI_31, |
Mahesh Sivasubramanian | dbf2bb6 | 2011-12-12 16:03:40 -0700 | [diff] [blame] | 1200 | A2_BAM_IRQ, |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 1201 | }; |
| 1202 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1203 | struct msm_mpm_device_data msm9615_mpm_dev_data __initdata = { |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 1204 | .irqs_m2a = msm_mpm_irqs_m2a, |
| 1205 | .irqs_m2a_size = ARRAY_SIZE(msm_mpm_irqs_m2a), |
| 1206 | .bypassed_apps_irqs = msm_mpm_bypassed_apps_irqs, |
| 1207 | .bypassed_apps_irqs_size = ARRAY_SIZE(msm_mpm_bypassed_apps_irqs), |
| 1208 | .mpm_request_reg_base = MSM_RPM_BASE + 0x9d8, |
| 1209 | .mpm_status_reg_base = MSM_RPM_BASE + 0xdf8, |
| 1210 | .mpm_apps_ipc_reg = MSM_APCS_GCC_BASE + 0x008, |
| 1211 | .mpm_apps_ipc_val = BIT(1), |
| 1212 | .mpm_ipc_irq = RPM_APCC_CPU0_GP_MEDIUM_IRQ, |
Maheshkumar Sivasubramanian | f07bd0b | 2011-09-06 17:33:17 -0600 | [diff] [blame] | 1213 | }; |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 1214 | |
Maheshkumar Sivasubramanian | f07bd0b | 2011-09-06 17:33:17 -0600 | [diff] [blame] | 1215 | static uint8_t spm_wfi_cmd_sequence[] __initdata = { |
Maheshkumar Sivasubramanian | 343c991 | 2011-10-17 11:00:33 -0600 | [diff] [blame] | 1216 | 0x00, 0x03, 0x00, 0x0f, |
Maheshkumar Sivasubramanian | f07bd0b | 2011-09-06 17:33:17 -0600 | [diff] [blame] | 1217 | }; |
| 1218 | |
| 1219 | static uint8_t spm_power_collapse_without_rpm[] __initdata = { |
Maheshkumar Sivasubramanian | 343c991 | 2011-10-17 11:00:33 -0600 | [diff] [blame] | 1220 | 0x34, 0x24, 0x14, 0x04, |
| 1221 | 0x54, 0x03, 0x54, 0x04, |
| 1222 | 0x14, 0x24, 0x3e, 0x0f, |
Maheshkumar Sivasubramanian | f07bd0b | 2011-09-06 17:33:17 -0600 | [diff] [blame] | 1223 | }; |
| 1224 | |
| 1225 | static uint8_t spm_power_collapse_with_rpm[] __initdata = { |
Maheshkumar Sivasubramanian | 343c991 | 2011-10-17 11:00:33 -0600 | [diff] [blame] | 1226 | 0x34, 0x24, 0x14, 0x04, |
| 1227 | 0x54, 0x07, 0x54, 0x04, |
| 1228 | 0x14, 0x24, 0x3e, 0x0f, |
Maheshkumar Sivasubramanian | f07bd0b | 2011-09-06 17:33:17 -0600 | [diff] [blame] | 1229 | }; |
| 1230 | |
| 1231 | static struct msm_spm_seq_entry msm_spm_seq_list[] __initdata = { |
| 1232 | [0] = { |
| 1233 | .mode = MSM_SPM_MODE_CLOCK_GATING, |
| 1234 | .notify_rpm = false, |
| 1235 | .cmd = spm_wfi_cmd_sequence, |
| 1236 | }, |
| 1237 | [1] = { |
| 1238 | .mode = MSM_SPM_MODE_POWER_COLLAPSE, |
| 1239 | .notify_rpm = false, |
| 1240 | .cmd = spm_power_collapse_without_rpm, |
| 1241 | }, |
| 1242 | [2] = { |
| 1243 | .mode = MSM_SPM_MODE_POWER_COLLAPSE, |
| 1244 | .notify_rpm = true, |
| 1245 | .cmd = spm_power_collapse_with_rpm, |
| 1246 | }, |
| 1247 | }; |
| 1248 | |
| 1249 | static struct msm_spm_platform_data msm_spm_data[] __initdata = { |
| 1250 | [0] = { |
| 1251 | .reg_base_addr = MSM_SAW0_BASE, |
| 1252 | .reg_init_values[MSM_SPM_REG_SAW2_SPM_CTL] = 0x01, |
Maheshkumar Sivasubramanian | 343c991 | 2011-10-17 11:00:33 -0600 | [diff] [blame] | 1253 | .reg_init_values[MSM_SPM_REG_SAW2_CFG] = 0x1001, |
Maheshkumar Sivasubramanian | f07bd0b | 2011-09-06 17:33:17 -0600 | [diff] [blame] | 1254 | .num_modes = ARRAY_SIZE(msm_spm_seq_list), |
| 1255 | .modes = msm_spm_seq_list, |
| 1256 | }, |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 1257 | }; |
| 1258 | |
| 1259 | static struct msm_rpmrs_level msm_rpmrs_levels[] __initdata = { |
| 1260 | { |
| 1261 | MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT, |
| 1262 | MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), |
| 1263 | true, |
Maheshkumar Sivasubramanian | 634e4f6 | 2011-10-17 15:49:11 -0600 | [diff] [blame] | 1264 | 100, 8000, 100000, 1, |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 1265 | }, |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 1266 | { |
| 1267 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE, |
| 1268 | MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), |
| 1269 | true, |
Maheshkumar Sivasubramanian | 634e4f6 | 2011-10-17 15:49:11 -0600 | [diff] [blame] | 1270 | 2000, 5000, 60100000, 3000, |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 1271 | }, |
| 1272 | { |
| 1273 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1274 | MSM_RPMRS_LIMITS(ON, ACTIVE, MAX, ACTIVE), |
| 1275 | false, |
Maheshkumar Sivasubramanian | 634e4f6 | 2011-10-17 15:49:11 -0600 | [diff] [blame] | 1276 | 6300, 5000, 60350000, 3500, |
| 1277 | }, |
| 1278 | { |
| 1279 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1280 | MSM_RPMRS_LIMITS(OFF, HSFS_OPEN, MAX, ACTIVE), |
| 1281 | false, |
| 1282 | 13300, 2000, 71850000, 6800, |
| 1283 | }, |
| 1284 | { |
| 1285 | MSM_PM_SLEEP_MODE_POWER_COLLAPSE, |
| 1286 | MSM_RPMRS_LIMITS(OFF, HSFS_OPEN, RET_HIGH, RET_LOW), |
| 1287 | false, |
| 1288 | 28300, 0, 76350000, 9800, |
Praveen Chidambaram | ab3b1c4 | 2011-08-25 08:44:05 -0600 | [diff] [blame] | 1289 | }, |
| 1290 | }; |
| 1291 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1292 | static struct msm_rpmrs_platform_data msm_rpmrs_data __initdata = { |
| 1293 | .levels = &msm_rpmrs_levels[0], |
| 1294 | .num_levels = ARRAY_SIZE(msm_rpmrs_levels), |
| 1295 | .vdd_mem_levels = { |
| 1296 | [MSM_RPMRS_VDD_MEM_RET_LOW] = 750000, |
| 1297 | [MSM_RPMRS_VDD_MEM_RET_HIGH] = 750000, |
| 1298 | [MSM_RPMRS_VDD_MEM_ACTIVE] = 1050000, |
| 1299 | [MSM_RPMRS_VDD_MEM_MAX] = 1150000, |
| 1300 | }, |
| 1301 | .vdd_dig_levels = { |
Mahesh Sivasubramanian | 66768b9 | 2012-05-21 11:52:04 -0600 | [diff] [blame] | 1302 | [MSM_RPMRS_VDD_DIG_RET_LOW] = 0, |
| 1303 | [MSM_RPMRS_VDD_DIG_RET_HIGH] = 0, |
| 1304 | [MSM_RPMRS_VDD_DIG_ACTIVE] = 1, |
| 1305 | [MSM_RPMRS_VDD_DIG_MAX] = 3, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1306 | }, |
| 1307 | .vdd_mask = 0x7FFFFF, |
| 1308 | .rpmrs_target_id = { |
| 1309 | [MSM_RPMRS_ID_PXO_CLK] = MSM_RPM_ID_CXO_CLK, |
| 1310 | [MSM_RPMRS_ID_L2_CACHE_CTL] = MSM_RPM_ID_LAST, |
Mahesh Sivasubramanian | 66768b9 | 2012-05-21 11:52:04 -0600 | [diff] [blame] | 1311 | [MSM_RPMRS_ID_VDD_DIG_0] = MSM_RPM_ID_VOLTAGE_CORNER, |
| 1312 | [MSM_RPMRS_ID_VDD_DIG_1] = MSM_RPM_ID_LAST, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1313 | [MSM_RPMRS_ID_VDD_MEM_0] = MSM_RPM_ID_PM8018_L9_0, |
| 1314 | [MSM_RPMRS_ID_VDD_MEM_1] = MSM_RPM_ID_PM8018_L9_1, |
| 1315 | [MSM_RPMRS_ID_RPM_CTL] = MSM_RPM_ID_RPM_CTL, |
| 1316 | }, |
| 1317 | }; |
| 1318 | |
| 1319 | static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = { |
| 1320 | .phys_addr_base = 0x0010D204, |
| 1321 | .phys_size = SZ_8K, |
| 1322 | }; |
| 1323 | |
| 1324 | struct platform_device msm9615_rpm_stat_device = { |
| 1325 | .name = "msm_rpm_stat", |
| 1326 | .id = -1, |
| 1327 | .dev = { |
| 1328 | .platform_data = &msm_rpm_stat_pdata, |
| 1329 | }, |
| 1330 | }; |
| 1331 | |
Anji Jonnala | 2a8bd31 | 2012-11-01 13:11:42 +0530 | [diff] [blame] | 1332 | static struct resource resources_rpm_master_stats[] = { |
| 1333 | { |
| 1334 | .start = MSM9615_RPM_MASTER_STATS_BASE, |
| 1335 | .end = MSM9615_RPM_MASTER_STATS_BASE + SZ_256, |
| 1336 | .flags = IORESOURCE_MEM, |
| 1337 | }, |
| 1338 | }; |
| 1339 | |
| 1340 | static char *master_names[] = { |
| 1341 | "KPSS", |
| 1342 | "MPSS", |
| 1343 | "LPASS", |
| 1344 | }; |
| 1345 | |
| 1346 | static struct msm_rpm_master_stats_platform_data msm_rpm_master_stat_pdata = { |
| 1347 | .masters = master_names, |
| 1348 | .nomasters = ARRAY_SIZE(master_names), |
| 1349 | }; |
| 1350 | |
| 1351 | struct platform_device msm9615_rpm_master_stat_device = { |
| 1352 | .name = "msm_rpm_master_stat", |
| 1353 | .id = -1, |
| 1354 | .num_resources = ARRAY_SIZE(resources_rpm_master_stats), |
| 1355 | .resource = resources_rpm_master_stats, |
| 1356 | .dev = { |
| 1357 | .platform_data = &msm_rpm_master_stat_pdata, |
| 1358 | }, |
| 1359 | }; |
| 1360 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1361 | static struct msm_rpm_log_platform_data msm_rpm_log_pdata = { |
| 1362 | .phys_addr_base = 0x0010AC00, |
| 1363 | .reg_offsets = { |
| 1364 | [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080, |
| 1365 | [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0, |
| 1366 | }, |
| 1367 | .phys_size = SZ_8K, |
| 1368 | .log_len = 4096, /* log's buffer length in bytes */ |
| 1369 | .log_len_mask = (4096 >> 2) - 1, /* length mask in units of u32 */ |
| 1370 | }; |
| 1371 | |
| 1372 | struct platform_device msm9615_rpm_log_device = { |
| 1373 | .name = "msm_rpm_log", |
| 1374 | .id = -1, |
| 1375 | .dev = { |
| 1376 | .platform_data = &msm_rpm_log_pdata, |
| 1377 | }, |
| 1378 | }; |
| 1379 | |
Ofir Cohen | 94213a7 | 2012-05-03 14:26:32 +0300 | [diff] [blame] | 1380 | uint32_t __init msm9615_rpm_get_swfi_latency(void) |
| 1381 | { |
| 1382 | int i; |
| 1383 | |
| 1384 | for (i = 0; i < ARRAY_SIZE(msm_rpmrs_levels); i++) { |
| 1385 | if (msm_rpmrs_levels[i].sleep_mode == |
| 1386 | MSM_PM_SLEEP_MODE_WAIT_FOR_INTERRUPT) |
| 1387 | return msm_rpmrs_levels[i].latency_us; |
| 1388 | } |
| 1389 | return 0; |
| 1390 | } |
| 1391 | |
Ido Shayevitz | 479f2eb | 2012-06-27 10:39:57 +0300 | [diff] [blame] | 1392 | struct android_usb_platform_data msm_android_usb_pdata = { |
| 1393 | .usb_core_id = 0, |
| 1394 | }; |
Ofir Cohen | 94213a7 | 2012-05-03 14:26:32 +0300 | [diff] [blame] | 1395 | |
| 1396 | struct platform_device msm_android_usb_device = { |
| 1397 | .name = "android_usb", |
| 1398 | .id = -1, |
| 1399 | .dev = { |
| 1400 | .platform_data = &msm_android_usb_pdata, |
| 1401 | }, |
| 1402 | }; |
| 1403 | |
Ido Shayevitz | 479f2eb | 2012-06-27 10:39:57 +0300 | [diff] [blame] | 1404 | struct android_usb_platform_data msm_android_usb_hsic_pdata = { |
| 1405 | .usb_core_id = 1, |
| 1406 | }; |
| 1407 | |
| 1408 | struct platform_device msm_android_usb_hsic_device = { |
| 1409 | .name = "android_usb_hsic", |
| 1410 | .id = -1, |
| 1411 | .dev = { |
| 1412 | .platform_data = &msm_android_usb_hsic_pdata, |
| 1413 | }, |
| 1414 | }; |
| 1415 | |
Rohit Vaswani | b1cc493 | 2012-07-23 21:30:11 -0700 | [diff] [blame] | 1416 | struct platform_device msm_gpio_device = { |
| 1417 | .name = "msmgpio", |
| 1418 | .id = -1, |
| 1419 | }; |
Ido Shayevitz | 479f2eb | 2012-06-27 10:39:57 +0300 | [diff] [blame] | 1420 | |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 1421 | void __init msm9615_device_init(void) |
| 1422 | { |
Maheshkumar Sivasubramanian | f07bd0b | 2011-09-06 17:33:17 -0600 | [diff] [blame] | 1423 | msm_spm_init(msm_spm_data, ARRAY_SIZE(msm_spm_data)); |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1424 | BUG_ON(msm_rpm_init(&msm9615_rpm_data)); |
| 1425 | BUG_ON(msm_rpmrs_levels_init(&msm_rpmrs_data)); |
Ofir Cohen | 94213a7 | 2012-05-03 14:26:32 +0300 | [diff] [blame] | 1426 | msm_android_usb_pdata.swfi_latency = |
| 1427 | msm_rpmrs_levels[0].latency_us; |
Ido Shayevitz | 479f2eb | 2012-06-27 10:39:57 +0300 | [diff] [blame] | 1428 | msm_android_usb_hsic_pdata.swfi_latency = |
| 1429 | msm_rpmrs_levels[0].latency_us; |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 1430 | } |
| 1431 | |
Jeff Hugo | 56b933a | 2011-09-28 14:42:05 -0600 | [diff] [blame] | 1432 | #define MSM_SHARED_RAM_PHYS 0x40000000 |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 1433 | void __init msm9615_map_io(void) |
| 1434 | { |
Jeff Hugo | 56b933a | 2011-09-28 14:42:05 -0600 | [diff] [blame] | 1435 | msm_shared_ram_phys = MSM_SHARED_RAM_PHYS; |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 1436 | msm_map_msm9615_io(); |
Rohit Vaswani | f0ce9ae | 2011-08-23 22:18:38 -0700 | [diff] [blame] | 1437 | l2x0_cache_init(); |
Jeff Ohlstein | 3a77f9f | 2011-09-06 14:50:20 -0700 | [diff] [blame] | 1438 | if (socinfo_init() < 0) |
| 1439 | pr_err("socinfo_init() failed!\n"); |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 1440 | } |
| 1441 | |
| 1442 | void __init msm9615_init_irq(void) |
| 1443 | { |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 1444 | struct msm_mpm_device_data *data = NULL; |
| 1445 | |
| 1446 | #ifdef CONFIG_MSM_MPM |
| 1447 | data = &msm9615_mpm_dev_data; |
| 1448 | #endif |
| 1449 | |
| 1450 | msm_mpm_irq_extn_init(data); |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 1451 | gic_init(0, GIC_PPI_START, MSM_QGIC_DIST_BASE, |
| 1452 | (void *)MSM_QGIC_CPU_BASE); |
Rohit Vaswani | ced9b3b | 2011-08-23 17:21:49 -0700 | [diff] [blame] | 1453 | } |
Gagan Mac | 7a82764 | 2011-09-22 19:42:21 -0600 | [diff] [blame] | 1454 | |
| 1455 | struct platform_device msm_bus_9615_sys_fabric = { |
| 1456 | .name = "msm_bus_fabric", |
| 1457 | .id = MSM_BUS_FAB_SYSTEM, |
| 1458 | }; |
| 1459 | |
| 1460 | struct platform_device msm_bus_def_fab = { |
| 1461 | .name = "msm_bus_fabric", |
| 1462 | .id = MSM_BUS_FAB_DEFAULT, |
| 1463 | }; |
Zhang Chang Ken | c2f2bcc | 2012-03-30 18:32:02 -0400 | [diff] [blame] | 1464 | |
| 1465 | #ifdef CONFIG_FB_MSM_EBI2 |
| 1466 | static void __init msm_register_device(struct platform_device *pdev, void *data) |
| 1467 | { |
| 1468 | int ret; |
| 1469 | |
| 1470 | pdev->dev.platform_data = data; |
| 1471 | |
| 1472 | ret = platform_device_register(pdev); |
| 1473 | if (ret) |
| 1474 | dev_err(&pdev->dev, |
| 1475 | "%s: platform_device_register() failed = %d\n", |
| 1476 | __func__, ret); |
| 1477 | } |
| 1478 | |
| 1479 | void __init msm_fb_register_device(char *name, void *data) |
| 1480 | { |
| 1481 | if (!strncmp(name, "ebi2", 4)) |
| 1482 | msm_register_device(&msm_ebi2_lcdc_device, data); |
| 1483 | else |
| 1484 | pr_err("%s: unknown device! %s\n", __func__, name); |
| 1485 | } |
| 1486 | #endif |