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