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