Praveen Chidambaram | f27a515 | 2013-02-01 11:44:53 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [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> |
Steve Muckle | f132c6c | 2012-06-06 18:30:57 -0700 | [diff] [blame] | 16 | #include <asm/io.h> |
Mitchel Humpherys | 0cc2bce | 2012-09-06 11:35:55 -0700 | [diff] [blame] | 17 | #include <linux/msm_ion.h> |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 18 | #include <mach/msm_iomap.h> |
| 19 | #include <mach/irqs-8930.h> |
| 20 | #include <mach/rpm.h> |
Arun Menon | aabf263 | 2012-02-24 15:30:47 -0800 | [diff] [blame] | 21 | #include <mach/msm_bus.h> |
Gagan Mac | cd5b327 | 2012-02-09 18:13:10 -0700 | [diff] [blame] | 22 | #include <mach/msm_bus_board.h> |
Arun Menon | aabf263 | 2012-02-24 15:30:47 -0800 | [diff] [blame] | 23 | #include <mach/board.h> |
| 24 | #include <mach/socinfo.h> |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 25 | #include <mach/iommu_domains.h> |
Laura Abbott | 532b2df | 2012-04-12 10:53:48 -0700 | [diff] [blame] | 26 | #include <mach/msm_rtb.h> |
Laura Abbott | f317304 | 2012-05-29 15:23:18 -0700 | [diff] [blame] | 27 | #include <mach/msm_cache_dump.h> |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 28 | |
| 29 | #include "devices.h" |
| 30 | #include "rpm_log.h" |
| 31 | #include "rpm_stats.h" |
Girish Mahadevan | 898c56d | 2012-06-05 16:09:19 -0600 | [diff] [blame] | 32 | #include "rpm_rbcpr_stats.h" |
Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 33 | #include "footswitch.h" |
Patrick Daly | c1227cb | 2012-08-28 13:39:17 -0700 | [diff] [blame] | 34 | #include "acpuclock-krait.h" |
Praveen Chidambaram | f27a515 | 2013-02-01 11:44:53 -0700 | [diff] [blame] | 35 | #include "pm.h" |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 36 | |
| 37 | #ifdef CONFIG_MSM_MPM |
Subhash Jadavani | 909e04f | 2012-04-12 10:52:50 +0530 | [diff] [blame] | 38 | #include <mach/mpm.h> |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 39 | #endif |
Anji Jonnala | 6c2b685 | 2012-09-21 13:34:44 +0530 | [diff] [blame] | 40 | #define MSM8930_PC_CNTR_PHYS (MSM8930_IMEM_PHYS + 0x664) |
| 41 | #define MSM8930_PC_CNTR_SIZE 0x40 |
Anji Jonnala | 9312992 | 2012-10-09 20:57:53 +0530 | [diff] [blame] | 42 | #define MSM8930_RPM_MASTER_STATS_BASE 0x10B100 |
Anji Jonnala | 6c2b685 | 2012-09-21 13:34:44 +0530 | [diff] [blame] | 43 | |
| 44 | static struct resource msm8930_resources_pccntr[] = { |
| 45 | { |
| 46 | .start = MSM8930_PC_CNTR_PHYS, |
| 47 | .end = MSM8930_PC_CNTR_PHYS + MSM8930_PC_CNTR_SIZE, |
| 48 | .flags = IORESOURCE_MEM, |
| 49 | }, |
| 50 | }; |
| 51 | |
Praveen Chidambaram | f27a515 | 2013-02-01 11:44:53 -0700 | [diff] [blame] | 52 | static struct msm_pm_init_data_type msm_pm_data = { |
| 53 | .retention_calls_tz = true, |
| 54 | }; |
| 55 | |
Anji Jonnala | f91d897 | 2013-02-26 17:55:50 +0530 | [diff] [blame] | 56 | static struct msm_pm_sleep_status_data msm_pm_slp_sts_data = { |
| 57 | .base_addr = MSM_ACC0_BASE + 0x08, |
| 58 | .cpu_offset = MSM_ACC1_BASE - MSM_ACC0_BASE, |
| 59 | .mask = 1UL << 13, |
| 60 | }; |
| 61 | |
| 62 | struct platform_device msm8930_cpu_slp_status = { |
| 63 | .name = "cpu_slp_status", |
| 64 | .id = -1, |
| 65 | .dev = { |
| 66 | .platform_data = &msm_pm_slp_sts_data, |
| 67 | }, |
| 68 | }; |
| 69 | |
Praveen Chidambaram | f27a515 | 2013-02-01 11:44:53 -0700 | [diff] [blame] | 70 | struct platform_device msm8930_pm_8x60 = { |
| 71 | .name = "pm-8x60", |
Anji Jonnala | 6c2b685 | 2012-09-21 13:34:44 +0530 | [diff] [blame] | 72 | .id = -1, |
| 73 | .num_resources = ARRAY_SIZE(msm8930_resources_pccntr), |
| 74 | .resource = msm8930_resources_pccntr, |
Praveen Chidambaram | f27a515 | 2013-02-01 11:44:53 -0700 | [diff] [blame] | 75 | .dev = { |
| 76 | .platform_data = &msm_pm_data, |
| 77 | }, |
Anji Jonnala | 6c2b685 | 2012-09-21 13:34:44 +0530 | [diff] [blame] | 78 | }; |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 79 | |
| 80 | struct msm_rpm_platform_data msm8930_rpm_data __initdata = { |
| 81 | .reg_base_addrs = { |
| 82 | [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE, |
| 83 | [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400, |
| 84 | [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600, |
| 85 | [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00, |
| 86 | }, |
| 87 | .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ, |
Stephen Boyd | f61255e | 2012-02-24 14:31:09 -0800 | [diff] [blame] | 88 | .irq_err = RPM_APCC_CPU0_GP_LOW_IRQ, |
Praveen Chidambaram | e396ce6 | 2012-03-30 11:15:57 -0600 | [diff] [blame] | 89 | .irq_wakeup = RPM_APCC_CPU0_WAKE_UP_IRQ, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 90 | .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008, |
| 91 | .ipc_rpm_val = 4, |
| 92 | .target_id = { |
| 93 | MSM_RPM_MAP(8930, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4), |
| 94 | MSM_RPM_MAP(8930, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4), |
| 95 | MSM_RPM_MAP(8930, INVALIDATE_0, INVALIDATE, 8), |
Mahesh Sivasubramanian | ef2a0fa | 2012-01-24 15:57:01 -0700 | [diff] [blame] | 96 | MSM_RPM_MAP(8960, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1), |
| 97 | MSM_RPM_MAP(8960, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1), |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 98 | MSM_RPM_MAP(8930, RPM_CTL, RPM_CTL, 1), |
| 99 | MSM_RPM_MAP(8930, CXO_CLK, CXO_CLK, 1), |
| 100 | MSM_RPM_MAP(8930, PXO_CLK, PXO_CLK, 1), |
| 101 | MSM_RPM_MAP(8930, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1), |
| 102 | MSM_RPM_MAP(8930, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1), |
| 103 | MSM_RPM_MAP(8930, MM_FABRIC_CLK, MM_FABRIC_CLK, 1), |
| 104 | MSM_RPM_MAP(8930, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1), |
| 105 | MSM_RPM_MAP(8930, SFPB_CLK, SFPB_CLK, 1), |
| 106 | MSM_RPM_MAP(8930, CFPB_CLK, CFPB_CLK, 1), |
| 107 | MSM_RPM_MAP(8930, MMFPB_CLK, MMFPB_CLK, 1), |
| 108 | MSM_RPM_MAP(8930, EBI1_CLK, EBI1_CLK, 1), |
| 109 | MSM_RPM_MAP(8930, APPS_FABRIC_CFG_HALT_0, |
| 110 | APPS_FABRIC_CFG_HALT, 2), |
| 111 | MSM_RPM_MAP(8930, APPS_FABRIC_CFG_CLKMOD_0, |
| 112 | APPS_FABRIC_CFG_CLKMOD, 3), |
| 113 | MSM_RPM_MAP(8930, APPS_FABRIC_CFG_IOCTL, |
| 114 | APPS_FABRIC_CFG_IOCTL, 1), |
Mahesh Sivasubramanian | 2d2c7059 | 2012-03-20 17:07:24 -0600 | [diff] [blame] | 115 | MSM_RPM_MAP(8930, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 6), |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 116 | MSM_RPM_MAP(8930, SYS_FABRIC_CFG_HALT_0, |
| 117 | SYS_FABRIC_CFG_HALT, 2), |
| 118 | MSM_RPM_MAP(8930, SYS_FABRIC_CFG_CLKMOD_0, |
| 119 | SYS_FABRIC_CFG_CLKMOD, 3), |
| 120 | MSM_RPM_MAP(8930, SYS_FABRIC_CFG_IOCTL, |
| 121 | SYS_FABRIC_CFG_IOCTL, 1), |
| 122 | MSM_RPM_MAP(8930, SYSTEM_FABRIC_ARB_0, |
Mahesh Sivasubramanian | 2d2c7059 | 2012-03-20 17:07:24 -0600 | [diff] [blame] | 123 | SYSTEM_FABRIC_ARB, 20), |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 124 | MSM_RPM_MAP(8930, MMSS_FABRIC_CFG_HALT_0, |
| 125 | MMSS_FABRIC_CFG_HALT, 2), |
| 126 | MSM_RPM_MAP(8930, MMSS_FABRIC_CFG_CLKMOD_0, |
| 127 | MMSS_FABRIC_CFG_CLKMOD, 3), |
| 128 | MSM_RPM_MAP(8930, MMSS_FABRIC_CFG_IOCTL, |
| 129 | MMSS_FABRIC_CFG_IOCTL, 1), |
Mahesh Sivasubramanian | 2d2c7059 | 2012-03-20 17:07:24 -0600 | [diff] [blame] | 130 | MSM_RPM_MAP(8930, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 11), |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 131 | MSM_RPM_MAP(8930, PM8038_S1_0, PM8038_S1, 2), |
| 132 | MSM_RPM_MAP(8930, PM8038_S2_0, PM8038_S2, 2), |
| 133 | MSM_RPM_MAP(8930, PM8038_S3_0, PM8038_S3, 2), |
| 134 | MSM_RPM_MAP(8930, PM8038_S4_0, PM8038_S4, 2), |
| 135 | MSM_RPM_MAP(8930, PM8038_S5_0, PM8038_S5, 2), |
| 136 | MSM_RPM_MAP(8930, PM8038_S6_0, PM8038_S6, 2), |
| 137 | MSM_RPM_MAP(8930, PM8038_L1_0, PM8038_L1, 2), |
| 138 | MSM_RPM_MAP(8930, PM8038_L2_0, PM8038_L2, 2), |
| 139 | MSM_RPM_MAP(8930, PM8038_L3_0, PM8038_L3, 2), |
| 140 | MSM_RPM_MAP(8930, PM8038_L4_0, PM8038_L4, 2), |
| 141 | MSM_RPM_MAP(8930, PM8038_L5_0, PM8038_L5, 2), |
| 142 | MSM_RPM_MAP(8930, PM8038_L6_0, PM8038_L6, 2), |
| 143 | MSM_RPM_MAP(8930, PM8038_L7_0, PM8038_L7, 2), |
| 144 | MSM_RPM_MAP(8930, PM8038_L8_0, PM8038_L8, 2), |
| 145 | MSM_RPM_MAP(8930, PM8038_L9_0, PM8038_L9, 2), |
| 146 | MSM_RPM_MAP(8930, PM8038_L10_0, PM8038_L10, 2), |
| 147 | MSM_RPM_MAP(8930, PM8038_L11_0, PM8038_L11, 2), |
| 148 | MSM_RPM_MAP(8930, PM8038_L12_0, PM8038_L12, 2), |
| 149 | MSM_RPM_MAP(8930, PM8038_L13_0, PM8038_L13, 2), |
| 150 | MSM_RPM_MAP(8930, PM8038_L14_0, PM8038_L14, 2), |
| 151 | MSM_RPM_MAP(8930, PM8038_L15_0, PM8038_L15, 2), |
| 152 | MSM_RPM_MAP(8930, PM8038_L16_0, PM8038_L16, 2), |
| 153 | MSM_RPM_MAP(8930, PM8038_L17_0, PM8038_L17, 2), |
| 154 | MSM_RPM_MAP(8930, PM8038_L18_0, PM8038_L18, 2), |
| 155 | MSM_RPM_MAP(8930, PM8038_L19_0, PM8038_L19, 2), |
| 156 | MSM_RPM_MAP(8930, PM8038_L20_0, PM8038_L20, 2), |
| 157 | MSM_RPM_MAP(8930, PM8038_L21_0, PM8038_L21, 2), |
| 158 | MSM_RPM_MAP(8930, PM8038_L22_0, PM8038_L22, 2), |
| 159 | MSM_RPM_MAP(8930, PM8038_L23_0, PM8038_L23, 2), |
| 160 | MSM_RPM_MAP(8930, PM8038_L24_0, PM8038_L24, 2), |
| 161 | MSM_RPM_MAP(8930, PM8038_L25_0, PM8038_L25, 2), |
| 162 | MSM_RPM_MAP(8930, PM8038_L26_0, PM8038_L26, 2), |
| 163 | MSM_RPM_MAP(8930, PM8038_L27_0, PM8038_L27, 2), |
| 164 | MSM_RPM_MAP(8930, PM8038_CLK1_0, PM8038_CLK1, 2), |
| 165 | MSM_RPM_MAP(8930, PM8038_CLK2_0, PM8038_CLK2, 2), |
| 166 | MSM_RPM_MAP(8930, PM8038_LVS1, PM8038_LVS1, 1), |
| 167 | MSM_RPM_MAP(8930, PM8038_LVS2, PM8038_LVS2, 1), |
David Collins | 64c86fb | 2012-11-29 17:31:39 -0800 | [diff] [blame] | 168 | MSM_RPM_MAP_PMIC(8930, 8038, NCP_0, NCP, 2), |
| 169 | MSM_RPM_MAP_PMIC(8930, 8038, CXO_BUFFERS, CXO_BUFFERS, 1), |
| 170 | MSM_RPM_MAP_PMIC(8930, 8038, USB_OTG_SWITCH, USB_OTG_SWITCH, 1), |
| 171 | MSM_RPM_MAP_PMIC(8930, 8038, HDMI_SWITCH, HDMI_SWITCH, 1), |
| 172 | MSM_RPM_MAP_PMIC(8930, 8038, QDSS_CLK, QDSS_CLK, 1), |
| 173 | MSM_RPM_MAP_PMIC(8930, 8038, VOLTAGE_CORNER, VOLTAGE_CORNER, 1), |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 174 | }, |
| 175 | .target_status = { |
| 176 | MSM_RPM_STATUS_ID_MAP(8930, VERSION_MAJOR), |
| 177 | MSM_RPM_STATUS_ID_MAP(8930, VERSION_MINOR), |
| 178 | MSM_RPM_STATUS_ID_MAP(8930, VERSION_BUILD), |
| 179 | MSM_RPM_STATUS_ID_MAP(8930, SUPPORTED_RESOURCES_0), |
| 180 | MSM_RPM_STATUS_ID_MAP(8930, SUPPORTED_RESOURCES_1), |
| 181 | MSM_RPM_STATUS_ID_MAP(8930, SUPPORTED_RESOURCES_2), |
| 182 | MSM_RPM_STATUS_ID_MAP(8930, RESERVED_SUPPORTED_RESOURCES_0), |
| 183 | MSM_RPM_STATUS_ID_MAP(8930, SEQUENCE), |
| 184 | MSM_RPM_STATUS_ID_MAP(8930, RPM_CTL), |
| 185 | MSM_RPM_STATUS_ID_MAP(8930, CXO_CLK), |
| 186 | MSM_RPM_STATUS_ID_MAP(8930, PXO_CLK), |
| 187 | MSM_RPM_STATUS_ID_MAP(8930, APPS_FABRIC_CLK), |
| 188 | MSM_RPM_STATUS_ID_MAP(8930, SYSTEM_FABRIC_CLK), |
| 189 | MSM_RPM_STATUS_ID_MAP(8930, MM_FABRIC_CLK), |
| 190 | MSM_RPM_STATUS_ID_MAP(8930, DAYTONA_FABRIC_CLK), |
| 191 | MSM_RPM_STATUS_ID_MAP(8930, SFPB_CLK), |
| 192 | MSM_RPM_STATUS_ID_MAP(8930, CFPB_CLK), |
| 193 | MSM_RPM_STATUS_ID_MAP(8930, MMFPB_CLK), |
| 194 | MSM_RPM_STATUS_ID_MAP(8930, EBI1_CLK), |
| 195 | MSM_RPM_STATUS_ID_MAP(8930, APPS_FABRIC_CFG_HALT), |
| 196 | MSM_RPM_STATUS_ID_MAP(8930, APPS_FABRIC_CFG_CLKMOD), |
| 197 | MSM_RPM_STATUS_ID_MAP(8930, APPS_FABRIC_CFG_IOCTL), |
| 198 | MSM_RPM_STATUS_ID_MAP(8930, APPS_FABRIC_ARB), |
| 199 | MSM_RPM_STATUS_ID_MAP(8930, SYS_FABRIC_CFG_HALT), |
| 200 | MSM_RPM_STATUS_ID_MAP(8930, SYS_FABRIC_CFG_CLKMOD), |
| 201 | MSM_RPM_STATUS_ID_MAP(8930, SYS_FABRIC_CFG_IOCTL), |
| 202 | MSM_RPM_STATUS_ID_MAP(8930, SYSTEM_FABRIC_ARB), |
| 203 | MSM_RPM_STATUS_ID_MAP(8930, MMSS_FABRIC_CFG_HALT), |
| 204 | MSM_RPM_STATUS_ID_MAP(8930, MMSS_FABRIC_CFG_CLKMOD), |
| 205 | MSM_RPM_STATUS_ID_MAP(8930, MMSS_FABRIC_CFG_IOCTL), |
| 206 | MSM_RPM_STATUS_ID_MAP(8930, MM_FABRIC_ARB), |
| 207 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_S1_0), |
| 208 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_S1_1), |
| 209 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_S2_0), |
| 210 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_S2_1), |
| 211 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_S3_0), |
| 212 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_S3_1), |
| 213 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_S4_0), |
| 214 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_S4_1), |
| 215 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L1_0), |
| 216 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L1_1), |
| 217 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L2_0), |
| 218 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L2_1), |
| 219 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L3_0), |
| 220 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L3_1), |
| 221 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L4_0), |
| 222 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L4_1), |
| 223 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L5_0), |
| 224 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L5_1), |
| 225 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L6_0), |
| 226 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L6_1), |
| 227 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L7_0), |
| 228 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L7_1), |
| 229 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L8_0), |
| 230 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L8_1), |
| 231 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L9_0), |
| 232 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L9_1), |
| 233 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L10_0), |
| 234 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L10_1), |
| 235 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L11_0), |
| 236 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L11_1), |
| 237 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L12_0), |
| 238 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L12_1), |
| 239 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L13_0), |
| 240 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L13_1), |
| 241 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L14_0), |
| 242 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L14_1), |
| 243 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L15_0), |
| 244 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L15_1), |
| 245 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L16_0), |
| 246 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L16_1), |
| 247 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L17_0), |
| 248 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L17_1), |
| 249 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L18_0), |
| 250 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L18_1), |
| 251 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L19_0), |
| 252 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L19_1), |
| 253 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L20_0), |
| 254 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L20_1), |
| 255 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L21_0), |
| 256 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L21_1), |
| 257 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L22_0), |
| 258 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L22_1), |
| 259 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L23_0), |
| 260 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L23_1), |
| 261 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L24_0), |
| 262 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L24_1), |
| 263 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L25_0), |
| 264 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_L25_1), |
| 265 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_CLK1_0), |
| 266 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_CLK1_1), |
| 267 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_CLK2_0), |
| 268 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_CLK2_1), |
| 269 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_LVS1), |
| 270 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_LVS2), |
Praveen Chidambaram | 75b8c81 | 2012-08-10 16:26:37 -0600 | [diff] [blame] | 271 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_NCP_0), |
| 272 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_NCP_1), |
| 273 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_CXO_BUFFERS), |
| 274 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_USB_OTG_SWITCH), |
| 275 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_HDMI_SWITCH), |
| 276 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_QDSS_CLK), |
| 277 | MSM_RPM_STATUS_ID_MAP(8930, PM8038_VOLTAGE_CORNER), |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 278 | }, |
| 279 | .target_ctrl_id = { |
| 280 | MSM_RPM_CTRL_MAP(8930, VERSION_MAJOR), |
| 281 | MSM_RPM_CTRL_MAP(8930, VERSION_MINOR), |
| 282 | MSM_RPM_CTRL_MAP(8930, VERSION_BUILD), |
| 283 | MSM_RPM_CTRL_MAP(8930, REQ_CTX_0), |
| 284 | MSM_RPM_CTRL_MAP(8930, REQ_SEL_0), |
| 285 | MSM_RPM_CTRL_MAP(8930, ACK_CTX_0), |
| 286 | MSM_RPM_CTRL_MAP(8930, ACK_SEL_0), |
| 287 | }, |
| 288 | .sel_invalidate = MSM_RPM_8930_SEL_INVALIDATE, |
| 289 | .sel_notification = MSM_RPM_8930_SEL_NOTIFICATION, |
| 290 | .sel_last = MSM_RPM_8930_SEL_LAST, |
| 291 | .ver = {3, 0, 0}, |
| 292 | }; |
| 293 | |
Praveen Chidambaram | 75b8c81 | 2012-08-10 16:26:37 -0600 | [diff] [blame] | 294 | struct msm_rpm_platform_data msm8930_rpm_data_pm8917 __initdata = { |
| 295 | .reg_base_addrs = { |
| 296 | [MSM_RPM_PAGE_STATUS] = MSM_RPM_BASE, |
| 297 | [MSM_RPM_PAGE_CTRL] = MSM_RPM_BASE + 0x400, |
| 298 | [MSM_RPM_PAGE_REQ] = MSM_RPM_BASE + 0x600, |
| 299 | [MSM_RPM_PAGE_ACK] = MSM_RPM_BASE + 0xa00, |
| 300 | }, |
| 301 | .irq_ack = RPM_APCC_CPU0_GP_HIGH_IRQ, |
| 302 | .irq_err = RPM_APCC_CPU0_GP_LOW_IRQ, |
| 303 | .irq_wakeup = RPM_APCC_CPU0_WAKE_UP_IRQ, |
| 304 | .ipc_rpm_reg = MSM_APCS_GCC_BASE + 0x008, |
| 305 | .ipc_rpm_val = 4, |
| 306 | .target_id = { |
| 307 | MSM_RPM_MAP(8930, NOTIFICATION_CONFIGURED_0, NOTIFICATION, 4), |
| 308 | MSM_RPM_MAP(8930, NOTIFICATION_REGISTERED_0, NOTIFICATION, 4), |
| 309 | MSM_RPM_MAP(8930, INVALIDATE_0, INVALIDATE, 8), |
| 310 | MSM_RPM_MAP(8960, TRIGGER_TIMED_TO, TRIGGER_TIMED, 1), |
| 311 | MSM_RPM_MAP(8960, TRIGGER_TIMED_SCLK_COUNT, TRIGGER_TIMED, 1), |
| 312 | MSM_RPM_MAP(8930, RPM_CTL, RPM_CTL, 1), |
| 313 | MSM_RPM_MAP(8930, CXO_CLK, CXO_CLK, 1), |
| 314 | MSM_RPM_MAP(8930, PXO_CLK, PXO_CLK, 1), |
| 315 | MSM_RPM_MAP(8930, APPS_FABRIC_CLK, APPS_FABRIC_CLK, 1), |
| 316 | MSM_RPM_MAP(8930, SYSTEM_FABRIC_CLK, SYSTEM_FABRIC_CLK, 1), |
| 317 | MSM_RPM_MAP(8930, MM_FABRIC_CLK, MM_FABRIC_CLK, 1), |
| 318 | MSM_RPM_MAP(8930, DAYTONA_FABRIC_CLK, DAYTONA_FABRIC_CLK, 1), |
| 319 | MSM_RPM_MAP(8930, SFPB_CLK, SFPB_CLK, 1), |
| 320 | MSM_RPM_MAP(8930, CFPB_CLK, CFPB_CLK, 1), |
| 321 | MSM_RPM_MAP(8930, MMFPB_CLK, MMFPB_CLK, 1), |
| 322 | MSM_RPM_MAP(8930, EBI1_CLK, EBI1_CLK, 1), |
| 323 | MSM_RPM_MAP(8930, APPS_FABRIC_CFG_HALT_0, |
| 324 | APPS_FABRIC_CFG_HALT, 2), |
| 325 | MSM_RPM_MAP(8930, APPS_FABRIC_CFG_CLKMOD_0, |
| 326 | APPS_FABRIC_CFG_CLKMOD, 3), |
| 327 | MSM_RPM_MAP(8930, APPS_FABRIC_CFG_IOCTL, |
| 328 | APPS_FABRIC_CFG_IOCTL, 1), |
| 329 | MSM_RPM_MAP(8930, APPS_FABRIC_ARB_0, APPS_FABRIC_ARB, 6), |
| 330 | MSM_RPM_MAP(8930, SYS_FABRIC_CFG_HALT_0, |
| 331 | SYS_FABRIC_CFG_HALT, 2), |
| 332 | MSM_RPM_MAP(8930, SYS_FABRIC_CFG_CLKMOD_0, |
| 333 | SYS_FABRIC_CFG_CLKMOD, 3), |
| 334 | MSM_RPM_MAP(8930, SYS_FABRIC_CFG_IOCTL, |
| 335 | SYS_FABRIC_CFG_IOCTL, 1), |
| 336 | MSM_RPM_MAP(8930, SYSTEM_FABRIC_ARB_0, |
| 337 | SYSTEM_FABRIC_ARB, 20), |
| 338 | MSM_RPM_MAP(8930, MMSS_FABRIC_CFG_HALT_0, |
| 339 | MMSS_FABRIC_CFG_HALT, 2), |
| 340 | MSM_RPM_MAP(8930, MMSS_FABRIC_CFG_CLKMOD_0, |
| 341 | MMSS_FABRIC_CFG_CLKMOD, 3), |
| 342 | MSM_RPM_MAP(8930, MMSS_FABRIC_CFG_IOCTL, |
| 343 | MMSS_FABRIC_CFG_IOCTL, 1), |
| 344 | MSM_RPM_MAP(8930, MM_FABRIC_ARB_0, MM_FABRIC_ARB, 11), |
| 345 | MSM_RPM_MAP(8930, PM8917_S1_0, PM8917_S1, 2), |
| 346 | MSM_RPM_MAP(8930, PM8917_S2_0, PM8917_S2, 2), |
| 347 | MSM_RPM_MAP(8930, PM8917_S3_0, PM8917_S3, 2), |
| 348 | MSM_RPM_MAP(8930, PM8917_S4_0, PM8917_S4, 2), |
| 349 | MSM_RPM_MAP(8930, PM8917_S5_0, PM8917_S5, 2), |
| 350 | MSM_RPM_MAP(8930, PM8917_S6_0, PM8917_S6, 2), |
| 351 | MSM_RPM_MAP(8930, PM8917_S7_0, PM8917_S7, 2), |
| 352 | MSM_RPM_MAP(8930, PM8917_S8_0, PM8917_S8, 2), |
| 353 | MSM_RPM_MAP(8930, PM8917_L1_0, PM8917_L1, 2), |
| 354 | MSM_RPM_MAP(8930, PM8917_L2_0, PM8917_L2, 2), |
| 355 | MSM_RPM_MAP(8930, PM8917_L3_0, PM8917_L3, 2), |
| 356 | MSM_RPM_MAP(8930, PM8917_L4_0, PM8917_L4, 2), |
| 357 | MSM_RPM_MAP(8930, PM8917_L5_0, PM8917_L5, 2), |
| 358 | MSM_RPM_MAP(8930, PM8917_L6_0, PM8917_L6, 2), |
| 359 | MSM_RPM_MAP(8930, PM8917_L7_0, PM8917_L7, 2), |
| 360 | MSM_RPM_MAP(8930, PM8917_L8_0, PM8917_L8, 2), |
| 361 | MSM_RPM_MAP(8930, PM8917_L9_0, PM8917_L9, 2), |
| 362 | MSM_RPM_MAP(8930, PM8917_L10_0, PM8917_L10, 2), |
| 363 | MSM_RPM_MAP(8930, PM8917_L11_0, PM8917_L11, 2), |
| 364 | MSM_RPM_MAP(8930, PM8917_L12_0, PM8917_L12, 2), |
| 365 | MSM_RPM_MAP(8930, PM8917_L14_0, PM8917_L14, 2), |
| 366 | MSM_RPM_MAP(8930, PM8917_L15_0, PM8917_L15, 2), |
| 367 | MSM_RPM_MAP(8930, PM8917_L16_0, PM8917_L16, 2), |
| 368 | MSM_RPM_MAP(8930, PM8917_L17_0, PM8917_L17, 2), |
| 369 | MSM_RPM_MAP(8930, PM8917_L18_0, PM8917_L18, 2), |
| 370 | MSM_RPM_MAP(8930, PM8917_L21_0, PM8917_L21, 2), |
| 371 | MSM_RPM_MAP(8930, PM8917_L22_0, PM8917_L22, 2), |
| 372 | MSM_RPM_MAP(8930, PM8917_L23_0, PM8917_L23, 2), |
| 373 | MSM_RPM_MAP(8930, PM8917_L24_0, PM8917_L24, 2), |
| 374 | MSM_RPM_MAP(8930, PM8917_L25_0, PM8917_L25, 2), |
| 375 | MSM_RPM_MAP(8930, PM8917_L26_0, PM8917_L26, 2), |
| 376 | MSM_RPM_MAP(8930, PM8917_L27_0, PM8917_L27, 2), |
| 377 | MSM_RPM_MAP(8930, PM8917_L28_0, PM8917_L28, 2), |
| 378 | MSM_RPM_MAP(8930, PM8917_L29_0, PM8917_L29, 2), |
| 379 | MSM_RPM_MAP(8930, PM8917_L30_0, PM8917_L30, 2), |
| 380 | MSM_RPM_MAP(8930, PM8917_L31_0, PM8917_L31, 2), |
| 381 | MSM_RPM_MAP(8930, PM8917_L32_0, PM8917_L32, 2), |
| 382 | MSM_RPM_MAP(8930, PM8917_L33_0, PM8917_L33, 2), |
| 383 | MSM_RPM_MAP(8930, PM8917_L34_0, PM8917_L34, 2), |
| 384 | MSM_RPM_MAP(8930, PM8917_L35_0, PM8917_L35, 2), |
| 385 | MSM_RPM_MAP(8930, PM8917_L36_0, PM8917_L36, 2), |
| 386 | MSM_RPM_MAP(8930, PM8917_CLK1_0, PM8917_CLK1, 2), |
| 387 | MSM_RPM_MAP(8930, PM8917_CLK2_0, PM8917_CLK2, 2), |
| 388 | MSM_RPM_MAP(8930, PM8917_LVS1, PM8917_LVS1, 1), |
| 389 | MSM_RPM_MAP(8930, PM8917_LVS3, PM8917_LVS3, 1), |
| 390 | MSM_RPM_MAP(8930, PM8917_LVS4, PM8917_LVS4, 1), |
| 391 | MSM_RPM_MAP(8930, PM8917_LVS5, PM8917_LVS5, 1), |
| 392 | MSM_RPM_MAP(8930, PM8917_LVS6, PM8917_LVS6, 1), |
| 393 | MSM_RPM_MAP(8930, PM8917_LVS7, PM8917_LVS7, 1), |
David Collins | 64c86fb | 2012-11-29 17:31:39 -0800 | [diff] [blame] | 394 | MSM_RPM_MAP_PMIC(8930, 8917, NCP_0, NCP, 2), |
| 395 | MSM_RPM_MAP_PMIC(8930, 8917, CXO_BUFFERS, CXO_BUFFERS, 1), |
| 396 | MSM_RPM_MAP_PMIC(8930, 8917, USB_OTG_SWITCH, USB_OTG_SWITCH, 1), |
| 397 | MSM_RPM_MAP_PMIC(8930, 8917, HDMI_SWITCH, HDMI_SWITCH, 1), |
| 398 | MSM_RPM_MAP_PMIC(8930, 8917, QDSS_CLK, QDSS_CLK, 1), |
| 399 | MSM_RPM_MAP_PMIC(8930, 8917, VOLTAGE_CORNER, VOLTAGE_CORNER, 1), |
Praveen Chidambaram | 75b8c81 | 2012-08-10 16:26:37 -0600 | [diff] [blame] | 400 | }, |
| 401 | .target_status = { |
| 402 | MSM_RPM_STATUS_ID_MAP(8930, VERSION_MAJOR), |
| 403 | MSM_RPM_STATUS_ID_MAP(8930, VERSION_MINOR), |
| 404 | MSM_RPM_STATUS_ID_MAP(8930, VERSION_BUILD), |
| 405 | MSM_RPM_STATUS_ID_MAP(8930, SUPPORTED_RESOURCES_0), |
| 406 | MSM_RPM_STATUS_ID_MAP(8930, SUPPORTED_RESOURCES_1), |
| 407 | MSM_RPM_STATUS_ID_MAP(8930, SUPPORTED_RESOURCES_2), |
| 408 | MSM_RPM_STATUS_ID_MAP(8930, RESERVED_SUPPORTED_RESOURCES_0), |
| 409 | MSM_RPM_STATUS_ID_MAP(8930, SEQUENCE), |
| 410 | MSM_RPM_STATUS_ID_MAP(8930, RPM_CTL), |
| 411 | MSM_RPM_STATUS_ID_MAP(8930, CXO_CLK), |
| 412 | MSM_RPM_STATUS_ID_MAP(8930, PXO_CLK), |
| 413 | MSM_RPM_STATUS_ID_MAP(8930, APPS_FABRIC_CLK), |
| 414 | MSM_RPM_STATUS_ID_MAP(8930, SYSTEM_FABRIC_CLK), |
| 415 | MSM_RPM_STATUS_ID_MAP(8930, MM_FABRIC_CLK), |
| 416 | MSM_RPM_STATUS_ID_MAP(8930, DAYTONA_FABRIC_CLK), |
| 417 | MSM_RPM_STATUS_ID_MAP(8930, SFPB_CLK), |
| 418 | MSM_RPM_STATUS_ID_MAP(8930, CFPB_CLK), |
| 419 | MSM_RPM_STATUS_ID_MAP(8930, MMFPB_CLK), |
| 420 | MSM_RPM_STATUS_ID_MAP(8930, EBI1_CLK), |
| 421 | MSM_RPM_STATUS_ID_MAP(8930, APPS_FABRIC_CFG_HALT), |
| 422 | MSM_RPM_STATUS_ID_MAP(8930, APPS_FABRIC_CFG_CLKMOD), |
| 423 | MSM_RPM_STATUS_ID_MAP(8930, APPS_FABRIC_CFG_IOCTL), |
| 424 | MSM_RPM_STATUS_ID_MAP(8930, APPS_FABRIC_ARB), |
| 425 | MSM_RPM_STATUS_ID_MAP(8930, SYS_FABRIC_CFG_HALT), |
| 426 | MSM_RPM_STATUS_ID_MAP(8930, SYS_FABRIC_CFG_CLKMOD), |
| 427 | MSM_RPM_STATUS_ID_MAP(8930, SYS_FABRIC_CFG_IOCTL), |
| 428 | MSM_RPM_STATUS_ID_MAP(8930, SYSTEM_FABRIC_ARB), |
| 429 | MSM_RPM_STATUS_ID_MAP(8930, MMSS_FABRIC_CFG_HALT), |
| 430 | MSM_RPM_STATUS_ID_MAP(8930, MMSS_FABRIC_CFG_CLKMOD), |
| 431 | MSM_RPM_STATUS_ID_MAP(8930, MMSS_FABRIC_CFG_IOCTL), |
| 432 | MSM_RPM_STATUS_ID_MAP(8930, MM_FABRIC_ARB), |
| 433 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S1_0), |
| 434 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S1_1), |
| 435 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S2_0), |
| 436 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S2_1), |
| 437 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S3_0), |
| 438 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S3_1), |
| 439 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S4_0), |
| 440 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S4_1), |
| 441 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S5_0), |
| 442 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S5_1), |
| 443 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S6_0), |
| 444 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S6_1), |
| 445 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S7_0), |
| 446 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S7_1), |
| 447 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S8_0), |
| 448 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_S8_1), |
| 449 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L1_0), |
| 450 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L1_1), |
| 451 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L2_0), |
| 452 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L2_1), |
| 453 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L3_0), |
| 454 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L3_1), |
| 455 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L4_0), |
| 456 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L4_1), |
| 457 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L5_0), |
| 458 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L5_1), |
| 459 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L6_0), |
| 460 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L6_1), |
| 461 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L7_0), |
| 462 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L7_1), |
| 463 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L8_0), |
| 464 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L8_1), |
| 465 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L9_0), |
| 466 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L9_1), |
| 467 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L10_0), |
| 468 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L10_1), |
| 469 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L11_0), |
| 470 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L11_1), |
| 471 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L12_0), |
| 472 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L12_1), |
| 473 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L14_0), |
| 474 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L14_1), |
| 475 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L15_0), |
| 476 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L15_1), |
| 477 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L16_0), |
| 478 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L16_1), |
| 479 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L17_0), |
| 480 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L17_1), |
| 481 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L18_0), |
| 482 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L18_1), |
| 483 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L21_0), |
| 484 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L21_1), |
| 485 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L22_0), |
| 486 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L22_1), |
| 487 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L23_0), |
| 488 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L23_1), |
| 489 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L24_0), |
| 490 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L24_1), |
| 491 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L25_0), |
| 492 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L25_1), |
| 493 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L26_0), |
| 494 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L26_1), |
| 495 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L27_0), |
| 496 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L27_1), |
| 497 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L28_0), |
| 498 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L28_1), |
| 499 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L29_0), |
| 500 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L29_1), |
| 501 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L30_0), |
| 502 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L30_1), |
| 503 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L31_0), |
| 504 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L31_1), |
| 505 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L32_0), |
| 506 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L32_1), |
| 507 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L33_0), |
| 508 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L33_1), |
| 509 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L34_0), |
| 510 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L34_1), |
| 511 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L35_0), |
| 512 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L35_1), |
| 513 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L36_0), |
| 514 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_L36_1), |
| 515 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_CLK1_0), |
| 516 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_CLK1_1), |
| 517 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_CLK2_0), |
| 518 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_CLK2_1), |
| 519 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_LVS1), |
| 520 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_LVS3), |
| 521 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_LVS4), |
| 522 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_LVS5), |
| 523 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_LVS6), |
| 524 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_LVS7), |
| 525 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_NCP_0), |
| 526 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_NCP_1), |
| 527 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_CXO_BUFFERS), |
| 528 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_USB_OTG_SWITCH), |
| 529 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_HDMI_SWITCH), |
| 530 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_QDSS_CLK), |
| 531 | MSM_RPM_STATUS_ID_MAP(8930, PM8917_VOLTAGE_CORNER), |
| 532 | }, |
| 533 | .target_ctrl_id = { |
| 534 | MSM_RPM_CTRL_MAP(8930, VERSION_MAJOR), |
| 535 | MSM_RPM_CTRL_MAP(8930, VERSION_MINOR), |
| 536 | MSM_RPM_CTRL_MAP(8930, VERSION_BUILD), |
| 537 | MSM_RPM_CTRL_MAP(8930, REQ_CTX_0), |
| 538 | MSM_RPM_CTRL_MAP(8930, REQ_SEL_0), |
| 539 | MSM_RPM_CTRL_MAP(8930, ACK_CTX_0), |
| 540 | MSM_RPM_CTRL_MAP(8930, ACK_SEL_0), |
| 541 | }, |
| 542 | .sel_invalidate = MSM_RPM_8930_SEL_INVALIDATE, |
| 543 | .sel_notification = MSM_RPM_8930_SEL_NOTIFICATION, |
| 544 | .sel_last = MSM_RPM_8930_SEL_LAST, |
| 545 | .ver = {3, 0, 0}, |
| 546 | }; |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 547 | struct platform_device msm8930_rpm_device = { |
| 548 | .name = "msm_rpm", |
| 549 | .id = -1, |
| 550 | }; |
| 551 | |
| 552 | static struct msm_rpm_log_platform_data msm_rpm_log_pdata = { |
Anji Jonnala | 11efe5a | 2013-03-28 13:45:58 +0530 | [diff] [blame] | 553 | .phys_addr_base = 0x10B6A0, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 554 | .reg_offsets = { |
| 555 | [MSM_RPM_LOG_PAGE_INDICES] = 0x00000080, |
| 556 | [MSM_RPM_LOG_PAGE_BUFFER] = 0x000000A0, |
| 557 | }, |
| 558 | .phys_size = SZ_8K, |
Anji Jonnala | 11efe5a | 2013-03-28 13:45:58 +0530 | [diff] [blame] | 559 | .log_len = 8192, /* log's buffer length in bytes */ |
| 560 | .log_len_mask = (8192 >> 2) - 1, /* length mask in units of u32 */ |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 561 | }; |
| 562 | |
| 563 | struct platform_device msm8930_rpm_log_device = { |
| 564 | .name = "msm_rpm_log", |
| 565 | .id = -1, |
| 566 | .dev = { |
| 567 | .platform_data = &msm_rpm_log_pdata, |
| 568 | }, |
| 569 | }; |
| 570 | |
| 571 | static struct msm_rpmstats_platform_data msm_rpm_stat_pdata = { |
Priyanka Mathur | 71859f4 | 2012-10-17 10:54:35 -0700 | [diff] [blame] | 572 | .version = 1, |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 573 | }; |
| 574 | |
Priyanka Mathur | 71859f4 | 2012-10-17 10:54:35 -0700 | [diff] [blame] | 575 | static struct resource msm_rpm_stat_resource[] = { |
| 576 | { |
| 577 | .start = 0x0010D204, |
| 578 | .end = 0x0010D204 + SZ_8K, |
| 579 | .flags = IORESOURCE_MEM, |
| 580 | .name = "phys_addr_base" |
| 581 | |
| 582 | }, |
| 583 | }; |
| 584 | |
| 585 | |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 586 | struct platform_device msm8930_rpm_stat_device = { |
| 587 | .name = "msm_rpm_stat", |
| 588 | .id = -1, |
Priyanka Mathur | 71859f4 | 2012-10-17 10:54:35 -0700 | [diff] [blame] | 589 | .resource = msm_rpm_stat_resource, |
| 590 | .num_resources = ARRAY_SIZE(msm_rpm_stat_resource), |
| 591 | .dev = { |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 592 | .platform_data = &msm_rpm_stat_pdata, |
Priyanka Mathur | 71859f4 | 2012-10-17 10:54:35 -0700 | [diff] [blame] | 593 | } |
Praveen Chidambaram | 7849901 | 2011-11-01 17:15:17 -0600 | [diff] [blame] | 594 | }; |
| 595 | |
Anji Jonnala | 9312992 | 2012-10-09 20:57:53 +0530 | [diff] [blame] | 596 | static struct resource resources_rpm_master_stats[] = { |
| 597 | { |
| 598 | .start = MSM8930_RPM_MASTER_STATS_BASE, |
| 599 | .end = MSM8930_RPM_MASTER_STATS_BASE + SZ_256, |
| 600 | .flags = IORESOURCE_MEM, |
| 601 | }, |
| 602 | }; |
| 603 | |
| 604 | static char *master_names[] = { |
| 605 | "KPSS", |
| 606 | "MPSS", |
| 607 | "LPASS", |
| 608 | "RIVA", |
| 609 | }; |
| 610 | |
| 611 | static struct msm_rpm_master_stats_platform_data msm_rpm_master_stat_pdata = { |
| 612 | .masters = master_names, |
| 613 | .nomasters = ARRAY_SIZE(master_names), |
| 614 | }; |
| 615 | |
| 616 | struct platform_device msm8930_rpm_master_stat_device = { |
| 617 | .name = "msm_rpm_master_stat", |
| 618 | .id = -1, |
| 619 | .num_resources = ARRAY_SIZE(resources_rpm_master_stats), |
| 620 | .resource = resources_rpm_master_stats, |
| 621 | .dev = { |
| 622 | .platform_data = &msm_rpm_master_stat_pdata, |
| 623 | }, |
| 624 | }; |
| 625 | |
Girish Mahadevan | 898c56d | 2012-06-05 16:09:19 -0600 | [diff] [blame] | 626 | static struct resource msm_rpm_rbcpr_resource = { |
Girish Mahadevan | ea1a1d7 | 2012-09-10 12:43:26 -0600 | [diff] [blame] | 627 | .start = 0x0010DB00, |
| 628 | .end = 0x0010DB00 + SZ_8K - 1, |
Girish Mahadevan | 898c56d | 2012-06-05 16:09:19 -0600 | [diff] [blame] | 629 | .flags = IORESOURCE_MEM, |
| 630 | }; |
| 631 | |
| 632 | static struct msm_rpmrbcpr_platform_data msm_rpm_rbcpr_pdata = { |
| 633 | .rbcpr_data = { |
| 634 | .upside_steps = 1, |
| 635 | .downside_steps = 2, |
| 636 | .svs_voltage = 1050000, |
| 637 | .nominal_voltage = 1162500, |
| 638 | .turbo_voltage = 1287500, |
| 639 | }, |
| 640 | }; |
| 641 | |
| 642 | struct platform_device msm8930_rpm_rbcpr_device = { |
| 643 | .name = "msm_rpm_rbcpr", |
| 644 | .id = -1, |
| 645 | .dev = { |
| 646 | .platform_data = &msm_rpm_rbcpr_pdata, |
| 647 | }, |
| 648 | .resource = &msm_rpm_rbcpr_resource, |
| 649 | }; |
| 650 | |
Gagan Mac | cd5b327 | 2012-02-09 18:13:10 -0700 | [diff] [blame] | 651 | struct platform_device msm_bus_8930_sys_fabric = { |
| 652 | .name = "msm_bus_fabric", |
| 653 | .id = MSM_BUS_FAB_SYSTEM, |
| 654 | }; |
| 655 | struct platform_device msm_bus_8930_apps_fabric = { |
| 656 | .name = "msm_bus_fabric", |
| 657 | .id = MSM_BUS_FAB_APPSS, |
| 658 | }; |
| 659 | struct platform_device msm_bus_8930_mm_fabric = { |
| 660 | .name = "msm_bus_fabric", |
| 661 | .id = MSM_BUS_FAB_MMSS, |
| 662 | }; |
| 663 | struct platform_device msm_bus_8930_sys_fpb = { |
| 664 | .name = "msm_bus_fabric", |
| 665 | .id = MSM_BUS_FAB_SYSTEM_FPB, |
| 666 | }; |
| 667 | struct platform_device msm_bus_8930_cpss_fpb = { |
| 668 | .name = "msm_bus_fabric", |
| 669 | .id = MSM_BUS_FAB_CPSS_FPB, |
| 670 | }; |
| 671 | |
Matt Wagantall | ab730bd | 2012-06-07 20:13:51 -0700 | [diff] [blame] | 672 | struct platform_device msm8627_device_acpuclk = { |
| 673 | .name = "acpuclk-8627", |
| 674 | .id = -1, |
| 675 | }; |
| 676 | |
Patrick Daly | c1227cb | 2012-08-28 13:39:17 -0700 | [diff] [blame] | 677 | static struct acpuclk_platform_data acpuclk_8930_pdata = { |
| 678 | .uses_pm8917 = false, |
| 679 | }; |
| 680 | |
Matt Wagantall | 6dcfa92 | 2012-06-07 20:13:51 -0700 | [diff] [blame] | 681 | struct platform_device msm8930_device_acpuclk = { |
| 682 | .name = "acpuclk-8930", |
| 683 | .id = -1, |
Patrick Daly | c1227cb | 2012-08-28 13:39:17 -0700 | [diff] [blame] | 684 | .dev = { |
| 685 | .platform_data = &acpuclk_8930_pdata, |
| 686 | }, |
Matt Wagantall | 6dcfa92 | 2012-06-07 20:13:51 -0700 | [diff] [blame] | 687 | }; |
| 688 | |
Tianyi Gou | 12370f1 | 2012-07-23 19:13:57 -0700 | [diff] [blame] | 689 | struct platform_device msm8930aa_device_acpuclk = { |
| 690 | .name = "acpuclk-8930aa", |
| 691 | .id = -1, |
| 692 | }; |
| 693 | |
Tianyi Gou | 2520b6e | 2012-10-29 19:13:53 -0700 | [diff] [blame] | 694 | static struct acpuclk_platform_data acpuclk_8930ab_pdata = { |
| 695 | .uses_pm8917 = false, |
| 696 | }; |
| 697 | |
| 698 | struct platform_device msm8930ab_device_acpuclk = { |
| 699 | .name = "acpuclk-8930ab", |
| 700 | .id = -1, |
| 701 | .dev = { |
| 702 | .platform_data = &acpuclk_8930ab_pdata, |
| 703 | }, |
| 704 | }; |
| 705 | |
Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 706 | static struct fs_driver_data gfx3d_fs_data = { |
| 707 | .clks = (struct fs_clk_data[]){ |
| 708 | { .name = "core_clk", .reset_rate = 27000000 }, |
| 709 | { .name = "iface_clk" }, |
| 710 | { .name = "bus_clk" }, |
| 711 | { 0 } |
| 712 | }, |
| 713 | .bus_port0 = MSM_BUS_MASTER_GRAPHICS_3D, |
| 714 | }; |
| 715 | |
| 716 | static struct fs_driver_data ijpeg_fs_data = { |
| 717 | .clks = (struct fs_clk_data[]){ |
| 718 | { .name = "core_clk" }, |
| 719 | { .name = "iface_clk" }, |
| 720 | { .name = "bus_clk" }, |
| 721 | { 0 } |
| 722 | }, |
| 723 | .bus_port0 = MSM_BUS_MASTER_JPEG_ENC, |
| 724 | }; |
| 725 | |
Tianyi Gou | 723843b | 2012-06-13 15:24:56 -0700 | [diff] [blame] | 726 | static struct fs_driver_data mdp_fs_data_8930 = { |
Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 727 | .clks = (struct fs_clk_data[]){ |
| 728 | { .name = "core_clk" }, |
| 729 | { .name = "iface_clk" }, |
| 730 | { .name = "bus_clk" }, |
| 731 | { .name = "vsync_clk" }, |
| 732 | { .name = "lut_clk" }, |
| 733 | { .name = "tv_src_clk" }, |
| 734 | { .name = "tv_clk" }, |
Matt Wagantall | c33c1ed | 2012-07-23 17:19:08 -0700 | [diff] [blame] | 735 | { .name = "reset1_clk" }, |
Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 736 | { 0 } |
| 737 | }, |
| 738 | .bus_port0 = MSM_BUS_MASTER_MDP_PORT0, |
| 739 | .bus_port1 = MSM_BUS_MASTER_MDP_PORT1, |
| 740 | }; |
| 741 | |
Aravind Venkateswaran | 896d2f9 | 2012-10-29 17:54:55 -0700 | [diff] [blame] | 742 | static struct fs_driver_data mdp_fs_data_8930_pm8917 = { |
| 743 | .clks = (struct fs_clk_data[]){ |
| 744 | { .name = "core_clk" }, |
| 745 | { .name = "iface_clk" }, |
| 746 | { .name = "bus_clk" }, |
| 747 | { .name = "vsync_clk" }, |
| 748 | { .name = "lut_clk" }, |
| 749 | { .name = "reset1_clk" }, |
| 750 | { 0 } |
| 751 | }, |
| 752 | .bus_port0 = MSM_BUS_MASTER_MDP_PORT0, |
| 753 | .bus_port1 = MSM_BUS_MASTER_MDP_PORT1, |
| 754 | }; |
| 755 | |
Tianyi Gou | 723843b | 2012-06-13 15:24:56 -0700 | [diff] [blame] | 756 | static struct fs_driver_data mdp_fs_data_8627 = { |
| 757 | .clks = (struct fs_clk_data[]){ |
| 758 | { .name = "core_clk" }, |
| 759 | { .name = "iface_clk" }, |
| 760 | { .name = "bus_clk" }, |
| 761 | { .name = "vsync_clk" }, |
| 762 | { .name = "lut_clk" }, |
| 763 | { .name = "reset1_clk" }, |
| 764 | { 0 } |
| 765 | }, |
| 766 | .bus_port0 = MSM_BUS_MASTER_MDP_PORT0, |
| 767 | .bus_port1 = MSM_BUS_MASTER_MDP_PORT1, |
| 768 | }; |
| 769 | |
Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 770 | static struct fs_driver_data rot_fs_data = { |
| 771 | .clks = (struct fs_clk_data[]){ |
| 772 | { .name = "core_clk" }, |
| 773 | { .name = "iface_clk" }, |
| 774 | { .name = "bus_clk" }, |
| 775 | { 0 } |
| 776 | }, |
| 777 | .bus_port0 = MSM_BUS_MASTER_ROTATOR, |
| 778 | }; |
| 779 | |
| 780 | static struct fs_driver_data ved_fs_data = { |
| 781 | .clks = (struct fs_clk_data[]){ |
| 782 | { .name = "core_clk" }, |
| 783 | { .name = "iface_clk" }, |
| 784 | { .name = "bus_clk" }, |
| 785 | { 0 } |
| 786 | }, |
| 787 | .bus_port0 = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 788 | .bus_port1 = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 789 | }; |
| 790 | |
| 791 | static struct fs_driver_data vfe_fs_data = { |
| 792 | .clks = (struct fs_clk_data[]){ |
| 793 | { .name = "core_clk" }, |
| 794 | { .name = "iface_clk" }, |
| 795 | { .name = "bus_clk" }, |
| 796 | { 0 } |
| 797 | }, |
| 798 | .bus_port0 = MSM_BUS_MASTER_VFE, |
| 799 | }; |
| 800 | |
| 801 | static struct fs_driver_data vpe_fs_data = { |
| 802 | .clks = (struct fs_clk_data[]){ |
| 803 | { .name = "core_clk" }, |
| 804 | { .name = "iface_clk" }, |
| 805 | { .name = "bus_clk" }, |
| 806 | { 0 } |
| 807 | }, |
| 808 | .bus_port0 = MSM_BUS_MASTER_VPE, |
| 809 | }; |
| 810 | |
| 811 | struct platform_device *msm8930_footswitch[] __initdata = { |
Tianyi Gou | 723843b | 2012-06-13 15:24:56 -0700 | [diff] [blame] | 812 | FS_8X60(FS_MDP, "vdd", "mdp.0", &mdp_fs_data_8930), |
Matt Wagantall | 316f2fc | 2012-05-03 20:41:42 -0700 | [diff] [blame] | 813 | FS_8X60(FS_ROT, "vdd", "msm_rotator.0", &rot_fs_data), |
Matt Wagantall | e4454b8 | 2012-05-03 20:48:01 -0700 | [diff] [blame] | 814 | FS_8X60(FS_IJPEG, "vdd", "msm_gemini.0", &ijpeg_fs_data), |
Kiran Kumar H N | fa18a03 | 2012-06-25 14:34:18 -0700 | [diff] [blame] | 815 | FS_8X60(FS_VFE, "vdd", "msm_vfe.0", &vfe_fs_data), |
| 816 | FS_8X60(FS_VPE, "vdd", "msm_vpe.0", &vpe_fs_data), |
Matt Wagantall | d6fbf23 | 2012-05-03 20:09:28 -0700 | [diff] [blame] | 817 | FS_8X60(FS_GFX3D, "vdd", "kgsl-3d0.0", &gfx3d_fs_data), |
Matt Wagantall | 5e46aac | 2012-05-03 20:20:18 -0700 | [diff] [blame] | 818 | FS_8X60(FS_VED, "vdd", "msm_vidc.0", &ved_fs_data), |
Matt Wagantall | 1f65d9d | 2012-04-25 14:24:20 -0700 | [diff] [blame] | 819 | }; |
| 820 | unsigned msm8930_num_footswitch __initdata = ARRAY_SIZE(msm8930_footswitch); |
| 821 | |
Aravind Venkateswaran | 896d2f9 | 2012-10-29 17:54:55 -0700 | [diff] [blame] | 822 | struct platform_device *msm8930_pm8917_footswitch[] __initdata = { |
| 823 | FS_8X60(FS_MDP, "vdd", "mdp.0", &mdp_fs_data_8930_pm8917), |
| 824 | FS_8X60(FS_ROT, "vdd", "msm_rotator.0", &rot_fs_data), |
| 825 | FS_8X60(FS_IJPEG, "vdd", "msm_gemini.0", &ijpeg_fs_data), |
| 826 | FS_8X60(FS_VFE, "vdd", "msm_vfe.0", &vfe_fs_data), |
| 827 | FS_8X60(FS_VPE, "vdd", "msm_vpe.0", &vpe_fs_data), |
| 828 | FS_8X60(FS_GFX3D, "vdd", "kgsl-3d0.0", &gfx3d_fs_data), |
| 829 | FS_8X60(FS_VED, "vdd", "msm_vidc.0", &ved_fs_data), |
| 830 | }; |
| 831 | unsigned msm8930_pm8917_num_footswitch __initdata = |
| 832 | ARRAY_SIZE(msm8930_pm8917_footswitch); |
| 833 | |
Tianyi Gou | 723843b | 2012-06-13 15:24:56 -0700 | [diff] [blame] | 834 | struct platform_device *msm8627_footswitch[] __initdata = { |
| 835 | FS_8X60(FS_MDP, "vdd", "mdp.0", &mdp_fs_data_8627), |
| 836 | FS_8X60(FS_ROT, "vdd", "msm_rotator.0", &rot_fs_data), |
| 837 | FS_8X60(FS_IJPEG, "vdd", "msm_gemini.0", &ijpeg_fs_data), |
| 838 | FS_8X60(FS_VFE, "vdd", "msm_vfe.0", &vfe_fs_data), |
| 839 | FS_8X60(FS_VPE, "vdd", "msm_vpe.0", &vpe_fs_data), |
| 840 | FS_8X60(FS_GFX3D, "vdd", "kgsl-3d0.0", &gfx3d_fs_data), |
| 841 | FS_8X60(FS_VED, "vdd", "msm_vidc.0", &ved_fs_data), |
| 842 | }; |
| 843 | unsigned msm8627_num_footswitch __initdata = ARRAY_SIZE(msm8627_footswitch); |
| 844 | |
Arun Menon | aabf263 | 2012-02-24 15:30:47 -0800 | [diff] [blame] | 845 | /* MSM Video core device */ |
| 846 | #ifdef CONFIG_MSM_BUS_SCALING |
| 847 | static struct msm_bus_vectors vidc_init_vectors[] = { |
| 848 | { |
| 849 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 850 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 851 | .ab = 0, |
| 852 | .ib = 0, |
| 853 | }, |
| 854 | { |
| 855 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 856 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 857 | .ab = 0, |
| 858 | .ib = 0, |
| 859 | }, |
| 860 | { |
| 861 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 862 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 863 | .ab = 0, |
| 864 | .ib = 0, |
| 865 | }, |
| 866 | { |
| 867 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 868 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 869 | .ab = 0, |
| 870 | .ib = 0, |
| 871 | }, |
| 872 | }; |
| 873 | static struct msm_bus_vectors vidc_venc_vga_vectors[] = { |
| 874 | { |
| 875 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 876 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 877 | .ab = 54525952, |
| 878 | .ib = 436207616, |
| 879 | }, |
| 880 | { |
| 881 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 882 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 883 | .ab = 72351744, |
| 884 | .ib = 289406976, |
| 885 | }, |
| 886 | { |
| 887 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 888 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 889 | .ab = 500000, |
| 890 | .ib = 1000000, |
| 891 | }, |
| 892 | { |
| 893 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 894 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 895 | .ab = 500000, |
| 896 | .ib = 1000000, |
| 897 | }, |
| 898 | }; |
| 899 | static struct msm_bus_vectors vidc_vdec_vga_vectors[] = { |
| 900 | { |
| 901 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 902 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 903 | .ab = 40894464, |
| 904 | .ib = 327155712, |
| 905 | }, |
| 906 | { |
| 907 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 908 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 909 | .ab = 48234496, |
| 910 | .ib = 192937984, |
| 911 | }, |
| 912 | { |
| 913 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 914 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 915 | .ab = 500000, |
| 916 | .ib = 2000000, |
| 917 | }, |
| 918 | { |
| 919 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 920 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 921 | .ab = 500000, |
| 922 | .ib = 2000000, |
| 923 | }, |
| 924 | }; |
| 925 | static struct msm_bus_vectors vidc_venc_720p_vectors[] = { |
| 926 | { |
| 927 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 928 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 929 | .ab = 163577856, |
| 930 | .ib = 1308622848, |
| 931 | }, |
| 932 | { |
| 933 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 934 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 935 | .ab = 219152384, |
| 936 | .ib = 876609536, |
| 937 | }, |
| 938 | { |
| 939 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 940 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 941 | .ab = 1750000, |
| 942 | .ib = 3500000, |
| 943 | }, |
| 944 | { |
| 945 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 946 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 947 | .ab = 1750000, |
| 948 | .ib = 3500000, |
| 949 | }, |
| 950 | }; |
| 951 | static struct msm_bus_vectors vidc_vdec_720p_vectors[] = { |
| 952 | { |
| 953 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 954 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 955 | .ab = 121634816, |
| 956 | .ib = 973078528, |
| 957 | }, |
| 958 | { |
| 959 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 960 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 961 | .ab = 155189248, |
| 962 | .ib = 620756992, |
| 963 | }, |
| 964 | { |
| 965 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 966 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 967 | .ab = 1750000, |
| 968 | .ib = 7000000, |
| 969 | }, |
| 970 | { |
| 971 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 972 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 973 | .ab = 1750000, |
| 974 | .ib = 7000000, |
| 975 | }, |
| 976 | }; |
| 977 | static struct msm_bus_vectors vidc_venc_1080p_vectors[] = { |
| 978 | { |
| 979 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 980 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 981 | .ab = 372244480, |
| 982 | .ib = 2560000000U, |
| 983 | }, |
| 984 | { |
| 985 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 986 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 987 | .ab = 501219328, |
| 988 | .ib = 2560000000U, |
| 989 | }, |
| 990 | { |
| 991 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 992 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 993 | .ab = 2500000, |
| 994 | .ib = 5000000, |
| 995 | }, |
| 996 | { |
| 997 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 998 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 999 | .ab = 2500000, |
| 1000 | .ib = 5000000, |
| 1001 | }, |
| 1002 | }; |
| 1003 | static struct msm_bus_vectors vidc_vdec_1080p_vectors[] = { |
| 1004 | { |
| 1005 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 1006 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1007 | .ab = 222298112, |
| 1008 | .ib = 2560000000U, |
| 1009 | }, |
| 1010 | { |
| 1011 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 1012 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1013 | .ab = 330301440, |
| 1014 | .ib = 2560000000U, |
| 1015 | }, |
| 1016 | { |
| 1017 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1018 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1019 | .ab = 2500000, |
| 1020 | .ib = 700000000, |
| 1021 | }, |
| 1022 | { |
| 1023 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1024 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1025 | .ab = 2500000, |
| 1026 | .ib = 10000000, |
| 1027 | }, |
| 1028 | }; |
Arun Menon | b31fefd | 2012-07-19 14:02:13 -0700 | [diff] [blame] | 1029 | static struct msm_bus_vectors vidc_venc_1080p_turbo_vectors[] = { |
| 1030 | { |
| 1031 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 1032 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1033 | .ab = 222298112, |
| 1034 | .ib = 3522000000U, |
| 1035 | }, |
| 1036 | { |
| 1037 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 1038 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1039 | .ab = 330301440, |
| 1040 | .ib = 3522000000U, |
| 1041 | }, |
| 1042 | { |
| 1043 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1044 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1045 | .ab = 2500000, |
| 1046 | .ib = 700000000, |
| 1047 | }, |
| 1048 | { |
| 1049 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1050 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1051 | .ab = 2500000, |
| 1052 | .ib = 10000000, |
| 1053 | }, |
| 1054 | }; |
| 1055 | static struct msm_bus_vectors vidc_vdec_1080p_turbo_vectors[] = { |
| 1056 | { |
| 1057 | .src = MSM_BUS_MASTER_HD_CODEC_PORT0, |
| 1058 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1059 | .ab = 222298112, |
| 1060 | .ib = 3522000000U, |
| 1061 | }, |
| 1062 | { |
| 1063 | .src = MSM_BUS_MASTER_HD_CODEC_PORT1, |
| 1064 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1065 | .ab = 330301440, |
| 1066 | .ib = 3522000000U, |
| 1067 | }, |
| 1068 | { |
| 1069 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1070 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1071 | .ab = 2500000, |
| 1072 | .ib = 700000000, |
| 1073 | }, |
| 1074 | { |
| 1075 | .src = MSM_BUS_MASTER_AMPSS_M0, |
| 1076 | .dst = MSM_BUS_SLAVE_EBI_CH0, |
| 1077 | .ab = 2500000, |
| 1078 | .ib = 10000000, |
| 1079 | }, |
| 1080 | }; |
Arun Menon | aabf263 | 2012-02-24 15:30:47 -0800 | [diff] [blame] | 1081 | |
| 1082 | static struct msm_bus_paths vidc_bus_client_config[] = { |
| 1083 | { |
| 1084 | ARRAY_SIZE(vidc_init_vectors), |
| 1085 | vidc_init_vectors, |
| 1086 | }, |
| 1087 | { |
| 1088 | ARRAY_SIZE(vidc_venc_vga_vectors), |
| 1089 | vidc_venc_vga_vectors, |
| 1090 | }, |
| 1091 | { |
| 1092 | ARRAY_SIZE(vidc_vdec_vga_vectors), |
| 1093 | vidc_vdec_vga_vectors, |
| 1094 | }, |
| 1095 | { |
| 1096 | ARRAY_SIZE(vidc_venc_720p_vectors), |
| 1097 | vidc_venc_720p_vectors, |
| 1098 | }, |
| 1099 | { |
| 1100 | ARRAY_SIZE(vidc_vdec_720p_vectors), |
| 1101 | vidc_vdec_720p_vectors, |
| 1102 | }, |
| 1103 | { |
| 1104 | ARRAY_SIZE(vidc_venc_1080p_vectors), |
| 1105 | vidc_venc_1080p_vectors, |
| 1106 | }, |
| 1107 | { |
| 1108 | ARRAY_SIZE(vidc_vdec_1080p_vectors), |
| 1109 | vidc_vdec_1080p_vectors, |
| 1110 | }, |
Arun Menon | b31fefd | 2012-07-19 14:02:13 -0700 | [diff] [blame] | 1111 | { |
| 1112 | ARRAY_SIZE(vidc_venc_1080p_turbo_vectors), |
| 1113 | vidc_vdec_1080p_turbo_vectors, |
| 1114 | }, |
| 1115 | { |
| 1116 | ARRAY_SIZE(vidc_vdec_1080p_turbo_vectors), |
| 1117 | vidc_vdec_1080p_turbo_vectors, |
| 1118 | }, |
Arun Menon | aabf263 | 2012-02-24 15:30:47 -0800 | [diff] [blame] | 1119 | }; |
| 1120 | |
| 1121 | static struct msm_bus_scale_pdata vidc_bus_client_data = { |
| 1122 | vidc_bus_client_config, |
| 1123 | ARRAY_SIZE(vidc_bus_client_config), |
| 1124 | .name = "vidc", |
| 1125 | }; |
| 1126 | #endif |
| 1127 | |
| 1128 | #define MSM_VIDC_BASE_PHYS 0x04400000 |
| 1129 | #define MSM_VIDC_BASE_SIZE 0x00100000 |
| 1130 | |
| 1131 | static struct resource apq8930_device_vidc_resources[] = { |
| 1132 | { |
| 1133 | .start = MSM_VIDC_BASE_PHYS, |
| 1134 | .end = MSM_VIDC_BASE_PHYS + MSM_VIDC_BASE_SIZE - 1, |
| 1135 | .flags = IORESOURCE_MEM, |
| 1136 | }, |
| 1137 | { |
| 1138 | .start = VCODEC_IRQ, |
| 1139 | .end = VCODEC_IRQ, |
| 1140 | .flags = IORESOURCE_IRQ, |
| 1141 | }, |
| 1142 | }; |
| 1143 | |
| 1144 | struct msm_vidc_platform_data apq8930_vidc_platform_data = { |
| 1145 | #ifdef CONFIG_MSM_BUS_SCALING |
| 1146 | .vidc_bus_client_pdata = &vidc_bus_client_data, |
| 1147 | #endif |
| 1148 | #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION |
| 1149 | .memtype = ION_CP_MM_HEAP_ID, |
| 1150 | .enable_ion = 1, |
Deepak Kotur | 8097f78 | 2012-05-14 14:13:06 -0700 | [diff] [blame] | 1151 | .cp_enabled = 1, |
Arun Menon | aabf263 | 2012-02-24 15:30:47 -0800 | [diff] [blame] | 1152 | #else |
| 1153 | .memtype = MEMTYPE_EBI1, |
| 1154 | .enable_ion = 0, |
| 1155 | #endif |
Anil Gahlot | d0ce26d | 2012-05-08 17:58:46 -0700 | [diff] [blame] | 1156 | .disable_dmx = 1, |
Arun Menon | aabf263 | 2012-02-24 15:30:47 -0800 | [diff] [blame] | 1157 | .disable_fullhd = 0, |
Mohan Kumar Gubbihalli Lachma Naik | 885fcc5 | 2012-10-26 17:55:27 -0700 | [diff] [blame] | 1158 | .cont_mode_dpb_count = 18, |
Riaz Rahaman | 84f8c68 | 2012-05-30 13:32:10 +0530 | [diff] [blame] | 1159 | .fw_addr = 0x9fe00000, |
Arun Menon | aabf263 | 2012-02-24 15:30:47 -0800 | [diff] [blame] | 1160 | }; |
| 1161 | |
| 1162 | struct platform_device apq8930_msm_device_vidc = { |
| 1163 | .name = "msm_vidc", |
| 1164 | .id = 0, |
| 1165 | .num_resources = ARRAY_SIZE(apq8930_device_vidc_resources), |
| 1166 | .resource = apq8930_device_vidc_resources, |
| 1167 | .dev = { |
| 1168 | .platform_data = &apq8930_vidc_platform_data, |
| 1169 | }, |
| 1170 | }; |
| 1171 | |
| 1172 | struct platform_device *vidc_device[] __initdata = { |
| 1173 | &apq8930_msm_device_vidc |
| 1174 | }; |
| 1175 | |
| 1176 | void __init msm8930_add_vidc_device(void) |
| 1177 | { |
| 1178 | if (cpu_is_msm8627()) { |
| 1179 | struct msm_vidc_platform_data *pdata; |
| 1180 | pdata = (struct msm_vidc_platform_data *) |
| 1181 | apq8930_msm_device_vidc.dev.platform_data; |
| 1182 | pdata->disable_fullhd = 1; |
| 1183 | } |
| 1184 | platform_add_devices(vidc_device, ARRAY_SIZE(vidc_device)); |
| 1185 | } |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 1186 | |
| 1187 | struct msm_iommu_domain_name msm8930_iommu_ctx_names[] = { |
| 1188 | /* Camera */ |
| 1189 | { |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 1190 | .name = "ijpeg_src", |
| 1191 | .domain = CAMERA_DOMAIN, |
| 1192 | }, |
| 1193 | /* Camera */ |
| 1194 | { |
| 1195 | .name = "ijpeg_dst", |
| 1196 | .domain = CAMERA_DOMAIN, |
| 1197 | }, |
| 1198 | /* Camera */ |
| 1199 | { |
| 1200 | .name = "jpegd_src", |
| 1201 | .domain = CAMERA_DOMAIN, |
| 1202 | }, |
| 1203 | /* Camera */ |
| 1204 | { |
| 1205 | .name = "jpegd_dst", |
| 1206 | .domain = CAMERA_DOMAIN, |
| 1207 | }, |
| 1208 | /* Rotator */ |
| 1209 | { |
| 1210 | .name = "rot_src", |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 1211 | .domain = ROTATOR_SRC_DOMAIN, |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 1212 | }, |
| 1213 | /* Rotator */ |
| 1214 | { |
| 1215 | .name = "rot_dst", |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 1216 | .domain = ROTATOR_SRC_DOMAIN, |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 1217 | }, |
| 1218 | /* Video */ |
| 1219 | { |
| 1220 | .name = "vcodec_a_mm1", |
| 1221 | .domain = VIDEO_DOMAIN, |
| 1222 | }, |
| 1223 | /* Video */ |
| 1224 | { |
| 1225 | .name = "vcodec_b_mm2", |
| 1226 | .domain = VIDEO_DOMAIN, |
| 1227 | }, |
| 1228 | /* Video */ |
| 1229 | { |
| 1230 | .name = "vcodec_a_stream", |
| 1231 | .domain = VIDEO_DOMAIN, |
| 1232 | }, |
| 1233 | }; |
| 1234 | |
| 1235 | static struct mem_pool msm8930_video_pools[] = { |
| 1236 | /* |
| 1237 | * Video hardware has the following requirements: |
| 1238 | * 1. All video addresses used by the video hardware must be at a higher |
| 1239 | * address than video firmware address. |
| 1240 | * 2. Video hardware can only access a range of 256MB from the base of |
| 1241 | * the video firmware. |
| 1242 | */ |
| 1243 | [VIDEO_FIRMWARE_POOL] = |
| 1244 | /* Low addresses, intended for video firmware */ |
| 1245 | { |
| 1246 | .paddr = SZ_128K, |
| 1247 | .size = SZ_16M - SZ_128K, |
| 1248 | }, |
| 1249 | [VIDEO_MAIN_POOL] = |
| 1250 | /* Main video pool */ |
| 1251 | { |
| 1252 | .paddr = SZ_16M, |
| 1253 | .size = SZ_256M - SZ_16M, |
| 1254 | }, |
| 1255 | [GEN_POOL] = |
| 1256 | /* Remaining address space up to 2G */ |
| 1257 | { |
| 1258 | .paddr = SZ_256M, |
| 1259 | .size = SZ_2G - SZ_256M, |
| 1260 | }, |
| 1261 | }; |
| 1262 | |
| 1263 | static struct mem_pool msm8930_camera_pools[] = { |
| 1264 | [GEN_POOL] = |
| 1265 | /* One address space for camera */ |
| 1266 | { |
| 1267 | .paddr = SZ_128K, |
| 1268 | .size = SZ_2G - SZ_128K, |
| 1269 | }, |
| 1270 | }; |
| 1271 | |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 1272 | static struct mem_pool msm8930_display_read_pools[] = { |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 1273 | [GEN_POOL] = |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 1274 | /* One address space for display reads */ |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 1275 | { |
| 1276 | .paddr = SZ_128K, |
| 1277 | .size = SZ_2G - SZ_128K, |
| 1278 | }, |
| 1279 | }; |
| 1280 | |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 1281 | static struct mem_pool msm8930_rotator_src_pools[] = { |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 1282 | [GEN_POOL] = |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 1283 | /* One address space for rotator src */ |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 1284 | { |
| 1285 | .paddr = SZ_128K, |
| 1286 | .size = SZ_2G - SZ_128K, |
| 1287 | }, |
| 1288 | }; |
| 1289 | |
| 1290 | static struct msm_iommu_domain msm8930_iommu_domains[] = { |
| 1291 | [VIDEO_DOMAIN] = { |
| 1292 | .iova_pools = msm8930_video_pools, |
| 1293 | .npools = ARRAY_SIZE(msm8930_video_pools), |
| 1294 | }, |
| 1295 | [CAMERA_DOMAIN] = { |
| 1296 | .iova_pools = msm8930_camera_pools, |
| 1297 | .npools = ARRAY_SIZE(msm8930_camera_pools), |
| 1298 | }, |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 1299 | [DISPLAY_READ_DOMAIN] = { |
| 1300 | .iova_pools = msm8930_display_read_pools, |
| 1301 | .npools = ARRAY_SIZE(msm8930_display_read_pools), |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 1302 | }, |
Olav Haugan | ef95ae3 | 2012-05-15 09:50:30 -0700 | [diff] [blame] | 1303 | [ROTATOR_SRC_DOMAIN] = { |
| 1304 | .iova_pools = msm8930_rotator_src_pools, |
| 1305 | .npools = ARRAY_SIZE(msm8930_rotator_src_pools), |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 1306 | }, |
| 1307 | }; |
| 1308 | |
| 1309 | struct iommu_domains_pdata msm8930_iommu_domain_pdata = { |
| 1310 | .domains = msm8930_iommu_domains, |
| 1311 | .ndomains = ARRAY_SIZE(msm8930_iommu_domains), |
| 1312 | .domain_names = msm8930_iommu_ctx_names, |
| 1313 | .nnames = ARRAY_SIZE(msm8930_iommu_ctx_names), |
| 1314 | .domain_alloc_flags = 0, |
| 1315 | }; |
| 1316 | |
| 1317 | struct platform_device msm8930_iommu_domain_device = { |
| 1318 | .name = "iommu_domains", |
| 1319 | .id = -1, |
| 1320 | .dev = { |
| 1321 | .platform_data = &msm8930_iommu_domain_pdata, |
Laura Abbott | 532b2df | 2012-04-12 10:53:48 -0700 | [diff] [blame] | 1322 | } |
| 1323 | }; |
| 1324 | |
| 1325 | struct msm_rtb_platform_data msm8930_rtb_pdata = { |
| 1326 | .size = SZ_1M, |
| 1327 | }; |
| 1328 | |
| 1329 | static int __init msm_rtb_set_buffer_size(char *p) |
| 1330 | { |
| 1331 | int s; |
| 1332 | |
| 1333 | s = memparse(p, NULL); |
| 1334 | msm8930_rtb_pdata.size = ALIGN(s, SZ_4K); |
| 1335 | return 0; |
| 1336 | } |
| 1337 | early_param("msm_rtb_size", msm_rtb_set_buffer_size); |
| 1338 | |
| 1339 | |
| 1340 | struct platform_device msm8930_rtb_device = { |
| 1341 | .name = "msm_rtb", |
| 1342 | .id = -1, |
| 1343 | .dev = { |
| 1344 | .platform_data = &msm8930_rtb_pdata, |
Laura Abbott | 0577d7b | 2012-04-17 11:14:30 -0700 | [diff] [blame] | 1345 | }, |
| 1346 | }; |
Laura Abbott | f317304 | 2012-05-29 15:23:18 -0700 | [diff] [blame] | 1347 | |
| 1348 | #define MSM8930_L1_SIZE SZ_1M |
| 1349 | /* |
| 1350 | * The actual L2 size is smaller but we need a larger buffer |
| 1351 | * size to store other dump information |
| 1352 | */ |
| 1353 | #define MSM8930_L2_SIZE SZ_4M |
| 1354 | |
| 1355 | struct msm_cache_dump_platform_data msm8930_cache_dump_pdata = { |
| 1356 | .l2_size = MSM8930_L2_SIZE, |
| 1357 | .l1_size = MSM8930_L1_SIZE, |
| 1358 | }; |
| 1359 | |
| 1360 | struct platform_device msm8930_cache_dump_device = { |
| 1361 | .name = "msm_cache_dump", |
| 1362 | .id = -1, |
| 1363 | .dev = { |
| 1364 | .platform_data = &msm8930_cache_dump_pdata, |
| 1365 | }, |
| 1366 | }; |