Sreesudhan Ramakrish Ramkumar | 6be2781 | 2012-09-19 16:42:06 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2012, The Linux Foundation. All rights reserved. |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #include <linux/kernel.h> |
| 14 | #include <linux/init.h> |
| 15 | #include <linux/err.h> |
| 16 | #include <linux/ctype.h> |
| 17 | #include <linux/io.h> |
| 18 | #include <linux/spinlock.h> |
| 19 | #include <linux/delay.h> |
| 20 | #include <linux/clk.h> |
Vikram Mulukutla | 14ee37d | 2012-08-08 15:18:09 -0700 | [diff] [blame] | 21 | #include <linux/iopoll.h> |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 22 | |
Vikram Mulukutla | b7a1a74 | 2012-05-30 17:24:33 -0700 | [diff] [blame] | 23 | #include <mach/rpm-regulator-smd.h> |
Vikram Mulukutla | 19245e0 | 2012-07-23 15:58:04 -0700 | [diff] [blame] | 24 | #include <mach/socinfo.h> |
Vikram Mulukutla | 77140da | 2012-08-13 21:37:18 -0700 | [diff] [blame] | 25 | #include <mach/rpm-smd.h> |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 26 | |
| 27 | #include "clock-local2.h" |
| 28 | #include "clock-pll.h" |
Vikram Mulukutla | d08a152 | 2012-05-24 15:24:01 -0700 | [diff] [blame] | 29 | #include "clock-rpm.h" |
| 30 | #include "clock-voter.h" |
Vikram Mulukutla | fe0f5a5 | 2012-08-16 16:51:08 -0700 | [diff] [blame] | 31 | #include "clock-mdss-8974.h" |
Matt Wagantall | 33d01f5 | 2012-02-23 23:27:44 -0800 | [diff] [blame] | 32 | #include "clock.h" |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 33 | |
| 34 | enum { |
| 35 | GCC_BASE, |
| 36 | MMSS_BASE, |
| 37 | LPASS_BASE, |
Matt Wagantall | edf2fad | 2012-08-06 16:11:46 -0700 | [diff] [blame] | 38 | APCS_BASE, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 39 | N_BASES, |
| 40 | }; |
| 41 | |
| 42 | static void __iomem *virt_bases[N_BASES]; |
| 43 | |
| 44 | #define GCC_REG_BASE(x) (void __iomem *)(virt_bases[GCC_BASE] + (x)) |
| 45 | #define MMSS_REG_BASE(x) (void __iomem *)(virt_bases[MMSS_BASE] + (x)) |
| 46 | #define LPASS_REG_BASE(x) (void __iomem *)(virt_bases[LPASS_BASE] + (x)) |
Matt Wagantall | edf2fad | 2012-08-06 16:11:46 -0700 | [diff] [blame] | 47 | #define APCS_REG_BASE(x) (void __iomem *)(virt_bases[APCS_BASE] + (x)) |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 48 | |
| 49 | #define GPLL0_MODE_REG 0x0000 |
| 50 | #define GPLL0_L_REG 0x0004 |
| 51 | #define GPLL0_M_REG 0x0008 |
| 52 | #define GPLL0_N_REG 0x000C |
| 53 | #define GPLL0_USER_CTL_REG 0x0010 |
| 54 | #define GPLL0_CONFIG_CTL_REG 0x0014 |
| 55 | #define GPLL0_TEST_CTL_REG 0x0018 |
| 56 | #define GPLL0_STATUS_REG 0x001C |
| 57 | |
| 58 | #define GPLL1_MODE_REG 0x0040 |
| 59 | #define GPLL1_L_REG 0x0044 |
| 60 | #define GPLL1_M_REG 0x0048 |
| 61 | #define GPLL1_N_REG 0x004C |
| 62 | #define GPLL1_USER_CTL_REG 0x0050 |
| 63 | #define GPLL1_CONFIG_CTL_REG 0x0054 |
| 64 | #define GPLL1_TEST_CTL_REG 0x0058 |
| 65 | #define GPLL1_STATUS_REG 0x005C |
| 66 | |
| 67 | #define MMPLL0_MODE_REG 0x0000 |
| 68 | #define MMPLL0_L_REG 0x0004 |
| 69 | #define MMPLL0_M_REG 0x0008 |
| 70 | #define MMPLL0_N_REG 0x000C |
| 71 | #define MMPLL0_USER_CTL_REG 0x0010 |
| 72 | #define MMPLL0_CONFIG_CTL_REG 0x0014 |
| 73 | #define MMPLL0_TEST_CTL_REG 0x0018 |
| 74 | #define MMPLL0_STATUS_REG 0x001C |
| 75 | |
| 76 | #define MMPLL1_MODE_REG 0x0040 |
| 77 | #define MMPLL1_L_REG 0x0044 |
| 78 | #define MMPLL1_M_REG 0x0048 |
| 79 | #define MMPLL1_N_REG 0x004C |
| 80 | #define MMPLL1_USER_CTL_REG 0x0050 |
| 81 | #define MMPLL1_CONFIG_CTL_REG 0x0054 |
| 82 | #define MMPLL1_TEST_CTL_REG 0x0058 |
| 83 | #define MMPLL1_STATUS_REG 0x005C |
| 84 | |
| 85 | #define MMPLL3_MODE_REG 0x0080 |
| 86 | #define MMPLL3_L_REG 0x0084 |
| 87 | #define MMPLL3_M_REG 0x0088 |
| 88 | #define MMPLL3_N_REG 0x008C |
| 89 | #define MMPLL3_USER_CTL_REG 0x0090 |
| 90 | #define MMPLL3_CONFIG_CTL_REG 0x0094 |
| 91 | #define MMPLL3_TEST_CTL_REG 0x0098 |
| 92 | #define MMPLL3_STATUS_REG 0x009C |
| 93 | |
| 94 | #define LPAPLL_MODE_REG 0x0000 |
| 95 | #define LPAPLL_L_REG 0x0004 |
| 96 | #define LPAPLL_M_REG 0x0008 |
| 97 | #define LPAPLL_N_REG 0x000C |
| 98 | #define LPAPLL_USER_CTL_REG 0x0010 |
| 99 | #define LPAPLL_CONFIG_CTL_REG 0x0014 |
| 100 | #define LPAPLL_TEST_CTL_REG 0x0018 |
| 101 | #define LPAPLL_STATUS_REG 0x001C |
| 102 | |
| 103 | #define GCC_DEBUG_CLK_CTL_REG 0x1880 |
| 104 | #define CLOCK_FRQ_MEASURE_CTL_REG 0x1884 |
| 105 | #define CLOCK_FRQ_MEASURE_STATUS_REG 0x1888 |
| 106 | #define GCC_XO_DIV4_CBCR_REG 0x10C8 |
Matt Wagantall | 9a9b6f0 | 2012-08-07 23:12:26 -0700 | [diff] [blame] | 107 | #define GCC_PLLTEST_PAD_CFG_REG 0x188C |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 108 | #define APCS_GPLL_ENA_VOTE_REG 0x1480 |
| 109 | #define MMSS_PLL_VOTE_APCS_REG 0x0100 |
| 110 | #define MMSS_DEBUG_CLK_CTL_REG 0x0900 |
| 111 | #define LPASS_DEBUG_CLK_CTL_REG 0x29000 |
| 112 | #define LPASS_LPA_PLL_VOTE_APPS_REG 0x2000 |
| 113 | |
Matt Wagantall | edf2fad | 2012-08-06 16:11:46 -0700 | [diff] [blame] | 114 | #define GLB_CLK_DIAG_REG 0x001C |
| 115 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 116 | #define USB30_MASTER_CMD_RCGR 0x03D4 |
| 117 | #define USB30_MOCK_UTMI_CMD_RCGR 0x03E8 |
| 118 | #define USB_HSIC_SYSTEM_CMD_RCGR 0x041C |
| 119 | #define USB_HSIC_CMD_RCGR 0x0440 |
| 120 | #define USB_HSIC_IO_CAL_CMD_RCGR 0x0458 |
| 121 | #define USB_HS_SYSTEM_CMD_RCGR 0x0490 |
Vikram Mulukutla | 3b98a6d | 2012-08-15 20:35:25 -0700 | [diff] [blame] | 122 | #define SYS_NOC_USB3_AXI_CBCR 0x0108 |
| 123 | #define USB30_SLEEP_CBCR 0x03CC |
| 124 | #define USB2A_PHY_SLEEP_CBCR 0x04AC |
| 125 | #define USB2B_PHY_SLEEP_CBCR 0x04B4 |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 126 | #define SDCC1_APPS_CMD_RCGR 0x04D0 |
| 127 | #define SDCC2_APPS_CMD_RCGR 0x0510 |
| 128 | #define SDCC3_APPS_CMD_RCGR 0x0550 |
| 129 | #define SDCC4_APPS_CMD_RCGR 0x0590 |
| 130 | #define BLSP1_QUP1_SPI_APPS_CMD_RCGR 0x064C |
| 131 | #define BLSP1_UART1_APPS_CMD_RCGR 0x068C |
| 132 | #define BLSP1_QUP2_SPI_APPS_CMD_RCGR 0x06CC |
| 133 | #define BLSP1_UART2_APPS_CMD_RCGR 0x070C |
| 134 | #define BLSP1_QUP3_SPI_APPS_CMD_RCGR 0x074C |
| 135 | #define BLSP1_UART3_APPS_CMD_RCGR 0x078C |
| 136 | #define BLSP1_QUP4_SPI_APPS_CMD_RCGR 0x07CC |
| 137 | #define BLSP1_UART4_APPS_CMD_RCGR 0x080C |
| 138 | #define BLSP1_QUP5_SPI_APPS_CMD_RCGR 0x084C |
| 139 | #define BLSP1_UART5_APPS_CMD_RCGR 0x088C |
| 140 | #define BLSP1_QUP6_SPI_APPS_CMD_RCGR 0x08CC |
| 141 | #define BLSP1_UART6_APPS_CMD_RCGR 0x090C |
| 142 | #define BLSP2_QUP1_SPI_APPS_CMD_RCGR 0x098C |
| 143 | #define BLSP2_UART1_APPS_CMD_RCGR 0x09CC |
| 144 | #define BLSP2_QUP2_SPI_APPS_CMD_RCGR 0x0A0C |
| 145 | #define BLSP2_UART2_APPS_CMD_RCGR 0x0A4C |
| 146 | #define BLSP2_QUP3_SPI_APPS_CMD_RCGR 0x0A8C |
| 147 | #define BLSP2_UART3_APPS_CMD_RCGR 0x0ACC |
| 148 | #define BLSP2_QUP4_SPI_APPS_CMD_RCGR 0x0B0C |
| 149 | #define BLSP2_UART4_APPS_CMD_RCGR 0x0B4C |
| 150 | #define BLSP2_QUP5_SPI_APPS_CMD_RCGR 0x0B8C |
| 151 | #define BLSP2_UART5_APPS_CMD_RCGR 0x0BCC |
| 152 | #define BLSP2_QUP6_SPI_APPS_CMD_RCGR 0x0C0C |
| 153 | #define BLSP2_UART6_APPS_CMD_RCGR 0x0C4C |
| 154 | #define PDM2_CMD_RCGR 0x0CD0 |
| 155 | #define TSIF_REF_CMD_RCGR 0x0D90 |
| 156 | #define CE1_CMD_RCGR 0x1050 |
| 157 | #define CE2_CMD_RCGR 0x1090 |
| 158 | #define GP1_CMD_RCGR 0x1904 |
| 159 | #define GP2_CMD_RCGR 0x1944 |
| 160 | #define GP3_CMD_RCGR 0x1984 |
| 161 | #define LPAIF_SPKR_CMD_RCGR 0xA000 |
| 162 | #define LPAIF_PRI_CMD_RCGR 0xB000 |
| 163 | #define LPAIF_SEC_CMD_RCGR 0xC000 |
| 164 | #define LPAIF_TER_CMD_RCGR 0xD000 |
| 165 | #define LPAIF_QUAD_CMD_RCGR 0xE000 |
| 166 | #define LPAIF_PCM0_CMD_RCGR 0xF000 |
| 167 | #define LPAIF_PCM1_CMD_RCGR 0x10000 |
| 168 | #define RESAMPLER_CMD_RCGR 0x11000 |
| 169 | #define SLIMBUS_CMD_RCGR 0x12000 |
| 170 | #define LPAIF_PCMOE_CMD_RCGR 0x13000 |
| 171 | #define AHBFABRIC_CMD_RCGR 0x18000 |
| 172 | #define VCODEC0_CMD_RCGR 0x1000 |
| 173 | #define PCLK0_CMD_RCGR 0x2000 |
| 174 | #define PCLK1_CMD_RCGR 0x2020 |
| 175 | #define MDP_CMD_RCGR 0x2040 |
| 176 | #define EXTPCLK_CMD_RCGR 0x2060 |
| 177 | #define VSYNC_CMD_RCGR 0x2080 |
| 178 | #define EDPPIXEL_CMD_RCGR 0x20A0 |
| 179 | #define EDPLINK_CMD_RCGR 0x20C0 |
| 180 | #define EDPAUX_CMD_RCGR 0x20E0 |
| 181 | #define HDMI_CMD_RCGR 0x2100 |
| 182 | #define BYTE0_CMD_RCGR 0x2120 |
| 183 | #define BYTE1_CMD_RCGR 0x2140 |
| 184 | #define ESC0_CMD_RCGR 0x2160 |
| 185 | #define ESC1_CMD_RCGR 0x2180 |
| 186 | #define CSI0PHYTIMER_CMD_RCGR 0x3000 |
| 187 | #define CSI1PHYTIMER_CMD_RCGR 0x3030 |
| 188 | #define CSI2PHYTIMER_CMD_RCGR 0x3060 |
| 189 | #define CSI0_CMD_RCGR 0x3090 |
| 190 | #define CSI1_CMD_RCGR 0x3100 |
| 191 | #define CSI2_CMD_RCGR 0x3160 |
| 192 | #define CSI3_CMD_RCGR 0x31C0 |
| 193 | #define CCI_CMD_RCGR 0x3300 |
| 194 | #define MCLK0_CMD_RCGR 0x3360 |
| 195 | #define MCLK1_CMD_RCGR 0x3390 |
| 196 | #define MCLK2_CMD_RCGR 0x33C0 |
| 197 | #define MCLK3_CMD_RCGR 0x33F0 |
| 198 | #define MMSS_GP0_CMD_RCGR 0x3420 |
| 199 | #define MMSS_GP1_CMD_RCGR 0x3450 |
| 200 | #define JPEG0_CMD_RCGR 0x3500 |
| 201 | #define JPEG1_CMD_RCGR 0x3520 |
| 202 | #define JPEG2_CMD_RCGR 0x3540 |
| 203 | #define VFE0_CMD_RCGR 0x3600 |
| 204 | #define VFE1_CMD_RCGR 0x3620 |
| 205 | #define CPP_CMD_RCGR 0x3640 |
| 206 | #define GFX3D_CMD_RCGR 0x4000 |
| 207 | #define RBCPR_CMD_RCGR 0x4060 |
| 208 | #define AHB_CMD_RCGR 0x5000 |
| 209 | #define AXI_CMD_RCGR 0x5040 |
| 210 | #define OCMEMNOC_CMD_RCGR 0x5090 |
Vikram Mulukutla | 274b2d9 | 2012-07-13 15:53:04 -0700 | [diff] [blame] | 211 | #define OCMEMCX_OCMEMNOC_CBCR 0x4058 |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 212 | |
| 213 | #define MMSS_BCR 0x0240 |
| 214 | #define USB_30_BCR 0x03C0 |
| 215 | #define USB3_PHY_BCR 0x03FC |
| 216 | #define USB_HS_HSIC_BCR 0x0400 |
| 217 | #define USB_HS_BCR 0x0480 |
| 218 | #define SDCC1_BCR 0x04C0 |
| 219 | #define SDCC2_BCR 0x0500 |
| 220 | #define SDCC3_BCR 0x0540 |
| 221 | #define SDCC4_BCR 0x0580 |
| 222 | #define BLSP1_BCR 0x05C0 |
| 223 | #define BLSP1_QUP1_BCR 0x0640 |
| 224 | #define BLSP1_UART1_BCR 0x0680 |
| 225 | #define BLSP1_QUP2_BCR 0x06C0 |
| 226 | #define BLSP1_UART2_BCR 0x0700 |
| 227 | #define BLSP1_QUP3_BCR 0x0740 |
| 228 | #define BLSP1_UART3_BCR 0x0780 |
| 229 | #define BLSP1_QUP4_BCR 0x07C0 |
| 230 | #define BLSP1_UART4_BCR 0x0800 |
| 231 | #define BLSP1_QUP5_BCR 0x0840 |
| 232 | #define BLSP1_UART5_BCR 0x0880 |
| 233 | #define BLSP1_QUP6_BCR 0x08C0 |
| 234 | #define BLSP1_UART6_BCR 0x0900 |
| 235 | #define BLSP2_BCR 0x0940 |
| 236 | #define BLSP2_QUP1_BCR 0x0980 |
| 237 | #define BLSP2_UART1_BCR 0x09C0 |
| 238 | #define BLSP2_QUP2_BCR 0x0A00 |
| 239 | #define BLSP2_UART2_BCR 0x0A40 |
| 240 | #define BLSP2_QUP3_BCR 0x0A80 |
| 241 | #define BLSP2_UART3_BCR 0x0AC0 |
| 242 | #define BLSP2_QUP4_BCR 0x0B00 |
| 243 | #define BLSP2_UART4_BCR 0x0B40 |
| 244 | #define BLSP2_QUP5_BCR 0x0B80 |
| 245 | #define BLSP2_UART5_BCR 0x0BC0 |
| 246 | #define BLSP2_QUP6_BCR 0x0C00 |
| 247 | #define BLSP2_UART6_BCR 0x0C40 |
Vikram Mulukutla | a967db4 | 2012-05-10 16:20:40 -0700 | [diff] [blame] | 248 | #define BOOT_ROM_BCR 0x0E00 |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 249 | #define PDM_BCR 0x0CC0 |
| 250 | #define PRNG_BCR 0x0D00 |
| 251 | #define BAM_DMA_BCR 0x0D40 |
| 252 | #define TSIF_BCR 0x0D80 |
| 253 | #define CE1_BCR 0x1040 |
| 254 | #define CE2_BCR 0x1080 |
| 255 | #define AUDIO_CORE_BCR 0x4000 |
| 256 | #define VENUS0_BCR 0x1020 |
| 257 | #define MDSS_BCR 0x2300 |
| 258 | #define CAMSS_PHY0_BCR 0x3020 |
| 259 | #define CAMSS_PHY1_BCR 0x3050 |
| 260 | #define CAMSS_PHY2_BCR 0x3080 |
| 261 | #define CAMSS_CSI0_BCR 0x30B0 |
| 262 | #define CAMSS_CSI0PHY_BCR 0x30C0 |
| 263 | #define CAMSS_CSI0RDI_BCR 0x30D0 |
| 264 | #define CAMSS_CSI0PIX_BCR 0x30E0 |
| 265 | #define CAMSS_CSI1_BCR 0x3120 |
| 266 | #define CAMSS_CSI1PHY_BCR 0x3130 |
| 267 | #define CAMSS_CSI1RDI_BCR 0x3140 |
| 268 | #define CAMSS_CSI1PIX_BCR 0x3150 |
| 269 | #define CAMSS_CSI2_BCR 0x3180 |
| 270 | #define CAMSS_CSI2PHY_BCR 0x3190 |
| 271 | #define CAMSS_CSI2RDI_BCR 0x31A0 |
| 272 | #define CAMSS_CSI2PIX_BCR 0x31B0 |
| 273 | #define CAMSS_CSI3_BCR 0x31E0 |
| 274 | #define CAMSS_CSI3PHY_BCR 0x31F0 |
| 275 | #define CAMSS_CSI3RDI_BCR 0x3200 |
| 276 | #define CAMSS_CSI3PIX_BCR 0x3210 |
| 277 | #define CAMSS_ISPIF_BCR 0x3220 |
| 278 | #define CAMSS_CCI_BCR 0x3340 |
| 279 | #define CAMSS_MCLK0_BCR 0x3380 |
| 280 | #define CAMSS_MCLK1_BCR 0x33B0 |
| 281 | #define CAMSS_MCLK2_BCR 0x33E0 |
| 282 | #define CAMSS_MCLK3_BCR 0x3410 |
| 283 | #define CAMSS_GP0_BCR 0x3440 |
| 284 | #define CAMSS_GP1_BCR 0x3470 |
| 285 | #define CAMSS_TOP_BCR 0x3480 |
| 286 | #define CAMSS_MICRO_BCR 0x3490 |
| 287 | #define CAMSS_JPEG_BCR 0x35A0 |
| 288 | #define CAMSS_VFE_BCR 0x36A0 |
| 289 | #define CAMSS_CSI_VFE0_BCR 0x3700 |
| 290 | #define CAMSS_CSI_VFE1_BCR 0x3710 |
| 291 | #define OCMEMNOC_BCR 0x50B0 |
| 292 | #define MMSSNOCAHB_BCR 0x5020 |
| 293 | #define MMSSNOCAXI_BCR 0x5060 |
| 294 | #define OXILI_GFX3D_CBCR 0x4028 |
| 295 | #define OXILICX_AHB_CBCR 0x403C |
| 296 | #define OXILICX_AXI_CBCR 0x4038 |
| 297 | #define OXILI_BCR 0x4020 |
| 298 | #define OXILICX_BCR 0x4030 |
Vikram Mulukutla | a967db4 | 2012-05-10 16:20:40 -0700 | [diff] [blame] | 299 | #define LPASS_Q6SS_BCR 0x6000 |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 300 | |
| 301 | #define OCMEM_SYS_NOC_AXI_CBCR 0x0244 |
| 302 | #define OCMEM_NOC_CFG_AHB_CBCR 0x0248 |
| 303 | #define MMSS_NOC_CFG_AHB_CBCR 0x024C |
| 304 | |
| 305 | #define USB30_MASTER_CBCR 0x03C8 |
| 306 | #define USB30_MOCK_UTMI_CBCR 0x03D0 |
| 307 | #define USB_HSIC_AHB_CBCR 0x0408 |
| 308 | #define USB_HSIC_SYSTEM_CBCR 0x040C |
| 309 | #define USB_HSIC_CBCR 0x0410 |
| 310 | #define USB_HSIC_IO_CAL_CBCR 0x0414 |
| 311 | #define USB_HS_SYSTEM_CBCR 0x0484 |
| 312 | #define USB_HS_AHB_CBCR 0x0488 |
| 313 | #define SDCC1_APPS_CBCR 0x04C4 |
| 314 | #define SDCC1_AHB_CBCR 0x04C8 |
| 315 | #define SDCC2_APPS_CBCR 0x0504 |
| 316 | #define SDCC2_AHB_CBCR 0x0508 |
| 317 | #define SDCC3_APPS_CBCR 0x0544 |
| 318 | #define SDCC3_AHB_CBCR 0x0548 |
| 319 | #define SDCC4_APPS_CBCR 0x0584 |
| 320 | #define SDCC4_AHB_CBCR 0x0588 |
| 321 | #define BLSP1_AHB_CBCR 0x05C4 |
| 322 | #define BLSP1_QUP1_SPI_APPS_CBCR 0x0644 |
| 323 | #define BLSP1_QUP1_I2C_APPS_CBCR 0x0648 |
| 324 | #define BLSP1_UART1_APPS_CBCR 0x0684 |
| 325 | #define BLSP1_UART1_SIM_CBCR 0x0688 |
| 326 | #define BLSP1_QUP2_SPI_APPS_CBCR 0x06C4 |
| 327 | #define BLSP1_QUP2_I2C_APPS_CBCR 0x06C8 |
| 328 | #define BLSP1_UART2_APPS_CBCR 0x0704 |
| 329 | #define BLSP1_UART2_SIM_CBCR 0x0708 |
| 330 | #define BLSP1_QUP3_SPI_APPS_CBCR 0x0744 |
| 331 | #define BLSP1_QUP3_I2C_APPS_CBCR 0x0748 |
| 332 | #define BLSP1_UART3_APPS_CBCR 0x0784 |
| 333 | #define BLSP1_UART3_SIM_CBCR 0x0788 |
| 334 | #define BLSP1_QUP4_SPI_APPS_CBCR 0x07C4 |
| 335 | #define BLSP1_QUP4_I2C_APPS_CBCR 0x07C8 |
| 336 | #define BLSP1_UART4_APPS_CBCR 0x0804 |
| 337 | #define BLSP1_UART4_SIM_CBCR 0x0808 |
| 338 | #define BLSP1_QUP5_SPI_APPS_CBCR 0x0844 |
| 339 | #define BLSP1_QUP5_I2C_APPS_CBCR 0x0848 |
| 340 | #define BLSP1_UART5_APPS_CBCR 0x0884 |
| 341 | #define BLSP1_UART5_SIM_CBCR 0x0888 |
| 342 | #define BLSP1_QUP6_SPI_APPS_CBCR 0x08C4 |
| 343 | #define BLSP1_QUP6_I2C_APPS_CBCR 0x08C8 |
| 344 | #define BLSP1_UART6_APPS_CBCR 0x0904 |
| 345 | #define BLSP1_UART6_SIM_CBCR 0x0908 |
| 346 | #define BLSP2_AHB_CBCR 0x0944 |
Vikram Mulukutla | a967db4 | 2012-05-10 16:20:40 -0700 | [diff] [blame] | 347 | #define BOOT_ROM_AHB_CBCR 0x0E04 |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 348 | #define BLSP2_QUP1_SPI_APPS_CBCR 0x0984 |
| 349 | #define BLSP2_QUP1_I2C_APPS_CBCR 0x0988 |
| 350 | #define BLSP2_UART1_APPS_CBCR 0x09C4 |
| 351 | #define BLSP2_UART1_SIM_CBCR 0x09C8 |
| 352 | #define BLSP2_QUP2_SPI_APPS_CBCR 0x0A04 |
| 353 | #define BLSP2_QUP2_I2C_APPS_CBCR 0x0A08 |
| 354 | #define BLSP2_UART2_APPS_CBCR 0x0A44 |
| 355 | #define BLSP2_UART2_SIM_CBCR 0x0A48 |
| 356 | #define BLSP2_QUP3_SPI_APPS_CBCR 0x0A84 |
| 357 | #define BLSP2_QUP3_I2C_APPS_CBCR 0x0A88 |
| 358 | #define BLSP2_UART3_APPS_CBCR 0x0AC4 |
| 359 | #define BLSP2_UART3_SIM_CBCR 0x0AC8 |
| 360 | #define BLSP2_QUP4_SPI_APPS_CBCR 0x0B04 |
| 361 | #define BLSP2_QUP4_I2C_APPS_CBCR 0x0B08 |
| 362 | #define BLSP2_UART4_APPS_CBCR 0x0B44 |
| 363 | #define BLSP2_UART4_SIM_CBCR 0x0B48 |
| 364 | #define BLSP2_QUP5_SPI_APPS_CBCR 0x0B84 |
| 365 | #define BLSP2_QUP5_I2C_APPS_CBCR 0x0B88 |
| 366 | #define BLSP2_UART5_APPS_CBCR 0x0BC4 |
| 367 | #define BLSP2_UART5_SIM_CBCR 0x0BC8 |
| 368 | #define BLSP2_QUP6_SPI_APPS_CBCR 0x0C04 |
| 369 | #define BLSP2_QUP6_I2C_APPS_CBCR 0x0C08 |
| 370 | #define BLSP2_UART6_APPS_CBCR 0x0C44 |
| 371 | #define BLSP2_UART6_SIM_CBCR 0x0C48 |
| 372 | #define PDM_AHB_CBCR 0x0CC4 |
| 373 | #define PDM_XO4_CBCR 0x0CC8 |
| 374 | #define PDM2_CBCR 0x0CCC |
| 375 | #define PRNG_AHB_CBCR 0x0D04 |
| 376 | #define BAM_DMA_AHB_CBCR 0x0D44 |
| 377 | #define TSIF_AHB_CBCR 0x0D84 |
| 378 | #define TSIF_REF_CBCR 0x0D88 |
| 379 | #define MSG_RAM_AHB_CBCR 0x0E44 |
| 380 | #define CE1_CBCR 0x1044 |
| 381 | #define CE1_AXI_CBCR 0x1048 |
| 382 | #define CE1_AHB_CBCR 0x104C |
| 383 | #define CE2_CBCR 0x1084 |
| 384 | #define CE2_AXI_CBCR 0x1088 |
| 385 | #define CE2_AHB_CBCR 0x108C |
| 386 | #define GCC_AHB_CBCR 0x10C0 |
| 387 | #define GP1_CBCR 0x1900 |
| 388 | #define GP2_CBCR 0x1940 |
| 389 | #define GP3_CBCR 0x1980 |
Vikram Mulukutla | 14ee37d | 2012-08-08 15:18:09 -0700 | [diff] [blame] | 390 | #define AUDIO_CORE_GDSCR 0x7000 |
Vikram Mulukutla | 6c0f1a7 | 2012-08-10 01:59:28 -0700 | [diff] [blame] | 391 | #define AUDIO_CORE_IXFABRIC_CBCR 0x1B000 |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 392 | #define AUDIO_CORE_LPAIF_CODEC_SPKR_OSR_CBCR 0xA014 |
| 393 | #define AUDIO_CORE_LPAIF_CODEC_SPKR_IBIT_CBCR 0xA018 |
| 394 | #define AUDIO_CORE_LPAIF_CODEC_SPKR_EBIT_CBCR 0xA01C |
| 395 | #define AUDIO_CORE_LPAIF_PRI_OSR_CBCR 0xB014 |
| 396 | #define AUDIO_CORE_LPAIF_PRI_IBIT_CBCR 0xB018 |
| 397 | #define AUDIO_CORE_LPAIF_PRI_EBIT_CBCR 0xB01C |
| 398 | #define AUDIO_CORE_LPAIF_SEC_OSR_CBCR 0xC014 |
| 399 | #define AUDIO_CORE_LPAIF_SEC_IBIT_CBCR 0xC018 |
| 400 | #define AUDIO_CORE_LPAIF_SEC_EBIT_CBCR 0xC01C |
| 401 | #define AUDIO_CORE_LPAIF_TER_OSR_CBCR 0xD014 |
| 402 | #define AUDIO_CORE_LPAIF_TER_IBIT_CBCR 0xD018 |
| 403 | #define AUDIO_CORE_LPAIF_TER_EBIT_CBCR 0xD01C |
| 404 | #define AUDIO_CORE_LPAIF_QUAD_OSR_CBCR 0xE014 |
| 405 | #define AUDIO_CORE_LPAIF_QUAD_IBIT_CBCR 0xE018 |
| 406 | #define AUDIO_CORE_LPAIF_QUAD_EBIT_CBCR 0xE01C |
| 407 | #define AUDIO_CORE_LPAIF_PCM0_IBIT_CBCR 0xF014 |
| 408 | #define AUDIO_CORE_LPAIF_PCM0_EBIT_CBCR 0xF018 |
| 409 | #define AUDIO_CORE_LPAIF_PCM1_IBIT_CBCR 0x10014 |
| 410 | #define AUDIO_CORE_LPAIF_PCM1_EBIT_CBCR 0x10018 |
| 411 | #define AUDIO_CORE_RESAMPLER_CORE_CBCR 0x11014 |
| 412 | #define AUDIO_CORE_RESAMPLER_LFABIF_CBCR 0x11018 |
| 413 | #define AUDIO_CORE_SLIMBUS_CORE_CBCR 0x12014 |
| 414 | #define AUDIO_CORE_SLIMBUS_LFABIF_CBCR 0x12018 |
| 415 | #define AUDIO_CORE_LPAIF_PCM_DATA_OE_CBCR 0x13014 |
| 416 | #define VENUS0_VCODEC0_CBCR 0x1028 |
| 417 | #define VENUS0_AHB_CBCR 0x1030 |
| 418 | #define VENUS0_AXI_CBCR 0x1034 |
| 419 | #define VENUS0_OCMEMNOC_CBCR 0x1038 |
| 420 | #define MDSS_AHB_CBCR 0x2308 |
| 421 | #define MDSS_HDMI_AHB_CBCR 0x230C |
| 422 | #define MDSS_AXI_CBCR 0x2310 |
| 423 | #define MDSS_PCLK0_CBCR 0x2314 |
| 424 | #define MDSS_PCLK1_CBCR 0x2318 |
| 425 | #define MDSS_MDP_CBCR 0x231C |
| 426 | #define MDSS_MDP_LUT_CBCR 0x2320 |
| 427 | #define MDSS_EXTPCLK_CBCR 0x2324 |
| 428 | #define MDSS_VSYNC_CBCR 0x2328 |
| 429 | #define MDSS_EDPPIXEL_CBCR 0x232C |
| 430 | #define MDSS_EDPLINK_CBCR 0x2330 |
| 431 | #define MDSS_EDPAUX_CBCR 0x2334 |
| 432 | #define MDSS_HDMI_CBCR 0x2338 |
| 433 | #define MDSS_BYTE0_CBCR 0x233C |
| 434 | #define MDSS_BYTE1_CBCR 0x2340 |
| 435 | #define MDSS_ESC0_CBCR 0x2344 |
| 436 | #define MDSS_ESC1_CBCR 0x2348 |
| 437 | #define CAMSS_PHY0_CSI0PHYTIMER_CBCR 0x3024 |
| 438 | #define CAMSS_PHY1_CSI1PHYTIMER_CBCR 0x3054 |
| 439 | #define CAMSS_PHY2_CSI2PHYTIMER_CBCR 0x3084 |
| 440 | #define CAMSS_CSI0_CBCR 0x30B4 |
| 441 | #define CAMSS_CSI0_AHB_CBCR 0x30BC |
| 442 | #define CAMSS_CSI0PHY_CBCR 0x30C4 |
| 443 | #define CAMSS_CSI0RDI_CBCR 0x30D4 |
| 444 | #define CAMSS_CSI0PIX_CBCR 0x30E4 |
| 445 | #define CAMSS_CSI1_CBCR 0x3124 |
| 446 | #define CAMSS_CSI1_AHB_CBCR 0x3128 |
| 447 | #define CAMSS_CSI1PHY_CBCR 0x3134 |
| 448 | #define CAMSS_CSI1RDI_CBCR 0x3144 |
| 449 | #define CAMSS_CSI1PIX_CBCR 0x3154 |
| 450 | #define CAMSS_CSI2_CBCR 0x3184 |
| 451 | #define CAMSS_CSI2_AHB_CBCR 0x3188 |
| 452 | #define CAMSS_CSI2PHY_CBCR 0x3194 |
| 453 | #define CAMSS_CSI2RDI_CBCR 0x31A4 |
| 454 | #define CAMSS_CSI2PIX_CBCR 0x31B4 |
| 455 | #define CAMSS_CSI3_CBCR 0x31E4 |
| 456 | #define CAMSS_CSI3_AHB_CBCR 0x31E8 |
| 457 | #define CAMSS_CSI3PHY_CBCR 0x31F4 |
| 458 | #define CAMSS_CSI3RDI_CBCR 0x3204 |
| 459 | #define CAMSS_CSI3PIX_CBCR 0x3214 |
| 460 | #define CAMSS_ISPIF_AHB_CBCR 0x3224 |
| 461 | #define CAMSS_CCI_CCI_CBCR 0x3344 |
| 462 | #define CAMSS_CCI_CCI_AHB_CBCR 0x3348 |
| 463 | #define CAMSS_MCLK0_CBCR 0x3384 |
| 464 | #define CAMSS_MCLK1_CBCR 0x33B4 |
| 465 | #define CAMSS_MCLK2_CBCR 0x33E4 |
| 466 | #define CAMSS_MCLK3_CBCR 0x3414 |
| 467 | #define CAMSS_GP0_CBCR 0x3444 |
| 468 | #define CAMSS_GP1_CBCR 0x3474 |
| 469 | #define CAMSS_TOP_AHB_CBCR 0x3484 |
| 470 | #define CAMSS_MICRO_AHB_CBCR 0x3494 |
| 471 | #define CAMSS_JPEG_JPEG0_CBCR 0x35A8 |
| 472 | #define CAMSS_JPEG_JPEG1_CBCR 0x35AC |
| 473 | #define CAMSS_JPEG_JPEG2_CBCR 0x35B0 |
| 474 | #define CAMSS_JPEG_JPEG_AHB_CBCR 0x35B4 |
| 475 | #define CAMSS_JPEG_JPEG_AXI_CBCR 0x35B8 |
| 476 | #define CAMSS_JPEG_JPEG_OCMEMNOC_CBCR 0x35BC |
| 477 | #define CAMSS_VFE_VFE0_CBCR 0x36A8 |
| 478 | #define CAMSS_VFE_VFE1_CBCR 0x36AC |
| 479 | #define CAMSS_VFE_CPP_CBCR 0x36B0 |
| 480 | #define CAMSS_VFE_CPP_AHB_CBCR 0x36B4 |
| 481 | #define CAMSS_VFE_VFE_AHB_CBCR 0x36B8 |
| 482 | #define CAMSS_VFE_VFE_AXI_CBCR 0x36BC |
| 483 | #define CAMSS_VFE_VFE_OCMEMNOC_CBCR 0x36C0 |
| 484 | #define CAMSS_CSI_VFE0_CBCR 0x3704 |
| 485 | #define CAMSS_CSI_VFE1_CBCR 0x3714 |
| 486 | #define MMSS_MMSSNOC_AXI_CBCR 0x506C |
| 487 | #define MMSS_MMSSNOC_AHB_CBCR 0x5024 |
| 488 | #define MMSS_MMSSNOC_BTO_AHB_CBCR 0x5028 |
| 489 | #define MMSS_MISC_AHB_CBCR 0x502C |
| 490 | #define MMSS_S0_AXI_CBCR 0x5064 |
| 491 | #define OCMEMNOC_CBCR 0x50B4 |
Vikram Mulukutla | a967db4 | 2012-05-10 16:20:40 -0700 | [diff] [blame] | 492 | #define LPASS_Q6SS_AHB_LFABIF_CBCR 0x22000 |
| 493 | #define LPASS_Q6SS_XO_CBCR 0x26000 |
Vikram Mulukutla | 3454e9e | 2012-08-11 20:18:42 -0700 | [diff] [blame] | 494 | #define LPASS_Q6_AXI_CBCR 0x11C0 |
Vikram Mulukutla | b5b311e | 2012-08-09 14:58:48 -0700 | [diff] [blame] | 495 | #define Q6SS_AHBM_CBCR 0x22004 |
Vikram Mulukutla | 97ac334 | 2012-08-21 12:55:13 -0700 | [diff] [blame] | 496 | #define AUDIO_WRAPPER_BR_CBCR 0x24000 |
Vikram Mulukutla | a967db4 | 2012-05-10 16:20:40 -0700 | [diff] [blame] | 497 | #define MSS_CFG_AHB_CBCR 0x0280 |
Vikram Mulukutla | 31926eb | 2012-08-12 19:58:08 -0700 | [diff] [blame] | 498 | #define MSS_Q6_BIMC_AXI_CBCR 0x0284 |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 499 | |
| 500 | #define APCS_CLOCK_BRANCH_ENA_VOTE 0x1484 |
| 501 | #define APCS_CLOCK_SLEEP_ENA_VOTE 0x1488 |
| 502 | |
| 503 | /* Mux source select values */ |
| 504 | #define cxo_source_val 0 |
| 505 | #define gpll0_source_val 1 |
| 506 | #define gpll1_source_val 2 |
| 507 | #define gnd_source_val 5 |
| 508 | #define mmpll0_mm_source_val 1 |
| 509 | #define mmpll1_mm_source_val 2 |
| 510 | #define mmpll3_mm_source_val 3 |
| 511 | #define gpll0_mm_source_val 5 |
| 512 | #define cxo_mm_source_val 0 |
| 513 | #define mm_gnd_source_val 6 |
| 514 | #define gpll1_hsic_source_val 4 |
| 515 | #define cxo_lpass_source_val 0 |
| 516 | #define lpapll0_lpass_source_val 1 |
| 517 | #define gpll0_lpass_source_val 5 |
| 518 | #define edppll_270_mm_source_val 4 |
| 519 | #define edppll_350_mm_source_val 4 |
| 520 | #define dsipll_750_mm_source_val 1 |
Vikram Mulukutla | fe0f5a5 | 2012-08-16 16:51:08 -0700 | [diff] [blame] | 521 | #define dsipll0_byte_mm_source_val 1 |
| 522 | #define dsipll0_pixel_mm_source_val 1 |
Vikram Mulukutla | 86b7634 | 2012-08-15 16:22:09 -0700 | [diff] [blame] | 523 | #define hdmipll_mm_source_val 3 |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 524 | |
| 525 | #define F(f, s, div, m, n) \ |
| 526 | { \ |
| 527 | .freq_hz = (f), \ |
| 528 | .src_clk = &s##_clk_src.c, \ |
| 529 | .m_val = (m), \ |
Vikram Mulukutla | 60bfbb0 | 2012-08-08 00:49:20 -0700 | [diff] [blame] | 530 | .n_val = ~((n)-(m)) * !!(n), \ |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 531 | .d_val = ~(n),\ |
| 532 | .div_src_val = BVAL(4, 0, (int)(2*(div) - 1)) \ |
| 533 | | BVAL(10, 8, s##_source_val), \ |
| 534 | } |
| 535 | |
| 536 | #define F_MM(f, s, div, m, n) \ |
| 537 | { \ |
| 538 | .freq_hz = (f), \ |
| 539 | .src_clk = &s##_clk_src.c, \ |
| 540 | .m_val = (m), \ |
Vikram Mulukutla | 60bfbb0 | 2012-08-08 00:49:20 -0700 | [diff] [blame] | 541 | .n_val = ~((n)-(m)) * !!(n), \ |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 542 | .d_val = ~(n),\ |
| 543 | .div_src_val = BVAL(4, 0, (int)(2*(div) - 1)) \ |
| 544 | | BVAL(10, 8, s##_mm_source_val), \ |
| 545 | } |
| 546 | |
Vikram Mulukutla | 86b7634 | 2012-08-15 16:22:09 -0700 | [diff] [blame] | 547 | #define F_HDMI(f, s, div, m, n) \ |
| 548 | { \ |
| 549 | .freq_hz = (f), \ |
| 550 | .src_clk = &s##_clk_src, \ |
| 551 | .m_val = (m), \ |
| 552 | .n_val = ~((n)-(m)) * !!(n), \ |
| 553 | .d_val = ~(n),\ |
| 554 | .div_src_val = BVAL(4, 0, (int)(2*(div) - 1)) \ |
| 555 | | BVAL(10, 8, s##_mm_source_val), \ |
| 556 | } |
| 557 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 558 | #define F_MDSS(f, s, div, m, n) \ |
| 559 | { \ |
| 560 | .freq_hz = (f), \ |
| 561 | .m_val = (m), \ |
Vikram Mulukutla | 60bfbb0 | 2012-08-08 00:49:20 -0700 | [diff] [blame] | 562 | .n_val = ~((n)-(m)) * !!(n), \ |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 563 | .d_val = ~(n),\ |
| 564 | .div_src_val = BVAL(4, 0, (int)(2*(div) - 1)) \ |
| 565 | | BVAL(10, 8, s##_mm_source_val), \ |
| 566 | } |
| 567 | |
| 568 | #define F_HSIC(f, s, div, m, n) \ |
| 569 | { \ |
| 570 | .freq_hz = (f), \ |
| 571 | .src_clk = &s##_clk_src.c, \ |
| 572 | .m_val = (m), \ |
Vikram Mulukutla | 60bfbb0 | 2012-08-08 00:49:20 -0700 | [diff] [blame] | 573 | .n_val = ~((n)-(m)) * !!(n), \ |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 574 | .d_val = ~(n),\ |
| 575 | .div_src_val = BVAL(4, 0, (int)(2*(div) - 1)) \ |
| 576 | | BVAL(10, 8, s##_hsic_source_val), \ |
| 577 | } |
| 578 | |
| 579 | #define F_LPASS(f, s, div, m, n) \ |
| 580 | { \ |
| 581 | .freq_hz = (f), \ |
| 582 | .src_clk = &s##_clk_src.c, \ |
| 583 | .m_val = (m), \ |
Vikram Mulukutla | 60bfbb0 | 2012-08-08 00:49:20 -0700 | [diff] [blame] | 584 | .n_val = ~((n)-(m)) * !!(n), \ |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 585 | .d_val = ~(n),\ |
| 586 | .div_src_val = BVAL(4, 0, (int)(2*(div) - 1)) \ |
| 587 | | BVAL(10, 8, s##_lpass_source_val), \ |
| 588 | } |
| 589 | |
| 590 | #define VDD_DIG_FMAX_MAP1(l1, f1) \ |
| 591 | .vdd_class = &vdd_dig, \ |
| 592 | .fmax[VDD_DIG_##l1] = (f1) |
| 593 | #define VDD_DIG_FMAX_MAP2(l1, f1, l2, f2) \ |
| 594 | .vdd_class = &vdd_dig, \ |
| 595 | .fmax[VDD_DIG_##l1] = (f1), \ |
| 596 | .fmax[VDD_DIG_##l2] = (f2) |
| 597 | #define VDD_DIG_FMAX_MAP3(l1, f1, l2, f2, l3, f3) \ |
| 598 | .vdd_class = &vdd_dig, \ |
| 599 | .fmax[VDD_DIG_##l1] = (f1), \ |
| 600 | .fmax[VDD_DIG_##l2] = (f2), \ |
| 601 | .fmax[VDD_DIG_##l3] = (f3) |
| 602 | |
| 603 | enum vdd_dig_levels { |
| 604 | VDD_DIG_NONE, |
| 605 | VDD_DIG_LOW, |
| 606 | VDD_DIG_NOMINAL, |
| 607 | VDD_DIG_HIGH |
| 608 | }; |
| 609 | |
Vikram Mulukutla | b7a1a74 | 2012-05-30 17:24:33 -0700 | [diff] [blame] | 610 | static const int vdd_corner[] = { |
| 611 | [VDD_DIG_NONE] = RPM_REGULATOR_CORNER_NONE, |
| 612 | [VDD_DIG_LOW] = RPM_REGULATOR_CORNER_SVS_SOC, |
| 613 | [VDD_DIG_NOMINAL] = RPM_REGULATOR_CORNER_NORMAL, |
| 614 | [VDD_DIG_HIGH] = RPM_REGULATOR_CORNER_SUPER_TURBO, |
| 615 | }; |
| 616 | |
| 617 | static struct rpm_regulator *vdd_dig_reg; |
| 618 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 619 | static int set_vdd_dig(struct clk_vdd_class *vdd_class, int level) |
| 620 | { |
Vikram Mulukutla | b7a1a74 | 2012-05-30 17:24:33 -0700 | [diff] [blame] | 621 | return rpm_regulator_set_voltage(vdd_dig_reg, vdd_corner[level], |
| 622 | RPM_REGULATOR_CORNER_SUPER_TURBO); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 623 | } |
| 624 | |
| 625 | static DEFINE_VDD_CLASS(vdd_dig, set_vdd_dig); |
| 626 | |
Vikram Mulukutla | 80b7ab5 | 2012-07-26 19:03:15 -0700 | [diff] [blame] | 627 | #define RPM_MISC_CLK_TYPE 0x306b6c63 |
| 628 | #define RPM_BUS_CLK_TYPE 0x316b6c63 |
| 629 | #define RPM_MEM_CLK_TYPE 0x326b6c63 |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 630 | |
Vikram Mulukutla | 77140da | 2012-08-13 21:37:18 -0700 | [diff] [blame] | 631 | #define RPM_SMD_KEY_ENABLE 0x62616E45 |
| 632 | |
| 633 | #define CXO_ID 0x0 |
| 634 | #define QDSS_ID 0x1 |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 635 | |
Vikram Mulukutla | 6ddff4e | 2012-06-22 15:11:28 -0700 | [diff] [blame] | 636 | #define PNOC_ID 0x0 |
| 637 | #define SNOC_ID 0x1 |
| 638 | #define CNOC_ID 0x2 |
Vikram Mulukutla | c77922f | 2012-08-13 21:44:45 -0700 | [diff] [blame] | 639 | #define MMSSNOC_AHB_ID 0x3 |
Matt Wagantall | c4388bf | 2012-05-14 23:03:00 -0700 | [diff] [blame] | 640 | |
Vikram Mulukutla | 6ddff4e | 2012-06-22 15:11:28 -0700 | [diff] [blame] | 641 | #define BIMC_ID 0x0 |
Vikram Mulukutla | 1e6127d | 2012-08-21 21:05:24 -0700 | [diff] [blame] | 642 | #define OXILI_ID 0x1 |
| 643 | #define OCMEM_ID 0x2 |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 644 | |
Vikram Mulukutla | 02ea711 | 2012-08-29 12:06:11 -0700 | [diff] [blame] | 645 | #define D0_ID 1 |
| 646 | #define D1_ID 2 |
| 647 | #define A0_ID 3 |
| 648 | #define A1_ID 4 |
| 649 | #define A2_ID 5 |
| 650 | #define DIFF_CLK_ID 7 |
| 651 | #define DIV_CLK_ID 11 |
Vikram Mulukutla | 80b7ab5 | 2012-07-26 19:03:15 -0700 | [diff] [blame] | 652 | |
Vikram Mulukutla | 6ddff4e | 2012-06-22 15:11:28 -0700 | [diff] [blame] | 653 | DEFINE_CLK_RPM_SMD(pnoc_clk, pnoc_a_clk, RPM_BUS_CLK_TYPE, PNOC_ID, NULL); |
| 654 | DEFINE_CLK_RPM_SMD(snoc_clk, snoc_a_clk, RPM_BUS_CLK_TYPE, SNOC_ID, NULL); |
| 655 | DEFINE_CLK_RPM_SMD(cnoc_clk, cnoc_a_clk, RPM_BUS_CLK_TYPE, CNOC_ID, NULL); |
Vikram Mulukutla | 09e2081 | 2012-07-12 11:32:42 -0700 | [diff] [blame] | 656 | DEFINE_CLK_RPM_SMD(mmssnoc_ahb_clk, mmssnoc_ahb_a_clk, RPM_BUS_CLK_TYPE, |
| 657 | MMSSNOC_AHB_ID, NULL); |
Vikram Mulukutla | 6ddff4e | 2012-06-22 15:11:28 -0700 | [diff] [blame] | 658 | |
| 659 | DEFINE_CLK_RPM_SMD(bimc_clk, bimc_a_clk, RPM_MEM_CLK_TYPE, BIMC_ID, NULL); |
| 660 | DEFINE_CLK_RPM_SMD(ocmemgx_clk, ocmemgx_a_clk, RPM_MEM_CLK_TYPE, OCMEM_ID, |
| 661 | NULL); |
Vikram Mulukutla | 1e6127d | 2012-08-21 21:05:24 -0700 | [diff] [blame] | 662 | DEFINE_CLK_RPM_SMD(gfx3d_clk_src, gfx3d_a_clk_src, RPM_MEM_CLK_TYPE, OXILI_ID, |
| 663 | NULL); |
Vikram Mulukutla | 6ddff4e | 2012-06-22 15:11:28 -0700 | [diff] [blame] | 664 | |
| 665 | DEFINE_CLK_RPM_SMD_BRANCH(cxo_clk_src, cxo_a_clk_src, |
| 666 | RPM_MISC_CLK_TYPE, CXO_ID, 19200000); |
Vikram Mulukutla | 0f63e00 | 2012-06-28 14:29:44 -0700 | [diff] [blame] | 667 | DEFINE_CLK_RPM_SMD_QDSS(qdss_clk, qdss_a_clk, RPM_MISC_CLK_TYPE, QDSS_ID); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 668 | |
Vikram Mulukutla | 80b7ab5 | 2012-07-26 19:03:15 -0700 | [diff] [blame] | 669 | DEFINE_CLK_RPM_SMD_XO_BUFFER(cxo_d0, cxo_d0_a, D0_ID); |
| 670 | DEFINE_CLK_RPM_SMD_XO_BUFFER(cxo_d1, cxo_d1_a, D1_ID); |
| 671 | DEFINE_CLK_RPM_SMD_XO_BUFFER(cxo_a0, cxo_a0_a, A0_ID); |
| 672 | DEFINE_CLK_RPM_SMD_XO_BUFFER(cxo_a1, cxo_a1_a, A1_ID); |
| 673 | DEFINE_CLK_RPM_SMD_XO_BUFFER(cxo_a2, cxo_a2_a, A2_ID); |
Vikram Mulukutla | 02ea711 | 2012-08-29 12:06:11 -0700 | [diff] [blame] | 674 | DEFINE_CLK_RPM_SMD_XO_BUFFER(div_clk, div_a_clk, DIV_CLK_ID); |
| 675 | DEFINE_CLK_RPM_SMD_XO_BUFFER(diff_clk, diff_a_clk, DIFF_CLK_ID); |
Vikram Mulukutla | 80b7ab5 | 2012-07-26 19:03:15 -0700 | [diff] [blame] | 676 | |
| 677 | DEFINE_CLK_RPM_SMD_XO_BUFFER_PINCTRL(cxo_d0_pin, cxo_d0_a_pin, D0_ID); |
| 678 | DEFINE_CLK_RPM_SMD_XO_BUFFER_PINCTRL(cxo_d1_pin, cxo_d1_a_pin, D1_ID); |
| 679 | DEFINE_CLK_RPM_SMD_XO_BUFFER_PINCTRL(cxo_a0_pin, cxo_a0_a_pin, A0_ID); |
| 680 | DEFINE_CLK_RPM_SMD_XO_BUFFER_PINCTRL(cxo_a1_pin, cxo_a1_a_pin, A1_ID); |
| 681 | DEFINE_CLK_RPM_SMD_XO_BUFFER_PINCTRL(cxo_a2_pin, cxo_a2_a_pin, A2_ID); |
| 682 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 683 | static struct pll_vote_clk gpll0_clk_src = { |
| 684 | .en_reg = (void __iomem *)APCS_GPLL_ENA_VOTE_REG, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 685 | .status_reg = (void __iomem *)GPLL0_STATUS_REG, |
| 686 | .status_mask = BIT(17), |
| 687 | .parent = &cxo_clk_src.c, |
| 688 | .base = &virt_bases[GCC_BASE], |
| 689 | .c = { |
| 690 | .rate = 600000000, |
| 691 | .dbg_name = "gpll0_clk_src", |
| 692 | .ops = &clk_ops_pll_vote, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 693 | CLK_INIT(gpll0_clk_src.c), |
| 694 | }, |
| 695 | }; |
| 696 | |
| 697 | static struct pll_vote_clk gpll1_clk_src = { |
| 698 | .en_reg = (void __iomem *)APCS_GPLL_ENA_VOTE_REG, |
| 699 | .en_mask = BIT(1), |
| 700 | .status_reg = (void __iomem *)GPLL1_STATUS_REG, |
| 701 | .status_mask = BIT(17), |
| 702 | .parent = &cxo_clk_src.c, |
| 703 | .base = &virt_bases[GCC_BASE], |
| 704 | .c = { |
| 705 | .rate = 480000000, |
| 706 | .dbg_name = "gpll1_clk_src", |
| 707 | .ops = &clk_ops_pll_vote, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 708 | CLK_INIT(gpll1_clk_src.c), |
| 709 | }, |
| 710 | }; |
| 711 | |
| 712 | static struct pll_vote_clk lpapll0_clk_src = { |
| 713 | .en_reg = (void __iomem *)LPASS_LPA_PLL_VOTE_APPS_REG, |
| 714 | .en_mask = BIT(0), |
| 715 | .status_reg = (void __iomem *)LPAPLL_STATUS_REG, |
| 716 | .status_mask = BIT(17), |
| 717 | .parent = &cxo_clk_src.c, |
| 718 | .base = &virt_bases[LPASS_BASE], |
| 719 | .c = { |
| 720 | .rate = 491520000, |
| 721 | .dbg_name = "lpapll0_clk_src", |
| 722 | .ops = &clk_ops_pll_vote, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 723 | CLK_INIT(lpapll0_clk_src.c), |
| 724 | }, |
| 725 | }; |
| 726 | |
| 727 | static struct pll_vote_clk mmpll0_clk_src = { |
| 728 | .en_reg = (void __iomem *)MMSS_PLL_VOTE_APCS_REG, |
| 729 | .en_mask = BIT(0), |
| 730 | .status_reg = (void __iomem *)MMPLL0_STATUS_REG, |
| 731 | .status_mask = BIT(17), |
| 732 | .parent = &cxo_clk_src.c, |
| 733 | .base = &virt_bases[MMSS_BASE], |
| 734 | .c = { |
| 735 | .dbg_name = "mmpll0_clk_src", |
| 736 | .rate = 800000000, |
| 737 | .ops = &clk_ops_pll_vote, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 738 | CLK_INIT(mmpll0_clk_src.c), |
| 739 | }, |
| 740 | }; |
| 741 | |
| 742 | static struct pll_vote_clk mmpll1_clk_src = { |
| 743 | .en_reg = (void __iomem *)MMSS_PLL_VOTE_APCS_REG, |
| 744 | .en_mask = BIT(1), |
| 745 | .status_reg = (void __iomem *)MMPLL1_STATUS_REG, |
| 746 | .status_mask = BIT(17), |
| 747 | .parent = &cxo_clk_src.c, |
| 748 | .base = &virt_bases[MMSS_BASE], |
| 749 | .c = { |
| 750 | .dbg_name = "mmpll1_clk_src", |
Vikram Mulukutla | d16a8f1 | 2012-07-20 13:33:45 -0700 | [diff] [blame] | 751 | .rate = 846000000, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 752 | .ops = &clk_ops_pll_vote, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 753 | CLK_INIT(mmpll1_clk_src.c), |
| 754 | }, |
| 755 | }; |
| 756 | |
| 757 | static struct pll_clk mmpll3_clk_src = { |
| 758 | .mode_reg = (void __iomem *)MMPLL3_MODE_REG, |
| 759 | .status_reg = (void __iomem *)MMPLL3_STATUS_REG, |
| 760 | .parent = &cxo_clk_src.c, |
| 761 | .base = &virt_bases[MMSS_BASE], |
| 762 | .c = { |
| 763 | .dbg_name = "mmpll3_clk_src", |
| 764 | .rate = 1000000000, |
| 765 | .ops = &clk_ops_local_pll, |
| 766 | CLK_INIT(mmpll3_clk_src.c), |
| 767 | }, |
| 768 | }; |
| 769 | |
Vikram Mulukutla | d08a152 | 2012-05-24 15:24:01 -0700 | [diff] [blame] | 770 | static DEFINE_CLK_VOTER(pnoc_msmbus_clk, &pnoc_clk.c, LONG_MAX); |
| 771 | static DEFINE_CLK_VOTER(snoc_msmbus_clk, &snoc_clk.c, LONG_MAX); |
| 772 | static DEFINE_CLK_VOTER(cnoc_msmbus_clk, &cnoc_clk.c, LONG_MAX); |
| 773 | static DEFINE_CLK_VOTER(pnoc_msmbus_a_clk, &pnoc_a_clk.c, LONG_MAX); |
| 774 | static DEFINE_CLK_VOTER(snoc_msmbus_a_clk, &snoc_a_clk.c, LONG_MAX); |
| 775 | static DEFINE_CLK_VOTER(cnoc_msmbus_a_clk, &cnoc_a_clk.c, LONG_MAX); |
| 776 | |
| 777 | static DEFINE_CLK_VOTER(bimc_msmbus_clk, &bimc_clk.c, LONG_MAX); |
| 778 | static DEFINE_CLK_VOTER(bimc_msmbus_a_clk, &bimc_a_clk.c, LONG_MAX); |
| 779 | static DEFINE_CLK_VOTER(bimc_acpu_a_clk, &bimc_a_clk.c, LONG_MAX); |
Vikram Mulukutla | 1e6127d | 2012-08-21 21:05:24 -0700 | [diff] [blame] | 780 | static DEFINE_CLK_VOTER(oxili_gfx3d_clk_src, &gfx3d_clk_src.c, LONG_MAX); |
Vikram Mulukutla | d08a152 | 2012-05-24 15:24:01 -0700 | [diff] [blame] | 781 | static DEFINE_CLK_VOTER(ocmemgx_msmbus_clk, &ocmemgx_clk.c, LONG_MAX); |
| 782 | static DEFINE_CLK_VOTER(ocmemgx_msmbus_a_clk, &ocmemgx_a_clk.c, LONG_MAX); |
Naveen Ramaraj | 65396b9 | 2012-08-15 17:05:07 -0700 | [diff] [blame] | 783 | static DEFINE_CLK_VOTER(ocmemgx_core_clk, &ocmemgx_clk.c, LONG_MAX); |
Vikram Mulukutla | d08a152 | 2012-05-24 15:24:01 -0700 | [diff] [blame] | 784 | |
Sujit Reddy Thumma | 5024749 | 2012-06-18 09:39:36 +0530 | [diff] [blame] | 785 | static DEFINE_CLK_VOTER(pnoc_sdcc1_clk, &pnoc_clk.c, 0); |
| 786 | static DEFINE_CLK_VOTER(pnoc_sdcc2_clk, &pnoc_clk.c, 0); |
| 787 | static DEFINE_CLK_VOTER(pnoc_sdcc3_clk, &pnoc_clk.c, 0); |
| 788 | static DEFINE_CLK_VOTER(pnoc_sdcc4_clk, &pnoc_clk.c, 0); |
| 789 | |
Vikram Mulukutla | b0ad9f3 | 2012-07-03 12:57:24 -0700 | [diff] [blame] | 790 | static DEFINE_CLK_VOTER(pnoc_sps_clk, &pnoc_clk.c, 0); |
Vikram Mulukutla | b0ad9f3 | 2012-07-03 12:57:24 -0700 | [diff] [blame] | 791 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 792 | static struct clk_freq_tbl ftbl_gcc_usb30_master_clk[] = { |
| 793 | F(125000000, gpll0, 1, 5, 24), |
| 794 | F_END |
| 795 | }; |
| 796 | |
| 797 | static struct rcg_clk usb30_master_clk_src = { |
| 798 | .cmd_rcgr_reg = USB30_MASTER_CMD_RCGR, |
| 799 | .set_rate = set_rate_mnd, |
| 800 | .freq_tbl = ftbl_gcc_usb30_master_clk, |
| 801 | .current_freq = &rcg_dummy_freq, |
| 802 | .base = &virt_bases[GCC_BASE], |
| 803 | .c = { |
| 804 | .dbg_name = "usb30_master_clk_src", |
| 805 | .ops = &clk_ops_rcg_mnd, |
| 806 | VDD_DIG_FMAX_MAP1(NOMINAL, 125000000), |
| 807 | CLK_INIT(usb30_master_clk_src.c), |
| 808 | }, |
| 809 | }; |
| 810 | |
| 811 | static struct clk_freq_tbl ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk[] = { |
| 812 | F( 960000, cxo, 10, 1, 2), |
| 813 | F( 4800000, cxo, 4, 0, 0), |
| 814 | F( 9600000, cxo, 2, 0, 0), |
| 815 | F(15000000, gpll0, 10, 1, 4), |
| 816 | F(19200000, cxo, 1, 0, 0), |
| 817 | F(25000000, gpll0, 12, 1, 2), |
| 818 | F(50000000, gpll0, 12, 0, 0), |
| 819 | F_END |
| 820 | }; |
| 821 | |
| 822 | static struct rcg_clk blsp1_qup1_spi_apps_clk_src = { |
| 823 | .cmd_rcgr_reg = BLSP1_QUP1_SPI_APPS_CMD_RCGR, |
| 824 | .set_rate = set_rate_mnd, |
| 825 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 826 | .current_freq = &rcg_dummy_freq, |
| 827 | .base = &virt_bases[GCC_BASE], |
| 828 | .c = { |
| 829 | .dbg_name = "blsp1_qup1_spi_apps_clk_src", |
| 830 | .ops = &clk_ops_rcg_mnd, |
| 831 | VDD_DIG_FMAX_MAP2(LOW, 25000000, NOMINAL, 50000000), |
| 832 | CLK_INIT(blsp1_qup1_spi_apps_clk_src.c), |
| 833 | }, |
| 834 | }; |
| 835 | |
| 836 | static struct rcg_clk blsp1_qup2_spi_apps_clk_src = { |
| 837 | .cmd_rcgr_reg = BLSP1_QUP2_SPI_APPS_CMD_RCGR, |
| 838 | .set_rate = set_rate_mnd, |
| 839 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 840 | .current_freq = &rcg_dummy_freq, |
| 841 | .base = &virt_bases[GCC_BASE], |
| 842 | .c = { |
| 843 | .dbg_name = "blsp1_qup2_spi_apps_clk_src", |
| 844 | .ops = &clk_ops_rcg_mnd, |
| 845 | VDD_DIG_FMAX_MAP2(LOW, 25000000, NOMINAL, 50000000), |
| 846 | CLK_INIT(blsp1_qup2_spi_apps_clk_src.c), |
| 847 | }, |
| 848 | }; |
| 849 | |
| 850 | static struct rcg_clk blsp1_qup3_spi_apps_clk_src = { |
| 851 | .cmd_rcgr_reg = BLSP1_QUP3_SPI_APPS_CMD_RCGR, |
| 852 | .set_rate = set_rate_mnd, |
| 853 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 854 | .current_freq = &rcg_dummy_freq, |
| 855 | .base = &virt_bases[GCC_BASE], |
| 856 | .c = { |
| 857 | .dbg_name = "blsp1_qup3_spi_apps_clk_src", |
| 858 | .ops = &clk_ops_rcg_mnd, |
| 859 | VDD_DIG_FMAX_MAP2(LOW, 25000000, NOMINAL, 50000000), |
| 860 | CLK_INIT(blsp1_qup3_spi_apps_clk_src.c), |
| 861 | }, |
| 862 | }; |
| 863 | |
| 864 | static struct rcg_clk blsp1_qup4_spi_apps_clk_src = { |
| 865 | .cmd_rcgr_reg = BLSP1_QUP4_SPI_APPS_CMD_RCGR, |
| 866 | .set_rate = set_rate_mnd, |
| 867 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 868 | .current_freq = &rcg_dummy_freq, |
| 869 | .base = &virt_bases[GCC_BASE], |
| 870 | .c = { |
| 871 | .dbg_name = "blsp1_qup4_spi_apps_clk_src", |
| 872 | .ops = &clk_ops_rcg_mnd, |
| 873 | VDD_DIG_FMAX_MAP2(LOW, 25000000, NOMINAL, 50000000), |
| 874 | CLK_INIT(blsp1_qup4_spi_apps_clk_src.c), |
| 875 | }, |
| 876 | }; |
| 877 | |
| 878 | static struct rcg_clk blsp1_qup5_spi_apps_clk_src = { |
| 879 | .cmd_rcgr_reg = BLSP1_QUP5_SPI_APPS_CMD_RCGR, |
| 880 | .set_rate = set_rate_mnd, |
| 881 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 882 | .current_freq = &rcg_dummy_freq, |
| 883 | .base = &virt_bases[GCC_BASE], |
| 884 | .c = { |
| 885 | .dbg_name = "blsp1_qup5_spi_apps_clk_src", |
| 886 | .ops = &clk_ops_rcg_mnd, |
| 887 | VDD_DIG_FMAX_MAP2(LOW, 25000000, NOMINAL, 50000000), |
| 888 | CLK_INIT(blsp1_qup5_spi_apps_clk_src.c), |
| 889 | }, |
| 890 | }; |
| 891 | |
| 892 | static struct rcg_clk blsp1_qup6_spi_apps_clk_src = { |
| 893 | .cmd_rcgr_reg = BLSP1_QUP6_SPI_APPS_CMD_RCGR, |
| 894 | .set_rate = set_rate_mnd, |
| 895 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 896 | .current_freq = &rcg_dummy_freq, |
| 897 | .base = &virt_bases[GCC_BASE], |
| 898 | .c = { |
| 899 | .dbg_name = "blsp1_qup6_spi_apps_clk_src", |
| 900 | .ops = &clk_ops_rcg_mnd, |
| 901 | VDD_DIG_FMAX_MAP2(LOW, 25000000, NOMINAL, 50000000), |
| 902 | CLK_INIT(blsp1_qup6_spi_apps_clk_src.c), |
| 903 | }, |
| 904 | }; |
| 905 | |
| 906 | static struct clk_freq_tbl ftbl_gcc_blsp1_2_uart1_6_apps_clk[] = { |
| 907 | F( 3686400, gpll0, 1, 96, 15625), |
| 908 | F( 7372800, gpll0, 1, 192, 15625), |
| 909 | F(14745600, gpll0, 1, 384, 15625), |
| 910 | F(16000000, gpll0, 5, 2, 15), |
| 911 | F(19200000, cxo, 1, 0, 0), |
| 912 | F(24000000, gpll0, 5, 1, 5), |
| 913 | F(32000000, gpll0, 1, 4, 75), |
| 914 | F(40000000, gpll0, 15, 0, 0), |
| 915 | F(46400000, gpll0, 1, 29, 375), |
| 916 | F(48000000, gpll0, 12.5, 0, 0), |
| 917 | F(51200000, gpll0, 1, 32, 375), |
| 918 | F(56000000, gpll0, 1, 7, 75), |
| 919 | F(58982400, gpll0, 1, 1536, 15625), |
| 920 | F(60000000, gpll0, 10, 0, 0), |
| 921 | F_END |
| 922 | }; |
| 923 | |
| 924 | static struct rcg_clk blsp1_uart1_apps_clk_src = { |
| 925 | .cmd_rcgr_reg = BLSP1_UART1_APPS_CMD_RCGR, |
| 926 | .set_rate = set_rate_mnd, |
| 927 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 928 | .current_freq = &rcg_dummy_freq, |
| 929 | .base = &virt_bases[GCC_BASE], |
| 930 | .c = { |
| 931 | .dbg_name = "blsp1_uart1_apps_clk_src", |
| 932 | .ops = &clk_ops_rcg_mnd, |
| 933 | VDD_DIG_FMAX_MAP2(LOW, 31580000, NOMINAL, 63160000), |
| 934 | CLK_INIT(blsp1_uart1_apps_clk_src.c), |
| 935 | }, |
| 936 | }; |
| 937 | |
| 938 | static struct rcg_clk blsp1_uart2_apps_clk_src = { |
| 939 | .cmd_rcgr_reg = BLSP1_UART2_APPS_CMD_RCGR, |
| 940 | .set_rate = set_rate_mnd, |
| 941 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 942 | .current_freq = &rcg_dummy_freq, |
| 943 | .base = &virt_bases[GCC_BASE], |
| 944 | .c = { |
| 945 | .dbg_name = "blsp1_uart2_apps_clk_src", |
| 946 | .ops = &clk_ops_rcg_mnd, |
| 947 | VDD_DIG_FMAX_MAP2(LOW, 31580000, NOMINAL, 63160000), |
| 948 | CLK_INIT(blsp1_uart2_apps_clk_src.c), |
| 949 | }, |
| 950 | }; |
| 951 | |
| 952 | static struct rcg_clk blsp1_uart3_apps_clk_src = { |
| 953 | .cmd_rcgr_reg = BLSP1_UART3_APPS_CMD_RCGR, |
| 954 | .set_rate = set_rate_mnd, |
| 955 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 956 | .current_freq = &rcg_dummy_freq, |
| 957 | .base = &virt_bases[GCC_BASE], |
| 958 | .c = { |
| 959 | .dbg_name = "blsp1_uart3_apps_clk_src", |
| 960 | .ops = &clk_ops_rcg_mnd, |
| 961 | VDD_DIG_FMAX_MAP2(LOW, 31580000, NOMINAL, 63160000), |
| 962 | CLK_INIT(blsp1_uart3_apps_clk_src.c), |
| 963 | }, |
| 964 | }; |
| 965 | |
| 966 | static struct rcg_clk blsp1_uart4_apps_clk_src = { |
| 967 | .cmd_rcgr_reg = BLSP1_UART4_APPS_CMD_RCGR, |
| 968 | .set_rate = set_rate_mnd, |
| 969 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 970 | .current_freq = &rcg_dummy_freq, |
| 971 | .base = &virt_bases[GCC_BASE], |
| 972 | .c = { |
| 973 | .dbg_name = "blsp1_uart4_apps_clk_src", |
| 974 | .ops = &clk_ops_rcg_mnd, |
| 975 | VDD_DIG_FMAX_MAP2(LOW, 31580000, NOMINAL, 63160000), |
| 976 | CLK_INIT(blsp1_uart4_apps_clk_src.c), |
| 977 | }, |
| 978 | }; |
| 979 | |
| 980 | static struct rcg_clk blsp1_uart5_apps_clk_src = { |
| 981 | .cmd_rcgr_reg = BLSP1_UART5_APPS_CMD_RCGR, |
| 982 | .set_rate = set_rate_mnd, |
| 983 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 984 | .current_freq = &rcg_dummy_freq, |
| 985 | .base = &virt_bases[GCC_BASE], |
| 986 | .c = { |
| 987 | .dbg_name = "blsp1_uart5_apps_clk_src", |
| 988 | .ops = &clk_ops_rcg_mnd, |
| 989 | VDD_DIG_FMAX_MAP2(LOW, 31580000, NOMINAL, 63160000), |
| 990 | CLK_INIT(blsp1_uart5_apps_clk_src.c), |
| 991 | }, |
| 992 | }; |
| 993 | |
| 994 | static struct rcg_clk blsp1_uart6_apps_clk_src = { |
| 995 | .cmd_rcgr_reg = BLSP1_UART6_APPS_CMD_RCGR, |
| 996 | .set_rate = set_rate_mnd, |
| 997 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 998 | .current_freq = &rcg_dummy_freq, |
| 999 | .base = &virt_bases[GCC_BASE], |
| 1000 | .c = { |
| 1001 | .dbg_name = "blsp1_uart6_apps_clk_src", |
| 1002 | .ops = &clk_ops_rcg_mnd, |
| 1003 | VDD_DIG_FMAX_MAP2(LOW, 31580000, NOMINAL, 63160000), |
| 1004 | CLK_INIT(blsp1_uart6_apps_clk_src.c), |
| 1005 | }, |
| 1006 | }; |
| 1007 | |
| 1008 | static struct rcg_clk blsp2_qup1_spi_apps_clk_src = { |
| 1009 | .cmd_rcgr_reg = BLSP2_QUP1_SPI_APPS_CMD_RCGR, |
| 1010 | .set_rate = set_rate_mnd, |
| 1011 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 1012 | .current_freq = &rcg_dummy_freq, |
| 1013 | .base = &virt_bases[GCC_BASE], |
| 1014 | .c = { |
| 1015 | .dbg_name = "blsp2_qup1_spi_apps_clk_src", |
| 1016 | .ops = &clk_ops_rcg_mnd, |
| 1017 | VDD_DIG_FMAX_MAP2(LOW, 25000000, NOMINAL, 50000000), |
| 1018 | CLK_INIT(blsp2_qup1_spi_apps_clk_src.c), |
| 1019 | }, |
| 1020 | }; |
| 1021 | |
| 1022 | static struct rcg_clk blsp2_qup2_spi_apps_clk_src = { |
| 1023 | .cmd_rcgr_reg = BLSP2_QUP2_SPI_APPS_CMD_RCGR, |
| 1024 | .set_rate = set_rate_mnd, |
| 1025 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 1026 | .current_freq = &rcg_dummy_freq, |
| 1027 | .base = &virt_bases[GCC_BASE], |
| 1028 | .c = { |
| 1029 | .dbg_name = "blsp2_qup2_spi_apps_clk_src", |
| 1030 | .ops = &clk_ops_rcg_mnd, |
| 1031 | VDD_DIG_FMAX_MAP2(LOW, 25000000, NOMINAL, 50000000), |
| 1032 | CLK_INIT(blsp2_qup2_spi_apps_clk_src.c), |
| 1033 | }, |
| 1034 | }; |
| 1035 | |
| 1036 | static struct rcg_clk blsp2_qup3_spi_apps_clk_src = { |
| 1037 | .cmd_rcgr_reg = BLSP2_QUP3_SPI_APPS_CMD_RCGR, |
| 1038 | .set_rate = set_rate_mnd, |
| 1039 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 1040 | .current_freq = &rcg_dummy_freq, |
| 1041 | .base = &virt_bases[GCC_BASE], |
| 1042 | .c = { |
| 1043 | .dbg_name = "blsp2_qup3_spi_apps_clk_src", |
| 1044 | .ops = &clk_ops_rcg_mnd, |
| 1045 | VDD_DIG_FMAX_MAP2(LOW, 25000000, NOMINAL, 50000000), |
| 1046 | CLK_INIT(blsp2_qup3_spi_apps_clk_src.c), |
| 1047 | }, |
| 1048 | }; |
| 1049 | |
| 1050 | static struct rcg_clk blsp2_qup4_spi_apps_clk_src = { |
| 1051 | .cmd_rcgr_reg = BLSP2_QUP4_SPI_APPS_CMD_RCGR, |
| 1052 | .set_rate = set_rate_mnd, |
| 1053 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 1054 | .current_freq = &rcg_dummy_freq, |
| 1055 | .base = &virt_bases[GCC_BASE], |
| 1056 | .c = { |
| 1057 | .dbg_name = "blsp2_qup4_spi_apps_clk_src", |
| 1058 | .ops = &clk_ops_rcg_mnd, |
| 1059 | VDD_DIG_FMAX_MAP2(LOW, 25000000, NOMINAL, 50000000), |
| 1060 | CLK_INIT(blsp2_qup4_spi_apps_clk_src.c), |
| 1061 | }, |
| 1062 | }; |
| 1063 | |
| 1064 | static struct rcg_clk blsp2_qup5_spi_apps_clk_src = { |
| 1065 | .cmd_rcgr_reg = BLSP2_QUP5_SPI_APPS_CMD_RCGR, |
| 1066 | .set_rate = set_rate_mnd, |
| 1067 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 1068 | .current_freq = &rcg_dummy_freq, |
| 1069 | .base = &virt_bases[GCC_BASE], |
| 1070 | .c = { |
| 1071 | .dbg_name = "blsp2_qup5_spi_apps_clk_src", |
| 1072 | .ops = &clk_ops_rcg_mnd, |
| 1073 | VDD_DIG_FMAX_MAP2(LOW, 25000000, NOMINAL, 50000000), |
| 1074 | CLK_INIT(blsp2_qup5_spi_apps_clk_src.c), |
| 1075 | }, |
| 1076 | }; |
| 1077 | |
| 1078 | static struct rcg_clk blsp2_qup6_spi_apps_clk_src = { |
| 1079 | .cmd_rcgr_reg = BLSP2_QUP6_SPI_APPS_CMD_RCGR, |
| 1080 | .set_rate = set_rate_mnd, |
| 1081 | .freq_tbl = ftbl_gcc_blsp1_2_qup1_6_spi_apps_clk, |
| 1082 | .current_freq = &rcg_dummy_freq, |
| 1083 | .base = &virt_bases[GCC_BASE], |
| 1084 | .c = { |
| 1085 | .dbg_name = "blsp2_qup6_spi_apps_clk_src", |
| 1086 | .ops = &clk_ops_rcg_mnd, |
| 1087 | VDD_DIG_FMAX_MAP2(LOW, 25000000, NOMINAL, 50000000), |
| 1088 | CLK_INIT(blsp2_qup6_spi_apps_clk_src.c), |
| 1089 | }, |
| 1090 | }; |
| 1091 | |
| 1092 | static struct rcg_clk blsp2_uart1_apps_clk_src = { |
| 1093 | .cmd_rcgr_reg = BLSP2_UART1_APPS_CMD_RCGR, |
| 1094 | .set_rate = set_rate_mnd, |
| 1095 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 1096 | .current_freq = &rcg_dummy_freq, |
| 1097 | .base = &virt_bases[GCC_BASE], |
| 1098 | .c = { |
| 1099 | .dbg_name = "blsp2_uart1_apps_clk_src", |
| 1100 | .ops = &clk_ops_rcg_mnd, |
| 1101 | VDD_DIG_FMAX_MAP2(LOW, 31580000, NOMINAL, 63160000), |
| 1102 | CLK_INIT(blsp2_uart1_apps_clk_src.c), |
| 1103 | }, |
| 1104 | }; |
| 1105 | |
| 1106 | static struct rcg_clk blsp2_uart2_apps_clk_src = { |
| 1107 | .cmd_rcgr_reg = BLSP2_UART2_APPS_CMD_RCGR, |
| 1108 | .set_rate = set_rate_mnd, |
| 1109 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 1110 | .current_freq = &rcg_dummy_freq, |
| 1111 | .base = &virt_bases[GCC_BASE], |
| 1112 | .c = { |
| 1113 | .dbg_name = "blsp2_uart2_apps_clk_src", |
| 1114 | .ops = &clk_ops_rcg_mnd, |
| 1115 | VDD_DIG_FMAX_MAP2(LOW, 31580000, NOMINAL, 63160000), |
| 1116 | CLK_INIT(blsp2_uart2_apps_clk_src.c), |
| 1117 | }, |
| 1118 | }; |
| 1119 | |
| 1120 | static struct rcg_clk blsp2_uart3_apps_clk_src = { |
| 1121 | .cmd_rcgr_reg = BLSP2_UART3_APPS_CMD_RCGR, |
| 1122 | .set_rate = set_rate_mnd, |
| 1123 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 1124 | .current_freq = &rcg_dummy_freq, |
| 1125 | .base = &virt_bases[GCC_BASE], |
| 1126 | .c = { |
| 1127 | .dbg_name = "blsp2_uart3_apps_clk_src", |
| 1128 | .ops = &clk_ops_rcg_mnd, |
| 1129 | VDD_DIG_FMAX_MAP2(LOW, 31580000, NOMINAL, 63160000), |
| 1130 | CLK_INIT(blsp2_uart3_apps_clk_src.c), |
| 1131 | }, |
| 1132 | }; |
| 1133 | |
| 1134 | static struct rcg_clk blsp2_uart4_apps_clk_src = { |
| 1135 | .cmd_rcgr_reg = BLSP2_UART4_APPS_CMD_RCGR, |
| 1136 | .set_rate = set_rate_mnd, |
| 1137 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 1138 | .current_freq = &rcg_dummy_freq, |
| 1139 | .base = &virt_bases[GCC_BASE], |
| 1140 | .c = { |
| 1141 | .dbg_name = "blsp2_uart4_apps_clk_src", |
| 1142 | .ops = &clk_ops_rcg_mnd, |
| 1143 | VDD_DIG_FMAX_MAP2(LOW, 31580000, NOMINAL, 63160000), |
| 1144 | CLK_INIT(blsp2_uart4_apps_clk_src.c), |
| 1145 | }, |
| 1146 | }; |
| 1147 | |
| 1148 | static struct rcg_clk blsp2_uart5_apps_clk_src = { |
| 1149 | .cmd_rcgr_reg = BLSP2_UART5_APPS_CMD_RCGR, |
| 1150 | .set_rate = set_rate_mnd, |
| 1151 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 1152 | .current_freq = &rcg_dummy_freq, |
| 1153 | .base = &virt_bases[GCC_BASE], |
| 1154 | .c = { |
| 1155 | .dbg_name = "blsp2_uart5_apps_clk_src", |
| 1156 | .ops = &clk_ops_rcg_mnd, |
| 1157 | VDD_DIG_FMAX_MAP2(LOW, 31580000, NOMINAL, 63160000), |
| 1158 | CLK_INIT(blsp2_uart5_apps_clk_src.c), |
| 1159 | }, |
| 1160 | }; |
| 1161 | |
| 1162 | static struct rcg_clk blsp2_uart6_apps_clk_src = { |
| 1163 | .cmd_rcgr_reg = BLSP2_UART6_APPS_CMD_RCGR, |
| 1164 | .set_rate = set_rate_mnd, |
| 1165 | .freq_tbl = ftbl_gcc_blsp1_2_uart1_6_apps_clk, |
| 1166 | .current_freq = &rcg_dummy_freq, |
| 1167 | .base = &virt_bases[GCC_BASE], |
| 1168 | .c = { |
| 1169 | .dbg_name = "blsp2_uart6_apps_clk_src", |
| 1170 | .ops = &clk_ops_rcg_mnd, |
| 1171 | VDD_DIG_FMAX_MAP2(LOW, 31580000, NOMINAL, 63160000), |
| 1172 | CLK_INIT(blsp2_uart6_apps_clk_src.c), |
| 1173 | }, |
| 1174 | }; |
| 1175 | |
| 1176 | static struct clk_freq_tbl ftbl_gcc_ce1_clk[] = { |
| 1177 | F( 50000000, gpll0, 12, 0, 0), |
| 1178 | F(100000000, gpll0, 6, 0, 0), |
| 1179 | F_END |
| 1180 | }; |
| 1181 | |
| 1182 | static struct rcg_clk ce1_clk_src = { |
| 1183 | .cmd_rcgr_reg = CE1_CMD_RCGR, |
| 1184 | .set_rate = set_rate_hid, |
| 1185 | .freq_tbl = ftbl_gcc_ce1_clk, |
| 1186 | .current_freq = &rcg_dummy_freq, |
| 1187 | .base = &virt_bases[GCC_BASE], |
| 1188 | .c = { |
| 1189 | .dbg_name = "ce1_clk_src", |
| 1190 | .ops = &clk_ops_rcg, |
| 1191 | VDD_DIG_FMAX_MAP2(LOW, 50000000, NOMINAL, 100000000), |
| 1192 | CLK_INIT(ce1_clk_src.c), |
| 1193 | }, |
| 1194 | }; |
| 1195 | |
| 1196 | static struct clk_freq_tbl ftbl_gcc_ce2_clk[] = { |
| 1197 | F( 50000000, gpll0, 12, 0, 0), |
| 1198 | F(100000000, gpll0, 6, 0, 0), |
| 1199 | F_END |
| 1200 | }; |
| 1201 | |
| 1202 | static struct rcg_clk ce2_clk_src = { |
| 1203 | .cmd_rcgr_reg = CE2_CMD_RCGR, |
| 1204 | .set_rate = set_rate_hid, |
| 1205 | .freq_tbl = ftbl_gcc_ce2_clk, |
| 1206 | .current_freq = &rcg_dummy_freq, |
| 1207 | .base = &virt_bases[GCC_BASE], |
| 1208 | .c = { |
| 1209 | .dbg_name = "ce2_clk_src", |
| 1210 | .ops = &clk_ops_rcg, |
| 1211 | VDD_DIG_FMAX_MAP2(LOW, 50000000, NOMINAL, 100000000), |
| 1212 | CLK_INIT(ce2_clk_src.c), |
| 1213 | }, |
| 1214 | }; |
| 1215 | |
| 1216 | static struct clk_freq_tbl ftbl_gcc_gp_clk[] = { |
| 1217 | F(19200000, cxo, 1, 0, 0), |
| 1218 | F_END |
| 1219 | }; |
| 1220 | |
| 1221 | static struct rcg_clk gp1_clk_src = { |
| 1222 | .cmd_rcgr_reg = GP1_CMD_RCGR, |
| 1223 | .set_rate = set_rate_mnd, |
| 1224 | .freq_tbl = ftbl_gcc_gp_clk, |
| 1225 | .current_freq = &rcg_dummy_freq, |
| 1226 | .base = &virt_bases[GCC_BASE], |
| 1227 | .c = { |
| 1228 | .dbg_name = "gp1_clk_src", |
| 1229 | .ops = &clk_ops_rcg_mnd, |
| 1230 | VDD_DIG_FMAX_MAP2(LOW, 100000000, NOMINAL, 200000000), |
| 1231 | CLK_INIT(gp1_clk_src.c), |
| 1232 | }, |
| 1233 | }; |
| 1234 | |
| 1235 | static struct rcg_clk gp2_clk_src = { |
| 1236 | .cmd_rcgr_reg = GP2_CMD_RCGR, |
| 1237 | .set_rate = set_rate_mnd, |
| 1238 | .freq_tbl = ftbl_gcc_gp_clk, |
| 1239 | .current_freq = &rcg_dummy_freq, |
| 1240 | .base = &virt_bases[GCC_BASE], |
| 1241 | .c = { |
| 1242 | .dbg_name = "gp2_clk_src", |
| 1243 | .ops = &clk_ops_rcg_mnd, |
| 1244 | VDD_DIG_FMAX_MAP2(LOW, 100000000, NOMINAL, 200000000), |
| 1245 | CLK_INIT(gp2_clk_src.c), |
| 1246 | }, |
| 1247 | }; |
| 1248 | |
| 1249 | static struct rcg_clk gp3_clk_src = { |
| 1250 | .cmd_rcgr_reg = GP3_CMD_RCGR, |
| 1251 | .set_rate = set_rate_mnd, |
| 1252 | .freq_tbl = ftbl_gcc_gp_clk, |
| 1253 | .current_freq = &rcg_dummy_freq, |
| 1254 | .base = &virt_bases[GCC_BASE], |
| 1255 | .c = { |
| 1256 | .dbg_name = "gp3_clk_src", |
| 1257 | .ops = &clk_ops_rcg_mnd, |
| 1258 | VDD_DIG_FMAX_MAP2(LOW, 100000000, NOMINAL, 200000000), |
| 1259 | CLK_INIT(gp3_clk_src.c), |
| 1260 | }, |
| 1261 | }; |
| 1262 | |
| 1263 | static struct clk_freq_tbl ftbl_gcc_pdm2_clk[] = { |
| 1264 | F(60000000, gpll0, 10, 0, 0), |
| 1265 | F_END |
| 1266 | }; |
| 1267 | |
| 1268 | static struct rcg_clk pdm2_clk_src = { |
| 1269 | .cmd_rcgr_reg = PDM2_CMD_RCGR, |
| 1270 | .set_rate = set_rate_hid, |
| 1271 | .freq_tbl = ftbl_gcc_pdm2_clk, |
| 1272 | .current_freq = &rcg_dummy_freq, |
| 1273 | .base = &virt_bases[GCC_BASE], |
| 1274 | .c = { |
| 1275 | .dbg_name = "pdm2_clk_src", |
| 1276 | .ops = &clk_ops_rcg, |
| 1277 | VDD_DIG_FMAX_MAP1(LOW, 60000000), |
| 1278 | CLK_INIT(pdm2_clk_src.c), |
| 1279 | }, |
| 1280 | }; |
| 1281 | |
| 1282 | static struct clk_freq_tbl ftbl_gcc_sdcc1_2_apps_clk[] = { |
| 1283 | F( 144000, cxo, 16, 3, 25), |
| 1284 | F( 400000, cxo, 12, 1, 4), |
| 1285 | F( 20000000, gpll0, 15, 1, 2), |
| 1286 | F( 25000000, gpll0, 12, 1, 2), |
| 1287 | F( 50000000, gpll0, 12, 0, 0), |
| 1288 | F(100000000, gpll0, 6, 0, 0), |
| 1289 | F(200000000, gpll0, 3, 0, 0), |
| 1290 | F_END |
| 1291 | }; |
| 1292 | |
| 1293 | static struct clk_freq_tbl ftbl_gcc_sdcc3_4_apps_clk[] = { |
| 1294 | F( 144000, cxo, 16, 3, 25), |
| 1295 | F( 400000, cxo, 12, 1, 4), |
| 1296 | F( 20000000, gpll0, 15, 1, 2), |
| 1297 | F( 25000000, gpll0, 12, 1, 2), |
| 1298 | F( 50000000, gpll0, 12, 0, 0), |
| 1299 | F(100000000, gpll0, 6, 0, 0), |
| 1300 | F_END |
| 1301 | }; |
| 1302 | |
Vikram Mulukutla | 19245e0 | 2012-07-23 15:58:04 -0700 | [diff] [blame] | 1303 | static struct clk_freq_tbl ftbl_gcc_sdcc_apps_rumi_clk[] = { |
| 1304 | F( 400000, cxo, 12, 1, 4), |
| 1305 | F( 19200000, cxo, 1, 0, 0), |
| 1306 | F_END |
| 1307 | }; |
| 1308 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1309 | static struct rcg_clk sdcc1_apps_clk_src = { |
| 1310 | .cmd_rcgr_reg = SDCC1_APPS_CMD_RCGR, |
| 1311 | .set_rate = set_rate_mnd, |
| 1312 | .freq_tbl = ftbl_gcc_sdcc1_2_apps_clk, |
| 1313 | .current_freq = &rcg_dummy_freq, |
| 1314 | .base = &virt_bases[GCC_BASE], |
| 1315 | .c = { |
| 1316 | .dbg_name = "sdcc1_apps_clk_src", |
| 1317 | .ops = &clk_ops_rcg_mnd, |
| 1318 | VDD_DIG_FMAX_MAP2(LOW, 100000000, NOMINAL, 200000000), |
| 1319 | CLK_INIT(sdcc1_apps_clk_src.c), |
| 1320 | }, |
| 1321 | }; |
| 1322 | |
| 1323 | static struct rcg_clk sdcc2_apps_clk_src = { |
| 1324 | .cmd_rcgr_reg = SDCC2_APPS_CMD_RCGR, |
| 1325 | .set_rate = set_rate_mnd, |
| 1326 | .freq_tbl = ftbl_gcc_sdcc1_2_apps_clk, |
| 1327 | .current_freq = &rcg_dummy_freq, |
| 1328 | .base = &virt_bases[GCC_BASE], |
| 1329 | .c = { |
| 1330 | .dbg_name = "sdcc2_apps_clk_src", |
| 1331 | .ops = &clk_ops_rcg_mnd, |
| 1332 | VDD_DIG_FMAX_MAP2(LOW, 100000000, NOMINAL, 200000000), |
| 1333 | CLK_INIT(sdcc2_apps_clk_src.c), |
| 1334 | }, |
| 1335 | }; |
| 1336 | |
| 1337 | static struct rcg_clk sdcc3_apps_clk_src = { |
| 1338 | .cmd_rcgr_reg = SDCC3_APPS_CMD_RCGR, |
| 1339 | .set_rate = set_rate_mnd, |
| 1340 | .freq_tbl = ftbl_gcc_sdcc3_4_apps_clk, |
| 1341 | .current_freq = &rcg_dummy_freq, |
| 1342 | .base = &virt_bases[GCC_BASE], |
| 1343 | .c = { |
| 1344 | .dbg_name = "sdcc3_apps_clk_src", |
| 1345 | .ops = &clk_ops_rcg_mnd, |
| 1346 | VDD_DIG_FMAX_MAP2(LOW, 50000000, NOMINAL, 100000000), |
| 1347 | CLK_INIT(sdcc3_apps_clk_src.c), |
| 1348 | }, |
| 1349 | }; |
| 1350 | |
| 1351 | static struct rcg_clk sdcc4_apps_clk_src = { |
| 1352 | .cmd_rcgr_reg = SDCC4_APPS_CMD_RCGR, |
| 1353 | .set_rate = set_rate_mnd, |
| 1354 | .freq_tbl = ftbl_gcc_sdcc3_4_apps_clk, |
| 1355 | .current_freq = &rcg_dummy_freq, |
| 1356 | .base = &virt_bases[GCC_BASE], |
| 1357 | .c = { |
| 1358 | .dbg_name = "sdcc4_apps_clk_src", |
| 1359 | .ops = &clk_ops_rcg_mnd, |
| 1360 | VDD_DIG_FMAX_MAP2(LOW, 50000000, NOMINAL, 100000000), |
| 1361 | CLK_INIT(sdcc4_apps_clk_src.c), |
| 1362 | }, |
| 1363 | }; |
| 1364 | |
| 1365 | static struct clk_freq_tbl ftbl_gcc_tsif_ref_clk[] = { |
| 1366 | F(105000, cxo, 2, 1, 91), |
| 1367 | F_END |
| 1368 | }; |
| 1369 | |
| 1370 | static struct rcg_clk tsif_ref_clk_src = { |
| 1371 | .cmd_rcgr_reg = TSIF_REF_CMD_RCGR, |
| 1372 | .set_rate = set_rate_mnd, |
| 1373 | .freq_tbl = ftbl_gcc_tsif_ref_clk, |
| 1374 | .current_freq = &rcg_dummy_freq, |
| 1375 | .base = &virt_bases[GCC_BASE], |
| 1376 | .c = { |
| 1377 | .dbg_name = "tsif_ref_clk_src", |
| 1378 | .ops = &clk_ops_rcg_mnd, |
| 1379 | VDD_DIG_FMAX_MAP1(LOW, 105500), |
| 1380 | CLK_INIT(tsif_ref_clk_src.c), |
| 1381 | }, |
| 1382 | }; |
| 1383 | |
| 1384 | static struct clk_freq_tbl ftbl_gcc_usb30_mock_utmi_clk[] = { |
| 1385 | F(60000000, gpll0, 10, 0, 0), |
| 1386 | F_END |
| 1387 | }; |
| 1388 | |
| 1389 | static struct rcg_clk usb30_mock_utmi_clk_src = { |
| 1390 | .cmd_rcgr_reg = USB30_MOCK_UTMI_CMD_RCGR, |
| 1391 | .set_rate = set_rate_hid, |
| 1392 | .freq_tbl = ftbl_gcc_usb30_mock_utmi_clk, |
| 1393 | .current_freq = &rcg_dummy_freq, |
| 1394 | .base = &virt_bases[GCC_BASE], |
| 1395 | .c = { |
| 1396 | .dbg_name = "usb30_mock_utmi_clk_src", |
| 1397 | .ops = &clk_ops_rcg, |
| 1398 | VDD_DIG_FMAX_MAP1(NOMINAL, 60000000), |
| 1399 | CLK_INIT(usb30_mock_utmi_clk_src.c), |
| 1400 | }, |
| 1401 | }; |
| 1402 | |
| 1403 | static struct clk_freq_tbl ftbl_gcc_usb_hs_system_clk[] = { |
| 1404 | F(75000000, gpll0, 8, 0, 0), |
| 1405 | F_END |
| 1406 | }; |
| 1407 | |
| 1408 | static struct rcg_clk usb_hs_system_clk_src = { |
| 1409 | .cmd_rcgr_reg = USB_HS_SYSTEM_CMD_RCGR, |
| 1410 | .set_rate = set_rate_hid, |
| 1411 | .freq_tbl = ftbl_gcc_usb_hs_system_clk, |
| 1412 | .current_freq = &rcg_dummy_freq, |
| 1413 | .base = &virt_bases[GCC_BASE], |
| 1414 | .c = { |
| 1415 | .dbg_name = "usb_hs_system_clk_src", |
| 1416 | .ops = &clk_ops_rcg, |
| 1417 | VDD_DIG_FMAX_MAP2(LOW, 37500000, NOMINAL, 75000000), |
| 1418 | CLK_INIT(usb_hs_system_clk_src.c), |
| 1419 | }, |
| 1420 | }; |
| 1421 | |
| 1422 | static struct clk_freq_tbl ftbl_gcc_usb_hsic_clk[] = { |
| 1423 | F_HSIC(480000000, gpll1, 1, 0, 0), |
| 1424 | F_END |
| 1425 | }; |
| 1426 | |
| 1427 | static struct rcg_clk usb_hsic_clk_src = { |
| 1428 | .cmd_rcgr_reg = USB_HSIC_CMD_RCGR, |
| 1429 | .set_rate = set_rate_hid, |
| 1430 | .freq_tbl = ftbl_gcc_usb_hsic_clk, |
| 1431 | .current_freq = &rcg_dummy_freq, |
| 1432 | .base = &virt_bases[GCC_BASE], |
| 1433 | .c = { |
| 1434 | .dbg_name = "usb_hsic_clk_src", |
| 1435 | .ops = &clk_ops_rcg, |
| 1436 | VDD_DIG_FMAX_MAP1(LOW, 480000000), |
| 1437 | CLK_INIT(usb_hsic_clk_src.c), |
| 1438 | }, |
| 1439 | }; |
| 1440 | |
| 1441 | static struct clk_freq_tbl ftbl_gcc_usb_hsic_io_cal_clk[] = { |
| 1442 | F(9600000, cxo, 2, 0, 0), |
| 1443 | F_END |
| 1444 | }; |
| 1445 | |
| 1446 | static struct rcg_clk usb_hsic_io_cal_clk_src = { |
| 1447 | .cmd_rcgr_reg = USB_HSIC_IO_CAL_CMD_RCGR, |
| 1448 | .set_rate = set_rate_hid, |
| 1449 | .freq_tbl = ftbl_gcc_usb_hsic_io_cal_clk, |
| 1450 | .current_freq = &rcg_dummy_freq, |
| 1451 | .base = &virt_bases[GCC_BASE], |
| 1452 | .c = { |
| 1453 | .dbg_name = "usb_hsic_io_cal_clk_src", |
| 1454 | .ops = &clk_ops_rcg, |
| 1455 | VDD_DIG_FMAX_MAP1(LOW, 9600000), |
| 1456 | CLK_INIT(usb_hsic_io_cal_clk_src.c), |
| 1457 | }, |
| 1458 | }; |
| 1459 | |
| 1460 | static struct clk_freq_tbl ftbl_gcc_usb_hsic_system_clk[] = { |
| 1461 | F(75000000, gpll0, 8, 0, 0), |
| 1462 | F_END |
| 1463 | }; |
| 1464 | |
| 1465 | static struct rcg_clk usb_hsic_system_clk_src = { |
| 1466 | .cmd_rcgr_reg = USB_HSIC_SYSTEM_CMD_RCGR, |
| 1467 | .set_rate = set_rate_hid, |
| 1468 | .freq_tbl = ftbl_gcc_usb_hsic_system_clk, |
| 1469 | .current_freq = &rcg_dummy_freq, |
| 1470 | .base = &virt_bases[GCC_BASE], |
| 1471 | .c = { |
| 1472 | .dbg_name = "usb_hsic_system_clk_src", |
| 1473 | .ops = &clk_ops_rcg, |
| 1474 | VDD_DIG_FMAX_MAP2(LOW, 37500000, NOMINAL, 75000000), |
| 1475 | CLK_INIT(usb_hsic_system_clk_src.c), |
| 1476 | }, |
| 1477 | }; |
| 1478 | |
| 1479 | static struct local_vote_clk gcc_bam_dma_ahb_clk = { |
| 1480 | .cbcr_reg = BAM_DMA_AHB_CBCR, |
| 1481 | .vote_reg = APCS_CLOCK_BRANCH_ENA_VOTE, |
| 1482 | .en_mask = BIT(12), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1483 | .base = &virt_bases[GCC_BASE], |
| 1484 | .c = { |
| 1485 | .dbg_name = "gcc_bam_dma_ahb_clk", |
| 1486 | .ops = &clk_ops_vote, |
| 1487 | CLK_INIT(gcc_bam_dma_ahb_clk.c), |
| 1488 | }, |
| 1489 | }; |
| 1490 | |
| 1491 | static struct local_vote_clk gcc_blsp1_ahb_clk = { |
| 1492 | .cbcr_reg = BLSP1_AHB_CBCR, |
| 1493 | .vote_reg = APCS_CLOCK_BRANCH_ENA_VOTE, |
| 1494 | .en_mask = BIT(17), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1495 | .base = &virt_bases[GCC_BASE], |
| 1496 | .c = { |
| 1497 | .dbg_name = "gcc_blsp1_ahb_clk", |
| 1498 | .ops = &clk_ops_vote, |
| 1499 | CLK_INIT(gcc_blsp1_ahb_clk.c), |
| 1500 | }, |
| 1501 | }; |
| 1502 | |
| 1503 | static struct branch_clk gcc_blsp1_qup1_i2c_apps_clk = { |
| 1504 | .cbcr_reg = BLSP1_QUP1_I2C_APPS_CBCR, |
| 1505 | .parent = &cxo_clk_src.c, |
| 1506 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1507 | .base = &virt_bases[GCC_BASE], |
| 1508 | .c = { |
| 1509 | .dbg_name = "gcc_blsp1_qup1_i2c_apps_clk", |
| 1510 | .ops = &clk_ops_branch, |
| 1511 | CLK_INIT(gcc_blsp1_qup1_i2c_apps_clk.c), |
| 1512 | }, |
| 1513 | }; |
| 1514 | |
| 1515 | static struct branch_clk gcc_blsp1_qup1_spi_apps_clk = { |
| 1516 | .cbcr_reg = BLSP1_QUP1_SPI_APPS_CBCR, |
| 1517 | .parent = &blsp1_qup1_spi_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1518 | .base = &virt_bases[GCC_BASE], |
| 1519 | .c = { |
| 1520 | .dbg_name = "gcc_blsp1_qup1_spi_apps_clk", |
| 1521 | .ops = &clk_ops_branch, |
| 1522 | CLK_INIT(gcc_blsp1_qup1_spi_apps_clk.c), |
| 1523 | }, |
| 1524 | }; |
| 1525 | |
| 1526 | static struct branch_clk gcc_blsp1_qup2_i2c_apps_clk = { |
| 1527 | .cbcr_reg = BLSP1_QUP2_I2C_APPS_CBCR, |
| 1528 | .parent = &cxo_clk_src.c, |
| 1529 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1530 | .base = &virt_bases[GCC_BASE], |
| 1531 | .c = { |
| 1532 | .dbg_name = "gcc_blsp1_qup2_i2c_apps_clk", |
| 1533 | .ops = &clk_ops_branch, |
| 1534 | CLK_INIT(gcc_blsp1_qup2_i2c_apps_clk.c), |
| 1535 | }, |
| 1536 | }; |
| 1537 | |
| 1538 | static struct branch_clk gcc_blsp1_qup2_spi_apps_clk = { |
| 1539 | .cbcr_reg = BLSP1_QUP2_SPI_APPS_CBCR, |
| 1540 | .parent = &blsp1_qup2_spi_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1541 | .base = &virt_bases[GCC_BASE], |
| 1542 | .c = { |
| 1543 | .dbg_name = "gcc_blsp1_qup2_spi_apps_clk", |
| 1544 | .ops = &clk_ops_branch, |
| 1545 | CLK_INIT(gcc_blsp1_qup2_spi_apps_clk.c), |
| 1546 | }, |
| 1547 | }; |
| 1548 | |
| 1549 | static struct branch_clk gcc_blsp1_qup3_i2c_apps_clk = { |
| 1550 | .cbcr_reg = BLSP1_QUP3_I2C_APPS_CBCR, |
| 1551 | .parent = &cxo_clk_src.c, |
| 1552 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1553 | .base = &virt_bases[GCC_BASE], |
| 1554 | .c = { |
| 1555 | .dbg_name = "gcc_blsp1_qup3_i2c_apps_clk", |
| 1556 | .ops = &clk_ops_branch, |
| 1557 | CLK_INIT(gcc_blsp1_qup3_i2c_apps_clk.c), |
| 1558 | }, |
| 1559 | }; |
| 1560 | |
| 1561 | static struct branch_clk gcc_blsp1_qup3_spi_apps_clk = { |
| 1562 | .cbcr_reg = BLSP1_QUP3_SPI_APPS_CBCR, |
| 1563 | .parent = &blsp1_qup3_spi_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1564 | .base = &virt_bases[GCC_BASE], |
| 1565 | .c = { |
| 1566 | .dbg_name = "gcc_blsp1_qup3_spi_apps_clk", |
| 1567 | .ops = &clk_ops_branch, |
| 1568 | CLK_INIT(gcc_blsp1_qup3_spi_apps_clk.c), |
| 1569 | }, |
| 1570 | }; |
| 1571 | |
| 1572 | static struct branch_clk gcc_blsp1_qup4_i2c_apps_clk = { |
| 1573 | .cbcr_reg = BLSP1_QUP4_I2C_APPS_CBCR, |
| 1574 | .parent = &cxo_clk_src.c, |
| 1575 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1576 | .base = &virt_bases[GCC_BASE], |
| 1577 | .c = { |
| 1578 | .dbg_name = "gcc_blsp1_qup4_i2c_apps_clk", |
| 1579 | .ops = &clk_ops_branch, |
| 1580 | CLK_INIT(gcc_blsp1_qup4_i2c_apps_clk.c), |
| 1581 | }, |
| 1582 | }; |
| 1583 | |
| 1584 | static struct branch_clk gcc_blsp1_qup4_spi_apps_clk = { |
| 1585 | .cbcr_reg = BLSP1_QUP4_SPI_APPS_CBCR, |
| 1586 | .parent = &blsp1_qup4_spi_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1587 | .base = &virt_bases[GCC_BASE], |
| 1588 | .c = { |
| 1589 | .dbg_name = "gcc_blsp1_qup4_spi_apps_clk", |
| 1590 | .ops = &clk_ops_branch, |
| 1591 | CLK_INIT(gcc_blsp1_qup4_spi_apps_clk.c), |
| 1592 | }, |
| 1593 | }; |
| 1594 | |
| 1595 | static struct branch_clk gcc_blsp1_qup5_i2c_apps_clk = { |
| 1596 | .cbcr_reg = BLSP1_QUP5_I2C_APPS_CBCR, |
| 1597 | .parent = &cxo_clk_src.c, |
| 1598 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1599 | .base = &virt_bases[GCC_BASE], |
| 1600 | .c = { |
| 1601 | .dbg_name = "gcc_blsp1_qup5_i2c_apps_clk", |
| 1602 | .ops = &clk_ops_branch, |
| 1603 | CLK_INIT(gcc_blsp1_qup5_i2c_apps_clk.c), |
| 1604 | }, |
| 1605 | }; |
| 1606 | |
| 1607 | static struct branch_clk gcc_blsp1_qup5_spi_apps_clk = { |
| 1608 | .cbcr_reg = BLSP1_QUP5_SPI_APPS_CBCR, |
| 1609 | .parent = &blsp1_qup5_spi_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1610 | .base = &virt_bases[GCC_BASE], |
| 1611 | .c = { |
| 1612 | .dbg_name = "gcc_blsp1_qup5_spi_apps_clk", |
| 1613 | .ops = &clk_ops_branch, |
| 1614 | CLK_INIT(gcc_blsp1_qup5_spi_apps_clk.c), |
| 1615 | }, |
| 1616 | }; |
| 1617 | |
| 1618 | static struct branch_clk gcc_blsp1_qup6_i2c_apps_clk = { |
| 1619 | .cbcr_reg = BLSP1_QUP6_I2C_APPS_CBCR, |
| 1620 | .parent = &cxo_clk_src.c, |
| 1621 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1622 | .base = &virt_bases[GCC_BASE], |
| 1623 | .c = { |
| 1624 | .dbg_name = "gcc_blsp1_qup6_i2c_apps_clk", |
| 1625 | .ops = &clk_ops_branch, |
| 1626 | CLK_INIT(gcc_blsp1_qup6_i2c_apps_clk.c), |
| 1627 | }, |
| 1628 | }; |
| 1629 | |
| 1630 | static struct branch_clk gcc_blsp1_qup6_spi_apps_clk = { |
| 1631 | .cbcr_reg = BLSP1_QUP6_SPI_APPS_CBCR, |
| 1632 | .parent = &blsp1_qup6_spi_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1633 | .base = &virt_bases[GCC_BASE], |
| 1634 | .c = { |
| 1635 | .dbg_name = "gcc_blsp1_qup6_spi_apps_clk", |
| 1636 | .ops = &clk_ops_branch, |
| 1637 | CLK_INIT(gcc_blsp1_qup6_spi_apps_clk.c), |
| 1638 | }, |
| 1639 | }; |
| 1640 | |
| 1641 | static struct branch_clk gcc_blsp1_uart1_apps_clk = { |
| 1642 | .cbcr_reg = BLSP1_UART1_APPS_CBCR, |
| 1643 | .parent = &blsp1_uart1_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1644 | .base = &virt_bases[GCC_BASE], |
| 1645 | .c = { |
| 1646 | .dbg_name = "gcc_blsp1_uart1_apps_clk", |
| 1647 | .ops = &clk_ops_branch, |
| 1648 | CLK_INIT(gcc_blsp1_uart1_apps_clk.c), |
| 1649 | }, |
| 1650 | }; |
| 1651 | |
| 1652 | static struct branch_clk gcc_blsp1_uart2_apps_clk = { |
| 1653 | .cbcr_reg = BLSP1_UART2_APPS_CBCR, |
| 1654 | .parent = &blsp1_uart2_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1655 | .base = &virt_bases[GCC_BASE], |
| 1656 | .c = { |
| 1657 | .dbg_name = "gcc_blsp1_uart2_apps_clk", |
| 1658 | .ops = &clk_ops_branch, |
| 1659 | CLK_INIT(gcc_blsp1_uart2_apps_clk.c), |
| 1660 | }, |
| 1661 | }; |
| 1662 | |
| 1663 | static struct branch_clk gcc_blsp1_uart3_apps_clk = { |
| 1664 | .cbcr_reg = BLSP1_UART3_APPS_CBCR, |
| 1665 | .parent = &blsp1_uart3_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1666 | .base = &virt_bases[GCC_BASE], |
| 1667 | .c = { |
| 1668 | .dbg_name = "gcc_blsp1_uart3_apps_clk", |
| 1669 | .ops = &clk_ops_branch, |
| 1670 | CLK_INIT(gcc_blsp1_uart3_apps_clk.c), |
| 1671 | }, |
| 1672 | }; |
| 1673 | |
| 1674 | static struct branch_clk gcc_blsp1_uart4_apps_clk = { |
| 1675 | .cbcr_reg = BLSP1_UART4_APPS_CBCR, |
| 1676 | .parent = &blsp1_uart4_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1677 | .base = &virt_bases[GCC_BASE], |
| 1678 | .c = { |
| 1679 | .dbg_name = "gcc_blsp1_uart4_apps_clk", |
| 1680 | .ops = &clk_ops_branch, |
| 1681 | CLK_INIT(gcc_blsp1_uart4_apps_clk.c), |
| 1682 | }, |
| 1683 | }; |
| 1684 | |
| 1685 | static struct branch_clk gcc_blsp1_uart5_apps_clk = { |
| 1686 | .cbcr_reg = BLSP1_UART5_APPS_CBCR, |
| 1687 | .parent = &blsp1_uart5_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1688 | .base = &virt_bases[GCC_BASE], |
| 1689 | .c = { |
| 1690 | .dbg_name = "gcc_blsp1_uart5_apps_clk", |
| 1691 | .ops = &clk_ops_branch, |
| 1692 | CLK_INIT(gcc_blsp1_uart5_apps_clk.c), |
| 1693 | }, |
| 1694 | }; |
| 1695 | |
| 1696 | static struct branch_clk gcc_blsp1_uart6_apps_clk = { |
| 1697 | .cbcr_reg = BLSP1_UART6_APPS_CBCR, |
| 1698 | .parent = &blsp1_uart6_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1699 | .base = &virt_bases[GCC_BASE], |
| 1700 | .c = { |
| 1701 | .dbg_name = "gcc_blsp1_uart6_apps_clk", |
| 1702 | .ops = &clk_ops_branch, |
| 1703 | CLK_INIT(gcc_blsp1_uart6_apps_clk.c), |
| 1704 | }, |
| 1705 | }; |
| 1706 | |
Vikram Mulukutla | a967db4 | 2012-05-10 16:20:40 -0700 | [diff] [blame] | 1707 | static struct local_vote_clk gcc_boot_rom_ahb_clk = { |
| 1708 | .cbcr_reg = BOOT_ROM_AHB_CBCR, |
| 1709 | .vote_reg = APCS_CLOCK_BRANCH_ENA_VOTE, |
| 1710 | .en_mask = BIT(10), |
Vikram Mulukutla | a967db4 | 2012-05-10 16:20:40 -0700 | [diff] [blame] | 1711 | .base = &virt_bases[GCC_BASE], |
| 1712 | .c = { |
| 1713 | .dbg_name = "gcc_boot_rom_ahb_clk", |
| 1714 | .ops = &clk_ops_vote, |
| 1715 | CLK_INIT(gcc_boot_rom_ahb_clk.c), |
| 1716 | }, |
| 1717 | }; |
| 1718 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1719 | static struct local_vote_clk gcc_blsp2_ahb_clk = { |
| 1720 | .cbcr_reg = BLSP2_AHB_CBCR, |
| 1721 | .vote_reg = APCS_CLOCK_BRANCH_ENA_VOTE, |
| 1722 | .en_mask = BIT(15), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1723 | .base = &virt_bases[GCC_BASE], |
| 1724 | .c = { |
| 1725 | .dbg_name = "gcc_blsp2_ahb_clk", |
| 1726 | .ops = &clk_ops_vote, |
| 1727 | CLK_INIT(gcc_blsp2_ahb_clk.c), |
| 1728 | }, |
| 1729 | }; |
| 1730 | |
| 1731 | static struct branch_clk gcc_blsp2_qup1_i2c_apps_clk = { |
| 1732 | .cbcr_reg = BLSP2_QUP1_I2C_APPS_CBCR, |
| 1733 | .parent = &cxo_clk_src.c, |
| 1734 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1735 | .base = &virt_bases[GCC_BASE], |
| 1736 | .c = { |
| 1737 | .dbg_name = "gcc_blsp2_qup1_i2c_apps_clk", |
| 1738 | .ops = &clk_ops_branch, |
| 1739 | CLK_INIT(gcc_blsp2_qup1_i2c_apps_clk.c), |
| 1740 | }, |
| 1741 | }; |
| 1742 | |
| 1743 | static struct branch_clk gcc_blsp2_qup1_spi_apps_clk = { |
| 1744 | .cbcr_reg = BLSP2_QUP1_SPI_APPS_CBCR, |
| 1745 | .parent = &blsp2_qup1_spi_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1746 | .base = &virt_bases[GCC_BASE], |
| 1747 | .c = { |
| 1748 | .dbg_name = "gcc_blsp2_qup1_spi_apps_clk", |
| 1749 | .ops = &clk_ops_branch, |
| 1750 | CLK_INIT(gcc_blsp2_qup1_spi_apps_clk.c), |
| 1751 | }, |
| 1752 | }; |
| 1753 | |
| 1754 | static struct branch_clk gcc_blsp2_qup2_i2c_apps_clk = { |
| 1755 | .cbcr_reg = BLSP2_QUP2_I2C_APPS_CBCR, |
| 1756 | .parent = &cxo_clk_src.c, |
| 1757 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1758 | .base = &virt_bases[GCC_BASE], |
| 1759 | .c = { |
| 1760 | .dbg_name = "gcc_blsp2_qup2_i2c_apps_clk", |
| 1761 | .ops = &clk_ops_branch, |
| 1762 | CLK_INIT(gcc_blsp2_qup2_i2c_apps_clk.c), |
| 1763 | }, |
| 1764 | }; |
| 1765 | |
| 1766 | static struct branch_clk gcc_blsp2_qup2_spi_apps_clk = { |
| 1767 | .cbcr_reg = BLSP2_QUP2_SPI_APPS_CBCR, |
| 1768 | .parent = &blsp2_qup2_spi_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1769 | .base = &virt_bases[GCC_BASE], |
| 1770 | .c = { |
| 1771 | .dbg_name = "gcc_blsp2_qup2_spi_apps_clk", |
| 1772 | .ops = &clk_ops_branch, |
| 1773 | CLK_INIT(gcc_blsp2_qup2_spi_apps_clk.c), |
| 1774 | }, |
| 1775 | }; |
| 1776 | |
| 1777 | static struct branch_clk gcc_blsp2_qup3_i2c_apps_clk = { |
| 1778 | .cbcr_reg = BLSP2_QUP3_I2C_APPS_CBCR, |
| 1779 | .parent = &cxo_clk_src.c, |
| 1780 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1781 | .base = &virt_bases[GCC_BASE], |
| 1782 | .c = { |
| 1783 | .dbg_name = "gcc_blsp2_qup3_i2c_apps_clk", |
| 1784 | .ops = &clk_ops_branch, |
| 1785 | CLK_INIT(gcc_blsp2_qup3_i2c_apps_clk.c), |
| 1786 | }, |
| 1787 | }; |
| 1788 | |
| 1789 | static struct branch_clk gcc_blsp2_qup3_spi_apps_clk = { |
| 1790 | .cbcr_reg = BLSP2_QUP3_SPI_APPS_CBCR, |
| 1791 | .parent = &blsp2_qup3_spi_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1792 | .base = &virt_bases[GCC_BASE], |
| 1793 | .c = { |
| 1794 | .dbg_name = "gcc_blsp2_qup3_spi_apps_clk", |
| 1795 | .ops = &clk_ops_branch, |
| 1796 | CLK_INIT(gcc_blsp2_qup3_spi_apps_clk.c), |
| 1797 | }, |
| 1798 | }; |
| 1799 | |
| 1800 | static struct branch_clk gcc_blsp2_qup4_i2c_apps_clk = { |
| 1801 | .cbcr_reg = BLSP2_QUP4_I2C_APPS_CBCR, |
| 1802 | .parent = &cxo_clk_src.c, |
| 1803 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1804 | .base = &virt_bases[GCC_BASE], |
| 1805 | .c = { |
| 1806 | .dbg_name = "gcc_blsp2_qup4_i2c_apps_clk", |
| 1807 | .ops = &clk_ops_branch, |
| 1808 | CLK_INIT(gcc_blsp2_qup4_i2c_apps_clk.c), |
| 1809 | }, |
| 1810 | }; |
| 1811 | |
| 1812 | static struct branch_clk gcc_blsp2_qup4_spi_apps_clk = { |
| 1813 | .cbcr_reg = BLSP2_QUP4_SPI_APPS_CBCR, |
| 1814 | .parent = &blsp2_qup4_spi_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1815 | .base = &virt_bases[GCC_BASE], |
| 1816 | .c = { |
| 1817 | .dbg_name = "gcc_blsp2_qup4_spi_apps_clk", |
| 1818 | .ops = &clk_ops_branch, |
| 1819 | CLK_INIT(gcc_blsp2_qup4_spi_apps_clk.c), |
| 1820 | }, |
| 1821 | }; |
| 1822 | |
| 1823 | static struct branch_clk gcc_blsp2_qup5_i2c_apps_clk = { |
| 1824 | .cbcr_reg = BLSP2_QUP5_I2C_APPS_CBCR, |
| 1825 | .parent = &cxo_clk_src.c, |
| 1826 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1827 | .base = &virt_bases[GCC_BASE], |
| 1828 | .c = { |
| 1829 | .dbg_name = "gcc_blsp2_qup5_i2c_apps_clk", |
| 1830 | .ops = &clk_ops_branch, |
| 1831 | CLK_INIT(gcc_blsp2_qup5_i2c_apps_clk.c), |
| 1832 | }, |
| 1833 | }; |
| 1834 | |
| 1835 | static struct branch_clk gcc_blsp2_qup5_spi_apps_clk = { |
| 1836 | .cbcr_reg = BLSP2_QUP5_SPI_APPS_CBCR, |
| 1837 | .parent = &blsp2_qup5_spi_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1838 | .base = &virt_bases[GCC_BASE], |
| 1839 | .c = { |
| 1840 | .dbg_name = "gcc_blsp2_qup5_spi_apps_clk", |
| 1841 | .ops = &clk_ops_branch, |
| 1842 | CLK_INIT(gcc_blsp2_qup5_spi_apps_clk.c), |
| 1843 | }, |
| 1844 | }; |
| 1845 | |
| 1846 | static struct branch_clk gcc_blsp2_qup6_i2c_apps_clk = { |
| 1847 | .cbcr_reg = BLSP2_QUP6_I2C_APPS_CBCR, |
| 1848 | .parent = &cxo_clk_src.c, |
| 1849 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1850 | .base = &virt_bases[GCC_BASE], |
| 1851 | .c = { |
| 1852 | .dbg_name = "gcc_blsp2_qup6_i2c_apps_clk", |
| 1853 | .ops = &clk_ops_branch, |
| 1854 | CLK_INIT(gcc_blsp2_qup6_i2c_apps_clk.c), |
| 1855 | }, |
| 1856 | }; |
| 1857 | |
| 1858 | static struct branch_clk gcc_blsp2_qup6_spi_apps_clk = { |
| 1859 | .cbcr_reg = BLSP2_QUP6_SPI_APPS_CBCR, |
| 1860 | .parent = &blsp2_qup6_spi_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1861 | .base = &virt_bases[GCC_BASE], |
| 1862 | .c = { |
| 1863 | .dbg_name = "gcc_blsp2_qup6_spi_apps_clk", |
| 1864 | .ops = &clk_ops_branch, |
| 1865 | CLK_INIT(gcc_blsp2_qup6_spi_apps_clk.c), |
| 1866 | }, |
| 1867 | }; |
| 1868 | |
| 1869 | static struct branch_clk gcc_blsp2_uart1_apps_clk = { |
| 1870 | .cbcr_reg = BLSP2_UART1_APPS_CBCR, |
| 1871 | .parent = &blsp2_uart1_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1872 | .base = &virt_bases[GCC_BASE], |
| 1873 | .c = { |
| 1874 | .dbg_name = "gcc_blsp2_uart1_apps_clk", |
| 1875 | .ops = &clk_ops_branch, |
| 1876 | CLK_INIT(gcc_blsp2_uart1_apps_clk.c), |
| 1877 | }, |
| 1878 | }; |
| 1879 | |
| 1880 | static struct branch_clk gcc_blsp2_uart2_apps_clk = { |
| 1881 | .cbcr_reg = BLSP2_UART2_APPS_CBCR, |
| 1882 | .parent = &blsp2_uart2_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1883 | .base = &virt_bases[GCC_BASE], |
| 1884 | .c = { |
| 1885 | .dbg_name = "gcc_blsp2_uart2_apps_clk", |
| 1886 | .ops = &clk_ops_branch, |
| 1887 | CLK_INIT(gcc_blsp2_uart2_apps_clk.c), |
| 1888 | }, |
| 1889 | }; |
| 1890 | |
| 1891 | static struct branch_clk gcc_blsp2_uart3_apps_clk = { |
| 1892 | .cbcr_reg = BLSP2_UART3_APPS_CBCR, |
| 1893 | .parent = &blsp2_uart3_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1894 | .base = &virt_bases[GCC_BASE], |
| 1895 | .c = { |
| 1896 | .dbg_name = "gcc_blsp2_uart3_apps_clk", |
| 1897 | .ops = &clk_ops_branch, |
| 1898 | CLK_INIT(gcc_blsp2_uart3_apps_clk.c), |
| 1899 | }, |
| 1900 | }; |
| 1901 | |
| 1902 | static struct branch_clk gcc_blsp2_uart4_apps_clk = { |
| 1903 | .cbcr_reg = BLSP2_UART4_APPS_CBCR, |
| 1904 | .parent = &blsp2_uart4_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1905 | .base = &virt_bases[GCC_BASE], |
| 1906 | .c = { |
| 1907 | .dbg_name = "gcc_blsp2_uart4_apps_clk", |
| 1908 | .ops = &clk_ops_branch, |
| 1909 | CLK_INIT(gcc_blsp2_uart4_apps_clk.c), |
| 1910 | }, |
| 1911 | }; |
| 1912 | |
| 1913 | static struct branch_clk gcc_blsp2_uart5_apps_clk = { |
| 1914 | .cbcr_reg = BLSP2_UART5_APPS_CBCR, |
| 1915 | .parent = &blsp2_uart5_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1916 | .base = &virt_bases[GCC_BASE], |
| 1917 | .c = { |
| 1918 | .dbg_name = "gcc_blsp2_uart5_apps_clk", |
| 1919 | .ops = &clk_ops_branch, |
| 1920 | CLK_INIT(gcc_blsp2_uart5_apps_clk.c), |
| 1921 | }, |
| 1922 | }; |
| 1923 | |
| 1924 | static struct branch_clk gcc_blsp2_uart6_apps_clk = { |
| 1925 | .cbcr_reg = BLSP2_UART6_APPS_CBCR, |
| 1926 | .parent = &blsp2_uart6_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1927 | .base = &virt_bases[GCC_BASE], |
| 1928 | .c = { |
| 1929 | .dbg_name = "gcc_blsp2_uart6_apps_clk", |
| 1930 | .ops = &clk_ops_branch, |
| 1931 | CLK_INIT(gcc_blsp2_uart6_apps_clk.c), |
| 1932 | }, |
| 1933 | }; |
| 1934 | |
| 1935 | static struct local_vote_clk gcc_ce1_clk = { |
| 1936 | .cbcr_reg = CE1_CBCR, |
| 1937 | .vote_reg = APCS_CLOCK_BRANCH_ENA_VOTE, |
| 1938 | .en_mask = BIT(5), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1939 | .base = &virt_bases[GCC_BASE], |
| 1940 | .c = { |
| 1941 | .dbg_name = "gcc_ce1_clk", |
| 1942 | .ops = &clk_ops_vote, |
| 1943 | CLK_INIT(gcc_ce1_clk.c), |
| 1944 | }, |
| 1945 | }; |
| 1946 | |
| 1947 | static struct local_vote_clk gcc_ce1_ahb_clk = { |
| 1948 | .cbcr_reg = CE1_AHB_CBCR, |
| 1949 | .vote_reg = APCS_CLOCK_BRANCH_ENA_VOTE, |
| 1950 | .en_mask = BIT(3), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1951 | .base = &virt_bases[GCC_BASE], |
| 1952 | .c = { |
| 1953 | .dbg_name = "gcc_ce1_ahb_clk", |
| 1954 | .ops = &clk_ops_vote, |
| 1955 | CLK_INIT(gcc_ce1_ahb_clk.c), |
| 1956 | }, |
| 1957 | }; |
| 1958 | |
| 1959 | static struct local_vote_clk gcc_ce1_axi_clk = { |
| 1960 | .cbcr_reg = CE1_AXI_CBCR, |
| 1961 | .vote_reg = APCS_CLOCK_BRANCH_ENA_VOTE, |
| 1962 | .en_mask = BIT(4), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1963 | .base = &virt_bases[GCC_BASE], |
| 1964 | .c = { |
| 1965 | .dbg_name = "gcc_ce1_axi_clk", |
| 1966 | .ops = &clk_ops_vote, |
| 1967 | CLK_INIT(gcc_ce1_axi_clk.c), |
| 1968 | }, |
| 1969 | }; |
| 1970 | |
| 1971 | static struct local_vote_clk gcc_ce2_clk = { |
| 1972 | .cbcr_reg = CE2_CBCR, |
| 1973 | .vote_reg = APCS_CLOCK_BRANCH_ENA_VOTE, |
| 1974 | .en_mask = BIT(2), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1975 | .base = &virt_bases[GCC_BASE], |
| 1976 | .c = { |
| 1977 | .dbg_name = "gcc_ce2_clk", |
| 1978 | .ops = &clk_ops_vote, |
| 1979 | CLK_INIT(gcc_ce2_clk.c), |
| 1980 | }, |
| 1981 | }; |
| 1982 | |
| 1983 | static struct local_vote_clk gcc_ce2_ahb_clk = { |
| 1984 | .cbcr_reg = CE2_AHB_CBCR, |
| 1985 | .vote_reg = APCS_CLOCK_BRANCH_ENA_VOTE, |
| 1986 | .en_mask = BIT(0), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1987 | .base = &virt_bases[GCC_BASE], |
| 1988 | .c = { |
Vikram Mulukutla | 3f580f8 | 2012-09-04 15:22:42 -0700 | [diff] [blame] | 1989 | .dbg_name = "gcc_ce2_ahb_clk", |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1990 | .ops = &clk_ops_vote, |
Vikram Mulukutla | 3f580f8 | 2012-09-04 15:22:42 -0700 | [diff] [blame] | 1991 | CLK_INIT(gcc_ce2_ahb_clk.c), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1992 | }, |
| 1993 | }; |
| 1994 | |
| 1995 | static struct local_vote_clk gcc_ce2_axi_clk = { |
| 1996 | .cbcr_reg = CE2_AXI_CBCR, |
| 1997 | .vote_reg = APCS_CLOCK_BRANCH_ENA_VOTE, |
| 1998 | .en_mask = BIT(1), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 1999 | .base = &virt_bases[GCC_BASE], |
| 2000 | .c = { |
Vikram Mulukutla | 3f580f8 | 2012-09-04 15:22:42 -0700 | [diff] [blame] | 2001 | .dbg_name = "gcc_ce2_axi_clk", |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2002 | .ops = &clk_ops_vote, |
| 2003 | CLK_INIT(gcc_ce2_axi_clk.c), |
| 2004 | }, |
| 2005 | }; |
| 2006 | |
| 2007 | static struct branch_clk gcc_gp1_clk = { |
| 2008 | .cbcr_reg = GP1_CBCR, |
| 2009 | .parent = &gp1_clk_src.c, |
| 2010 | .base = &virt_bases[GCC_BASE], |
| 2011 | .c = { |
| 2012 | .dbg_name = "gcc_gp1_clk", |
| 2013 | .ops = &clk_ops_branch, |
| 2014 | CLK_INIT(gcc_gp1_clk.c), |
| 2015 | }, |
| 2016 | }; |
| 2017 | |
| 2018 | static struct branch_clk gcc_gp2_clk = { |
| 2019 | .cbcr_reg = GP2_CBCR, |
| 2020 | .parent = &gp2_clk_src.c, |
| 2021 | .base = &virt_bases[GCC_BASE], |
| 2022 | .c = { |
| 2023 | .dbg_name = "gcc_gp2_clk", |
| 2024 | .ops = &clk_ops_branch, |
| 2025 | CLK_INIT(gcc_gp2_clk.c), |
| 2026 | }, |
| 2027 | }; |
| 2028 | |
| 2029 | static struct branch_clk gcc_gp3_clk = { |
| 2030 | .cbcr_reg = GP3_CBCR, |
| 2031 | .parent = &gp3_clk_src.c, |
| 2032 | .base = &virt_bases[GCC_BASE], |
| 2033 | .c = { |
| 2034 | .dbg_name = "gcc_gp3_clk", |
| 2035 | .ops = &clk_ops_branch, |
| 2036 | CLK_INIT(gcc_gp3_clk.c), |
| 2037 | }, |
| 2038 | }; |
| 2039 | |
| 2040 | static struct branch_clk gcc_pdm2_clk = { |
| 2041 | .cbcr_reg = PDM2_CBCR, |
| 2042 | .parent = &pdm2_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2043 | .base = &virt_bases[GCC_BASE], |
| 2044 | .c = { |
| 2045 | .dbg_name = "gcc_pdm2_clk", |
| 2046 | .ops = &clk_ops_branch, |
| 2047 | CLK_INIT(gcc_pdm2_clk.c), |
| 2048 | }, |
| 2049 | }; |
| 2050 | |
| 2051 | static struct branch_clk gcc_pdm_ahb_clk = { |
| 2052 | .cbcr_reg = PDM_AHB_CBCR, |
| 2053 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2054 | .base = &virt_bases[GCC_BASE], |
| 2055 | .c = { |
| 2056 | .dbg_name = "gcc_pdm_ahb_clk", |
| 2057 | .ops = &clk_ops_branch, |
| 2058 | CLK_INIT(gcc_pdm_ahb_clk.c), |
| 2059 | }, |
| 2060 | }; |
| 2061 | |
| 2062 | static struct local_vote_clk gcc_prng_ahb_clk = { |
| 2063 | .cbcr_reg = PRNG_AHB_CBCR, |
| 2064 | .vote_reg = APCS_CLOCK_BRANCH_ENA_VOTE, |
| 2065 | .en_mask = BIT(13), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2066 | .base = &virt_bases[GCC_BASE], |
| 2067 | .c = { |
| 2068 | .dbg_name = "gcc_prng_ahb_clk", |
| 2069 | .ops = &clk_ops_vote, |
| 2070 | CLK_INIT(gcc_prng_ahb_clk.c), |
| 2071 | }, |
| 2072 | }; |
| 2073 | |
| 2074 | static struct branch_clk gcc_sdcc1_ahb_clk = { |
| 2075 | .cbcr_reg = SDCC1_AHB_CBCR, |
| 2076 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2077 | .base = &virt_bases[GCC_BASE], |
| 2078 | .c = { |
| 2079 | .dbg_name = "gcc_sdcc1_ahb_clk", |
| 2080 | .ops = &clk_ops_branch, |
| 2081 | CLK_INIT(gcc_sdcc1_ahb_clk.c), |
| 2082 | }, |
| 2083 | }; |
| 2084 | |
| 2085 | static struct branch_clk gcc_sdcc1_apps_clk = { |
| 2086 | .cbcr_reg = SDCC1_APPS_CBCR, |
| 2087 | .parent = &sdcc1_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2088 | .base = &virt_bases[GCC_BASE], |
| 2089 | .c = { |
| 2090 | .dbg_name = "gcc_sdcc1_apps_clk", |
| 2091 | .ops = &clk_ops_branch, |
| 2092 | CLK_INIT(gcc_sdcc1_apps_clk.c), |
| 2093 | }, |
| 2094 | }; |
| 2095 | |
| 2096 | static struct branch_clk gcc_sdcc2_ahb_clk = { |
| 2097 | .cbcr_reg = SDCC2_AHB_CBCR, |
| 2098 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2099 | .base = &virt_bases[GCC_BASE], |
| 2100 | .c = { |
| 2101 | .dbg_name = "gcc_sdcc2_ahb_clk", |
| 2102 | .ops = &clk_ops_branch, |
| 2103 | CLK_INIT(gcc_sdcc2_ahb_clk.c), |
| 2104 | }, |
| 2105 | }; |
| 2106 | |
| 2107 | static struct branch_clk gcc_sdcc2_apps_clk = { |
| 2108 | .cbcr_reg = SDCC2_APPS_CBCR, |
| 2109 | .parent = &sdcc2_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2110 | .base = &virt_bases[GCC_BASE], |
| 2111 | .c = { |
| 2112 | .dbg_name = "gcc_sdcc2_apps_clk", |
| 2113 | .ops = &clk_ops_branch, |
| 2114 | CLK_INIT(gcc_sdcc2_apps_clk.c), |
| 2115 | }, |
| 2116 | }; |
| 2117 | |
| 2118 | static struct branch_clk gcc_sdcc3_ahb_clk = { |
| 2119 | .cbcr_reg = SDCC3_AHB_CBCR, |
| 2120 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2121 | .base = &virt_bases[GCC_BASE], |
| 2122 | .c = { |
| 2123 | .dbg_name = "gcc_sdcc3_ahb_clk", |
| 2124 | .ops = &clk_ops_branch, |
| 2125 | CLK_INIT(gcc_sdcc3_ahb_clk.c), |
| 2126 | }, |
| 2127 | }; |
| 2128 | |
| 2129 | static struct branch_clk gcc_sdcc3_apps_clk = { |
| 2130 | .cbcr_reg = SDCC3_APPS_CBCR, |
| 2131 | .parent = &sdcc3_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2132 | .base = &virt_bases[GCC_BASE], |
| 2133 | .c = { |
| 2134 | .dbg_name = "gcc_sdcc3_apps_clk", |
| 2135 | .ops = &clk_ops_branch, |
| 2136 | CLK_INIT(gcc_sdcc3_apps_clk.c), |
| 2137 | }, |
| 2138 | }; |
| 2139 | |
| 2140 | static struct branch_clk gcc_sdcc4_ahb_clk = { |
| 2141 | .cbcr_reg = SDCC4_AHB_CBCR, |
| 2142 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2143 | .base = &virt_bases[GCC_BASE], |
| 2144 | .c = { |
| 2145 | .dbg_name = "gcc_sdcc4_ahb_clk", |
| 2146 | .ops = &clk_ops_branch, |
| 2147 | CLK_INIT(gcc_sdcc4_ahb_clk.c), |
| 2148 | }, |
| 2149 | }; |
| 2150 | |
| 2151 | static struct branch_clk gcc_sdcc4_apps_clk = { |
| 2152 | .cbcr_reg = SDCC4_APPS_CBCR, |
| 2153 | .parent = &sdcc4_apps_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2154 | .base = &virt_bases[GCC_BASE], |
| 2155 | .c = { |
| 2156 | .dbg_name = "gcc_sdcc4_apps_clk", |
| 2157 | .ops = &clk_ops_branch, |
| 2158 | CLK_INIT(gcc_sdcc4_apps_clk.c), |
| 2159 | }, |
| 2160 | }; |
| 2161 | |
| 2162 | static struct branch_clk gcc_tsif_ahb_clk = { |
| 2163 | .cbcr_reg = TSIF_AHB_CBCR, |
| 2164 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2165 | .base = &virt_bases[GCC_BASE], |
| 2166 | .c = { |
| 2167 | .dbg_name = "gcc_tsif_ahb_clk", |
| 2168 | .ops = &clk_ops_branch, |
| 2169 | CLK_INIT(gcc_tsif_ahb_clk.c), |
| 2170 | }, |
| 2171 | }; |
| 2172 | |
| 2173 | static struct branch_clk gcc_tsif_ref_clk = { |
| 2174 | .cbcr_reg = TSIF_REF_CBCR, |
| 2175 | .parent = &tsif_ref_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2176 | .base = &virt_bases[GCC_BASE], |
| 2177 | .c = { |
| 2178 | .dbg_name = "gcc_tsif_ref_clk", |
| 2179 | .ops = &clk_ops_branch, |
| 2180 | CLK_INIT(gcc_tsif_ref_clk.c), |
| 2181 | }, |
| 2182 | }; |
| 2183 | |
Vikram Mulukutla | 9e3512c | 2012-09-28 13:53:52 -0700 | [diff] [blame] | 2184 | struct branch_clk gcc_sys_noc_usb3_axi_clk = { |
| 2185 | .cbcr_reg = SYS_NOC_USB3_AXI_CBCR, |
| 2186 | .parent = &usb30_master_clk_src.c, |
| 2187 | .has_sibling = 1, |
| 2188 | .base = &virt_bases[GCC_BASE], |
| 2189 | .c = { |
| 2190 | .dbg_name = "gcc_sys_noc_usb3_axi_clk", |
| 2191 | .ops = &clk_ops_branch, |
| 2192 | CLK_INIT(gcc_sys_noc_usb3_axi_clk.c), |
| 2193 | }, |
| 2194 | }; |
| 2195 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2196 | static struct branch_clk gcc_usb30_master_clk = { |
| 2197 | .cbcr_reg = USB30_MASTER_CBCR, |
Vikram Mulukutla | 777c3ce | 2012-07-03 20:02:55 -0700 | [diff] [blame] | 2198 | .bcr_reg = USB_30_BCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2199 | .parent = &usb30_master_clk_src.c, |
| 2200 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2201 | .base = &virt_bases[GCC_BASE], |
| 2202 | .c = { |
| 2203 | .dbg_name = "gcc_usb30_master_clk", |
| 2204 | .ops = &clk_ops_branch, |
| 2205 | CLK_INIT(gcc_usb30_master_clk.c), |
Vikram Mulukutla | 9e3512c | 2012-09-28 13:53:52 -0700 | [diff] [blame] | 2206 | .depends = &gcc_sys_noc_usb3_axi_clk.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2207 | }, |
| 2208 | }; |
| 2209 | |
| 2210 | static struct branch_clk gcc_usb30_mock_utmi_clk = { |
| 2211 | .cbcr_reg = USB30_MOCK_UTMI_CBCR, |
| 2212 | .parent = &usb30_mock_utmi_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2213 | .base = &virt_bases[GCC_BASE], |
| 2214 | .c = { |
| 2215 | .dbg_name = "gcc_usb30_mock_utmi_clk", |
| 2216 | .ops = &clk_ops_branch, |
| 2217 | CLK_INIT(gcc_usb30_mock_utmi_clk.c), |
| 2218 | }, |
| 2219 | }; |
| 2220 | |
Vikram Mulukutla | 3b98a6d | 2012-08-15 20:35:25 -0700 | [diff] [blame] | 2221 | struct branch_clk gcc_usb30_sleep_clk = { |
| 2222 | .cbcr_reg = USB30_SLEEP_CBCR, |
| 2223 | .has_sibling = 1, |
| 2224 | .base = &virt_bases[GCC_BASE], |
| 2225 | .c = { |
| 2226 | .dbg_name = "gcc_usb30_sleep_clk", |
| 2227 | .ops = &clk_ops_branch, |
| 2228 | CLK_INIT(gcc_usb30_sleep_clk.c), |
| 2229 | }, |
| 2230 | }; |
| 2231 | |
| 2232 | struct branch_clk gcc_usb2a_phy_sleep_clk = { |
| 2233 | .cbcr_reg = USB2A_PHY_SLEEP_CBCR, |
| 2234 | .has_sibling = 1, |
| 2235 | .base = &virt_bases[GCC_BASE], |
| 2236 | .c = { |
| 2237 | .dbg_name = "gcc_usb2a_phy_sleep_clk", |
| 2238 | .ops = &clk_ops_branch, |
| 2239 | CLK_INIT(gcc_usb2a_phy_sleep_clk.c), |
| 2240 | }, |
| 2241 | }; |
| 2242 | |
| 2243 | struct branch_clk gcc_usb2b_phy_sleep_clk = { |
| 2244 | .cbcr_reg = USB2B_PHY_SLEEP_CBCR, |
| 2245 | .has_sibling = 1, |
| 2246 | .base = &virt_bases[GCC_BASE], |
| 2247 | .c = { |
| 2248 | .dbg_name = "gcc_usb2b_phy_sleep_clk", |
| 2249 | .ops = &clk_ops_branch, |
| 2250 | CLK_INIT(gcc_usb2b_phy_sleep_clk.c), |
| 2251 | }, |
| 2252 | }; |
| 2253 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2254 | static struct branch_clk gcc_usb_hs_ahb_clk = { |
| 2255 | .cbcr_reg = USB_HS_AHB_CBCR, |
| 2256 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2257 | .base = &virt_bases[GCC_BASE], |
| 2258 | .c = { |
| 2259 | .dbg_name = "gcc_usb_hs_ahb_clk", |
| 2260 | .ops = &clk_ops_branch, |
| 2261 | CLK_INIT(gcc_usb_hs_ahb_clk.c), |
| 2262 | }, |
| 2263 | }; |
| 2264 | |
| 2265 | static struct branch_clk gcc_usb_hs_system_clk = { |
| 2266 | .cbcr_reg = USB_HS_SYSTEM_CBCR, |
Vikram Mulukutla | 777c3ce | 2012-07-03 20:02:55 -0700 | [diff] [blame] | 2267 | .bcr_reg = USB_HS_BCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2268 | .parent = &usb_hs_system_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2269 | .base = &virt_bases[GCC_BASE], |
| 2270 | .c = { |
| 2271 | .dbg_name = "gcc_usb_hs_system_clk", |
| 2272 | .ops = &clk_ops_branch, |
| 2273 | CLK_INIT(gcc_usb_hs_system_clk.c), |
| 2274 | }, |
| 2275 | }; |
| 2276 | |
| 2277 | static struct branch_clk gcc_usb_hsic_ahb_clk = { |
| 2278 | .cbcr_reg = USB_HSIC_AHB_CBCR, |
| 2279 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2280 | .base = &virt_bases[GCC_BASE], |
| 2281 | .c = { |
| 2282 | .dbg_name = "gcc_usb_hsic_ahb_clk", |
| 2283 | .ops = &clk_ops_branch, |
| 2284 | CLK_INIT(gcc_usb_hsic_ahb_clk.c), |
| 2285 | }, |
| 2286 | }; |
| 2287 | |
| 2288 | static struct branch_clk gcc_usb_hsic_clk = { |
| 2289 | .cbcr_reg = USB_HSIC_CBCR, |
Vikram Mulukutla | 777c3ce | 2012-07-03 20:02:55 -0700 | [diff] [blame] | 2290 | .bcr_reg = USB_HS_HSIC_BCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2291 | .parent = &usb_hsic_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2292 | .base = &virt_bases[GCC_BASE], |
| 2293 | .c = { |
| 2294 | .dbg_name = "gcc_usb_hsic_clk", |
| 2295 | .ops = &clk_ops_branch, |
| 2296 | CLK_INIT(gcc_usb_hsic_clk.c), |
| 2297 | }, |
| 2298 | }; |
| 2299 | |
| 2300 | static struct branch_clk gcc_usb_hsic_io_cal_clk = { |
| 2301 | .cbcr_reg = USB_HSIC_IO_CAL_CBCR, |
| 2302 | .parent = &usb_hsic_io_cal_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2303 | .base = &virt_bases[GCC_BASE], |
| 2304 | .c = { |
| 2305 | .dbg_name = "gcc_usb_hsic_io_cal_clk", |
| 2306 | .ops = &clk_ops_branch, |
| 2307 | CLK_INIT(gcc_usb_hsic_io_cal_clk.c), |
| 2308 | }, |
| 2309 | }; |
| 2310 | |
| 2311 | static struct branch_clk gcc_usb_hsic_system_clk = { |
| 2312 | .cbcr_reg = USB_HSIC_SYSTEM_CBCR, |
| 2313 | .parent = &usb_hsic_system_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2314 | .base = &virt_bases[GCC_BASE], |
| 2315 | .c = { |
| 2316 | .dbg_name = "gcc_usb_hsic_system_clk", |
| 2317 | .ops = &clk_ops_branch, |
| 2318 | CLK_INIT(gcc_usb_hsic_system_clk.c), |
| 2319 | }, |
| 2320 | }; |
| 2321 | |
Vikram Mulukutla | 274b2d9 | 2012-07-13 15:53:04 -0700 | [diff] [blame] | 2322 | struct branch_clk gcc_mmss_noc_cfg_ahb_clk = { |
| 2323 | .cbcr_reg = MMSS_NOC_CFG_AHB_CBCR, |
| 2324 | .has_sibling = 1, |
| 2325 | .base = &virt_bases[GCC_BASE], |
| 2326 | .c = { |
| 2327 | .dbg_name = "gcc_mmss_noc_cfg_ahb_clk", |
| 2328 | .ops = &clk_ops_branch, |
| 2329 | CLK_INIT(gcc_mmss_noc_cfg_ahb_clk.c), |
| 2330 | }, |
| 2331 | }; |
| 2332 | |
| 2333 | struct branch_clk gcc_ocmem_noc_cfg_ahb_clk = { |
| 2334 | .cbcr_reg = OCMEM_NOC_CFG_AHB_CBCR, |
| 2335 | .has_sibling = 1, |
| 2336 | .base = &virt_bases[GCC_BASE], |
| 2337 | .c = { |
| 2338 | .dbg_name = "gcc_ocmem_noc_cfg_ahb_clk", |
| 2339 | .ops = &clk_ops_branch, |
| 2340 | CLK_INIT(gcc_ocmem_noc_cfg_ahb_clk.c), |
| 2341 | }, |
| 2342 | }; |
| 2343 | |
Vikram Mulukutla | a967db4 | 2012-05-10 16:20:40 -0700 | [diff] [blame] | 2344 | static struct branch_clk gcc_mss_cfg_ahb_clk = { |
| 2345 | .cbcr_reg = MSS_CFG_AHB_CBCR, |
| 2346 | .has_sibling = 1, |
| 2347 | .base = &virt_bases[GCC_BASE], |
| 2348 | .c = { |
| 2349 | .dbg_name = "gcc_mss_cfg_ahb_clk", |
| 2350 | .ops = &clk_ops_branch, |
| 2351 | CLK_INIT(gcc_mss_cfg_ahb_clk.c), |
| 2352 | }, |
| 2353 | }; |
| 2354 | |
Vikram Mulukutla | 31926eb | 2012-08-12 19:58:08 -0700 | [diff] [blame] | 2355 | static struct branch_clk gcc_mss_q6_bimc_axi_clk = { |
| 2356 | .cbcr_reg = MSS_Q6_BIMC_AXI_CBCR, |
| 2357 | .has_sibling = 1, |
| 2358 | .base = &virt_bases[GCC_BASE], |
| 2359 | .c = { |
| 2360 | .dbg_name = "gcc_mss_q6_bimc_axi_clk", |
| 2361 | .ops = &clk_ops_branch, |
| 2362 | CLK_INIT(gcc_mss_q6_bimc_axi_clk.c), |
| 2363 | }, |
| 2364 | }; |
| 2365 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2366 | static struct clk_freq_tbl ftbl_mmss_axi_clk[] = { |
Vikram Mulukutla | d16a8f1 | 2012-07-20 13:33:45 -0700 | [diff] [blame] | 2367 | F_MM( 19200000, cxo, 1, 0, 0), |
Vikram Mulukutla | 694fafd | 2012-09-20 19:24:22 -0700 | [diff] [blame] | 2368 | F_MM( 37500000, gpll0, 16, 0, 0), |
| 2369 | F_MM( 50000000, gpll0, 12, 0, 0), |
| 2370 | F_MM( 75000000, gpll0, 8, 0, 0), |
| 2371 | F_MM(100000000, gpll0, 6, 0, 0), |
Vikram Mulukutla | d16a8f1 | 2012-07-20 13:33:45 -0700 | [diff] [blame] | 2372 | F_MM(150000000, gpll0, 4, 0, 0), |
| 2373 | F_MM(282000000, mmpll1, 3, 0, 0), |
Vikram Mulukutla | d16a8f1 | 2012-07-20 13:33:45 -0700 | [diff] [blame] | 2374 | F_MM(400000000, mmpll0, 2, 0, 0), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2375 | F_END |
| 2376 | }; |
| 2377 | |
| 2378 | static struct rcg_clk axi_clk_src = { |
| 2379 | .cmd_rcgr_reg = 0x5040, |
| 2380 | .set_rate = set_rate_hid, |
| 2381 | .freq_tbl = ftbl_mmss_axi_clk, |
| 2382 | .current_freq = &rcg_dummy_freq, |
| 2383 | .base = &virt_bases[MMSS_BASE], |
| 2384 | .c = { |
| 2385 | .dbg_name = "axi_clk_src", |
| 2386 | .ops = &clk_ops_rcg, |
Vikram Mulukutla | d16a8f1 | 2012-07-20 13:33:45 -0700 | [diff] [blame] | 2387 | VDD_DIG_FMAX_MAP3(LOW, 150000000, NOMINAL, 282000000, |
Vikram Mulukutla | 9f588e8 | 2012-08-31 20:46:30 -0700 | [diff] [blame] | 2388 | HIGH, 400000000), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2389 | CLK_INIT(axi_clk_src.c), |
| 2390 | }, |
| 2391 | }; |
| 2392 | |
Vikram Mulukutla | d08a152 | 2012-05-24 15:24:01 -0700 | [diff] [blame] | 2393 | static struct clk_freq_tbl ftbl_ocmemnoc_clk[] = { |
| 2394 | F_MM( 19200000, cxo, 1, 0, 0), |
Vikram Mulukutla | 694fafd | 2012-09-20 19:24:22 -0700 | [diff] [blame] | 2395 | F_MM( 37500000, gpll0, 16, 0, 0), |
| 2396 | F_MM( 50000000, gpll0, 12, 0, 0), |
| 2397 | F_MM( 75000000, gpll0, 8, 0, 0), |
| 2398 | F_MM(100000000, gpll0, 6, 0, 0), |
Vikram Mulukutla | d08a152 | 2012-05-24 15:24:01 -0700 | [diff] [blame] | 2399 | F_MM(150000000, gpll0, 4, 0, 0), |
Vikram Mulukutla | d16a8f1 | 2012-07-20 13:33:45 -0700 | [diff] [blame] | 2400 | F_MM(282000000, mmpll1, 3, 0, 0), |
Vikram Mulukutla | d08a152 | 2012-05-24 15:24:01 -0700 | [diff] [blame] | 2401 | F_MM(400000000, mmpll0, 2, 0, 0), |
| 2402 | F_END |
| 2403 | }; |
| 2404 | |
| 2405 | struct rcg_clk ocmemnoc_clk_src = { |
| 2406 | .cmd_rcgr_reg = OCMEMNOC_CMD_RCGR, |
| 2407 | .set_rate = set_rate_hid, |
| 2408 | .freq_tbl = ftbl_ocmemnoc_clk, |
| 2409 | .current_freq = &rcg_dummy_freq, |
| 2410 | .base = &virt_bases[MMSS_BASE], |
| 2411 | .c = { |
| 2412 | .dbg_name = "ocmemnoc_clk_src", |
| 2413 | .ops = &clk_ops_rcg, |
Vikram Mulukutla | d16a8f1 | 2012-07-20 13:33:45 -0700 | [diff] [blame] | 2414 | VDD_DIG_FMAX_MAP3(LOW, 150000000, NOMINAL, 282000000, |
Vikram Mulukutla | d08a152 | 2012-05-24 15:24:01 -0700 | [diff] [blame] | 2415 | HIGH, 400000000), |
| 2416 | CLK_INIT(ocmemnoc_clk_src.c), |
| 2417 | }, |
| 2418 | }; |
| 2419 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2420 | static struct clk_freq_tbl ftbl_camss_csi0_3_clk[] = { |
| 2421 | F_MM(100000000, gpll0, 6, 0, 0), |
| 2422 | F_MM(200000000, mmpll0, 4, 0, 0), |
| 2423 | F_END |
| 2424 | }; |
| 2425 | |
| 2426 | static struct rcg_clk csi0_clk_src = { |
| 2427 | .cmd_rcgr_reg = CSI0_CMD_RCGR, |
| 2428 | .set_rate = set_rate_hid, |
| 2429 | .freq_tbl = ftbl_camss_csi0_3_clk, |
| 2430 | .current_freq = &rcg_dummy_freq, |
| 2431 | .base = &virt_bases[MMSS_BASE], |
| 2432 | .c = { |
| 2433 | .dbg_name = "csi0_clk_src", |
| 2434 | .ops = &clk_ops_rcg, |
| 2435 | VDD_DIG_FMAX_MAP2(LOW, 100000000, NOMINAL, 200000000), |
| 2436 | CLK_INIT(csi0_clk_src.c), |
| 2437 | }, |
| 2438 | }; |
| 2439 | |
| 2440 | static struct rcg_clk csi1_clk_src = { |
| 2441 | .cmd_rcgr_reg = CSI1_CMD_RCGR, |
| 2442 | .set_rate = set_rate_hid, |
| 2443 | .freq_tbl = ftbl_camss_csi0_3_clk, |
| 2444 | .current_freq = &rcg_dummy_freq, |
| 2445 | .base = &virt_bases[MMSS_BASE], |
| 2446 | .c = { |
| 2447 | .dbg_name = "csi1_clk_src", |
| 2448 | .ops = &clk_ops_rcg, |
| 2449 | VDD_DIG_FMAX_MAP2(LOW, 100000000, NOMINAL, 200000000), |
| 2450 | CLK_INIT(csi1_clk_src.c), |
| 2451 | }, |
| 2452 | }; |
| 2453 | |
| 2454 | static struct rcg_clk csi2_clk_src = { |
| 2455 | .cmd_rcgr_reg = CSI2_CMD_RCGR, |
| 2456 | .set_rate = set_rate_hid, |
| 2457 | .freq_tbl = ftbl_camss_csi0_3_clk, |
| 2458 | .current_freq = &rcg_dummy_freq, |
| 2459 | .base = &virt_bases[MMSS_BASE], |
| 2460 | .c = { |
| 2461 | .dbg_name = "csi2_clk_src", |
| 2462 | .ops = &clk_ops_rcg, |
| 2463 | VDD_DIG_FMAX_MAP2(LOW, 100000000, NOMINAL, 200000000), |
| 2464 | CLK_INIT(csi2_clk_src.c), |
| 2465 | }, |
| 2466 | }; |
| 2467 | |
| 2468 | static struct rcg_clk csi3_clk_src = { |
| 2469 | .cmd_rcgr_reg = CSI3_CMD_RCGR, |
| 2470 | .set_rate = set_rate_hid, |
| 2471 | .freq_tbl = ftbl_camss_csi0_3_clk, |
| 2472 | .current_freq = &rcg_dummy_freq, |
| 2473 | .base = &virt_bases[MMSS_BASE], |
| 2474 | .c = { |
| 2475 | .dbg_name = "csi3_clk_src", |
| 2476 | .ops = &clk_ops_rcg, |
| 2477 | VDD_DIG_FMAX_MAP2(LOW, 100000000, NOMINAL, 200000000), |
| 2478 | CLK_INIT(csi3_clk_src.c), |
| 2479 | }, |
| 2480 | }; |
| 2481 | |
| 2482 | static struct clk_freq_tbl ftbl_camss_vfe_vfe0_1_clk[] = { |
| 2483 | F_MM( 37500000, gpll0, 16, 0, 0), |
| 2484 | F_MM( 50000000, gpll0, 12, 0, 0), |
| 2485 | F_MM( 60000000, gpll0, 10, 0, 0), |
| 2486 | F_MM( 80000000, gpll0, 7.5, 0, 0), |
| 2487 | F_MM(100000000, gpll0, 6, 0, 0), |
| 2488 | F_MM(109090000, gpll0, 5.5, 0, 0), |
| 2489 | F_MM(150000000, gpll0, 4, 0, 0), |
| 2490 | F_MM(200000000, gpll0, 3, 0, 0), |
| 2491 | F_MM(228570000, mmpll0, 3.5, 0, 0), |
| 2492 | F_MM(266670000, mmpll0, 3, 0, 0), |
| 2493 | F_MM(320000000, mmpll0, 2.5, 0, 0), |
| 2494 | F_END |
| 2495 | }; |
| 2496 | |
| 2497 | static struct rcg_clk vfe0_clk_src = { |
| 2498 | .cmd_rcgr_reg = VFE0_CMD_RCGR, |
| 2499 | .set_rate = set_rate_hid, |
| 2500 | .freq_tbl = ftbl_camss_vfe_vfe0_1_clk, |
| 2501 | .current_freq = &rcg_dummy_freq, |
| 2502 | .base = &virt_bases[MMSS_BASE], |
| 2503 | .c = { |
| 2504 | .dbg_name = "vfe0_clk_src", |
| 2505 | .ops = &clk_ops_rcg, |
| 2506 | VDD_DIG_FMAX_MAP3(LOW, 133330000, NOMINAL, 266670000, |
| 2507 | HIGH, 320000000), |
| 2508 | CLK_INIT(vfe0_clk_src.c), |
| 2509 | }, |
| 2510 | }; |
| 2511 | |
| 2512 | static struct rcg_clk vfe1_clk_src = { |
| 2513 | .cmd_rcgr_reg = VFE1_CMD_RCGR, |
| 2514 | .set_rate = set_rate_hid, |
| 2515 | .freq_tbl = ftbl_camss_vfe_vfe0_1_clk, |
| 2516 | .current_freq = &rcg_dummy_freq, |
| 2517 | .base = &virt_bases[MMSS_BASE], |
| 2518 | .c = { |
| 2519 | .dbg_name = "vfe1_clk_src", |
| 2520 | .ops = &clk_ops_rcg, |
| 2521 | VDD_DIG_FMAX_MAP3(LOW, 133330000, NOMINAL, 266670000, |
| 2522 | HIGH, 320000000), |
| 2523 | CLK_INIT(vfe1_clk_src.c), |
| 2524 | }, |
| 2525 | }; |
| 2526 | |
| 2527 | static struct clk_freq_tbl ftbl_mdss_mdp_clk[] = { |
| 2528 | F_MM( 37500000, gpll0, 16, 0, 0), |
| 2529 | F_MM( 60000000, gpll0, 10, 0, 0), |
| 2530 | F_MM( 75000000, gpll0, 8, 0, 0), |
| 2531 | F_MM( 85710000, gpll0, 7, 0, 0), |
| 2532 | F_MM(100000000, gpll0, 6, 0, 0), |
| 2533 | F_MM(133330000, mmpll0, 6, 0, 0), |
| 2534 | F_MM(160000000, mmpll0, 5, 0, 0), |
| 2535 | F_MM(200000000, mmpll0, 4, 0, 0), |
| 2536 | F_MM(266670000, mmpll0, 3, 0, 0), |
| 2537 | F_MM(320000000, mmpll0, 2.5, 0, 0), |
| 2538 | F_END |
| 2539 | }; |
| 2540 | |
| 2541 | static struct rcg_clk mdp_clk_src = { |
| 2542 | .cmd_rcgr_reg = MDP_CMD_RCGR, |
| 2543 | .set_rate = set_rate_hid, |
| 2544 | .freq_tbl = ftbl_mdss_mdp_clk, |
| 2545 | .current_freq = &rcg_dummy_freq, |
| 2546 | .base = &virt_bases[MMSS_BASE], |
| 2547 | .c = { |
| 2548 | .dbg_name = "mdp_clk_src", |
| 2549 | .ops = &clk_ops_rcg, |
| 2550 | VDD_DIG_FMAX_MAP3(LOW, 133330000, NOMINAL, 266670000, |
| 2551 | HIGH, 320000000), |
| 2552 | CLK_INIT(mdp_clk_src.c), |
| 2553 | }, |
| 2554 | }; |
| 2555 | |
| 2556 | static struct clk_freq_tbl ftbl_camss_cci_cci_clk[] = { |
| 2557 | F_MM(19200000, cxo, 1, 0, 0), |
| 2558 | F_END |
| 2559 | }; |
| 2560 | |
| 2561 | static struct rcg_clk cci_clk_src = { |
| 2562 | .cmd_rcgr_reg = CCI_CMD_RCGR, |
| 2563 | .set_rate = set_rate_hid, |
| 2564 | .freq_tbl = ftbl_camss_cci_cci_clk, |
| 2565 | .current_freq = &rcg_dummy_freq, |
| 2566 | .base = &virt_bases[MMSS_BASE], |
| 2567 | .c = { |
| 2568 | .dbg_name = "cci_clk_src", |
| 2569 | .ops = &clk_ops_rcg, |
| 2570 | VDD_DIG_FMAX_MAP2(LOW, 20000000, NOMINAL, 40000000), |
| 2571 | CLK_INIT(cci_clk_src.c), |
| 2572 | }, |
| 2573 | }; |
| 2574 | |
| 2575 | static struct clk_freq_tbl ftbl_camss_gp0_1_clk[] = { |
| 2576 | F_MM( 10000, cxo, 16, 1, 120), |
| 2577 | F_MM( 20000, cxo, 16, 1, 50), |
| 2578 | F_MM( 6000000, gpll0, 10, 1, 10), |
| 2579 | F_MM(12000000, gpll0, 10, 1, 5), |
| 2580 | F_MM(13000000, gpll0, 10, 13, 60), |
| 2581 | F_MM(24000000, gpll0, 5, 1, 5), |
| 2582 | F_END |
| 2583 | }; |
| 2584 | |
| 2585 | static struct rcg_clk mmss_gp0_clk_src = { |
| 2586 | .cmd_rcgr_reg = MMSS_GP0_CMD_RCGR, |
| 2587 | .set_rate = set_rate_mnd, |
| 2588 | .freq_tbl = ftbl_camss_gp0_1_clk, |
| 2589 | .current_freq = &rcg_dummy_freq, |
| 2590 | .base = &virt_bases[MMSS_BASE], |
| 2591 | .c = { |
| 2592 | .dbg_name = "mmss_gp0_clk_src", |
| 2593 | .ops = &clk_ops_rcg_mnd, |
| 2594 | VDD_DIG_FMAX_MAP2(LOW, 100000000, NOMINAL, 200000000), |
| 2595 | CLK_INIT(mmss_gp0_clk_src.c), |
| 2596 | }, |
| 2597 | }; |
| 2598 | |
| 2599 | static struct rcg_clk mmss_gp1_clk_src = { |
| 2600 | .cmd_rcgr_reg = MMSS_GP1_CMD_RCGR, |
| 2601 | .set_rate = set_rate_mnd, |
| 2602 | .freq_tbl = ftbl_camss_gp0_1_clk, |
| 2603 | .current_freq = &rcg_dummy_freq, |
| 2604 | .base = &virt_bases[MMSS_BASE], |
| 2605 | .c = { |
| 2606 | .dbg_name = "mmss_gp1_clk_src", |
| 2607 | .ops = &clk_ops_rcg_mnd, |
| 2608 | VDD_DIG_FMAX_MAP2(LOW, 100000000, NOMINAL, 200000000), |
| 2609 | CLK_INIT(mmss_gp1_clk_src.c), |
| 2610 | }, |
| 2611 | }; |
| 2612 | |
| 2613 | static struct clk_freq_tbl ftbl_camss_jpeg_jpeg0_2_clk[] = { |
| 2614 | F_MM( 75000000, gpll0, 8, 0, 0), |
| 2615 | F_MM(150000000, gpll0, 4, 0, 0), |
| 2616 | F_MM(200000000, gpll0, 3, 0, 0), |
| 2617 | F_MM(228570000, mmpll0, 3.5, 0, 0), |
| 2618 | F_MM(266670000, mmpll0, 3, 0, 0), |
| 2619 | F_MM(320000000, mmpll0, 2.5, 0, 0), |
| 2620 | F_END |
| 2621 | }; |
| 2622 | |
| 2623 | static struct rcg_clk jpeg0_clk_src = { |
| 2624 | .cmd_rcgr_reg = JPEG0_CMD_RCGR, |
| 2625 | .set_rate = set_rate_hid, |
| 2626 | .freq_tbl = ftbl_camss_jpeg_jpeg0_2_clk, |
| 2627 | .current_freq = &rcg_dummy_freq, |
| 2628 | .base = &virt_bases[MMSS_BASE], |
| 2629 | .c = { |
| 2630 | .dbg_name = "jpeg0_clk_src", |
| 2631 | .ops = &clk_ops_rcg, |
| 2632 | VDD_DIG_FMAX_MAP3(LOW, 133330000, NOMINAL, 266670000, |
| 2633 | HIGH, 320000000), |
| 2634 | CLK_INIT(jpeg0_clk_src.c), |
| 2635 | }, |
| 2636 | }; |
| 2637 | |
| 2638 | static struct rcg_clk jpeg1_clk_src = { |
| 2639 | .cmd_rcgr_reg = JPEG1_CMD_RCGR, |
| 2640 | .set_rate = set_rate_hid, |
| 2641 | .freq_tbl = ftbl_camss_jpeg_jpeg0_2_clk, |
| 2642 | .current_freq = &rcg_dummy_freq, |
| 2643 | .base = &virt_bases[MMSS_BASE], |
| 2644 | .c = { |
| 2645 | .dbg_name = "jpeg1_clk_src", |
| 2646 | .ops = &clk_ops_rcg, |
| 2647 | VDD_DIG_FMAX_MAP3(LOW, 133330000, NOMINAL, 266670000, |
| 2648 | HIGH, 320000000), |
| 2649 | CLK_INIT(jpeg1_clk_src.c), |
| 2650 | }, |
| 2651 | }; |
| 2652 | |
| 2653 | static struct rcg_clk jpeg2_clk_src = { |
| 2654 | .cmd_rcgr_reg = JPEG2_CMD_RCGR, |
| 2655 | .set_rate = set_rate_hid, |
| 2656 | .freq_tbl = ftbl_camss_jpeg_jpeg0_2_clk, |
| 2657 | .current_freq = &rcg_dummy_freq, |
| 2658 | .base = &virt_bases[MMSS_BASE], |
| 2659 | .c = { |
| 2660 | .dbg_name = "jpeg2_clk_src", |
| 2661 | .ops = &clk_ops_rcg, |
| 2662 | VDD_DIG_FMAX_MAP3(LOW, 133330000, NOMINAL, 266670000, |
| 2663 | HIGH, 320000000), |
| 2664 | CLK_INIT(jpeg2_clk_src.c), |
| 2665 | }, |
| 2666 | }; |
| 2667 | |
| 2668 | static struct clk_freq_tbl ftbl_camss_mclk0_3_clk[] = { |
Vikram Mulukutla | 7dc7502 | 2012-08-23 16:50:56 -0700 | [diff] [blame] | 2669 | F_MM(19200000, cxo, 1, 0, 0), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2670 | F_MM(66670000, gpll0, 9, 0, 0), |
| 2671 | F_END |
| 2672 | }; |
| 2673 | |
| 2674 | static struct rcg_clk mclk0_clk_src = { |
| 2675 | .cmd_rcgr_reg = MCLK0_CMD_RCGR, |
| 2676 | .set_rate = set_rate_hid, |
| 2677 | .freq_tbl = ftbl_camss_mclk0_3_clk, |
| 2678 | .current_freq = &rcg_dummy_freq, |
| 2679 | .base = &virt_bases[MMSS_BASE], |
| 2680 | .c = { |
| 2681 | .dbg_name = "mclk0_clk_src", |
| 2682 | .ops = &clk_ops_rcg, |
| 2683 | VDD_DIG_FMAX_MAP1(LOW, 66670000), |
| 2684 | CLK_INIT(mclk0_clk_src.c), |
| 2685 | }, |
| 2686 | }; |
| 2687 | |
| 2688 | static struct rcg_clk mclk1_clk_src = { |
| 2689 | .cmd_rcgr_reg = MCLK1_CMD_RCGR, |
| 2690 | .set_rate = set_rate_hid, |
| 2691 | .freq_tbl = ftbl_camss_mclk0_3_clk, |
| 2692 | .current_freq = &rcg_dummy_freq, |
| 2693 | .base = &virt_bases[MMSS_BASE], |
| 2694 | .c = { |
| 2695 | .dbg_name = "mclk1_clk_src", |
| 2696 | .ops = &clk_ops_rcg, |
| 2697 | VDD_DIG_FMAX_MAP1(LOW, 66670000), |
| 2698 | CLK_INIT(mclk1_clk_src.c), |
| 2699 | }, |
| 2700 | }; |
| 2701 | |
| 2702 | static struct rcg_clk mclk2_clk_src = { |
| 2703 | .cmd_rcgr_reg = MCLK2_CMD_RCGR, |
| 2704 | .set_rate = set_rate_hid, |
| 2705 | .freq_tbl = ftbl_camss_mclk0_3_clk, |
| 2706 | .current_freq = &rcg_dummy_freq, |
| 2707 | .base = &virt_bases[MMSS_BASE], |
| 2708 | .c = { |
| 2709 | .dbg_name = "mclk2_clk_src", |
| 2710 | .ops = &clk_ops_rcg, |
| 2711 | VDD_DIG_FMAX_MAP1(LOW, 66670000), |
| 2712 | CLK_INIT(mclk2_clk_src.c), |
| 2713 | }, |
| 2714 | }; |
| 2715 | |
| 2716 | static struct rcg_clk mclk3_clk_src = { |
| 2717 | .cmd_rcgr_reg = MCLK3_CMD_RCGR, |
| 2718 | .set_rate = set_rate_hid, |
| 2719 | .freq_tbl = ftbl_camss_mclk0_3_clk, |
| 2720 | .current_freq = &rcg_dummy_freq, |
| 2721 | .base = &virt_bases[MMSS_BASE], |
| 2722 | .c = { |
| 2723 | .dbg_name = "mclk3_clk_src", |
| 2724 | .ops = &clk_ops_rcg, |
| 2725 | VDD_DIG_FMAX_MAP1(LOW, 66670000), |
| 2726 | CLK_INIT(mclk3_clk_src.c), |
| 2727 | }, |
| 2728 | }; |
| 2729 | |
| 2730 | static struct clk_freq_tbl ftbl_camss_phy0_2_csi0_2phytimer_clk[] = { |
| 2731 | F_MM(100000000, gpll0, 6, 0, 0), |
| 2732 | F_MM(200000000, mmpll0, 4, 0, 0), |
| 2733 | F_END |
| 2734 | }; |
| 2735 | |
| 2736 | static struct rcg_clk csi0phytimer_clk_src = { |
| 2737 | .cmd_rcgr_reg = CSI0PHYTIMER_CMD_RCGR, |
| 2738 | .set_rate = set_rate_hid, |
| 2739 | .freq_tbl = ftbl_camss_phy0_2_csi0_2phytimer_clk, |
| 2740 | .current_freq = &rcg_dummy_freq, |
| 2741 | .base = &virt_bases[MMSS_BASE], |
| 2742 | .c = { |
| 2743 | .dbg_name = "csi0phytimer_clk_src", |
| 2744 | .ops = &clk_ops_rcg, |
| 2745 | VDD_DIG_FMAX_MAP2(LOW, 100000000, NOMINAL, 200000000), |
| 2746 | CLK_INIT(csi0phytimer_clk_src.c), |
| 2747 | }, |
| 2748 | }; |
| 2749 | |
| 2750 | static struct rcg_clk csi1phytimer_clk_src = { |
| 2751 | .cmd_rcgr_reg = CSI1PHYTIMER_CMD_RCGR, |
| 2752 | .set_rate = set_rate_hid, |
| 2753 | .freq_tbl = ftbl_camss_phy0_2_csi0_2phytimer_clk, |
| 2754 | .current_freq = &rcg_dummy_freq, |
| 2755 | .base = &virt_bases[MMSS_BASE], |
| 2756 | .c = { |
| 2757 | .dbg_name = "csi1phytimer_clk_src", |
| 2758 | .ops = &clk_ops_rcg, |
| 2759 | VDD_DIG_FMAX_MAP2(LOW, 100000000, NOMINAL, 200000000), |
| 2760 | CLK_INIT(csi1phytimer_clk_src.c), |
| 2761 | }, |
| 2762 | }; |
| 2763 | |
| 2764 | static struct rcg_clk csi2phytimer_clk_src = { |
| 2765 | .cmd_rcgr_reg = CSI2PHYTIMER_CMD_RCGR, |
| 2766 | .set_rate = set_rate_hid, |
| 2767 | .freq_tbl = ftbl_camss_phy0_2_csi0_2phytimer_clk, |
| 2768 | .current_freq = &rcg_dummy_freq, |
| 2769 | .base = &virt_bases[MMSS_BASE], |
| 2770 | .c = { |
| 2771 | .dbg_name = "csi2phytimer_clk_src", |
| 2772 | .ops = &clk_ops_rcg, |
| 2773 | VDD_DIG_FMAX_MAP2(LOW, 100000000, NOMINAL, 200000000), |
| 2774 | CLK_INIT(csi2phytimer_clk_src.c), |
| 2775 | }, |
| 2776 | }; |
| 2777 | |
| 2778 | static struct clk_freq_tbl ftbl_camss_vfe_cpp_clk[] = { |
| 2779 | F_MM(150000000, gpll0, 4, 0, 0), |
| 2780 | F_MM(266670000, mmpll0, 3, 0, 0), |
| 2781 | F_MM(320000000, mmpll0, 2.5, 0, 0), |
| 2782 | F_END |
| 2783 | }; |
| 2784 | |
| 2785 | static struct rcg_clk cpp_clk_src = { |
| 2786 | .cmd_rcgr_reg = CPP_CMD_RCGR, |
| 2787 | .set_rate = set_rate_hid, |
| 2788 | .freq_tbl = ftbl_camss_vfe_cpp_clk, |
| 2789 | .current_freq = &rcg_dummy_freq, |
| 2790 | .base = &virt_bases[MMSS_BASE], |
| 2791 | .c = { |
| 2792 | .dbg_name = "cpp_clk_src", |
| 2793 | .ops = &clk_ops_rcg, |
| 2794 | VDD_DIG_FMAX_MAP3(LOW, 133330000, NOMINAL, 266670000, |
| 2795 | HIGH, 320000000), |
| 2796 | CLK_INIT(cpp_clk_src.c), |
| 2797 | }, |
| 2798 | }; |
| 2799 | |
Vikram Mulukutla | fe0f5a5 | 2012-08-16 16:51:08 -0700 | [diff] [blame] | 2800 | static struct clk *dsi_pll_clk_get_parent(struct clk *c) |
| 2801 | { |
| 2802 | return &cxo_clk_src.c; |
| 2803 | } |
| 2804 | |
| 2805 | static struct clk dsipll0_byte_clk_src = { |
| 2806 | .dbg_name = "dsipll0_byte_clk_src", |
| 2807 | .ops = &clk_ops_dsi_byte_pll, |
| 2808 | CLK_INIT(dsipll0_byte_clk_src), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2809 | }; |
| 2810 | |
Vikram Mulukutla | fe0f5a5 | 2012-08-16 16:51:08 -0700 | [diff] [blame] | 2811 | static struct clk dsipll0_pixel_clk_src = { |
| 2812 | .dbg_name = "dsipll0_pixel_clk_src", |
| 2813 | .ops = &clk_ops_dsi_pixel_pll, |
| 2814 | CLK_INIT(dsipll0_pixel_clk_src), |
| 2815 | }; |
| 2816 | |
| 2817 | static struct clk_freq_tbl byte_freq = { |
| 2818 | .src_clk = &dsipll0_byte_clk_src, |
| 2819 | .div_src_val = BVAL(10, 8, dsipll0_byte_mm_source_val), |
| 2820 | }; |
| 2821 | static struct clk_freq_tbl pixel_freq = { |
| 2822 | .src_clk = &dsipll0_byte_clk_src, |
| 2823 | .div_src_val = BVAL(10, 8, dsipll0_byte_mm_source_val), |
| 2824 | }; |
| 2825 | static struct clk_ops clk_ops_byte; |
| 2826 | static struct clk_ops clk_ops_pixel; |
| 2827 | |
| 2828 | #define CFG_RCGR_DIV_MASK BM(4, 0) |
| 2829 | |
| 2830 | static int set_rate_byte(struct clk *clk, unsigned long rate) |
| 2831 | { |
| 2832 | struct rcg_clk *rcg = to_rcg_clk(clk); |
| 2833 | struct clk *pll = &dsipll0_byte_clk_src; |
| 2834 | unsigned long source_rate, div; |
| 2835 | int rc; |
| 2836 | |
| 2837 | if (rate == 0) |
| 2838 | return -EINVAL; |
| 2839 | |
| 2840 | rc = clk_set_rate(pll, rate); |
| 2841 | if (rc) |
| 2842 | return rc; |
| 2843 | |
| 2844 | source_rate = clk_round_rate(pll, rate); |
| 2845 | if ((2 * source_rate) % rate) |
| 2846 | return -EINVAL; |
| 2847 | |
| 2848 | div = ((2 * source_rate)/rate) - 1; |
| 2849 | if (div > CFG_RCGR_DIV_MASK) |
| 2850 | return -EINVAL; |
| 2851 | |
| 2852 | byte_freq.div_src_val &= ~CFG_RCGR_DIV_MASK; |
| 2853 | byte_freq.div_src_val |= BVAL(4, 0, div); |
| 2854 | set_rate_mnd(rcg, &byte_freq); |
| 2855 | |
| 2856 | return 0; |
| 2857 | } |
| 2858 | |
| 2859 | static int set_rate_pixel(struct clk *clk, unsigned long rate) |
| 2860 | { |
| 2861 | struct rcg_clk *rcg = to_rcg_clk(clk); |
| 2862 | struct clk *pll = &dsipll0_pixel_clk_src; |
| 2863 | unsigned long source_rate, div; |
| 2864 | int rc; |
| 2865 | |
| 2866 | if (rate == 0) |
| 2867 | return -EINVAL; |
| 2868 | |
| 2869 | rc = clk_set_rate(pll, rate); |
| 2870 | if (rc) |
| 2871 | return rc; |
| 2872 | |
| 2873 | source_rate = clk_round_rate(pll, rate); |
| 2874 | if ((2 * source_rate) % rate) |
| 2875 | return -EINVAL; |
| 2876 | |
| 2877 | div = ((2 * source_rate)/rate) - 1; |
| 2878 | if (div > CFG_RCGR_DIV_MASK) |
| 2879 | return -EINVAL; |
| 2880 | |
| 2881 | pixel_freq.div_src_val &= ~CFG_RCGR_DIV_MASK; |
| 2882 | pixel_freq.div_src_val |= BVAL(4, 0, div); |
| 2883 | set_rate_hid(rcg, &pixel_freq); |
| 2884 | |
| 2885 | return 0; |
| 2886 | } |
| 2887 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2888 | static struct rcg_clk byte0_clk_src = { |
| 2889 | .cmd_rcgr_reg = BYTE0_CMD_RCGR, |
Vikram Mulukutla | fe0f5a5 | 2012-08-16 16:51:08 -0700 | [diff] [blame] | 2890 | .current_freq = &byte_freq, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2891 | .base = &virt_bases[MMSS_BASE], |
| 2892 | .c = { |
| 2893 | .dbg_name = "byte0_clk_src", |
Vikram Mulukutla | fe0f5a5 | 2012-08-16 16:51:08 -0700 | [diff] [blame] | 2894 | .ops = &clk_ops_byte, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2895 | VDD_DIG_FMAX_MAP3(LOW, 93800000, NOMINAL, 187500000, |
| 2896 | HIGH, 188000000), |
| 2897 | CLK_INIT(byte0_clk_src.c), |
| 2898 | }, |
| 2899 | }; |
| 2900 | |
| 2901 | static struct rcg_clk byte1_clk_src = { |
| 2902 | .cmd_rcgr_reg = BYTE1_CMD_RCGR, |
Vikram Mulukutla | fe0f5a5 | 2012-08-16 16:51:08 -0700 | [diff] [blame] | 2903 | .current_freq = &byte_freq, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2904 | .base = &virt_bases[MMSS_BASE], |
| 2905 | .c = { |
| 2906 | .dbg_name = "byte1_clk_src", |
Vikram Mulukutla | fe0f5a5 | 2012-08-16 16:51:08 -0700 | [diff] [blame] | 2907 | .ops = &clk_ops_byte, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2908 | VDD_DIG_FMAX_MAP3(LOW, 93800000, NOMINAL, 187500000, |
| 2909 | HIGH, 188000000), |
| 2910 | CLK_INIT(byte1_clk_src.c), |
| 2911 | }, |
| 2912 | }; |
| 2913 | |
| 2914 | static struct clk_freq_tbl ftbl_mdss_edpaux_clk[] = { |
| 2915 | F_MM(19200000, cxo, 1, 0, 0), |
| 2916 | F_END |
| 2917 | }; |
| 2918 | |
| 2919 | static struct rcg_clk edpaux_clk_src = { |
| 2920 | .cmd_rcgr_reg = EDPAUX_CMD_RCGR, |
| 2921 | .set_rate = set_rate_hid, |
| 2922 | .freq_tbl = ftbl_mdss_edpaux_clk, |
| 2923 | .current_freq = &rcg_dummy_freq, |
| 2924 | .base = &virt_bases[MMSS_BASE], |
| 2925 | .c = { |
| 2926 | .dbg_name = "edpaux_clk_src", |
| 2927 | .ops = &clk_ops_rcg, |
| 2928 | VDD_DIG_FMAX_MAP2(LOW, 20000000, NOMINAL, 40000000), |
| 2929 | CLK_INIT(edpaux_clk_src.c), |
| 2930 | }, |
| 2931 | }; |
| 2932 | |
| 2933 | static struct clk_freq_tbl ftbl_mdss_edplink_clk[] = { |
Asaf Penso | 6b5251b | 2012-10-11 12:27:03 -0700 | [diff] [blame] | 2934 | F_MDSS(162000000, edppll_270, 2, 0, 0), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2935 | F_MDSS(270000000, edppll_270, 11, 0, 0), |
| 2936 | F_END |
| 2937 | }; |
| 2938 | |
| 2939 | static struct rcg_clk edplink_clk_src = { |
| 2940 | .cmd_rcgr_reg = EDPLINK_CMD_RCGR, |
| 2941 | .set_rate = set_rate_hid, |
| 2942 | .freq_tbl = ftbl_mdss_edplink_clk, |
| 2943 | .current_freq = &rcg_dummy_freq, |
| 2944 | .base = &virt_bases[MMSS_BASE], |
| 2945 | .c = { |
| 2946 | .dbg_name = "edplink_clk_src", |
| 2947 | .ops = &clk_ops_rcg, |
| 2948 | VDD_DIG_FMAX_MAP2(LOW, 135000000, NOMINAL, 270000000), |
| 2949 | CLK_INIT(edplink_clk_src.c), |
| 2950 | }, |
| 2951 | }; |
| 2952 | |
| 2953 | static struct clk_freq_tbl ftbl_mdss_edppixel_clk[] = { |
Asaf Penso | 6b5251b | 2012-10-11 12:27:03 -0700 | [diff] [blame] | 2954 | F_MDSS(148500000, edppll_350, 2, 0, 0), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 2955 | F_MDSS(350000000, edppll_350, 11, 0, 0), |
| 2956 | F_END |
| 2957 | }; |
| 2958 | |
| 2959 | static struct rcg_clk edppixel_clk_src = { |
| 2960 | .cmd_rcgr_reg = EDPPIXEL_CMD_RCGR, |
| 2961 | .set_rate = set_rate_mnd, |
| 2962 | .freq_tbl = ftbl_mdss_edppixel_clk, |
| 2963 | .current_freq = &rcg_dummy_freq, |
| 2964 | .base = &virt_bases[MMSS_BASE], |
| 2965 | .c = { |
| 2966 | .dbg_name = "edppixel_clk_src", |
| 2967 | .ops = &clk_ops_rcg_mnd, |
| 2968 | VDD_DIG_FMAX_MAP2(LOW, 175000000, NOMINAL, 350000000), |
| 2969 | CLK_INIT(edppixel_clk_src.c), |
| 2970 | }, |
| 2971 | }; |
| 2972 | |
| 2973 | static struct clk_freq_tbl ftbl_mdss_esc0_1_clk[] = { |
| 2974 | F_MM(19200000, cxo, 1, 0, 0), |
| 2975 | F_END |
| 2976 | }; |
| 2977 | |
| 2978 | static struct rcg_clk esc0_clk_src = { |
| 2979 | .cmd_rcgr_reg = ESC0_CMD_RCGR, |
| 2980 | .set_rate = set_rate_hid, |
| 2981 | .freq_tbl = ftbl_mdss_esc0_1_clk, |
| 2982 | .current_freq = &rcg_dummy_freq, |
| 2983 | .base = &virt_bases[MMSS_BASE], |
| 2984 | .c = { |
| 2985 | .dbg_name = "esc0_clk_src", |
| 2986 | .ops = &clk_ops_rcg, |
| 2987 | VDD_DIG_FMAX_MAP2(LOW, 20000000, NOMINAL, 40000000), |
| 2988 | CLK_INIT(esc0_clk_src.c), |
| 2989 | }, |
| 2990 | }; |
| 2991 | |
| 2992 | static struct rcg_clk esc1_clk_src = { |
| 2993 | .cmd_rcgr_reg = ESC1_CMD_RCGR, |
| 2994 | .set_rate = set_rate_hid, |
| 2995 | .freq_tbl = ftbl_mdss_esc0_1_clk, |
| 2996 | .current_freq = &rcg_dummy_freq, |
| 2997 | .base = &virt_bases[MMSS_BASE], |
| 2998 | .c = { |
| 2999 | .dbg_name = "esc1_clk_src", |
| 3000 | .ops = &clk_ops_rcg, |
| 3001 | VDD_DIG_FMAX_MAP2(LOW, 20000000, NOMINAL, 40000000), |
| 3002 | CLK_INIT(esc1_clk_src.c), |
| 3003 | }, |
| 3004 | }; |
| 3005 | |
Vikram Mulukutla | 86b7634 | 2012-08-15 16:22:09 -0700 | [diff] [blame] | 3006 | static int hdmi_pll_clk_enable(struct clk *c) |
| 3007 | { |
| 3008 | int ret; |
| 3009 | unsigned long flags; |
| 3010 | |
| 3011 | spin_lock_irqsave(&local_clock_reg_lock, flags); |
| 3012 | ret = hdmi_pll_enable(); |
| 3013 | spin_unlock_irqrestore(&local_clock_reg_lock, flags); |
| 3014 | return ret; |
| 3015 | } |
| 3016 | |
| 3017 | static void hdmi_pll_clk_disable(struct clk *c) |
| 3018 | { |
| 3019 | unsigned long flags; |
| 3020 | |
| 3021 | spin_lock_irqsave(&local_clock_reg_lock, flags); |
| 3022 | hdmi_pll_disable(); |
| 3023 | spin_unlock_irqrestore(&local_clock_reg_lock, flags); |
| 3024 | } |
| 3025 | |
| 3026 | static int hdmi_pll_clk_set_rate(struct clk *c, unsigned long rate) |
| 3027 | { |
| 3028 | unsigned long flags; |
| 3029 | int rc; |
| 3030 | |
| 3031 | spin_lock_irqsave(&local_clock_reg_lock, flags); |
| 3032 | rc = hdmi_pll_set_rate(rate); |
| 3033 | spin_unlock_irqrestore(&local_clock_reg_lock, flags); |
| 3034 | |
| 3035 | return rc; |
| 3036 | } |
| 3037 | |
| 3038 | static struct clk *hdmi_pll_clk_get_parent(struct clk *c) |
| 3039 | { |
| 3040 | return &cxo_clk_src.c; |
| 3041 | } |
| 3042 | |
| 3043 | static struct clk_ops clk_ops_hdmi_pll = { |
| 3044 | .enable = hdmi_pll_clk_enable, |
| 3045 | .disable = hdmi_pll_clk_disable, |
| 3046 | .set_rate = hdmi_pll_clk_set_rate, |
| 3047 | .get_parent = hdmi_pll_clk_get_parent, |
| 3048 | }; |
| 3049 | |
| 3050 | static struct clk hdmipll_clk_src = { |
| 3051 | .dbg_name = "hdmipll_clk_src", |
| 3052 | .ops = &clk_ops_hdmi_pll, |
| 3053 | CLK_INIT(hdmipll_clk_src), |
Vikram Mulukutla | 86b7634 | 2012-08-15 16:22:09 -0700 | [diff] [blame] | 3054 | }; |
| 3055 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3056 | static struct clk_freq_tbl ftbl_mdss_extpclk_clk[] = { |
Vikram Mulukutla | 86b7634 | 2012-08-15 16:22:09 -0700 | [diff] [blame] | 3057 | /* |
| 3058 | * The zero rate is required since suspend/resume wipes out the HDMI PHY |
| 3059 | * registers. This entry allows the HDMI driver to switch the cached |
| 3060 | * rate to zero before suspend and back to the real rate after resume. |
| 3061 | */ |
| 3062 | F_HDMI( 0, hdmipll, 1, 0, 0), |
| 3063 | F_HDMI( 25200000, hdmipll, 1, 0, 0), |
| 3064 | F_HDMI( 27030000, hdmipll, 1, 0, 0), |
| 3065 | F_HDMI( 74250000, hdmipll, 1, 0, 0), |
| 3066 | F_HDMI(148500000, hdmipll, 1, 0, 0), |
| 3067 | F_HDMI(297000000, hdmipll, 1, 0, 0), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3068 | F_END |
| 3069 | }; |
| 3070 | |
Vikram Mulukutla | 86b7634 | 2012-08-15 16:22:09 -0700 | [diff] [blame] | 3071 | /* |
| 3072 | * Unlike other clocks, the HDMI rate is adjusted through PLL |
| 3073 | * re-programming. It is also routed through an HID divider. |
| 3074 | */ |
| 3075 | static void set_rate_hdmi(struct rcg_clk *rcg, struct clk_freq_tbl *nf) |
| 3076 | { |
| 3077 | clk_set_rate(nf->src_clk, nf->freq_hz); |
| 3078 | set_rate_hid(rcg, nf); |
| 3079 | } |
| 3080 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3081 | static struct rcg_clk extpclk_clk_src = { |
| 3082 | .cmd_rcgr_reg = EXTPCLK_CMD_RCGR, |
Vikram Mulukutla | 86b7634 | 2012-08-15 16:22:09 -0700 | [diff] [blame] | 3083 | .set_rate = set_rate_hdmi, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3084 | .freq_tbl = ftbl_mdss_extpclk_clk, |
| 3085 | .current_freq = &rcg_dummy_freq, |
| 3086 | .base = &virt_bases[MMSS_BASE], |
| 3087 | .c = { |
| 3088 | .dbg_name = "extpclk_clk_src", |
| 3089 | .ops = &clk_ops_rcg, |
| 3090 | VDD_DIG_FMAX_MAP2(LOW, 148500000, NOMINAL, 297000000), |
| 3091 | CLK_INIT(extpclk_clk_src.c), |
| 3092 | }, |
| 3093 | }; |
| 3094 | |
| 3095 | static struct clk_freq_tbl ftbl_mdss_hdmi_clk[] = { |
| 3096 | F_MDSS(19200000, cxo, 1, 0, 0), |
| 3097 | F_END |
| 3098 | }; |
| 3099 | |
| 3100 | static struct rcg_clk hdmi_clk_src = { |
| 3101 | .cmd_rcgr_reg = HDMI_CMD_RCGR, |
| 3102 | .set_rate = set_rate_hid, |
| 3103 | .freq_tbl = ftbl_mdss_hdmi_clk, |
| 3104 | .current_freq = &rcg_dummy_freq, |
| 3105 | .base = &virt_bases[MMSS_BASE], |
| 3106 | .c = { |
| 3107 | .dbg_name = "hdmi_clk_src", |
| 3108 | .ops = &clk_ops_rcg, |
| 3109 | VDD_DIG_FMAX_MAP2(LOW, 20000000, NOMINAL, 40000000), |
| 3110 | CLK_INIT(hdmi_clk_src.c), |
| 3111 | }, |
| 3112 | }; |
| 3113 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3114 | |
| 3115 | static struct rcg_clk pclk0_clk_src = { |
| 3116 | .cmd_rcgr_reg = PCLK0_CMD_RCGR, |
Vikram Mulukutla | fe0f5a5 | 2012-08-16 16:51:08 -0700 | [diff] [blame] | 3117 | .current_freq = &pixel_freq, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3118 | .base = &virt_bases[MMSS_BASE], |
| 3119 | .c = { |
| 3120 | .dbg_name = "pclk0_clk_src", |
Vikram Mulukutla | fe0f5a5 | 2012-08-16 16:51:08 -0700 | [diff] [blame] | 3121 | .ops = &clk_ops_pixel, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3122 | VDD_DIG_FMAX_MAP2(LOW, 125000000, NOMINAL, 250000000), |
| 3123 | CLK_INIT(pclk0_clk_src.c), |
| 3124 | }, |
| 3125 | }; |
| 3126 | |
| 3127 | static struct rcg_clk pclk1_clk_src = { |
| 3128 | .cmd_rcgr_reg = PCLK1_CMD_RCGR, |
Vikram Mulukutla | fe0f5a5 | 2012-08-16 16:51:08 -0700 | [diff] [blame] | 3129 | .current_freq = &pixel_freq, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3130 | .base = &virt_bases[MMSS_BASE], |
| 3131 | .c = { |
| 3132 | .dbg_name = "pclk1_clk_src", |
Vikram Mulukutla | fe0f5a5 | 2012-08-16 16:51:08 -0700 | [diff] [blame] | 3133 | .ops = &clk_ops_pixel, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3134 | VDD_DIG_FMAX_MAP2(LOW, 125000000, NOMINAL, 250000000), |
| 3135 | CLK_INIT(pclk1_clk_src.c), |
| 3136 | }, |
| 3137 | }; |
| 3138 | |
| 3139 | static struct clk_freq_tbl ftbl_mdss_vsync_clk[] = { |
| 3140 | F_MDSS(19200000, cxo, 1, 0, 0), |
| 3141 | F_END |
| 3142 | }; |
| 3143 | |
| 3144 | static struct rcg_clk vsync_clk_src = { |
| 3145 | .cmd_rcgr_reg = VSYNC_CMD_RCGR, |
| 3146 | .set_rate = set_rate_hid, |
| 3147 | .freq_tbl = ftbl_mdss_vsync_clk, |
| 3148 | .current_freq = &rcg_dummy_freq, |
| 3149 | .base = &virt_bases[MMSS_BASE], |
| 3150 | .c = { |
| 3151 | .dbg_name = "vsync_clk_src", |
| 3152 | .ops = &clk_ops_rcg, |
| 3153 | VDD_DIG_FMAX_MAP2(LOW, 20000000, NOMINAL, 40000000), |
| 3154 | CLK_INIT(vsync_clk_src.c), |
| 3155 | }, |
| 3156 | }; |
| 3157 | |
| 3158 | static struct clk_freq_tbl ftbl_venus0_vcodec0_clk[] = { |
| 3159 | F_MM( 50000000, gpll0, 12, 0, 0), |
| 3160 | F_MM(100000000, gpll0, 6, 0, 0), |
| 3161 | F_MM(133330000, mmpll0, 6, 0, 0), |
| 3162 | F_MM(200000000, mmpll0, 4, 0, 0), |
| 3163 | F_MM(266670000, mmpll0, 3, 0, 0), |
| 3164 | F_MM(410000000, mmpll3, 2, 0, 0), |
| 3165 | F_END |
| 3166 | }; |
| 3167 | |
| 3168 | static struct rcg_clk vcodec0_clk_src = { |
| 3169 | .cmd_rcgr_reg = VCODEC0_CMD_RCGR, |
| 3170 | .set_rate = set_rate_mnd, |
| 3171 | .freq_tbl = ftbl_venus0_vcodec0_clk, |
| 3172 | .current_freq = &rcg_dummy_freq, |
| 3173 | .base = &virt_bases[MMSS_BASE], |
| 3174 | .c = { |
| 3175 | .dbg_name = "vcodec0_clk_src", |
| 3176 | .ops = &clk_ops_rcg_mnd, |
| 3177 | VDD_DIG_FMAX_MAP3(LOW, 133330000, NOMINAL, 266670000, |
| 3178 | HIGH, 410000000), |
| 3179 | CLK_INIT(vcodec0_clk_src.c), |
| 3180 | }, |
| 3181 | }; |
| 3182 | |
| 3183 | static struct branch_clk camss_cci_cci_ahb_clk = { |
| 3184 | .cbcr_reg = CAMSS_CCI_CCI_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3185 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3186 | .base = &virt_bases[MMSS_BASE], |
| 3187 | .c = { |
| 3188 | .dbg_name = "camss_cci_cci_ahb_clk", |
| 3189 | .ops = &clk_ops_branch, |
| 3190 | CLK_INIT(camss_cci_cci_ahb_clk.c), |
| 3191 | }, |
| 3192 | }; |
| 3193 | |
| 3194 | static struct branch_clk camss_cci_cci_clk = { |
| 3195 | .cbcr_reg = CAMSS_CCI_CCI_CBCR, |
| 3196 | .parent = &cci_clk_src.c, |
| 3197 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3198 | .base = &virt_bases[MMSS_BASE], |
| 3199 | .c = { |
| 3200 | .dbg_name = "camss_cci_cci_clk", |
| 3201 | .ops = &clk_ops_branch, |
| 3202 | CLK_INIT(camss_cci_cci_clk.c), |
| 3203 | }, |
| 3204 | }; |
| 3205 | |
| 3206 | static struct branch_clk camss_csi0_ahb_clk = { |
| 3207 | .cbcr_reg = CAMSS_CSI0_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3208 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3209 | .base = &virt_bases[MMSS_BASE], |
| 3210 | .c = { |
| 3211 | .dbg_name = "camss_csi0_ahb_clk", |
| 3212 | .ops = &clk_ops_branch, |
| 3213 | CLK_INIT(camss_csi0_ahb_clk.c), |
| 3214 | }, |
| 3215 | }; |
| 3216 | |
| 3217 | static struct branch_clk camss_csi0_clk = { |
| 3218 | .cbcr_reg = CAMSS_CSI0_CBCR, |
| 3219 | .parent = &csi0_clk_src.c, |
| 3220 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3221 | .base = &virt_bases[MMSS_BASE], |
| 3222 | .c = { |
| 3223 | .dbg_name = "camss_csi0_clk", |
| 3224 | .ops = &clk_ops_branch, |
| 3225 | CLK_INIT(camss_csi0_clk.c), |
| 3226 | }, |
| 3227 | }; |
| 3228 | |
| 3229 | static struct branch_clk camss_csi0phy_clk = { |
| 3230 | .cbcr_reg = CAMSS_CSI0PHY_CBCR, |
| 3231 | .parent = &csi0_clk_src.c, |
| 3232 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3233 | .base = &virt_bases[MMSS_BASE], |
| 3234 | .c = { |
| 3235 | .dbg_name = "camss_csi0phy_clk", |
| 3236 | .ops = &clk_ops_branch, |
| 3237 | CLK_INIT(camss_csi0phy_clk.c), |
| 3238 | }, |
| 3239 | }; |
| 3240 | |
| 3241 | static struct branch_clk camss_csi0pix_clk = { |
| 3242 | .cbcr_reg = CAMSS_CSI0PIX_CBCR, |
| 3243 | .parent = &csi0_clk_src.c, |
| 3244 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3245 | .base = &virt_bases[MMSS_BASE], |
| 3246 | .c = { |
| 3247 | .dbg_name = "camss_csi0pix_clk", |
| 3248 | .ops = &clk_ops_branch, |
| 3249 | CLK_INIT(camss_csi0pix_clk.c), |
| 3250 | }, |
| 3251 | }; |
| 3252 | |
| 3253 | static struct branch_clk camss_csi0rdi_clk = { |
| 3254 | .cbcr_reg = CAMSS_CSI0RDI_CBCR, |
| 3255 | .parent = &csi0_clk_src.c, |
| 3256 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3257 | .base = &virt_bases[MMSS_BASE], |
| 3258 | .c = { |
| 3259 | .dbg_name = "camss_csi0rdi_clk", |
| 3260 | .ops = &clk_ops_branch, |
| 3261 | CLK_INIT(camss_csi0rdi_clk.c), |
| 3262 | }, |
| 3263 | }; |
| 3264 | |
| 3265 | static struct branch_clk camss_csi1_ahb_clk = { |
| 3266 | .cbcr_reg = CAMSS_CSI1_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3267 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3268 | .base = &virt_bases[MMSS_BASE], |
| 3269 | .c = { |
| 3270 | .dbg_name = "camss_csi1_ahb_clk", |
| 3271 | .ops = &clk_ops_branch, |
| 3272 | CLK_INIT(camss_csi1_ahb_clk.c), |
| 3273 | }, |
| 3274 | }; |
| 3275 | |
| 3276 | static struct branch_clk camss_csi1_clk = { |
| 3277 | .cbcr_reg = CAMSS_CSI1_CBCR, |
| 3278 | .parent = &csi1_clk_src.c, |
| 3279 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3280 | .base = &virt_bases[MMSS_BASE], |
| 3281 | .c = { |
| 3282 | .dbg_name = "camss_csi1_clk", |
| 3283 | .ops = &clk_ops_branch, |
| 3284 | CLK_INIT(camss_csi1_clk.c), |
| 3285 | }, |
| 3286 | }; |
| 3287 | |
| 3288 | static struct branch_clk camss_csi1phy_clk = { |
| 3289 | .cbcr_reg = CAMSS_CSI1PHY_CBCR, |
| 3290 | .parent = &csi1_clk_src.c, |
| 3291 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3292 | .base = &virt_bases[MMSS_BASE], |
| 3293 | .c = { |
| 3294 | .dbg_name = "camss_csi1phy_clk", |
| 3295 | .ops = &clk_ops_branch, |
| 3296 | CLK_INIT(camss_csi1phy_clk.c), |
| 3297 | }, |
| 3298 | }; |
| 3299 | |
| 3300 | static struct branch_clk camss_csi1pix_clk = { |
| 3301 | .cbcr_reg = CAMSS_CSI1PIX_CBCR, |
| 3302 | .parent = &csi1_clk_src.c, |
| 3303 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3304 | .base = &virt_bases[MMSS_BASE], |
| 3305 | .c = { |
| 3306 | .dbg_name = "camss_csi1pix_clk", |
| 3307 | .ops = &clk_ops_branch, |
| 3308 | CLK_INIT(camss_csi1pix_clk.c), |
| 3309 | }, |
| 3310 | }; |
| 3311 | |
| 3312 | static struct branch_clk camss_csi1rdi_clk = { |
| 3313 | .cbcr_reg = CAMSS_CSI1RDI_CBCR, |
| 3314 | .parent = &csi1_clk_src.c, |
| 3315 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3316 | .base = &virt_bases[MMSS_BASE], |
| 3317 | .c = { |
| 3318 | .dbg_name = "camss_csi1rdi_clk", |
| 3319 | .ops = &clk_ops_branch, |
| 3320 | CLK_INIT(camss_csi1rdi_clk.c), |
| 3321 | }, |
| 3322 | }; |
| 3323 | |
| 3324 | static struct branch_clk camss_csi2_ahb_clk = { |
| 3325 | .cbcr_reg = CAMSS_CSI2_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3326 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3327 | .base = &virt_bases[MMSS_BASE], |
| 3328 | .c = { |
| 3329 | .dbg_name = "camss_csi2_ahb_clk", |
| 3330 | .ops = &clk_ops_branch, |
| 3331 | CLK_INIT(camss_csi2_ahb_clk.c), |
| 3332 | }, |
| 3333 | }; |
| 3334 | |
| 3335 | static struct branch_clk camss_csi2_clk = { |
| 3336 | .cbcr_reg = CAMSS_CSI2_CBCR, |
| 3337 | .parent = &csi2_clk_src.c, |
| 3338 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3339 | .base = &virt_bases[MMSS_BASE], |
| 3340 | .c = { |
| 3341 | .dbg_name = "camss_csi2_clk", |
| 3342 | .ops = &clk_ops_branch, |
| 3343 | CLK_INIT(camss_csi2_clk.c), |
| 3344 | }, |
| 3345 | }; |
| 3346 | |
| 3347 | static struct branch_clk camss_csi2phy_clk = { |
| 3348 | .cbcr_reg = CAMSS_CSI2PHY_CBCR, |
| 3349 | .parent = &csi2_clk_src.c, |
| 3350 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3351 | .base = &virt_bases[MMSS_BASE], |
| 3352 | .c = { |
| 3353 | .dbg_name = "camss_csi2phy_clk", |
| 3354 | .ops = &clk_ops_branch, |
| 3355 | CLK_INIT(camss_csi2phy_clk.c), |
| 3356 | }, |
| 3357 | }; |
| 3358 | |
| 3359 | static struct branch_clk camss_csi2pix_clk = { |
| 3360 | .cbcr_reg = CAMSS_CSI2PIX_CBCR, |
| 3361 | .parent = &csi2_clk_src.c, |
| 3362 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3363 | .base = &virt_bases[MMSS_BASE], |
| 3364 | .c = { |
| 3365 | .dbg_name = "camss_csi2pix_clk", |
| 3366 | .ops = &clk_ops_branch, |
| 3367 | CLK_INIT(camss_csi2pix_clk.c), |
| 3368 | }, |
| 3369 | }; |
| 3370 | |
| 3371 | static struct branch_clk camss_csi2rdi_clk = { |
| 3372 | .cbcr_reg = CAMSS_CSI2RDI_CBCR, |
| 3373 | .parent = &csi2_clk_src.c, |
| 3374 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3375 | .base = &virt_bases[MMSS_BASE], |
| 3376 | .c = { |
| 3377 | .dbg_name = "camss_csi2rdi_clk", |
| 3378 | .ops = &clk_ops_branch, |
| 3379 | CLK_INIT(camss_csi2rdi_clk.c), |
| 3380 | }, |
| 3381 | }; |
| 3382 | |
| 3383 | static struct branch_clk camss_csi3_ahb_clk = { |
| 3384 | .cbcr_reg = CAMSS_CSI3_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3385 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3386 | .base = &virt_bases[MMSS_BASE], |
| 3387 | .c = { |
| 3388 | .dbg_name = "camss_csi3_ahb_clk", |
| 3389 | .ops = &clk_ops_branch, |
| 3390 | CLK_INIT(camss_csi3_ahb_clk.c), |
| 3391 | }, |
| 3392 | }; |
| 3393 | |
| 3394 | static struct branch_clk camss_csi3_clk = { |
| 3395 | .cbcr_reg = CAMSS_CSI3_CBCR, |
| 3396 | .parent = &csi3_clk_src.c, |
| 3397 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3398 | .base = &virt_bases[MMSS_BASE], |
| 3399 | .c = { |
| 3400 | .dbg_name = "camss_csi3_clk", |
| 3401 | .ops = &clk_ops_branch, |
| 3402 | CLK_INIT(camss_csi3_clk.c), |
| 3403 | }, |
| 3404 | }; |
| 3405 | |
| 3406 | static struct branch_clk camss_csi3phy_clk = { |
| 3407 | .cbcr_reg = CAMSS_CSI3PHY_CBCR, |
| 3408 | .parent = &csi3_clk_src.c, |
| 3409 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3410 | .base = &virt_bases[MMSS_BASE], |
| 3411 | .c = { |
| 3412 | .dbg_name = "camss_csi3phy_clk", |
| 3413 | .ops = &clk_ops_branch, |
| 3414 | CLK_INIT(camss_csi3phy_clk.c), |
| 3415 | }, |
| 3416 | }; |
| 3417 | |
| 3418 | static struct branch_clk camss_csi3pix_clk = { |
| 3419 | .cbcr_reg = CAMSS_CSI3PIX_CBCR, |
| 3420 | .parent = &csi3_clk_src.c, |
| 3421 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3422 | .base = &virt_bases[MMSS_BASE], |
| 3423 | .c = { |
| 3424 | .dbg_name = "camss_csi3pix_clk", |
| 3425 | .ops = &clk_ops_branch, |
| 3426 | CLK_INIT(camss_csi3pix_clk.c), |
| 3427 | }, |
| 3428 | }; |
| 3429 | |
| 3430 | static struct branch_clk camss_csi3rdi_clk = { |
| 3431 | .cbcr_reg = CAMSS_CSI3RDI_CBCR, |
| 3432 | .parent = &csi3_clk_src.c, |
| 3433 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3434 | .base = &virt_bases[MMSS_BASE], |
| 3435 | .c = { |
| 3436 | .dbg_name = "camss_csi3rdi_clk", |
| 3437 | .ops = &clk_ops_branch, |
| 3438 | CLK_INIT(camss_csi3rdi_clk.c), |
| 3439 | }, |
| 3440 | }; |
| 3441 | |
| 3442 | static struct branch_clk camss_csi_vfe0_clk = { |
| 3443 | .cbcr_reg = CAMSS_CSI_VFE0_CBCR, |
| 3444 | .parent = &vfe0_clk_src.c, |
| 3445 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3446 | .base = &virt_bases[MMSS_BASE], |
| 3447 | .c = { |
| 3448 | .dbg_name = "camss_csi_vfe0_clk", |
| 3449 | .ops = &clk_ops_branch, |
| 3450 | CLK_INIT(camss_csi_vfe0_clk.c), |
| 3451 | }, |
| 3452 | }; |
| 3453 | |
| 3454 | static struct branch_clk camss_csi_vfe1_clk = { |
| 3455 | .cbcr_reg = CAMSS_CSI_VFE1_CBCR, |
| 3456 | .parent = &vfe1_clk_src.c, |
| 3457 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3458 | .base = &virt_bases[MMSS_BASE], |
| 3459 | .c = { |
| 3460 | .dbg_name = "camss_csi_vfe1_clk", |
| 3461 | .ops = &clk_ops_branch, |
| 3462 | CLK_INIT(camss_csi_vfe1_clk.c), |
| 3463 | }, |
| 3464 | }; |
| 3465 | |
| 3466 | static struct branch_clk camss_gp0_clk = { |
| 3467 | .cbcr_reg = CAMSS_GP0_CBCR, |
| 3468 | .parent = &mmss_gp0_clk_src.c, |
| 3469 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3470 | .base = &virt_bases[MMSS_BASE], |
| 3471 | .c = { |
| 3472 | .dbg_name = "camss_gp0_clk", |
| 3473 | .ops = &clk_ops_branch, |
| 3474 | CLK_INIT(camss_gp0_clk.c), |
| 3475 | }, |
| 3476 | }; |
| 3477 | |
| 3478 | static struct branch_clk camss_gp1_clk = { |
| 3479 | .cbcr_reg = CAMSS_GP1_CBCR, |
| 3480 | .parent = &mmss_gp1_clk_src.c, |
| 3481 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3482 | .base = &virt_bases[MMSS_BASE], |
| 3483 | .c = { |
| 3484 | .dbg_name = "camss_gp1_clk", |
| 3485 | .ops = &clk_ops_branch, |
| 3486 | CLK_INIT(camss_gp1_clk.c), |
| 3487 | }, |
| 3488 | }; |
| 3489 | |
| 3490 | static struct branch_clk camss_ispif_ahb_clk = { |
| 3491 | .cbcr_reg = CAMSS_ISPIF_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3492 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3493 | .base = &virt_bases[MMSS_BASE], |
| 3494 | .c = { |
| 3495 | .dbg_name = "camss_ispif_ahb_clk", |
| 3496 | .ops = &clk_ops_branch, |
| 3497 | CLK_INIT(camss_ispif_ahb_clk.c), |
| 3498 | }, |
| 3499 | }; |
| 3500 | |
| 3501 | static struct branch_clk camss_jpeg_jpeg0_clk = { |
| 3502 | .cbcr_reg = CAMSS_JPEG_JPEG0_CBCR, |
| 3503 | .parent = &jpeg0_clk_src.c, |
| 3504 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3505 | .base = &virt_bases[MMSS_BASE], |
| 3506 | .c = { |
| 3507 | .dbg_name = "camss_jpeg_jpeg0_clk", |
| 3508 | .ops = &clk_ops_branch, |
| 3509 | CLK_INIT(camss_jpeg_jpeg0_clk.c), |
| 3510 | }, |
| 3511 | }; |
| 3512 | |
| 3513 | static struct branch_clk camss_jpeg_jpeg1_clk = { |
| 3514 | .cbcr_reg = CAMSS_JPEG_JPEG1_CBCR, |
| 3515 | .parent = &jpeg1_clk_src.c, |
| 3516 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3517 | .base = &virt_bases[MMSS_BASE], |
| 3518 | .c = { |
| 3519 | .dbg_name = "camss_jpeg_jpeg1_clk", |
| 3520 | .ops = &clk_ops_branch, |
| 3521 | CLK_INIT(camss_jpeg_jpeg1_clk.c), |
| 3522 | }, |
| 3523 | }; |
| 3524 | |
| 3525 | static struct branch_clk camss_jpeg_jpeg2_clk = { |
| 3526 | .cbcr_reg = CAMSS_JPEG_JPEG2_CBCR, |
| 3527 | .parent = &jpeg2_clk_src.c, |
| 3528 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3529 | .base = &virt_bases[MMSS_BASE], |
| 3530 | .c = { |
| 3531 | .dbg_name = "camss_jpeg_jpeg2_clk", |
| 3532 | .ops = &clk_ops_branch, |
| 3533 | CLK_INIT(camss_jpeg_jpeg2_clk.c), |
| 3534 | }, |
| 3535 | }; |
| 3536 | |
| 3537 | static struct branch_clk camss_jpeg_jpeg_ahb_clk = { |
| 3538 | .cbcr_reg = CAMSS_JPEG_JPEG_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3539 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3540 | .base = &virt_bases[MMSS_BASE], |
| 3541 | .c = { |
| 3542 | .dbg_name = "camss_jpeg_jpeg_ahb_clk", |
| 3543 | .ops = &clk_ops_branch, |
| 3544 | CLK_INIT(camss_jpeg_jpeg_ahb_clk.c), |
| 3545 | }, |
| 3546 | }; |
| 3547 | |
| 3548 | static struct branch_clk camss_jpeg_jpeg_axi_clk = { |
| 3549 | .cbcr_reg = CAMSS_JPEG_JPEG_AXI_CBCR, |
| 3550 | .parent = &axi_clk_src.c, |
| 3551 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3552 | .base = &virt_bases[MMSS_BASE], |
| 3553 | .c = { |
| 3554 | .dbg_name = "camss_jpeg_jpeg_axi_clk", |
| 3555 | .ops = &clk_ops_branch, |
| 3556 | CLK_INIT(camss_jpeg_jpeg_axi_clk.c), |
| 3557 | }, |
| 3558 | }; |
| 3559 | |
| 3560 | static struct branch_clk camss_jpeg_jpeg_ocmemnoc_clk = { |
| 3561 | .cbcr_reg = CAMSS_JPEG_JPEG_OCMEMNOC_CBCR, |
Vikram Mulukutla | d08a152 | 2012-05-24 15:24:01 -0700 | [diff] [blame] | 3562 | .parent = &ocmemnoc_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3563 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3564 | .base = &virt_bases[MMSS_BASE], |
| 3565 | .c = { |
| 3566 | .dbg_name = "camss_jpeg_jpeg_ocmemnoc_clk", |
| 3567 | .ops = &clk_ops_branch, |
| 3568 | CLK_INIT(camss_jpeg_jpeg_ocmemnoc_clk.c), |
| 3569 | }, |
| 3570 | }; |
| 3571 | |
| 3572 | static struct branch_clk camss_mclk0_clk = { |
| 3573 | .cbcr_reg = CAMSS_MCLK0_CBCR, |
| 3574 | .parent = &mclk0_clk_src.c, |
| 3575 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3576 | .base = &virt_bases[MMSS_BASE], |
| 3577 | .c = { |
| 3578 | .dbg_name = "camss_mclk0_clk", |
| 3579 | .ops = &clk_ops_branch, |
| 3580 | CLK_INIT(camss_mclk0_clk.c), |
| 3581 | }, |
| 3582 | }; |
| 3583 | |
| 3584 | static struct branch_clk camss_mclk1_clk = { |
| 3585 | .cbcr_reg = CAMSS_MCLK1_CBCR, |
| 3586 | .parent = &mclk1_clk_src.c, |
| 3587 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3588 | .base = &virt_bases[MMSS_BASE], |
| 3589 | .c = { |
| 3590 | .dbg_name = "camss_mclk1_clk", |
| 3591 | .ops = &clk_ops_branch, |
| 3592 | CLK_INIT(camss_mclk1_clk.c), |
| 3593 | }, |
| 3594 | }; |
| 3595 | |
| 3596 | static struct branch_clk camss_mclk2_clk = { |
| 3597 | .cbcr_reg = CAMSS_MCLK2_CBCR, |
| 3598 | .parent = &mclk2_clk_src.c, |
| 3599 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3600 | .base = &virt_bases[MMSS_BASE], |
| 3601 | .c = { |
| 3602 | .dbg_name = "camss_mclk2_clk", |
| 3603 | .ops = &clk_ops_branch, |
| 3604 | CLK_INIT(camss_mclk2_clk.c), |
| 3605 | }, |
| 3606 | }; |
| 3607 | |
| 3608 | static struct branch_clk camss_mclk3_clk = { |
| 3609 | .cbcr_reg = CAMSS_MCLK3_CBCR, |
| 3610 | .parent = &mclk3_clk_src.c, |
| 3611 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3612 | .base = &virt_bases[MMSS_BASE], |
| 3613 | .c = { |
| 3614 | .dbg_name = "camss_mclk3_clk", |
| 3615 | .ops = &clk_ops_branch, |
| 3616 | CLK_INIT(camss_mclk3_clk.c), |
| 3617 | }, |
| 3618 | }; |
| 3619 | |
| 3620 | static struct branch_clk camss_micro_ahb_clk = { |
| 3621 | .cbcr_reg = CAMSS_MICRO_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3622 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3623 | .base = &virt_bases[MMSS_BASE], |
| 3624 | .c = { |
| 3625 | .dbg_name = "camss_micro_ahb_clk", |
| 3626 | .ops = &clk_ops_branch, |
| 3627 | CLK_INIT(camss_micro_ahb_clk.c), |
| 3628 | }, |
| 3629 | }; |
| 3630 | |
| 3631 | static struct branch_clk camss_phy0_csi0phytimer_clk = { |
| 3632 | .cbcr_reg = CAMSS_PHY0_CSI0PHYTIMER_CBCR, |
| 3633 | .parent = &csi0phytimer_clk_src.c, |
| 3634 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3635 | .base = &virt_bases[MMSS_BASE], |
| 3636 | .c = { |
| 3637 | .dbg_name = "camss_phy0_csi0phytimer_clk", |
| 3638 | .ops = &clk_ops_branch, |
| 3639 | CLK_INIT(camss_phy0_csi0phytimer_clk.c), |
| 3640 | }, |
| 3641 | }; |
| 3642 | |
| 3643 | static struct branch_clk camss_phy1_csi1phytimer_clk = { |
| 3644 | .cbcr_reg = CAMSS_PHY1_CSI1PHYTIMER_CBCR, |
| 3645 | .parent = &csi1phytimer_clk_src.c, |
| 3646 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3647 | .base = &virt_bases[MMSS_BASE], |
| 3648 | .c = { |
| 3649 | .dbg_name = "camss_phy1_csi1phytimer_clk", |
| 3650 | .ops = &clk_ops_branch, |
| 3651 | CLK_INIT(camss_phy1_csi1phytimer_clk.c), |
| 3652 | }, |
| 3653 | }; |
| 3654 | |
| 3655 | static struct branch_clk camss_phy2_csi2phytimer_clk = { |
| 3656 | .cbcr_reg = CAMSS_PHY2_CSI2PHYTIMER_CBCR, |
| 3657 | .parent = &csi2phytimer_clk_src.c, |
| 3658 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3659 | .base = &virt_bases[MMSS_BASE], |
| 3660 | .c = { |
| 3661 | .dbg_name = "camss_phy2_csi2phytimer_clk", |
| 3662 | .ops = &clk_ops_branch, |
| 3663 | CLK_INIT(camss_phy2_csi2phytimer_clk.c), |
| 3664 | }, |
| 3665 | }; |
| 3666 | |
| 3667 | static struct branch_clk camss_top_ahb_clk = { |
| 3668 | .cbcr_reg = CAMSS_TOP_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3669 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3670 | .base = &virt_bases[MMSS_BASE], |
| 3671 | .c = { |
| 3672 | .dbg_name = "camss_top_ahb_clk", |
| 3673 | .ops = &clk_ops_branch, |
| 3674 | CLK_INIT(camss_top_ahb_clk.c), |
| 3675 | }, |
| 3676 | }; |
| 3677 | |
| 3678 | static struct branch_clk camss_vfe_cpp_ahb_clk = { |
| 3679 | .cbcr_reg = CAMSS_VFE_CPP_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3680 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3681 | .base = &virt_bases[MMSS_BASE], |
| 3682 | .c = { |
| 3683 | .dbg_name = "camss_vfe_cpp_ahb_clk", |
| 3684 | .ops = &clk_ops_branch, |
| 3685 | CLK_INIT(camss_vfe_cpp_ahb_clk.c), |
| 3686 | }, |
| 3687 | }; |
| 3688 | |
| 3689 | static struct branch_clk camss_vfe_cpp_clk = { |
| 3690 | .cbcr_reg = CAMSS_VFE_CPP_CBCR, |
| 3691 | .parent = &cpp_clk_src.c, |
| 3692 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3693 | .base = &virt_bases[MMSS_BASE], |
| 3694 | .c = { |
| 3695 | .dbg_name = "camss_vfe_cpp_clk", |
| 3696 | .ops = &clk_ops_branch, |
| 3697 | CLK_INIT(camss_vfe_cpp_clk.c), |
| 3698 | }, |
| 3699 | }; |
| 3700 | |
| 3701 | static struct branch_clk camss_vfe_vfe0_clk = { |
| 3702 | .cbcr_reg = CAMSS_VFE_VFE0_CBCR, |
| 3703 | .parent = &vfe0_clk_src.c, |
| 3704 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3705 | .base = &virt_bases[MMSS_BASE], |
| 3706 | .c = { |
| 3707 | .dbg_name = "camss_vfe_vfe0_clk", |
| 3708 | .ops = &clk_ops_branch, |
| 3709 | CLK_INIT(camss_vfe_vfe0_clk.c), |
| 3710 | }, |
| 3711 | }; |
| 3712 | |
| 3713 | static struct branch_clk camss_vfe_vfe1_clk = { |
| 3714 | .cbcr_reg = CAMSS_VFE_VFE1_CBCR, |
| 3715 | .parent = &vfe1_clk_src.c, |
| 3716 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3717 | .base = &virt_bases[MMSS_BASE], |
| 3718 | .c = { |
| 3719 | .dbg_name = "camss_vfe_vfe1_clk", |
| 3720 | .ops = &clk_ops_branch, |
| 3721 | CLK_INIT(camss_vfe_vfe1_clk.c), |
| 3722 | }, |
| 3723 | }; |
| 3724 | |
| 3725 | static struct branch_clk camss_vfe_vfe_ahb_clk = { |
| 3726 | .cbcr_reg = CAMSS_VFE_VFE_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3727 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3728 | .base = &virt_bases[MMSS_BASE], |
| 3729 | .c = { |
| 3730 | .dbg_name = "camss_vfe_vfe_ahb_clk", |
| 3731 | .ops = &clk_ops_branch, |
| 3732 | CLK_INIT(camss_vfe_vfe_ahb_clk.c), |
| 3733 | }, |
| 3734 | }; |
| 3735 | |
| 3736 | static struct branch_clk camss_vfe_vfe_axi_clk = { |
| 3737 | .cbcr_reg = CAMSS_VFE_VFE_AXI_CBCR, |
| 3738 | .parent = &axi_clk_src.c, |
| 3739 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3740 | .base = &virt_bases[MMSS_BASE], |
| 3741 | .c = { |
| 3742 | .dbg_name = "camss_vfe_vfe_axi_clk", |
| 3743 | .ops = &clk_ops_branch, |
| 3744 | CLK_INIT(camss_vfe_vfe_axi_clk.c), |
| 3745 | }, |
| 3746 | }; |
| 3747 | |
| 3748 | static struct branch_clk camss_vfe_vfe_ocmemnoc_clk = { |
| 3749 | .cbcr_reg = CAMSS_VFE_VFE_OCMEMNOC_CBCR, |
Vikram Mulukutla | d08a152 | 2012-05-24 15:24:01 -0700 | [diff] [blame] | 3750 | .parent = &ocmemnoc_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3751 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3752 | .base = &virt_bases[MMSS_BASE], |
| 3753 | .c = { |
| 3754 | .dbg_name = "camss_vfe_vfe_ocmemnoc_clk", |
| 3755 | .ops = &clk_ops_branch, |
| 3756 | CLK_INIT(camss_vfe_vfe_ocmemnoc_clk.c), |
| 3757 | }, |
| 3758 | }; |
| 3759 | |
| 3760 | static struct branch_clk mdss_ahb_clk = { |
| 3761 | .cbcr_reg = MDSS_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3762 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3763 | .base = &virt_bases[MMSS_BASE], |
| 3764 | .c = { |
| 3765 | .dbg_name = "mdss_ahb_clk", |
| 3766 | .ops = &clk_ops_branch, |
| 3767 | CLK_INIT(mdss_ahb_clk.c), |
| 3768 | }, |
| 3769 | }; |
| 3770 | |
| 3771 | static struct branch_clk mdss_axi_clk = { |
| 3772 | .cbcr_reg = MDSS_AXI_CBCR, |
| 3773 | .parent = &axi_clk_src.c, |
| 3774 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3775 | .base = &virt_bases[MMSS_BASE], |
| 3776 | .c = { |
| 3777 | .dbg_name = "mdss_axi_clk", |
| 3778 | .ops = &clk_ops_branch, |
| 3779 | CLK_INIT(mdss_axi_clk.c), |
| 3780 | }, |
| 3781 | }; |
| 3782 | |
| 3783 | static struct branch_clk mdss_byte0_clk = { |
| 3784 | .cbcr_reg = MDSS_BYTE0_CBCR, |
| 3785 | .parent = &byte0_clk_src.c, |
| 3786 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3787 | .base = &virt_bases[MMSS_BASE], |
| 3788 | .c = { |
| 3789 | .dbg_name = "mdss_byte0_clk", |
| 3790 | .ops = &clk_ops_branch, |
| 3791 | CLK_INIT(mdss_byte0_clk.c), |
| 3792 | }, |
| 3793 | }; |
| 3794 | |
| 3795 | static struct branch_clk mdss_byte1_clk = { |
| 3796 | .cbcr_reg = MDSS_BYTE1_CBCR, |
| 3797 | .parent = &byte1_clk_src.c, |
| 3798 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3799 | .base = &virt_bases[MMSS_BASE], |
| 3800 | .c = { |
| 3801 | .dbg_name = "mdss_byte1_clk", |
| 3802 | .ops = &clk_ops_branch, |
| 3803 | CLK_INIT(mdss_byte1_clk.c), |
| 3804 | }, |
| 3805 | }; |
| 3806 | |
| 3807 | static struct branch_clk mdss_edpaux_clk = { |
| 3808 | .cbcr_reg = MDSS_EDPAUX_CBCR, |
| 3809 | .parent = &edpaux_clk_src.c, |
| 3810 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3811 | .base = &virt_bases[MMSS_BASE], |
| 3812 | .c = { |
| 3813 | .dbg_name = "mdss_edpaux_clk", |
| 3814 | .ops = &clk_ops_branch, |
| 3815 | CLK_INIT(mdss_edpaux_clk.c), |
| 3816 | }, |
| 3817 | }; |
| 3818 | |
| 3819 | static struct branch_clk mdss_edplink_clk = { |
| 3820 | .cbcr_reg = MDSS_EDPLINK_CBCR, |
| 3821 | .parent = &edplink_clk_src.c, |
| 3822 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3823 | .base = &virt_bases[MMSS_BASE], |
| 3824 | .c = { |
| 3825 | .dbg_name = "mdss_edplink_clk", |
| 3826 | .ops = &clk_ops_branch, |
| 3827 | CLK_INIT(mdss_edplink_clk.c), |
| 3828 | }, |
| 3829 | }; |
| 3830 | |
| 3831 | static struct branch_clk mdss_edppixel_clk = { |
| 3832 | .cbcr_reg = MDSS_EDPPIXEL_CBCR, |
| 3833 | .parent = &edppixel_clk_src.c, |
| 3834 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3835 | .base = &virt_bases[MMSS_BASE], |
| 3836 | .c = { |
| 3837 | .dbg_name = "mdss_edppixel_clk", |
| 3838 | .ops = &clk_ops_branch, |
| 3839 | CLK_INIT(mdss_edppixel_clk.c), |
| 3840 | }, |
| 3841 | }; |
| 3842 | |
| 3843 | static struct branch_clk mdss_esc0_clk = { |
| 3844 | .cbcr_reg = MDSS_ESC0_CBCR, |
| 3845 | .parent = &esc0_clk_src.c, |
| 3846 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3847 | .base = &virt_bases[MMSS_BASE], |
| 3848 | .c = { |
| 3849 | .dbg_name = "mdss_esc0_clk", |
| 3850 | .ops = &clk_ops_branch, |
| 3851 | CLK_INIT(mdss_esc0_clk.c), |
| 3852 | }, |
| 3853 | }; |
| 3854 | |
| 3855 | static struct branch_clk mdss_esc1_clk = { |
| 3856 | .cbcr_reg = MDSS_ESC1_CBCR, |
| 3857 | .parent = &esc1_clk_src.c, |
| 3858 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3859 | .base = &virt_bases[MMSS_BASE], |
| 3860 | .c = { |
| 3861 | .dbg_name = "mdss_esc1_clk", |
| 3862 | .ops = &clk_ops_branch, |
| 3863 | CLK_INIT(mdss_esc1_clk.c), |
| 3864 | }, |
| 3865 | }; |
| 3866 | |
| 3867 | static struct branch_clk mdss_extpclk_clk = { |
| 3868 | .cbcr_reg = MDSS_EXTPCLK_CBCR, |
| 3869 | .parent = &extpclk_clk_src.c, |
| 3870 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3871 | .base = &virt_bases[MMSS_BASE], |
| 3872 | .c = { |
| 3873 | .dbg_name = "mdss_extpclk_clk", |
| 3874 | .ops = &clk_ops_branch, |
| 3875 | CLK_INIT(mdss_extpclk_clk.c), |
| 3876 | }, |
| 3877 | }; |
| 3878 | |
| 3879 | static struct branch_clk mdss_hdmi_ahb_clk = { |
| 3880 | .cbcr_reg = MDSS_HDMI_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3881 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3882 | .base = &virt_bases[MMSS_BASE], |
| 3883 | .c = { |
| 3884 | .dbg_name = "mdss_hdmi_ahb_clk", |
| 3885 | .ops = &clk_ops_branch, |
| 3886 | CLK_INIT(mdss_hdmi_ahb_clk.c), |
| 3887 | }, |
| 3888 | }; |
| 3889 | |
| 3890 | static struct branch_clk mdss_hdmi_clk = { |
| 3891 | .cbcr_reg = MDSS_HDMI_CBCR, |
| 3892 | .parent = &hdmi_clk_src.c, |
| 3893 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3894 | .base = &virt_bases[MMSS_BASE], |
| 3895 | .c = { |
| 3896 | .dbg_name = "mdss_hdmi_clk", |
| 3897 | .ops = &clk_ops_branch, |
| 3898 | CLK_INIT(mdss_hdmi_clk.c), |
| 3899 | }, |
| 3900 | }; |
| 3901 | |
| 3902 | static struct branch_clk mdss_mdp_clk = { |
| 3903 | .cbcr_reg = MDSS_MDP_CBCR, |
| 3904 | .parent = &mdp_clk_src.c, |
| 3905 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3906 | .base = &virt_bases[MMSS_BASE], |
| 3907 | .c = { |
| 3908 | .dbg_name = "mdss_mdp_clk", |
| 3909 | .ops = &clk_ops_branch, |
| 3910 | CLK_INIT(mdss_mdp_clk.c), |
| 3911 | }, |
| 3912 | }; |
| 3913 | |
| 3914 | static struct branch_clk mdss_mdp_lut_clk = { |
| 3915 | .cbcr_reg = MDSS_MDP_LUT_CBCR, |
| 3916 | .parent = &mdp_clk_src.c, |
| 3917 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3918 | .base = &virt_bases[MMSS_BASE], |
| 3919 | .c = { |
| 3920 | .dbg_name = "mdss_mdp_lut_clk", |
| 3921 | .ops = &clk_ops_branch, |
| 3922 | CLK_INIT(mdss_mdp_lut_clk.c), |
| 3923 | }, |
| 3924 | }; |
| 3925 | |
| 3926 | static struct branch_clk mdss_pclk0_clk = { |
| 3927 | .cbcr_reg = MDSS_PCLK0_CBCR, |
| 3928 | .parent = &pclk0_clk_src.c, |
| 3929 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3930 | .base = &virt_bases[MMSS_BASE], |
| 3931 | .c = { |
| 3932 | .dbg_name = "mdss_pclk0_clk", |
| 3933 | .ops = &clk_ops_branch, |
| 3934 | CLK_INIT(mdss_pclk0_clk.c), |
| 3935 | }, |
| 3936 | }; |
| 3937 | |
| 3938 | static struct branch_clk mdss_pclk1_clk = { |
| 3939 | .cbcr_reg = MDSS_PCLK1_CBCR, |
| 3940 | .parent = &pclk1_clk_src.c, |
| 3941 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3942 | .base = &virt_bases[MMSS_BASE], |
| 3943 | .c = { |
| 3944 | .dbg_name = "mdss_pclk1_clk", |
| 3945 | .ops = &clk_ops_branch, |
| 3946 | CLK_INIT(mdss_pclk1_clk.c), |
| 3947 | }, |
| 3948 | }; |
| 3949 | |
| 3950 | static struct branch_clk mdss_vsync_clk = { |
| 3951 | .cbcr_reg = MDSS_VSYNC_CBCR, |
| 3952 | .parent = &vsync_clk_src.c, |
| 3953 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3954 | .base = &virt_bases[MMSS_BASE], |
| 3955 | .c = { |
| 3956 | .dbg_name = "mdss_vsync_clk", |
| 3957 | .ops = &clk_ops_branch, |
| 3958 | CLK_INIT(mdss_vsync_clk.c), |
| 3959 | }, |
| 3960 | }; |
| 3961 | |
| 3962 | static struct branch_clk mmss_misc_ahb_clk = { |
| 3963 | .cbcr_reg = MMSS_MISC_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3964 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3965 | .base = &virt_bases[MMSS_BASE], |
| 3966 | .c = { |
| 3967 | .dbg_name = "mmss_misc_ahb_clk", |
| 3968 | .ops = &clk_ops_branch, |
| 3969 | CLK_INIT(mmss_misc_ahb_clk.c), |
| 3970 | }, |
| 3971 | }; |
| 3972 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3973 | static struct branch_clk mmss_mmssnoc_bto_ahb_clk = { |
| 3974 | .cbcr_reg = MMSS_MMSSNOC_BTO_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3975 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3976 | .base = &virt_bases[MMSS_BASE], |
| 3977 | .c = { |
| 3978 | .dbg_name = "mmss_mmssnoc_bto_ahb_clk", |
| 3979 | .ops = &clk_ops_branch, |
| 3980 | CLK_INIT(mmss_mmssnoc_bto_ahb_clk.c), |
| 3981 | }, |
| 3982 | }; |
| 3983 | |
| 3984 | static struct branch_clk mmss_mmssnoc_axi_clk = { |
| 3985 | .cbcr_reg = MMSS_MMSSNOC_AXI_CBCR, |
| 3986 | .parent = &axi_clk_src.c, |
Vikram Mulukutla | c15dac0 | 2012-08-09 13:31:08 -0700 | [diff] [blame] | 3987 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 3988 | .base = &virt_bases[MMSS_BASE], |
| 3989 | .c = { |
| 3990 | .dbg_name = "mmss_mmssnoc_axi_clk", |
| 3991 | .ops = &clk_ops_branch, |
| 3992 | CLK_INIT(mmss_mmssnoc_axi_clk.c), |
| 3993 | }, |
| 3994 | }; |
| 3995 | |
| 3996 | static struct branch_clk mmss_s0_axi_clk = { |
| 3997 | .cbcr_reg = MMSS_S0_AXI_CBCR, |
| 3998 | .parent = &axi_clk_src.c, |
Vikram Mulukutla | c15dac0 | 2012-08-09 13:31:08 -0700 | [diff] [blame] | 3999 | /* The bus driver needs set_rate to go through to the parent */ |
| 4000 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4001 | .base = &virt_bases[MMSS_BASE], |
| 4002 | .c = { |
| 4003 | .dbg_name = "mmss_s0_axi_clk", |
| 4004 | .ops = &clk_ops_branch, |
| 4005 | CLK_INIT(mmss_s0_axi_clk.c), |
Vikram Mulukutla | c15dac0 | 2012-08-09 13:31:08 -0700 | [diff] [blame] | 4006 | .depends = &mmss_mmssnoc_axi_clk.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4007 | }, |
| 4008 | }; |
| 4009 | |
Vikram Mulukutla | d08a152 | 2012-05-24 15:24:01 -0700 | [diff] [blame] | 4010 | struct branch_clk ocmemnoc_clk = { |
| 4011 | .cbcr_reg = OCMEMNOC_CBCR, |
| 4012 | .parent = &ocmemnoc_clk_src.c, |
| 4013 | .has_sibling = 0, |
| 4014 | .bcr_reg = 0x50b0, |
| 4015 | .base = &virt_bases[MMSS_BASE], |
| 4016 | .c = { |
| 4017 | .dbg_name = "ocmemnoc_clk", |
| 4018 | .ops = &clk_ops_branch, |
| 4019 | CLK_INIT(ocmemnoc_clk.c), |
| 4020 | }, |
| 4021 | }; |
| 4022 | |
Vikram Mulukutla | 274b2d9 | 2012-07-13 15:53:04 -0700 | [diff] [blame] | 4023 | struct branch_clk ocmemcx_ocmemnoc_clk = { |
| 4024 | .cbcr_reg = OCMEMCX_OCMEMNOC_CBCR, |
| 4025 | .parent = &ocmemnoc_clk_src.c, |
| 4026 | .has_sibling = 1, |
| 4027 | .base = &virt_bases[MMSS_BASE], |
| 4028 | .c = { |
| 4029 | .dbg_name = "ocmemcx_ocmemnoc_clk", |
| 4030 | .ops = &clk_ops_branch, |
| 4031 | CLK_INIT(ocmemcx_ocmemnoc_clk.c), |
| 4032 | }, |
| 4033 | }; |
| 4034 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4035 | static struct branch_clk venus0_ahb_clk = { |
| 4036 | .cbcr_reg = VENUS0_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4037 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4038 | .base = &virt_bases[MMSS_BASE], |
| 4039 | .c = { |
| 4040 | .dbg_name = "venus0_ahb_clk", |
| 4041 | .ops = &clk_ops_branch, |
| 4042 | CLK_INIT(venus0_ahb_clk.c), |
| 4043 | }, |
| 4044 | }; |
| 4045 | |
| 4046 | static struct branch_clk venus0_axi_clk = { |
| 4047 | .cbcr_reg = VENUS0_AXI_CBCR, |
| 4048 | .parent = &axi_clk_src.c, |
| 4049 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4050 | .base = &virt_bases[MMSS_BASE], |
| 4051 | .c = { |
| 4052 | .dbg_name = "venus0_axi_clk", |
| 4053 | .ops = &clk_ops_branch, |
| 4054 | CLK_INIT(venus0_axi_clk.c), |
| 4055 | }, |
| 4056 | }; |
| 4057 | |
| 4058 | static struct branch_clk venus0_ocmemnoc_clk = { |
| 4059 | .cbcr_reg = VENUS0_OCMEMNOC_CBCR, |
Vikram Mulukutla | d08a152 | 2012-05-24 15:24:01 -0700 | [diff] [blame] | 4060 | .parent = &ocmemnoc_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4061 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4062 | .base = &virt_bases[MMSS_BASE], |
| 4063 | .c = { |
| 4064 | .dbg_name = "venus0_ocmemnoc_clk", |
| 4065 | .ops = &clk_ops_branch, |
| 4066 | CLK_INIT(venus0_ocmemnoc_clk.c), |
| 4067 | }, |
| 4068 | }; |
| 4069 | |
| 4070 | static struct branch_clk venus0_vcodec0_clk = { |
| 4071 | .cbcr_reg = VENUS0_VCODEC0_CBCR, |
| 4072 | .parent = &vcodec0_clk_src.c, |
| 4073 | .has_sibling = 0, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4074 | .base = &virt_bases[MMSS_BASE], |
| 4075 | .c = { |
| 4076 | .dbg_name = "venus0_vcodec0_clk", |
| 4077 | .ops = &clk_ops_branch, |
| 4078 | CLK_INIT(venus0_vcodec0_clk.c), |
| 4079 | }, |
| 4080 | }; |
| 4081 | |
Vikram Mulukutla | e3b0306 | 2012-05-16 12:07:08 -0700 | [diff] [blame] | 4082 | static struct branch_clk oxilicx_axi_clk = { |
| 4083 | .cbcr_reg = OXILICX_AXI_CBCR, |
| 4084 | .parent = &axi_clk_src.c, |
| 4085 | .has_sibling = 1, |
| 4086 | .base = &virt_bases[MMSS_BASE], |
| 4087 | .c = { |
| 4088 | .dbg_name = "oxilicx_axi_clk", |
| 4089 | .ops = &clk_ops_branch, |
| 4090 | CLK_INIT(oxilicx_axi_clk.c), |
| 4091 | }, |
| 4092 | }; |
| 4093 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4094 | static struct branch_clk oxili_gfx3d_clk = { |
| 4095 | .cbcr_reg = OXILI_GFX3D_CBCR, |
Vikram Mulukutla | 1e6127d | 2012-08-21 21:05:24 -0700 | [diff] [blame] | 4096 | .parent = &oxili_gfx3d_clk_src.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4097 | .base = &virt_bases[MMSS_BASE], |
| 4098 | .c = { |
| 4099 | .dbg_name = "oxili_gfx3d_clk", |
| 4100 | .ops = &clk_ops_branch, |
| 4101 | CLK_INIT(oxili_gfx3d_clk.c), |
Vikram Mulukutla | e3b0306 | 2012-05-16 12:07:08 -0700 | [diff] [blame] | 4102 | .depends = &oxilicx_axi_clk.c, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4103 | }, |
| 4104 | }; |
| 4105 | |
| 4106 | static struct branch_clk oxilicx_ahb_clk = { |
| 4107 | .cbcr_reg = OXILICX_AHB_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4108 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4109 | .base = &virt_bases[MMSS_BASE], |
| 4110 | .c = { |
| 4111 | .dbg_name = "oxilicx_ahb_clk", |
| 4112 | .ops = &clk_ops_branch, |
| 4113 | CLK_INIT(oxilicx_ahb_clk.c), |
| 4114 | }, |
| 4115 | }; |
| 4116 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4117 | static struct clk_freq_tbl ftbl_audio_core_slimbus_core_clock[] = { |
Vikram Mulukutla | 94d531c | 2012-08-11 18:50:27 -0700 | [diff] [blame] | 4118 | F_LPASS(24576000, lpapll0, 4, 1, 5), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4119 | F_END |
| 4120 | }; |
| 4121 | |
| 4122 | static struct rcg_clk audio_core_slimbus_core_clk_src = { |
| 4123 | .cmd_rcgr_reg = SLIMBUS_CMD_RCGR, |
| 4124 | .set_rate = set_rate_mnd, |
| 4125 | .freq_tbl = ftbl_audio_core_slimbus_core_clock, |
| 4126 | .current_freq = &rcg_dummy_freq, |
| 4127 | .base = &virt_bases[LPASS_BASE], |
| 4128 | .c = { |
| 4129 | .dbg_name = "audio_core_slimbus_core_clk_src", |
| 4130 | .ops = &clk_ops_rcg_mnd, |
| 4131 | VDD_DIG_FMAX_MAP2(LOW, 70000000, NOMINAL, 140000000), |
| 4132 | CLK_INIT(audio_core_slimbus_core_clk_src.c), |
| 4133 | }, |
| 4134 | }; |
| 4135 | |
| 4136 | static struct branch_clk audio_core_slimbus_core_clk = { |
| 4137 | .cbcr_reg = AUDIO_CORE_SLIMBUS_CORE_CBCR, |
| 4138 | .parent = &audio_core_slimbus_core_clk_src.c, |
| 4139 | .base = &virt_bases[LPASS_BASE], |
| 4140 | .c = { |
| 4141 | .dbg_name = "audio_core_slimbus_core_clk", |
| 4142 | .ops = &clk_ops_branch, |
| 4143 | CLK_INIT(audio_core_slimbus_core_clk.c), |
| 4144 | }, |
| 4145 | }; |
| 4146 | |
| 4147 | static struct branch_clk audio_core_slimbus_lfabif_clk = { |
| 4148 | .cbcr_reg = AUDIO_CORE_SLIMBUS_LFABIF_CBCR, |
| 4149 | .has_sibling = 1, |
| 4150 | .base = &virt_bases[LPASS_BASE], |
| 4151 | .c = { |
| 4152 | .dbg_name = "audio_core_slimbus_lfabif_clk", |
| 4153 | .ops = &clk_ops_branch, |
| 4154 | CLK_INIT(audio_core_slimbus_lfabif_clk.c), |
| 4155 | }, |
| 4156 | }; |
| 4157 | |
| 4158 | static struct clk_freq_tbl ftbl_audio_core_lpaif_clock[] = { |
| 4159 | F_LPASS( 512000, lpapll0, 16, 1, 60), |
| 4160 | F_LPASS( 768000, lpapll0, 16, 1, 40), |
| 4161 | F_LPASS( 1024000, lpapll0, 16, 1, 30), |
Vikram Mulukutla | 27da8de | 2012-08-09 19:28:51 -0700 | [diff] [blame] | 4162 | F_LPASS( 1536000, lpapll0, 16, 1, 20), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4163 | F_LPASS( 2048000, lpapll0, 16, 1, 15), |
| 4164 | F_LPASS( 3072000, lpapll0, 16, 1, 10), |
| 4165 | F_LPASS( 4096000, lpapll0, 15, 1, 8), |
| 4166 | F_LPASS( 6144000, lpapll0, 10, 1, 8), |
| 4167 | F_LPASS( 8192000, lpapll0, 15, 1, 4), |
| 4168 | F_LPASS(12288000, lpapll0, 10, 1, 4), |
| 4169 | F_END |
| 4170 | }; |
| 4171 | |
| 4172 | static struct rcg_clk audio_core_lpaif_codec_spkr_clk_src = { |
| 4173 | .cmd_rcgr_reg = LPAIF_SPKR_CMD_RCGR, |
| 4174 | .set_rate = set_rate_mnd, |
| 4175 | .freq_tbl = ftbl_audio_core_lpaif_clock, |
| 4176 | .current_freq = &rcg_dummy_freq, |
| 4177 | .base = &virt_bases[LPASS_BASE], |
| 4178 | .c = { |
| 4179 | .dbg_name = "audio_core_lpaif_codec_spkr_clk_src", |
| 4180 | .ops = &clk_ops_rcg_mnd, |
| 4181 | VDD_DIG_FMAX_MAP2(LOW, 12000000, NOMINAL, 25000000), |
| 4182 | CLK_INIT(audio_core_lpaif_codec_spkr_clk_src.c), |
| 4183 | }, |
| 4184 | }; |
| 4185 | |
| 4186 | static struct rcg_clk audio_core_lpaif_pri_clk_src = { |
| 4187 | .cmd_rcgr_reg = LPAIF_PRI_CMD_RCGR, |
| 4188 | .set_rate = set_rate_mnd, |
| 4189 | .freq_tbl = ftbl_audio_core_lpaif_clock, |
| 4190 | .current_freq = &rcg_dummy_freq, |
| 4191 | .base = &virt_bases[LPASS_BASE], |
| 4192 | .c = { |
| 4193 | .dbg_name = "audio_core_lpaif_pri_clk_src", |
| 4194 | .ops = &clk_ops_rcg_mnd, |
| 4195 | VDD_DIG_FMAX_MAP2(LOW, 12000000, NOMINAL, 25000000), |
| 4196 | CLK_INIT(audio_core_lpaif_pri_clk_src.c), |
| 4197 | }, |
| 4198 | }; |
| 4199 | |
| 4200 | static struct rcg_clk audio_core_lpaif_sec_clk_src = { |
| 4201 | .cmd_rcgr_reg = LPAIF_SEC_CMD_RCGR, |
| 4202 | .set_rate = set_rate_mnd, |
| 4203 | .freq_tbl = ftbl_audio_core_lpaif_clock, |
| 4204 | .current_freq = &rcg_dummy_freq, |
| 4205 | .base = &virt_bases[LPASS_BASE], |
| 4206 | .c = { |
| 4207 | .dbg_name = "audio_core_lpaif_sec_clk_src", |
| 4208 | .ops = &clk_ops_rcg_mnd, |
| 4209 | VDD_DIG_FMAX_MAP2(LOW, 12000000, NOMINAL, 25000000), |
| 4210 | CLK_INIT(audio_core_lpaif_sec_clk_src.c), |
| 4211 | }, |
| 4212 | }; |
| 4213 | |
| 4214 | static struct rcg_clk audio_core_lpaif_ter_clk_src = { |
| 4215 | .cmd_rcgr_reg = LPAIF_TER_CMD_RCGR, |
| 4216 | .set_rate = set_rate_mnd, |
| 4217 | .freq_tbl = ftbl_audio_core_lpaif_clock, |
| 4218 | .current_freq = &rcg_dummy_freq, |
| 4219 | .base = &virt_bases[LPASS_BASE], |
| 4220 | .c = { |
| 4221 | .dbg_name = "audio_core_lpaif_ter_clk_src", |
| 4222 | .ops = &clk_ops_rcg_mnd, |
| 4223 | VDD_DIG_FMAX_MAP2(LOW, 12000000, NOMINAL, 25000000), |
| 4224 | CLK_INIT(audio_core_lpaif_ter_clk_src.c), |
| 4225 | }, |
| 4226 | }; |
| 4227 | |
| 4228 | static struct rcg_clk audio_core_lpaif_quad_clk_src = { |
| 4229 | .cmd_rcgr_reg = LPAIF_QUAD_CMD_RCGR, |
| 4230 | .set_rate = set_rate_mnd, |
| 4231 | .freq_tbl = ftbl_audio_core_lpaif_clock, |
| 4232 | .current_freq = &rcg_dummy_freq, |
| 4233 | .base = &virt_bases[LPASS_BASE], |
| 4234 | .c = { |
| 4235 | .dbg_name = "audio_core_lpaif_quad_clk_src", |
| 4236 | .ops = &clk_ops_rcg_mnd, |
| 4237 | VDD_DIG_FMAX_MAP2(LOW, 12000000, NOMINAL, 25000000), |
| 4238 | CLK_INIT(audio_core_lpaif_quad_clk_src.c), |
| 4239 | }, |
| 4240 | }; |
| 4241 | |
| 4242 | static struct rcg_clk audio_core_lpaif_pcm0_clk_src = { |
| 4243 | .cmd_rcgr_reg = LPAIF_PCM0_CMD_RCGR, |
| 4244 | .set_rate = set_rate_mnd, |
| 4245 | .freq_tbl = ftbl_audio_core_lpaif_clock, |
| 4246 | .current_freq = &rcg_dummy_freq, |
| 4247 | .base = &virt_bases[LPASS_BASE], |
| 4248 | .c = { |
| 4249 | .dbg_name = "audio_core_lpaif_pcm0_clk_src", |
| 4250 | .ops = &clk_ops_rcg_mnd, |
| 4251 | VDD_DIG_FMAX_MAP2(LOW, 12000000, NOMINAL, 25000000), |
| 4252 | CLK_INIT(audio_core_lpaif_pcm0_clk_src.c), |
| 4253 | }, |
| 4254 | }; |
| 4255 | |
| 4256 | static struct rcg_clk audio_core_lpaif_pcm1_clk_src = { |
| 4257 | .cmd_rcgr_reg = LPAIF_PCM1_CMD_RCGR, |
| 4258 | .set_rate = set_rate_mnd, |
| 4259 | .freq_tbl = ftbl_audio_core_lpaif_clock, |
| 4260 | .current_freq = &rcg_dummy_freq, |
| 4261 | .base = &virt_bases[LPASS_BASE], |
| 4262 | .c = { |
| 4263 | .dbg_name = "audio_core_lpaif_pcm1_clk_src", |
| 4264 | .ops = &clk_ops_rcg_mnd, |
| 4265 | VDD_DIG_FMAX_MAP2(LOW, 12000000, NOMINAL, 25000000), |
| 4266 | CLK_INIT(audio_core_lpaif_pcm1_clk_src.c), |
| 4267 | }, |
| 4268 | }; |
| 4269 | |
Vikram Mulukutla | 1d25218 | 2012-07-13 10:51:44 -0700 | [diff] [blame] | 4270 | struct rcg_clk audio_core_lpaif_pcmoe_clk_src = { |
| 4271 | .cmd_rcgr_reg = LPAIF_PCMOE_CMD_RCGR, |
| 4272 | .set_rate = set_rate_mnd, |
| 4273 | .freq_tbl = ftbl_audio_core_lpaif_clock, |
| 4274 | .current_freq = &rcg_dummy_freq, |
| 4275 | .base = &virt_bases[LPASS_BASE], |
| 4276 | .c = { |
| 4277 | .dbg_name = "audio_core_lpaif_pcmoe_clk_src", |
| 4278 | .ops = &clk_ops_rcg_mnd, |
| 4279 | VDD_DIG_FMAX_MAP1(LOW, 12290000), |
| 4280 | CLK_INIT(audio_core_lpaif_pcmoe_clk_src.c), |
| 4281 | }, |
| 4282 | }; |
| 4283 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4284 | static struct branch_clk audio_core_lpaif_codec_spkr_osr_clk = { |
| 4285 | .cbcr_reg = AUDIO_CORE_LPAIF_CODEC_SPKR_OSR_CBCR, |
| 4286 | .parent = &audio_core_lpaif_codec_spkr_clk_src.c, |
| 4287 | .has_sibling = 1, |
| 4288 | .base = &virt_bases[LPASS_BASE], |
| 4289 | .c = { |
Vikram Mulukutla | fed770b | 2012-07-13 15:10:52 -0700 | [diff] [blame] | 4290 | .dbg_name = "audio_core_lpaif_codec_spkr_osr_clk", |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4291 | .ops = &clk_ops_branch, |
Vikram Mulukutla | fed770b | 2012-07-13 15:10:52 -0700 | [diff] [blame] | 4292 | CLK_INIT(audio_core_lpaif_codec_spkr_osr_clk.c), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4293 | }, |
| 4294 | }; |
| 4295 | |
| 4296 | static struct branch_clk audio_core_lpaif_codec_spkr_ebit_clk = { |
| 4297 | .cbcr_reg = AUDIO_CORE_LPAIF_CODEC_SPKR_EBIT_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4298 | .has_sibling = 1, |
| 4299 | .base = &virt_bases[LPASS_BASE], |
| 4300 | .c = { |
Vikram Mulukutla | fed770b | 2012-07-13 15:10:52 -0700 | [diff] [blame] | 4301 | .dbg_name = "audio_core_lpaif_codec_spkr_ebit_clk", |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4302 | .ops = &clk_ops_branch, |
Vikram Mulukutla | fed770b | 2012-07-13 15:10:52 -0700 | [diff] [blame] | 4303 | CLK_INIT(audio_core_lpaif_codec_spkr_ebit_clk.c), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4304 | }, |
| 4305 | }; |
| 4306 | |
| 4307 | static struct branch_clk audio_core_lpaif_codec_spkr_ibit_clk = { |
| 4308 | .cbcr_reg = AUDIO_CORE_LPAIF_CODEC_SPKR_IBIT_CBCR, |
| 4309 | .parent = &audio_core_lpaif_codec_spkr_clk_src.c, |
| 4310 | .has_sibling = 1, |
Vikram Mulukutla | 94ee5bb | 2012-05-16 13:57:28 -0700 | [diff] [blame] | 4311 | .max_div = 15, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4312 | .base = &virt_bases[LPASS_BASE], |
| 4313 | .c = { |
Vikram Mulukutla | fed770b | 2012-07-13 15:10:52 -0700 | [diff] [blame] | 4314 | .dbg_name = "audio_core_lpaif_codec_spkr_ibit_clk", |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4315 | .ops = &clk_ops_branch, |
Vikram Mulukutla | fed770b | 2012-07-13 15:10:52 -0700 | [diff] [blame] | 4316 | CLK_INIT(audio_core_lpaif_codec_spkr_ibit_clk.c), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4317 | }, |
| 4318 | }; |
| 4319 | |
| 4320 | static struct branch_clk audio_core_lpaif_pri_osr_clk = { |
| 4321 | .cbcr_reg = AUDIO_CORE_LPAIF_PRI_OSR_CBCR, |
| 4322 | .parent = &audio_core_lpaif_pri_clk_src.c, |
| 4323 | .has_sibling = 1, |
| 4324 | .base = &virt_bases[LPASS_BASE], |
| 4325 | .c = { |
| 4326 | .dbg_name = "audio_core_lpaif_pri_osr_clk", |
| 4327 | .ops = &clk_ops_branch, |
| 4328 | CLK_INIT(audio_core_lpaif_pri_osr_clk.c), |
| 4329 | }, |
| 4330 | }; |
| 4331 | |
| 4332 | static struct branch_clk audio_core_lpaif_pri_ebit_clk = { |
| 4333 | .cbcr_reg = AUDIO_CORE_LPAIF_PRI_EBIT_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4334 | .has_sibling = 1, |
| 4335 | .base = &virt_bases[LPASS_BASE], |
| 4336 | .c = { |
| 4337 | .dbg_name = "audio_core_lpaif_pri_ebit_clk", |
| 4338 | .ops = &clk_ops_branch, |
| 4339 | CLK_INIT(audio_core_lpaif_pri_ebit_clk.c), |
| 4340 | }, |
| 4341 | }; |
| 4342 | |
| 4343 | static struct branch_clk audio_core_lpaif_pri_ibit_clk = { |
| 4344 | .cbcr_reg = AUDIO_CORE_LPAIF_PRI_IBIT_CBCR, |
| 4345 | .parent = &audio_core_lpaif_pri_clk_src.c, |
| 4346 | .has_sibling = 1, |
Vikram Mulukutla | 94ee5bb | 2012-05-16 13:57:28 -0700 | [diff] [blame] | 4347 | .max_div = 15, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4348 | .base = &virt_bases[LPASS_BASE], |
| 4349 | .c = { |
| 4350 | .dbg_name = "audio_core_lpaif_pri_ibit_clk", |
| 4351 | .ops = &clk_ops_branch, |
| 4352 | CLK_INIT(audio_core_lpaif_pri_ibit_clk.c), |
| 4353 | }, |
| 4354 | }; |
| 4355 | |
| 4356 | static struct branch_clk audio_core_lpaif_sec_osr_clk = { |
| 4357 | .cbcr_reg = AUDIO_CORE_LPAIF_SEC_OSR_CBCR, |
| 4358 | .parent = &audio_core_lpaif_sec_clk_src.c, |
| 4359 | .has_sibling = 1, |
| 4360 | .base = &virt_bases[LPASS_BASE], |
| 4361 | .c = { |
| 4362 | .dbg_name = "audio_core_lpaif_sec_osr_clk", |
| 4363 | .ops = &clk_ops_branch, |
| 4364 | CLK_INIT(audio_core_lpaif_sec_osr_clk.c), |
| 4365 | }, |
| 4366 | }; |
| 4367 | |
| 4368 | static struct branch_clk audio_core_lpaif_sec_ebit_clk = { |
| 4369 | .cbcr_reg = AUDIO_CORE_LPAIF_SEC_EBIT_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4370 | .has_sibling = 1, |
| 4371 | .base = &virt_bases[LPASS_BASE], |
| 4372 | .c = { |
| 4373 | .dbg_name = "audio_core_lpaif_sec_ebit_clk", |
| 4374 | .ops = &clk_ops_branch, |
| 4375 | CLK_INIT(audio_core_lpaif_sec_ebit_clk.c), |
| 4376 | }, |
| 4377 | }; |
| 4378 | |
| 4379 | static struct branch_clk audio_core_lpaif_sec_ibit_clk = { |
| 4380 | .cbcr_reg = AUDIO_CORE_LPAIF_SEC_IBIT_CBCR, |
| 4381 | .parent = &audio_core_lpaif_sec_clk_src.c, |
| 4382 | .has_sibling = 1, |
Vikram Mulukutla | 94ee5bb | 2012-05-16 13:57:28 -0700 | [diff] [blame] | 4383 | .max_div = 15, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4384 | .base = &virt_bases[LPASS_BASE], |
| 4385 | .c = { |
| 4386 | .dbg_name = "audio_core_lpaif_sec_ibit_clk", |
| 4387 | .ops = &clk_ops_branch, |
| 4388 | CLK_INIT(audio_core_lpaif_sec_ibit_clk.c), |
| 4389 | }, |
| 4390 | }; |
| 4391 | |
| 4392 | static struct branch_clk audio_core_lpaif_ter_osr_clk = { |
| 4393 | .cbcr_reg = AUDIO_CORE_LPAIF_TER_OSR_CBCR, |
| 4394 | .parent = &audio_core_lpaif_ter_clk_src.c, |
| 4395 | .has_sibling = 1, |
| 4396 | .base = &virt_bases[LPASS_BASE], |
| 4397 | .c = { |
| 4398 | .dbg_name = "audio_core_lpaif_ter_osr_clk", |
| 4399 | .ops = &clk_ops_branch, |
| 4400 | CLK_INIT(audio_core_lpaif_ter_osr_clk.c), |
| 4401 | }, |
| 4402 | }; |
| 4403 | |
| 4404 | static struct branch_clk audio_core_lpaif_ter_ebit_clk = { |
| 4405 | .cbcr_reg = AUDIO_CORE_LPAIF_TER_EBIT_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4406 | .has_sibling = 1, |
| 4407 | .base = &virt_bases[LPASS_BASE], |
| 4408 | .c = { |
| 4409 | .dbg_name = "audio_core_lpaif_ter_ebit_clk", |
| 4410 | .ops = &clk_ops_branch, |
| 4411 | CLK_INIT(audio_core_lpaif_ter_ebit_clk.c), |
| 4412 | }, |
| 4413 | }; |
| 4414 | |
| 4415 | static struct branch_clk audio_core_lpaif_ter_ibit_clk = { |
| 4416 | .cbcr_reg = AUDIO_CORE_LPAIF_TER_IBIT_CBCR, |
| 4417 | .parent = &audio_core_lpaif_ter_clk_src.c, |
| 4418 | .has_sibling = 1, |
Vikram Mulukutla | 94ee5bb | 2012-05-16 13:57:28 -0700 | [diff] [blame] | 4419 | .max_div = 15, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4420 | .base = &virt_bases[LPASS_BASE], |
| 4421 | .c = { |
| 4422 | .dbg_name = "audio_core_lpaif_ter_ibit_clk", |
| 4423 | .ops = &clk_ops_branch, |
| 4424 | CLK_INIT(audio_core_lpaif_ter_ibit_clk.c), |
| 4425 | }, |
| 4426 | }; |
| 4427 | |
| 4428 | static struct branch_clk audio_core_lpaif_quad_osr_clk = { |
| 4429 | .cbcr_reg = AUDIO_CORE_LPAIF_QUAD_OSR_CBCR, |
| 4430 | .parent = &audio_core_lpaif_quad_clk_src.c, |
| 4431 | .has_sibling = 1, |
| 4432 | .base = &virt_bases[LPASS_BASE], |
| 4433 | .c = { |
| 4434 | .dbg_name = "audio_core_lpaif_quad_osr_clk", |
| 4435 | .ops = &clk_ops_branch, |
| 4436 | CLK_INIT(audio_core_lpaif_quad_osr_clk.c), |
| 4437 | }, |
| 4438 | }; |
| 4439 | |
| 4440 | static struct branch_clk audio_core_lpaif_quad_ebit_clk = { |
| 4441 | .cbcr_reg = AUDIO_CORE_LPAIF_QUAD_EBIT_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4442 | .has_sibling = 1, |
| 4443 | .base = &virt_bases[LPASS_BASE], |
| 4444 | .c = { |
| 4445 | .dbg_name = "audio_core_lpaif_quad_ebit_clk", |
| 4446 | .ops = &clk_ops_branch, |
| 4447 | CLK_INIT(audio_core_lpaif_quad_ebit_clk.c), |
| 4448 | }, |
| 4449 | }; |
| 4450 | |
| 4451 | static struct branch_clk audio_core_lpaif_quad_ibit_clk = { |
| 4452 | .cbcr_reg = AUDIO_CORE_LPAIF_QUAD_IBIT_CBCR, |
| 4453 | .parent = &audio_core_lpaif_quad_clk_src.c, |
| 4454 | .has_sibling = 1, |
Vikram Mulukutla | 94ee5bb | 2012-05-16 13:57:28 -0700 | [diff] [blame] | 4455 | .max_div = 15, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4456 | .base = &virt_bases[LPASS_BASE], |
| 4457 | .c = { |
| 4458 | .dbg_name = "audio_core_lpaif_quad_ibit_clk", |
| 4459 | .ops = &clk_ops_branch, |
| 4460 | CLK_INIT(audio_core_lpaif_quad_ibit_clk.c), |
| 4461 | }, |
| 4462 | }; |
| 4463 | |
| 4464 | static struct branch_clk audio_core_lpaif_pcm0_ebit_clk = { |
| 4465 | .cbcr_reg = AUDIO_CORE_LPAIF_PCM0_EBIT_CBCR, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4466 | .has_sibling = 1, |
| 4467 | .base = &virt_bases[LPASS_BASE], |
| 4468 | .c = { |
| 4469 | .dbg_name = "audio_core_lpaif_pcm0_ebit_clk", |
| 4470 | .ops = &clk_ops_branch, |
| 4471 | CLK_INIT(audio_core_lpaif_pcm0_ebit_clk.c), |
| 4472 | }, |
| 4473 | }; |
| 4474 | |
| 4475 | static struct branch_clk audio_core_lpaif_pcm0_ibit_clk = { |
| 4476 | .cbcr_reg = AUDIO_CORE_LPAIF_PCM0_IBIT_CBCR, |
| 4477 | .parent = &audio_core_lpaif_pcm0_clk_src.c, |
| 4478 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4479 | .base = &virt_bases[LPASS_BASE], |
| 4480 | .c = { |
| 4481 | .dbg_name = "audio_core_lpaif_pcm0_ibit_clk", |
| 4482 | .ops = &clk_ops_branch, |
| 4483 | CLK_INIT(audio_core_lpaif_pcm0_ibit_clk.c), |
| 4484 | }, |
| 4485 | }; |
| 4486 | |
| 4487 | static struct branch_clk audio_core_lpaif_pcm1_ebit_clk = { |
| 4488 | .cbcr_reg = AUDIO_CORE_LPAIF_PCM1_EBIT_CBCR, |
| 4489 | .parent = &audio_core_lpaif_pcm1_clk_src.c, |
| 4490 | .has_sibling = 1, |
| 4491 | .base = &virt_bases[LPASS_BASE], |
| 4492 | .c = { |
| 4493 | .dbg_name = "audio_core_lpaif_pcm1_ebit_clk", |
| 4494 | .ops = &clk_ops_branch, |
| 4495 | CLK_INIT(audio_core_lpaif_pcm1_ebit_clk.c), |
| 4496 | }, |
| 4497 | }; |
| 4498 | |
| 4499 | static struct branch_clk audio_core_lpaif_pcm1_ibit_clk = { |
| 4500 | .cbcr_reg = AUDIO_CORE_LPAIF_PCM1_IBIT_CBCR, |
| 4501 | .parent = &audio_core_lpaif_pcm1_clk_src.c, |
| 4502 | .has_sibling = 1, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4503 | .base = &virt_bases[LPASS_BASE], |
| 4504 | .c = { |
| 4505 | .dbg_name = "audio_core_lpaif_pcm1_ibit_clk", |
| 4506 | .ops = &clk_ops_branch, |
| 4507 | CLK_INIT(audio_core_lpaif_pcm1_ibit_clk.c), |
| 4508 | }, |
| 4509 | }; |
| 4510 | |
Vikram Mulukutla | 1d25218 | 2012-07-13 10:51:44 -0700 | [diff] [blame] | 4511 | struct branch_clk audio_core_lpaif_pcmoe_clk = { |
| 4512 | .cbcr_reg = AUDIO_CORE_LPAIF_PCM_DATA_OE_CBCR, |
| 4513 | .parent = &audio_core_lpaif_pcmoe_clk_src.c, |
| 4514 | .base = &virt_bases[LPASS_BASE], |
| 4515 | .c = { |
| 4516 | .dbg_name = "audio_core_lpaif_pcmoe_clk", |
| 4517 | .ops = &clk_ops_branch, |
| 4518 | CLK_INIT(audio_core_lpaif_pcmoe_clk.c), |
| 4519 | }, |
| 4520 | }; |
| 4521 | |
Vikram Mulukutla | a967db4 | 2012-05-10 16:20:40 -0700 | [diff] [blame] | 4522 | static struct branch_clk q6ss_ahb_lfabif_clk = { |
| 4523 | .cbcr_reg = LPASS_Q6SS_AHB_LFABIF_CBCR, |
| 4524 | .has_sibling = 1, |
| 4525 | .base = &virt_bases[LPASS_BASE], |
| 4526 | .c = { |
| 4527 | .dbg_name = "q6ss_ahb_lfabif_clk", |
| 4528 | .ops = &clk_ops_branch, |
| 4529 | CLK_INIT(q6ss_ahb_lfabif_clk.c), |
| 4530 | }, |
| 4531 | }; |
| 4532 | |
Vikram Mulukutla | 6c0f1a7 | 2012-08-10 01:59:28 -0700 | [diff] [blame] | 4533 | static struct branch_clk audio_core_ixfabric_clk = { |
| 4534 | .cbcr_reg = AUDIO_CORE_IXFABRIC_CBCR, |
| 4535 | .has_sibling = 1, |
| 4536 | .base = &virt_bases[LPASS_BASE], |
| 4537 | .c = { |
| 4538 | .dbg_name = "audio_core_ixfabric_clk", |
| 4539 | .ops = &clk_ops_branch, |
| 4540 | CLK_INIT(audio_core_ixfabric_clk.c), |
| 4541 | }, |
| 4542 | }; |
| 4543 | |
Vikram Mulukutla | 3454e9e | 2012-08-11 20:18:42 -0700 | [diff] [blame] | 4544 | static struct branch_clk gcc_lpass_q6_axi_clk = { |
| 4545 | .cbcr_reg = LPASS_Q6_AXI_CBCR, |
| 4546 | .has_sibling = 1, |
| 4547 | .base = &virt_bases[GCC_BASE], |
| 4548 | .c = { |
| 4549 | .dbg_name = "gcc_lpass_q6_axi_clk", |
| 4550 | .ops = &clk_ops_branch, |
| 4551 | CLK_INIT(gcc_lpass_q6_axi_clk.c), |
| 4552 | }, |
| 4553 | }; |
| 4554 | |
Vikram Mulukutla | a967db4 | 2012-05-10 16:20:40 -0700 | [diff] [blame] | 4555 | static struct branch_clk q6ss_xo_clk = { |
| 4556 | .cbcr_reg = LPASS_Q6SS_XO_CBCR, |
| 4557 | .bcr_reg = LPASS_Q6SS_BCR, |
| 4558 | .has_sibling = 1, |
| 4559 | .base = &virt_bases[LPASS_BASE], |
| 4560 | .c = { |
| 4561 | .dbg_name = "q6ss_xo_clk", |
| 4562 | .ops = &clk_ops_branch, |
| 4563 | CLK_INIT(q6ss_xo_clk.c), |
| 4564 | }, |
| 4565 | }; |
| 4566 | |
Vikram Mulukutla | b5b311e | 2012-08-09 14:58:48 -0700 | [diff] [blame] | 4567 | static struct branch_clk q6ss_ahbm_clk = { |
| 4568 | .cbcr_reg = Q6SS_AHBM_CBCR, |
| 4569 | .has_sibling = 1, |
| 4570 | .base = &virt_bases[LPASS_BASE], |
| 4571 | .c = { |
| 4572 | .dbg_name = "q6ss_ahbm_clk", |
| 4573 | .ops = &clk_ops_branch, |
| 4574 | CLK_INIT(q6ss_ahbm_clk.c), |
| 4575 | }, |
| 4576 | }; |
| 4577 | |
Vikram Mulukutla | 97ac334 | 2012-08-21 12:55:13 -0700 | [diff] [blame] | 4578 | static struct branch_clk audio_wrapper_br_clk = { |
| 4579 | .cbcr_reg = AUDIO_WRAPPER_BR_CBCR, |
| 4580 | .has_sibling = 1, |
| 4581 | .base = &virt_bases[LPASS_BASE], |
| 4582 | .c = { |
| 4583 | .dbg_name = "audio_wrapper_br_clk", |
| 4584 | .ops = &clk_ops_branch, |
| 4585 | CLK_INIT(audio_wrapper_br_clk.c), |
| 4586 | }, |
| 4587 | }; |
| 4588 | |
Matt Wagantall | edf2fad | 2012-08-06 16:11:46 -0700 | [diff] [blame] | 4589 | static DEFINE_CLK_MEASURE(l2_m_clk); |
| 4590 | static DEFINE_CLK_MEASURE(krait0_m_clk); |
| 4591 | static DEFINE_CLK_MEASURE(krait1_m_clk); |
| 4592 | static DEFINE_CLK_MEASURE(krait2_m_clk); |
| 4593 | static DEFINE_CLK_MEASURE(krait3_m_clk); |
| 4594 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4595 | #ifdef CONFIG_DEBUG_FS |
| 4596 | |
| 4597 | struct measure_mux_entry { |
| 4598 | struct clk *c; |
| 4599 | int base; |
| 4600 | u32 debug_mux; |
| 4601 | }; |
| 4602 | |
| 4603 | struct measure_mux_entry measure_mux[] = { |
Vikram Mulukutla | 9cd8f0f | 2012-07-27 14:15:24 -0700 | [diff] [blame] | 4604 | {&gcc_pdm_ahb_clk.c, GCC_BASE, 0x00d0}, |
| 4605 | {&gcc_blsp2_qup1_i2c_apps_clk.c, GCC_BASE, 0x00ab}, |
| 4606 | {&gcc_blsp2_qup3_spi_apps_clk.c, GCC_BASE, 0x00b3}, |
| 4607 | {&gcc_blsp2_uart5_apps_clk.c, GCC_BASE, 0x00be}, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4608 | {&gcc_usb30_master_clk.c, GCC_BASE, 0x0050}, |
Vikram Mulukutla | 9cd8f0f | 2012-07-27 14:15:24 -0700 | [diff] [blame] | 4609 | {&gcc_blsp2_qup3_i2c_apps_clk.c, GCC_BASE, 0x00b4}, |
| 4610 | {&gcc_usb_hsic_system_clk.c, GCC_BASE, 0x0059}, |
| 4611 | {&gcc_blsp2_uart3_apps_clk.c, GCC_BASE, 0x00b5}, |
| 4612 | {&gcc_usb_hsic_io_cal_clk.c, GCC_BASE, 0x005b}, |
| 4613 | {&gcc_ce2_axi_clk.c, GCC_BASE, 0x0141}, |
| 4614 | {&gcc_sdcc3_ahb_clk.c, GCC_BASE, 0x0079}, |
| 4615 | {&gcc_blsp1_qup5_i2c_apps_clk.c, GCC_BASE, 0x009d}, |
| 4616 | {&gcc_blsp1_qup1_spi_apps_clk.c, GCC_BASE, 0x008a}, |
| 4617 | {&gcc_blsp2_uart4_apps_clk.c, GCC_BASE, 0x00ba}, |
| 4618 | {&gcc_ce2_clk.c, GCC_BASE, 0x0140}, |
| 4619 | {&gcc_blsp1_uart2_apps_clk.c, GCC_BASE, 0x0091}, |
| 4620 | {&gcc_sdcc1_ahb_clk.c, GCC_BASE, 0x0069}, |
| 4621 | {&gcc_mss_cfg_ahb_clk.c, GCC_BASE, 0x0030}, |
| 4622 | {&gcc_tsif_ahb_clk.c, GCC_BASE, 0x00e8}, |
| 4623 | {&gcc_sdcc4_ahb_clk.c, GCC_BASE, 0x0081}, |
| 4624 | {&gcc_blsp1_qup4_spi_apps_clk.c, GCC_BASE, 0x0098}, |
| 4625 | {&gcc_blsp2_qup4_spi_apps_clk.c, GCC_BASE, 0x00b8}, |
| 4626 | {&gcc_blsp1_qup3_spi_apps_clk.c, GCC_BASE, 0x0093}, |
| 4627 | {&gcc_blsp1_qup6_i2c_apps_clk.c, GCC_BASE, 0x00a2}, |
| 4628 | {&gcc_blsp2_qup6_i2c_apps_clk.c, GCC_BASE, 0x00c2}, |
| 4629 | {&gcc_bam_dma_ahb_clk.c, GCC_BASE, 0x00e0}, |
| 4630 | {&gcc_sdcc3_apps_clk.c, GCC_BASE, 0x0078}, |
| 4631 | {&gcc_usb_hs_system_clk.c, GCC_BASE, 0x0060}, |
| 4632 | {&gcc_blsp1_ahb_clk.c, GCC_BASE, 0x0088}, |
| 4633 | {&gcc_sdcc1_apps_clk.c, GCC_BASE, 0x0068}, |
| 4634 | {&gcc_blsp2_qup5_i2c_apps_clk.c, GCC_BASE, 0x00bd}, |
| 4635 | {&gcc_blsp1_uart4_apps_clk.c, GCC_BASE, 0x009a}, |
| 4636 | {&gcc_blsp2_qup2_spi_apps_clk.c, GCC_BASE, 0x00ae}, |
| 4637 | {&gcc_blsp2_qup6_spi_apps_clk.c, GCC_BASE, 0x00c1}, |
| 4638 | {&gcc_blsp2_uart2_apps_clk.c, GCC_BASE, 0x00b1}, |
| 4639 | {&gcc_blsp1_qup2_spi_apps_clk.c, GCC_BASE, 0x008e}, |
| 4640 | {&gcc_usb_hsic_ahb_clk.c, GCC_BASE, 0x0058}, |
| 4641 | {&gcc_blsp1_uart3_apps_clk.c, GCC_BASE, 0x0095}, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4642 | {&gcc_usb30_mock_utmi_clk.c, GCC_BASE, 0x0052}, |
Vikram Mulukutla | 9cd8f0f | 2012-07-27 14:15:24 -0700 | [diff] [blame] | 4643 | {&gcc_ce1_axi_clk.c, GCC_BASE, 0x0139}, |
| 4644 | {&gcc_sdcc4_apps_clk.c, GCC_BASE, 0x0080}, |
| 4645 | {&gcc_blsp1_qup5_spi_apps_clk.c, GCC_BASE, 0x009c}, |
| 4646 | {&gcc_usb_hs_ahb_clk.c, GCC_BASE, 0x0061}, |
| 4647 | {&gcc_blsp1_qup6_spi_apps_clk.c, GCC_BASE, 0x00a1}, |
| 4648 | {&gcc_blsp2_qup2_i2c_apps_clk.c, GCC_BASE, 0x00b0}, |
| 4649 | {&gcc_prng_ahb_clk.c, GCC_BASE, 0x00d8}, |
| 4650 | {&gcc_blsp1_qup3_i2c_apps_clk.c, GCC_BASE, 0x0094}, |
| 4651 | {&gcc_usb_hsic_clk.c, GCC_BASE, 0x005a}, |
| 4652 | {&gcc_blsp1_uart6_apps_clk.c, GCC_BASE, 0x00a3}, |
| 4653 | {&gcc_sdcc2_apps_clk.c, GCC_BASE, 0x0070}, |
| 4654 | {&gcc_tsif_ref_clk.c, GCC_BASE, 0x00e9}, |
| 4655 | {&gcc_blsp1_uart1_apps_clk.c, GCC_BASE, 0x008c}, |
| 4656 | {&gcc_blsp2_qup5_spi_apps_clk.c, GCC_BASE, 0x00bc}, |
| 4657 | {&gcc_blsp1_qup4_i2c_apps_clk.c, GCC_BASE, 0x0099}, |
| 4658 | {&gcc_mmss_noc_cfg_ahb_clk.c, GCC_BASE, 0x002a}, |
| 4659 | {&gcc_blsp2_ahb_clk.c, GCC_BASE, 0x00a8}, |
| 4660 | {&gcc_boot_rom_ahb_clk.c, GCC_BASE, 0x00f8}, |
| 4661 | {&gcc_ce1_ahb_clk.c, GCC_BASE, 0x013a}, |
| 4662 | {&gcc_pdm2_clk.c, GCC_BASE, 0x00d2}, |
| 4663 | {&gcc_blsp2_qup4_i2c_apps_clk.c, GCC_BASE, 0x00b9}, |
| 4664 | {&gcc_ce2_ahb_clk.c, GCC_BASE, 0x0142}, |
| 4665 | {&gcc_blsp1_uart5_apps_clk.c, GCC_BASE, 0x009e}, |
| 4666 | {&gcc_blsp2_qup1_spi_apps_clk.c, GCC_BASE, 0x00aa}, |
| 4667 | {&gcc_blsp1_qup2_i2c_apps_clk.c, GCC_BASE, 0x0090}, |
| 4668 | {&gcc_blsp2_uart1_apps_clk.c, GCC_BASE, 0x00ac}, |
| 4669 | {&gcc_blsp1_qup1_i2c_apps_clk.c, GCC_BASE, 0x008b}, |
| 4670 | {&gcc_blsp2_uart6_apps_clk.c, GCC_BASE, 0x00c3}, |
| 4671 | {&gcc_sdcc2_ahb_clk.c, GCC_BASE, 0x0071}, |
Vikram Mulukutla | 3b98a6d | 2012-08-15 20:35:25 -0700 | [diff] [blame] | 4672 | {&gcc_usb30_sleep_clk.c, GCC_BASE, 0x0051}, |
| 4673 | {&gcc_usb2a_phy_sleep_clk.c, GCC_BASE, 0x0063}, |
| 4674 | {&gcc_usb2b_phy_sleep_clk.c, GCC_BASE, 0x0064}, |
| 4675 | {&gcc_sys_noc_usb3_axi_clk.c, GCC_BASE, 0x0001}, |
Vikram Mulukutla | 9cd8f0f | 2012-07-27 14:15:24 -0700 | [diff] [blame] | 4676 | {&gcc_ocmem_noc_cfg_ahb_clk.c, GCC_BASE, 0x0029}, |
| 4677 | {&gcc_ce1_clk.c, GCC_BASE, 0x0138}, |
Vikram Mulukutla | 3454e9e | 2012-08-11 20:18:42 -0700 | [diff] [blame] | 4678 | {&gcc_lpass_q6_axi_clk.c, GCC_BASE, 0x0160}, |
Vikram Mulukutla | 31926eb | 2012-08-12 19:58:08 -0700 | [diff] [blame] | 4679 | {&gcc_mss_q6_bimc_axi_clk.c, GCC_BASE, 0x0031}, |
Vikram Mulukutla | b529473 | 2012-10-15 14:21:47 -0700 | [diff] [blame] | 4680 | {&cnoc_clk.c, GCC_BASE, 0x0008}, |
| 4681 | {&pnoc_clk.c, GCC_BASE, 0x0010}, |
| 4682 | {&snoc_clk.c, GCC_BASE, 0x0000}, |
| 4683 | {&bimc_clk.c, GCC_BASE, 0x0155}, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4684 | {&mmss_mmssnoc_axi_clk.c, MMSS_BASE, 0x0004}, |
Vikram Mulukutla | d08a152 | 2012-05-24 15:24:01 -0700 | [diff] [blame] | 4685 | {&ocmemnoc_clk.c, MMSS_BASE, 0x0007}, |
Vikram Mulukutla | 274b2d9 | 2012-07-13 15:53:04 -0700 | [diff] [blame] | 4686 | {&ocmemcx_ocmemnoc_clk.c, MMSS_BASE, 0x0009}, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4687 | {&camss_cci_cci_ahb_clk.c, MMSS_BASE, 0x002e}, |
| 4688 | {&camss_cci_cci_clk.c, MMSS_BASE, 0x002d}, |
| 4689 | {&camss_csi0_ahb_clk.c, MMSS_BASE, 0x0042}, |
| 4690 | {&camss_csi0_clk.c, MMSS_BASE, 0x0041}, |
| 4691 | {&camss_csi0phy_clk.c, MMSS_BASE, 0x0043}, |
| 4692 | {&camss_csi0pix_clk.c, MMSS_BASE, 0x0045}, |
| 4693 | {&camss_csi0rdi_clk.c, MMSS_BASE, 0x0044}, |
| 4694 | {&camss_csi1_ahb_clk.c, MMSS_BASE, 0x0047}, |
| 4695 | {&camss_csi1_clk.c, MMSS_BASE, 0x0046}, |
| 4696 | {&camss_csi1phy_clk.c, MMSS_BASE, 0x0048}, |
| 4697 | {&camss_csi1pix_clk.c, MMSS_BASE, 0x004a}, |
| 4698 | {&camss_csi1rdi_clk.c, MMSS_BASE, 0x0049}, |
| 4699 | {&camss_csi2_ahb_clk.c, MMSS_BASE, 0x004c}, |
| 4700 | {&camss_csi2_clk.c, MMSS_BASE, 0x004b}, |
| 4701 | {&camss_csi2phy_clk.c, MMSS_BASE, 0x004d}, |
| 4702 | {&camss_csi2pix_clk.c, MMSS_BASE, 0x004f}, |
| 4703 | {&camss_csi2rdi_clk.c, MMSS_BASE, 0x004e}, |
| 4704 | {&camss_csi3_ahb_clk.c, MMSS_BASE, 0x0051}, |
| 4705 | {&camss_csi3_clk.c, MMSS_BASE, 0x0050}, |
| 4706 | {&camss_csi3phy_clk.c, MMSS_BASE, 0x0052}, |
| 4707 | {&camss_csi3pix_clk.c, MMSS_BASE, 0x0054}, |
| 4708 | {&camss_csi3rdi_clk.c, MMSS_BASE, 0x0053}, |
| 4709 | {&camss_csi_vfe0_clk.c, MMSS_BASE, 0x003f}, |
| 4710 | {&camss_csi_vfe1_clk.c, MMSS_BASE, 0x0040}, |
| 4711 | {&camss_gp0_clk.c, MMSS_BASE, 0x0027}, |
| 4712 | {&camss_gp1_clk.c, MMSS_BASE, 0x0028}, |
| 4713 | {&camss_ispif_ahb_clk.c, MMSS_BASE, 0x0055}, |
| 4714 | {&camss_jpeg_jpeg0_clk.c, MMSS_BASE, 0x0032}, |
| 4715 | {&camss_jpeg_jpeg1_clk.c, MMSS_BASE, 0x0033}, |
| 4716 | {&camss_jpeg_jpeg2_clk.c, MMSS_BASE, 0x0034}, |
| 4717 | {&camss_jpeg_jpeg_ahb_clk.c, MMSS_BASE, 0x0035}, |
| 4718 | {&camss_jpeg_jpeg_axi_clk.c, MMSS_BASE, 0x0036}, |
| 4719 | {&camss_jpeg_jpeg_ocmemnoc_clk.c, MMSS_BASE, 0x0037}, |
| 4720 | {&camss_mclk0_clk.c, MMSS_BASE, 0x0029}, |
| 4721 | {&camss_mclk1_clk.c, MMSS_BASE, 0x002a}, |
| 4722 | {&camss_mclk2_clk.c, MMSS_BASE, 0x002b}, |
| 4723 | {&camss_mclk3_clk.c, MMSS_BASE, 0x002c}, |
| 4724 | {&camss_micro_ahb_clk.c, MMSS_BASE, 0x0026}, |
| 4725 | {&camss_phy0_csi0phytimer_clk.c, MMSS_BASE, 0x002f}, |
| 4726 | {&camss_phy1_csi1phytimer_clk.c, MMSS_BASE, 0x0030}, |
| 4727 | {&camss_phy2_csi2phytimer_clk.c, MMSS_BASE, 0x0031}, |
| 4728 | {&camss_top_ahb_clk.c, MMSS_BASE, 0x0025}, |
| 4729 | {&camss_vfe_cpp_ahb_clk.c, MMSS_BASE, 0x003b}, |
| 4730 | {&camss_vfe_cpp_clk.c, MMSS_BASE, 0x003a}, |
| 4731 | {&camss_vfe_vfe0_clk.c, MMSS_BASE, 0x0038}, |
| 4732 | {&camss_vfe_vfe1_clk.c, MMSS_BASE, 0x0039}, |
| 4733 | {&camss_vfe_vfe_ahb_clk.c, MMSS_BASE, 0x003c}, |
| 4734 | {&camss_vfe_vfe_axi_clk.c, MMSS_BASE, 0x003d}, |
| 4735 | {&camss_vfe_vfe_ocmemnoc_clk.c, MMSS_BASE, 0x003e}, |
Vikram Mulukutla | df04d53 | 2012-08-10 21:01:00 -0700 | [diff] [blame] | 4736 | {&oxilicx_axi_clk.c, MMSS_BASE, 0x000b}, |
| 4737 | {&oxilicx_ahb_clk.c, MMSS_BASE, 0x000c}, |
| 4738 | {&ocmemcx_ocmemnoc_clk.c, MMSS_BASE, 0x0009}, |
| 4739 | {&oxili_gfx3d_clk.c, MMSS_BASE, 0x000d}, |
| 4740 | {&venus0_axi_clk.c, MMSS_BASE, 0x000f}, |
| 4741 | {&venus0_ocmemnoc_clk.c, MMSS_BASE, 0x0010}, |
| 4742 | {&venus0_ahb_clk.c, MMSS_BASE, 0x0011}, |
| 4743 | {&venus0_vcodec0_clk.c, MMSS_BASE, 0x000e}, |
| 4744 | {&mmss_s0_axi_clk.c, MMSS_BASE, 0x0005}, |
| 4745 | {&mmssnoc_ahb_clk.c, MMSS_BASE, 0x0001}, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4746 | {&mdss_ahb_clk.c, MMSS_BASE, 0x0022}, |
| 4747 | {&mdss_hdmi_clk.c, MMSS_BASE, 0x001d}, |
| 4748 | {&mdss_mdp_clk.c, MMSS_BASE, 0x0014}, |
| 4749 | {&mdss_mdp_lut_clk.c, MMSS_BASE, 0x0015}, |
| 4750 | {&mdss_axi_clk.c, MMSS_BASE, 0x0024}, |
| 4751 | {&mdss_vsync_clk.c, MMSS_BASE, 0x001c}, |
| 4752 | {&mdss_esc0_clk.c, MMSS_BASE, 0x0020}, |
| 4753 | {&mdss_esc1_clk.c, MMSS_BASE, 0x0021}, |
| 4754 | {&mdss_edpaux_clk.c, MMSS_BASE, 0x001b}, |
| 4755 | {&mdss_byte0_clk.c, MMSS_BASE, 0x001e}, |
| 4756 | {&mdss_byte1_clk.c, MMSS_BASE, 0x001f}, |
| 4757 | {&mdss_edplink_clk.c, MMSS_BASE, 0x001a}, |
| 4758 | {&mdss_edppixel_clk.c, MMSS_BASE, 0x0019}, |
| 4759 | {&mdss_extpclk_clk.c, MMSS_BASE, 0x0018}, |
| 4760 | {&mdss_hdmi_ahb_clk.c, MMSS_BASE, 0x0023}, |
| 4761 | {&mdss_pclk0_clk.c, MMSS_BASE, 0x0016}, |
| 4762 | {&mdss_pclk1_clk.c, MMSS_BASE, 0x0017}, |
| 4763 | {&audio_core_lpaif_pri_clk_src.c, LPASS_BASE, 0x0017}, |
| 4764 | {&audio_core_lpaif_sec_clk_src.c, LPASS_BASE, 0x0016}, |
| 4765 | {&audio_core_lpaif_ter_clk_src.c, LPASS_BASE, 0x0015}, |
| 4766 | {&audio_core_lpaif_quad_clk_src.c, LPASS_BASE, 0x0014}, |
| 4767 | {&audio_core_lpaif_pcm0_clk_src.c, LPASS_BASE, 0x0013}, |
| 4768 | {&audio_core_lpaif_pcm1_clk_src.c, LPASS_BASE, 0x0012}, |
Vikram Mulukutla | 1d25218 | 2012-07-13 10:51:44 -0700 | [diff] [blame] | 4769 | {&audio_core_lpaif_pcmoe_clk_src.c, LPASS_BASE, 0x000f}, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4770 | {&audio_core_slimbus_core_clk.c, LPASS_BASE, 0x003d}, |
| 4771 | {&audio_core_slimbus_lfabif_clk.c, LPASS_BASE, 0x003e}, |
Vikram Mulukutla | a967db4 | 2012-05-10 16:20:40 -0700 | [diff] [blame] | 4772 | {&q6ss_xo_clk.c, LPASS_BASE, 0x002b}, |
| 4773 | {&q6ss_ahb_lfabif_clk.c, LPASS_BASE, 0x001e}, |
Vikram Mulukutla | b5b311e | 2012-08-09 14:58:48 -0700 | [diff] [blame] | 4774 | {&q6ss_ahbm_clk.c, LPASS_BASE, 0x001d}, |
Vikram Mulukutla | 6c0f1a7 | 2012-08-10 01:59:28 -0700 | [diff] [blame] | 4775 | {&audio_core_ixfabric_clk.c, LPASS_BASE, 0x0059}, |
Vikram Mulukutla | 97ac334 | 2012-08-21 12:55:13 -0700 | [diff] [blame] | 4776 | {&audio_wrapper_br_clk.c, LPASS_BASE, 0x0022}, |
Vikram Mulukutla | a967db4 | 2012-05-10 16:20:40 -0700 | [diff] [blame] | 4777 | |
Matt Wagantall | edf2fad | 2012-08-06 16:11:46 -0700 | [diff] [blame] | 4778 | {&l2_m_clk, APCS_BASE, 0x0081}, |
| 4779 | {&krait0_m_clk, APCS_BASE, 0x0080}, |
| 4780 | {&krait1_m_clk, APCS_BASE, 0x0088}, |
| 4781 | {&krait2_m_clk, APCS_BASE, 0x0090}, |
| 4782 | {&krait3_m_clk, APCS_BASE, 0x0098}, |
| 4783 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4784 | {&dummy_clk, N_BASES, 0x0000}, |
| 4785 | }; |
| 4786 | |
| 4787 | static int measure_clk_set_parent(struct clk *c, struct clk *parent) |
| 4788 | { |
| 4789 | struct measure_clk *clk = to_measure_clk(c); |
| 4790 | unsigned long flags; |
| 4791 | u32 regval, clk_sel, i; |
| 4792 | |
| 4793 | if (!parent) |
| 4794 | return -EINVAL; |
| 4795 | |
| 4796 | for (i = 0; i < (ARRAY_SIZE(measure_mux) - 1); i++) |
| 4797 | if (measure_mux[i].c == parent) |
| 4798 | break; |
| 4799 | |
| 4800 | if (measure_mux[i].c == &dummy_clk) |
| 4801 | return -EINVAL; |
| 4802 | |
| 4803 | spin_lock_irqsave(&local_clock_reg_lock, flags); |
| 4804 | /* |
| 4805 | * Program the test vector, measurement period (sample_ticks) |
| 4806 | * and scaling multiplier. |
| 4807 | */ |
| 4808 | clk->sample_ticks = 0x10000; |
| 4809 | clk->multiplier = 1; |
| 4810 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4811 | switch (measure_mux[i].base) { |
| 4812 | |
| 4813 | case GCC_BASE: |
Vikram Mulukutla | ae7cfdb | 2012-08-10 15:30:21 -0700 | [diff] [blame] | 4814 | writel_relaxed(0, GCC_REG_BASE(GCC_DEBUG_CLK_CTL_REG)); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4815 | clk_sel = measure_mux[i].debug_mux; |
| 4816 | break; |
| 4817 | |
| 4818 | case MMSS_BASE: |
Vikram Mulukutla | ae7cfdb | 2012-08-10 15:30:21 -0700 | [diff] [blame] | 4819 | writel_relaxed(0, MMSS_REG_BASE(MMSS_DEBUG_CLK_CTL_REG)); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4820 | clk_sel = 0x02C; |
| 4821 | regval = BVAL(11, 0, measure_mux[i].debug_mux); |
| 4822 | writel_relaxed(regval, MMSS_REG_BASE(MMSS_DEBUG_CLK_CTL_REG)); |
| 4823 | |
| 4824 | /* Activate debug clock output */ |
| 4825 | regval |= BIT(16); |
| 4826 | writel_relaxed(regval, MMSS_REG_BASE(MMSS_DEBUG_CLK_CTL_REG)); |
| 4827 | break; |
| 4828 | |
| 4829 | case LPASS_BASE: |
Vikram Mulukutla | ae7cfdb | 2012-08-10 15:30:21 -0700 | [diff] [blame] | 4830 | writel_relaxed(0, LPASS_REG_BASE(LPASS_DEBUG_CLK_CTL_REG)); |
Vikram Mulukutla | 9353701 | 2012-08-08 14:44:33 -0700 | [diff] [blame] | 4831 | clk_sel = 0x161; |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4832 | regval = BVAL(11, 0, measure_mux[i].debug_mux); |
| 4833 | writel_relaxed(regval, LPASS_REG_BASE(LPASS_DEBUG_CLK_CTL_REG)); |
| 4834 | |
| 4835 | /* Activate debug clock output */ |
Vikram Mulukutla | 9353701 | 2012-08-08 14:44:33 -0700 | [diff] [blame] | 4836 | regval |= BIT(20); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4837 | writel_relaxed(regval, LPASS_REG_BASE(LPASS_DEBUG_CLK_CTL_REG)); |
| 4838 | break; |
| 4839 | |
Matt Wagantall | edf2fad | 2012-08-06 16:11:46 -0700 | [diff] [blame] | 4840 | case APCS_BASE: |
| 4841 | clk->multiplier = 4; |
| 4842 | clk_sel = 0x16A; |
| 4843 | regval = measure_mux[i].debug_mux; |
| 4844 | writel_relaxed(regval, APCS_REG_BASE(GLB_CLK_DIAG_REG)); |
| 4845 | break; |
| 4846 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4847 | default: |
| 4848 | return -EINVAL; |
| 4849 | } |
| 4850 | |
| 4851 | /* Set debug mux clock index */ |
| 4852 | regval = BVAL(8, 0, clk_sel); |
| 4853 | writel_relaxed(regval, GCC_REG_BASE(GCC_DEBUG_CLK_CTL_REG)); |
| 4854 | |
| 4855 | /* Activate debug clock output */ |
| 4856 | regval |= BIT(16); |
| 4857 | writel_relaxed(regval, GCC_REG_BASE(GCC_DEBUG_CLK_CTL_REG)); |
| 4858 | |
| 4859 | /* Make sure test vector is set before starting measurements. */ |
| 4860 | mb(); |
| 4861 | spin_unlock_irqrestore(&local_clock_reg_lock, flags); |
| 4862 | |
| 4863 | return 0; |
| 4864 | } |
| 4865 | |
| 4866 | /* Sample clock for 'ticks' reference clock ticks. */ |
| 4867 | static u32 run_measurement(unsigned ticks) |
| 4868 | { |
| 4869 | /* Stop counters and set the XO4 counter start value. */ |
| 4870 | writel_relaxed(ticks, GCC_REG_BASE(CLOCK_FRQ_MEASURE_CTL_REG)); |
| 4871 | |
| 4872 | /* Wait for timer to become ready. */ |
| 4873 | while ((readl_relaxed(GCC_REG_BASE(CLOCK_FRQ_MEASURE_STATUS_REG)) & |
| 4874 | BIT(25)) != 0) |
| 4875 | cpu_relax(); |
| 4876 | |
| 4877 | /* Run measurement and wait for completion. */ |
| 4878 | writel_relaxed(BIT(20)|ticks, GCC_REG_BASE(CLOCK_FRQ_MEASURE_CTL_REG)); |
| 4879 | while ((readl_relaxed(GCC_REG_BASE(CLOCK_FRQ_MEASURE_STATUS_REG)) & |
| 4880 | BIT(25)) == 0) |
| 4881 | cpu_relax(); |
| 4882 | |
| 4883 | /* Return measured ticks. */ |
| 4884 | return readl_relaxed(GCC_REG_BASE(CLOCK_FRQ_MEASURE_STATUS_REG)) & |
| 4885 | BM(24, 0); |
| 4886 | } |
| 4887 | |
| 4888 | /* |
| 4889 | * Perform a hardware rate measurement for a given clock. |
| 4890 | * FOR DEBUG USE ONLY: Measurements take ~15 ms! |
| 4891 | */ |
| 4892 | static unsigned long measure_clk_get_rate(struct clk *c) |
| 4893 | { |
| 4894 | unsigned long flags; |
| 4895 | u32 gcc_xo4_reg_backup; |
| 4896 | u64 raw_count_short, raw_count_full; |
| 4897 | struct measure_clk *clk = to_measure_clk(c); |
| 4898 | unsigned ret; |
| 4899 | |
| 4900 | ret = clk_prepare_enable(&cxo_clk_src.c); |
| 4901 | if (ret) { |
| 4902 | pr_warning("CXO clock failed to enable. Can't measure\n"); |
| 4903 | return 0; |
| 4904 | } |
| 4905 | |
| 4906 | spin_lock_irqsave(&local_clock_reg_lock, flags); |
| 4907 | |
| 4908 | /* Enable CXO/4 and RINGOSC branch. */ |
| 4909 | gcc_xo4_reg_backup = readl_relaxed(GCC_REG_BASE(GCC_XO_DIV4_CBCR_REG)); |
| 4910 | writel_relaxed(0x1, GCC_REG_BASE(GCC_XO_DIV4_CBCR_REG)); |
| 4911 | |
| 4912 | /* |
| 4913 | * The ring oscillator counter will not reset if the measured clock |
| 4914 | * is not running. To detect this, run a short measurement before |
| 4915 | * the full measurement. If the raw results of the two are the same |
| 4916 | * then the clock must be off. |
| 4917 | */ |
| 4918 | |
| 4919 | /* Run a short measurement. (~1 ms) */ |
| 4920 | raw_count_short = run_measurement(0x1000); |
| 4921 | /* Run a full measurement. (~14 ms) */ |
| 4922 | raw_count_full = run_measurement(clk->sample_ticks); |
| 4923 | |
| 4924 | writel_relaxed(gcc_xo4_reg_backup, GCC_REG_BASE(GCC_XO_DIV4_CBCR_REG)); |
| 4925 | |
| 4926 | /* Return 0 if the clock is off. */ |
| 4927 | if (raw_count_full == raw_count_short) { |
| 4928 | ret = 0; |
| 4929 | } else { |
| 4930 | /* Compute rate in Hz. */ |
| 4931 | raw_count_full = ((raw_count_full * 10) + 15) * 4800000; |
| 4932 | do_div(raw_count_full, ((clk->sample_ticks * 10) + 35)); |
| 4933 | ret = (raw_count_full * clk->multiplier); |
| 4934 | } |
| 4935 | |
Matt Wagantall | 9a9b6f0 | 2012-08-07 23:12:26 -0700 | [diff] [blame] | 4936 | writel_relaxed(0x51A00, GCC_REG_BASE(GCC_PLLTEST_PAD_CFG_REG)); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4937 | spin_unlock_irqrestore(&local_clock_reg_lock, flags); |
| 4938 | |
| 4939 | clk_disable_unprepare(&cxo_clk_src.c); |
| 4940 | |
| 4941 | return ret; |
| 4942 | } |
| 4943 | #else /* !CONFIG_DEBUG_FS */ |
| 4944 | static int measure_clk_set_parent(struct clk *clk, struct clk *parent) |
| 4945 | { |
| 4946 | return -EINVAL; |
| 4947 | } |
| 4948 | |
| 4949 | static unsigned long measure_clk_get_rate(struct clk *clk) |
| 4950 | { |
| 4951 | return 0; |
| 4952 | } |
| 4953 | #endif /* CONFIG_DEBUG_FS */ |
| 4954 | |
Matt Wagantall | ae05322 | 2012-05-14 19:42:07 -0700 | [diff] [blame] | 4955 | static struct clk_ops clk_ops_measure = { |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4956 | .set_parent = measure_clk_set_parent, |
| 4957 | .get_rate = measure_clk_get_rate, |
| 4958 | }; |
| 4959 | |
| 4960 | static struct measure_clk measure_clk = { |
| 4961 | .c = { |
| 4962 | .dbg_name = "measure_clk", |
Matt Wagantall | ae05322 | 2012-05-14 19:42:07 -0700 | [diff] [blame] | 4963 | .ops = &clk_ops_measure, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 4964 | CLK_INIT(measure_clk.c), |
| 4965 | }, |
| 4966 | .multiplier = 1, |
| 4967 | }; |
| 4968 | |
Vikram Mulukutla | 19245e0 | 2012-07-23 15:58:04 -0700 | [diff] [blame] | 4969 | |
| 4970 | static struct clk_lookup msm_clocks_8974_rumi[] = { |
| 4971 | CLK_LOOKUP("iface_clk", gcc_sdcc1_ahb_clk.c, "msm_sdcc.1"), |
| 4972 | CLK_LOOKUP("core_clk", gcc_sdcc1_apps_clk.c, "msm_sdcc.1"), |
| 4973 | CLK_LOOKUP("bus_clk", pnoc_sdcc1_clk.c, "msm_sdcc.1"), |
| 4974 | CLK_LOOKUP("iface_clk", gcc_sdcc2_ahb_clk.c, "msm_sdcc.2"), |
| 4975 | CLK_LOOKUP("core_clk", gcc_sdcc2_apps_clk.c, "msm_sdcc.2"), |
| 4976 | CLK_LOOKUP("bus_clk", pnoc_sdcc2_clk.c, "msm_sdcc.2"), |
| 4977 | CLK_LOOKUP("iface_clk", gcc_sdcc3_ahb_clk.c, "msm_sdcc.3"), |
| 4978 | CLK_LOOKUP("core_clk", gcc_sdcc3_apps_clk.c, "msm_sdcc.3"), |
| 4979 | CLK_LOOKUP("bus_clk", pnoc_sdcc3_clk.c, "msm_sdcc.3"), |
| 4980 | CLK_LOOKUP("iface_clk", gcc_sdcc4_ahb_clk.c, "msm_sdcc.4"), |
| 4981 | CLK_LOOKUP("core_clk", gcc_sdcc4_apps_clk.c, "msm_sdcc.4"), |
| 4982 | CLK_LOOKUP("bus_clk", pnoc_sdcc4_clk.c, "msm_sdcc.4"), |
| 4983 | CLK_DUMMY("xo", XO_CLK, NULL, OFF), |
| 4984 | CLK_DUMMY("xo", XO_CLK, "pil_pronto", OFF), |
Stepan Moskovchenko | f97dede7 | 2012-08-08 17:40:44 -0700 | [diff] [blame] | 4985 | CLK_DUMMY("core_clk", BLSP2_UART_CLK, "f991f000.serial", OFF), |
| 4986 | CLK_DUMMY("iface_clk", BLSP2_UART_CLK, "f991f000.serial", OFF), |
Vikram Mulukutla | 19245e0 | 2012-07-23 15:58:04 -0700 | [diff] [blame] | 4987 | CLK_DUMMY("core_clk", SDC1_CLK, NULL, OFF), |
| 4988 | CLK_DUMMY("iface_clk", SDC1_P_CLK, NULL, OFF), |
| 4989 | CLK_DUMMY("core_clk", SDC3_CLK, NULL, OFF), |
| 4990 | CLK_DUMMY("iface_clk", SDC3_P_CLK, NULL, OFF), |
| 4991 | CLK_DUMMY("phy_clk", NULL, "msm_otg", OFF), |
| 4992 | CLK_DUMMY("core_clk", NULL, "msm_otg", OFF), |
| 4993 | CLK_DUMMY("iface_clk", NULL, "msm_otg", OFF), |
| 4994 | CLK_DUMMY("xo", NULL, "msm_otg", OFF), |
| 4995 | CLK_DUMMY("dfab_clk", DFAB_CLK, NULL, 0), |
| 4996 | CLK_DUMMY("dma_bam_pclk", DMA_BAM_P_CLK, NULL, 0), |
| 4997 | CLK_DUMMY("mem_clk", NULL, NULL, 0), |
| 4998 | CLK_DUMMY("core_clk", SPI_CLK, "spi_qsd.1", OFF), |
| 4999 | CLK_DUMMY("iface_clk", SPI_P_CLK, "spi_qsd.1", OFF), |
| 5000 | CLK_DUMMY("core_clk", NULL, "f9966000.i2c", 0), |
| 5001 | CLK_DUMMY("iface_clk", NULL, "f9966000.i2c", 0), |
| 5002 | CLK_DUMMY("core_clk", NULL, "fe12f000.slim", OFF), |
| 5003 | CLK_DUMMY("core_clk", "mdp.0", NULL, 0), |
| 5004 | CLK_DUMMY("core_clk_src", "mdp.0", NULL, 0), |
| 5005 | CLK_DUMMY("lut_clk", "mdp.0", NULL, 0), |
| 5006 | CLK_DUMMY("vsync_clk", "mdp.0", NULL, 0), |
| 5007 | CLK_DUMMY("iface_clk", "mdp.0", NULL, 0), |
| 5008 | CLK_DUMMY("bus_clk", "mdp.0", NULL, 0), |
| 5009 | }; |
| 5010 | |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 5011 | static struct clk_lookup msm_clocks_8974[] = { |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5012 | CLK_LOOKUP("xo", cxo_clk_src.c, "msm_otg"), |
| 5013 | CLK_LOOKUP("xo", cxo_clk_src.c, "pil-q6v5-lpass"), |
Matt Wagantall | 4e2599e | 2012-03-21 22:31:35 -0700 | [diff] [blame] | 5014 | CLK_LOOKUP("xo", cxo_clk_src.c, "pil-q6v5-mss"), |
Matt Wagantall | e6e00d5 | 2012-03-08 17:39:07 -0800 | [diff] [blame] | 5015 | CLK_LOOKUP("xo", cxo_clk_src.c, "pil-mba"), |
Sameer Thalappil | 8d686d4 | 2012-08-24 10:07:31 -0700 | [diff] [blame] | 5016 | CLK_LOOKUP("xo", cxo_clk_src.c, "fb000000.qcom,wcnss-wlan"), |
Tianyi Gou | 4307d6c | 2012-05-31 18:36:07 -0700 | [diff] [blame] | 5017 | CLK_LOOKUP("xo", cxo_clk_src.c, "pil_pronto"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5018 | CLK_LOOKUP("measure", measure_clk.c, "debug"), |
| 5019 | |
| 5020 | CLK_LOOKUP("dma_bam_pclk", gcc_bam_dma_ahb_clk.c, "msm_sps"), |
Stepan Moskovchenko | f97dede7 | 2012-08-08 17:40:44 -0700 | [diff] [blame] | 5021 | CLK_LOOKUP("iface_clk", gcc_blsp1_ahb_clk.c, "f991f000.serial"), |
Amy Maloche | bc7e967 | 2012-08-15 10:30:40 -0700 | [diff] [blame] | 5022 | CLK_LOOKUP("iface_clk", gcc_blsp1_ahb_clk.c, "f9924000.i2c"), |
Stepan Moskovchenko | 5269b60 | 2012-08-08 17:57:09 -0700 | [diff] [blame] | 5023 | CLK_LOOKUP("iface_clk", gcc_blsp1_ahb_clk.c, "f991e000.serial"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5024 | CLK_LOOKUP("core_clk", gcc_blsp1_qup1_i2c_apps_clk.c, ""), |
Amy Maloche | bc7e967 | 2012-08-15 10:30:40 -0700 | [diff] [blame] | 5025 | CLK_LOOKUP("core_clk", gcc_blsp1_qup2_i2c_apps_clk.c, "f9924000.i2c"), |
| 5026 | CLK_LOOKUP("core_clk", gcc_blsp1_qup2_spi_apps_clk.c, ""), |
Subbaraman Narayanamurthy | 3f93ab1 | 2012-08-17 19:39:47 -0700 | [diff] [blame] | 5027 | CLK_LOOKUP("core_clk", gcc_blsp1_qup1_spi_apps_clk.c, "f9923000.spi"), |
| 5028 | CLK_LOOKUP("iface_clk", gcc_blsp1_ahb_clk.c, "f9923000.spi"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5029 | CLK_LOOKUP("core_clk", gcc_blsp1_qup3_i2c_apps_clk.c, ""), |
| 5030 | CLK_LOOKUP("core_clk", gcc_blsp1_qup3_spi_apps_clk.c, ""), |
| 5031 | CLK_LOOKUP("core_clk", gcc_blsp1_qup4_i2c_apps_clk.c, ""), |
| 5032 | CLK_LOOKUP("core_clk", gcc_blsp1_qup4_spi_apps_clk.c, ""), |
| 5033 | CLK_LOOKUP("core_clk", gcc_blsp1_qup5_i2c_apps_clk.c, ""), |
| 5034 | CLK_LOOKUP("core_clk", gcc_blsp1_qup5_spi_apps_clk.c, ""), |
| 5035 | CLK_LOOKUP("core_clk", gcc_blsp1_qup6_i2c_apps_clk.c, ""), |
| 5036 | CLK_LOOKUP("core_clk", gcc_blsp1_qup6_spi_apps_clk.c, ""), |
| 5037 | CLK_LOOKUP("core_clk", gcc_blsp1_uart1_apps_clk.c, ""), |
Stepan Moskovchenko | 5269b60 | 2012-08-08 17:57:09 -0700 | [diff] [blame] | 5038 | CLK_LOOKUP("core_clk", gcc_blsp1_uart2_apps_clk.c, "f991e000.serial"), |
Stepan Moskovchenko | f97dede7 | 2012-08-08 17:40:44 -0700 | [diff] [blame] | 5039 | CLK_LOOKUP("core_clk", gcc_blsp1_uart3_apps_clk.c, "f991f000.serial"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5040 | CLK_LOOKUP("core_clk", gcc_blsp1_uart4_apps_clk.c, ""), |
| 5041 | CLK_LOOKUP("core_clk", gcc_blsp1_uart5_apps_clk.c, ""), |
| 5042 | CLK_LOOKUP("core_clk", gcc_blsp1_uart6_apps_clk.c, ""), |
| 5043 | |
Sagar Dharia | 8a73da9 | 2012-08-11 16:41:25 -0600 | [diff] [blame] | 5044 | CLK_LOOKUP("iface_clk", gcc_blsp2_ahb_clk.c, "f9967000.i2c"), |
Sagar Dharia | e0bb650 | 2012-08-10 20:25:51 -0600 | [diff] [blame] | 5045 | CLK_LOOKUP("iface_clk", gcc_blsp2_ahb_clk.c, "f9966000.spi"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5046 | CLK_LOOKUP("iface_clk", gcc_blsp2_ahb_clk.c, "f995e000.serial"), |
| 5047 | CLK_LOOKUP("core_clk", gcc_blsp2_qup1_i2c_apps_clk.c, ""), |
| 5048 | CLK_LOOKUP("core_clk", gcc_blsp2_qup1_spi_apps_clk.c, ""), |
| 5049 | CLK_LOOKUP("core_clk", gcc_blsp2_qup2_i2c_apps_clk.c, ""), |
| 5050 | CLK_LOOKUP("core_clk", gcc_blsp2_qup2_spi_apps_clk.c, ""), |
Vikram Mulukutla | 82da88d | 2012-05-04 11:24:03 -0700 | [diff] [blame] | 5051 | CLK_LOOKUP("core_clk", gcc_blsp2_qup3_i2c_apps_clk.c, ""), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5052 | CLK_LOOKUP("core_clk", gcc_blsp2_qup3_spi_apps_clk.c, ""), |
Sagar Dharia | 8a73da9 | 2012-08-11 16:41:25 -0600 | [diff] [blame] | 5053 | CLK_LOOKUP("core_clk", gcc_blsp2_qup4_i2c_apps_clk.c, ""), |
Sagar Dharia | 8a73da9 | 2012-08-11 16:41:25 -0600 | [diff] [blame] | 5054 | CLK_LOOKUP("core_clk", gcc_blsp2_qup5_i2c_apps_clk.c, "f9967000.i2c"), |
Sagar Dharia | e0bb650 | 2012-08-10 20:25:51 -0600 | [diff] [blame] | 5055 | CLK_LOOKUP("core_clk", gcc_blsp2_qup4_spi_apps_clk.c, "f9966000.spi"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5056 | CLK_LOOKUP("core_clk", gcc_blsp2_qup5_spi_apps_clk.c, ""), |
| 5057 | CLK_LOOKUP("core_clk", gcc_blsp2_qup6_i2c_apps_clk.c, ""), |
| 5058 | CLK_LOOKUP("core_clk", gcc_blsp2_qup6_spi_apps_clk.c, ""), |
Vikram Mulukutla | 82da88d | 2012-05-04 11:24:03 -0700 | [diff] [blame] | 5059 | CLK_LOOKUP("core_clk", gcc_blsp2_uart1_apps_clk.c, ""), |
| 5060 | CLK_LOOKUP("core_clk", gcc_blsp2_uart2_apps_clk.c, "f995e000.serial"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5061 | CLK_LOOKUP("core_clk", gcc_blsp2_uart3_apps_clk.c, ""), |
| 5062 | CLK_LOOKUP("core_clk", gcc_blsp2_uart4_apps_clk.c, ""), |
| 5063 | CLK_LOOKUP("core_clk", gcc_blsp2_uart5_apps_clk.c, ""), |
| 5064 | CLK_LOOKUP("core_clk", gcc_blsp2_uart6_apps_clk.c, ""), |
| 5065 | |
Vikram Mulukutla | 3f580f8 | 2012-09-04 15:22:42 -0700 | [diff] [blame] | 5066 | CLK_LOOKUP("core_clk_src", ce1_clk_src.c, ""), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5067 | CLK_LOOKUP("core_clk", gcc_ce1_clk.c, ""), |
| 5068 | CLK_LOOKUP("core_clk", gcc_ce2_clk.c, ""), |
| 5069 | CLK_LOOKUP("iface_clk", gcc_ce1_ahb_clk.c, ""), |
| 5070 | CLK_LOOKUP("iface_clk", gcc_ce2_ahb_clk.c, ""), |
| 5071 | CLK_LOOKUP("bus_clk", gcc_ce1_axi_clk.c, ""), |
| 5072 | CLK_LOOKUP("bus_clk", gcc_ce2_axi_clk.c, ""), |
| 5073 | |
Mona Hossain | b43e94b | 2012-05-07 08:52:06 -0700 | [diff] [blame] | 5074 | CLK_LOOKUP("core_clk", gcc_ce2_clk.c, "qcedev.0"), |
| 5075 | CLK_LOOKUP("iface_clk", gcc_ce2_ahb_clk.c, "qcedev.0"), |
| 5076 | CLK_LOOKUP("bus_clk", gcc_ce2_axi_clk.c, "qcedev.0"), |
| 5077 | CLK_LOOKUP("core_clk_src", ce2_clk_src.c, "qcedev.0"), |
| 5078 | |
| 5079 | CLK_LOOKUP("core_clk", gcc_ce2_clk.c, "qcrypto.0"), |
| 5080 | CLK_LOOKUP("iface_clk", gcc_ce2_ahb_clk.c, "qcrypto.0"), |
| 5081 | CLK_LOOKUP("bus_clk", gcc_ce2_axi_clk.c, "qcrypto.0"), |
| 5082 | CLK_LOOKUP("core_clk_src", ce2_clk_src.c, "qcrypto.0"), |
| 5083 | |
Ramesh Masavarapu | ff37703 | 2012-09-14 12:11:32 -0700 | [diff] [blame] | 5084 | CLK_LOOKUP("core_clk", gcc_ce1_clk.c, "qseecom"), |
| 5085 | CLK_LOOKUP("iface_clk", gcc_ce1_ahb_clk.c, "qseecom"), |
| 5086 | CLK_LOOKUP("bus_clk", gcc_ce1_axi_clk.c, "qseecom"), |
| 5087 | CLK_LOOKUP("core_clk_src", ce1_clk_src.c, "qseecom"), |
| 5088 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5089 | CLK_LOOKUP("core_clk", gcc_gp1_clk.c, ""), |
| 5090 | CLK_LOOKUP("core_clk", gcc_gp2_clk.c, ""), |
| 5091 | CLK_LOOKUP("core_clk", gcc_gp3_clk.c, ""), |
| 5092 | |
| 5093 | CLK_LOOKUP("core_clk", gcc_pdm2_clk.c, ""), |
| 5094 | CLK_LOOKUP("iface_clk", gcc_pdm_ahb_clk.c, ""), |
| 5095 | CLK_LOOKUP("iface_clk", gcc_prng_ahb_clk.c, ""), |
| 5096 | |
| 5097 | CLK_LOOKUP("iface_clk", gcc_sdcc1_ahb_clk.c, "msm_sdcc.1"), |
| 5098 | CLK_LOOKUP("core_clk", gcc_sdcc1_apps_clk.c, "msm_sdcc.1"), |
Sujit Reddy Thumma | 5024749 | 2012-06-18 09:39:36 +0530 | [diff] [blame] | 5099 | CLK_LOOKUP("bus_clk", pnoc_sdcc1_clk.c, "msm_sdcc.1"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5100 | CLK_LOOKUP("iface_clk", gcc_sdcc2_ahb_clk.c, "msm_sdcc.2"), |
| 5101 | CLK_LOOKUP("core_clk", gcc_sdcc2_apps_clk.c, "msm_sdcc.2"), |
Sujit Reddy Thumma | 5024749 | 2012-06-18 09:39:36 +0530 | [diff] [blame] | 5102 | CLK_LOOKUP("bus_clk", pnoc_sdcc2_clk.c, "msm_sdcc.2"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5103 | CLK_LOOKUP("iface_clk", gcc_sdcc3_ahb_clk.c, "msm_sdcc.3"), |
| 5104 | CLK_LOOKUP("core_clk", gcc_sdcc3_apps_clk.c, "msm_sdcc.3"), |
Sujit Reddy Thumma | 5024749 | 2012-06-18 09:39:36 +0530 | [diff] [blame] | 5105 | CLK_LOOKUP("bus_clk", pnoc_sdcc3_clk.c, "msm_sdcc.3"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5106 | CLK_LOOKUP("iface_clk", gcc_sdcc4_ahb_clk.c, "msm_sdcc.4"), |
| 5107 | CLK_LOOKUP("core_clk", gcc_sdcc4_apps_clk.c, "msm_sdcc.4"), |
Sujit Reddy Thumma | 5024749 | 2012-06-18 09:39:36 +0530 | [diff] [blame] | 5108 | CLK_LOOKUP("bus_clk", pnoc_sdcc4_clk.c, "msm_sdcc.4"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5109 | |
| 5110 | CLK_LOOKUP("iface_clk", gcc_tsif_ahb_clk.c, ""), |
| 5111 | CLK_LOOKUP("ref_clk", gcc_tsif_ref_clk.c, ""), |
| 5112 | |
Manu Gautam | 1fd82ac | 2012-08-22 10:27:36 -0700 | [diff] [blame] | 5113 | CLK_LOOKUP("mem_clk", gcc_usb30_master_clk.c, "usb_bam"), |
| 5114 | CLK_LOOKUP("mem_iface_clk", gcc_sys_noc_usb3_axi_clk.c, "usb_bam"), |
Manu Gautam | 51be971 | 2012-06-06 14:54:52 +0530 | [diff] [blame] | 5115 | CLK_LOOKUP("core_clk", gcc_usb30_master_clk.c, "msm_dwc3"), |
| 5116 | CLK_LOOKUP("utmi_clk", gcc_usb30_mock_utmi_clk.c, "msm_dwc3"), |
Vikram Mulukutla | 3b98a6d | 2012-08-15 20:35:25 -0700 | [diff] [blame] | 5117 | CLK_LOOKUP("iface_clk", gcc_sys_noc_usb3_axi_clk.c, "msm_dwc3"), |
| 5118 | CLK_LOOKUP("sleep_clk", gcc_usb30_sleep_clk.c, "msm_dwc3"), |
| 5119 | CLK_LOOKUP("sleep_a_clk", gcc_usb2a_phy_sleep_clk.c, "msm_dwc3"), |
| 5120 | CLK_LOOKUP("sleep_b_clk", gcc_usb2b_phy_sleep_clk.c, "msm_dwc3"), |
Vikram Mulukutla | 02ea711 | 2012-08-29 12:06:11 -0700 | [diff] [blame] | 5121 | CLK_LOOKUP("ref_clk", diff_clk.c, "msm_dwc3"), |
Manu Gautam | 51be971 | 2012-06-06 14:54:52 +0530 | [diff] [blame] | 5122 | CLK_LOOKUP("iface_clk", gcc_usb_hs_ahb_clk.c, "msm_otg"), |
| 5123 | CLK_LOOKUP("core_clk", gcc_usb_hs_system_clk.c, "msm_otg"), |
| 5124 | CLK_LOOKUP("iface_clk", gcc_usb_hsic_ahb_clk.c, "msm_hsic_host"), |
| 5125 | CLK_LOOKUP("phy_clk", gcc_usb_hsic_clk.c, "msm_hsic_host"), |
| 5126 | CLK_LOOKUP("cal_clk", gcc_usb_hsic_io_cal_clk.c, "msm_hsic_host"), |
| 5127 | CLK_LOOKUP("core_clk", gcc_usb_hsic_system_clk.c, "msm_hsic_host"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5128 | |
| 5129 | /* Multimedia clocks */ |
| 5130 | CLK_LOOKUP("bus_clk_src", axi_clk_src.c, ""), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5131 | CLK_LOOKUP("bus_clk", mmss_mmssnoc_axi_clk.c, ""), |
Asaf Penso | 6b5251b | 2012-10-11 12:27:03 -0700 | [diff] [blame] | 5132 | CLK_LOOKUP("core_clk", mdss_edpaux_clk.c, "fd923400.qcom,mdss_edp"), |
| 5133 | CLK_LOOKUP("pixel_clk", mdss_edppixel_clk.c, "fd923400.qcom,mdss_edp"), |
| 5134 | CLK_LOOKUP("link_clk", mdss_edplink_clk.c, "fd923400.qcom,mdss_edp"), |
Chandan Uddaraju | 19203fa | 2012-07-31 00:28:02 -0700 | [diff] [blame] | 5135 | CLK_LOOKUP("byte_clk", mdss_byte0_clk.c, "fd922800.qcom,mdss_dsi"), |
| 5136 | CLK_LOOKUP("byte_clk", mdss_byte1_clk.c, ""), |
| 5137 | CLK_LOOKUP("core_clk", mdss_esc0_clk.c, "fd922800.qcom,mdss_dsi"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5138 | CLK_LOOKUP("core_clk", mdss_esc1_clk.c, ""), |
Chandan Uddaraju | 09adf32 | 2012-08-16 02:55:23 -0700 | [diff] [blame] | 5139 | CLK_LOOKUP("pixel_clk", mdss_pclk0_clk.c, "fd922800.qcom,mdss_dsi"), |
| 5140 | CLK_LOOKUP("pixel_clk", mdss_pclk1_clk.c, ""), |
Ujwal Patel | 9faae9a | 2012-09-10 19:00:02 -0700 | [diff] [blame] | 5141 | CLK_LOOKUP("iface_clk", mdss_ahb_clk.c, "fd922100.qcom,hdmi_tx"), |
| 5142 | CLK_LOOKUP("alt_iface_clk", mdss_hdmi_ahb_clk.c, |
| 5143 | "fd922100.qcom,hdmi_tx"), |
Ujwal Patel | 7232cde | 2012-08-13 22:50:13 -0700 | [diff] [blame] | 5144 | CLK_LOOKUP("core_clk", mdss_hdmi_clk.c, "fd922100.qcom,hdmi_tx"), |
| 5145 | CLK_LOOKUP("extp_clk", mdss_extpclk_clk.c, "fd922100.qcom,hdmi_tx"), |
Adrian Salido-Moreno | 5ef3ac0 | 2012-05-14 18:40:47 -0700 | [diff] [blame] | 5146 | CLK_LOOKUP("core_clk", mdss_mdp_clk.c, "mdp.0"), |
| 5147 | CLK_LOOKUP("lut_clk", mdss_mdp_lut_clk.c, "mdp.0"), |
| 5148 | CLK_LOOKUP("core_clk_src", mdp_clk_src.c, "mdp.0"), |
| 5149 | CLK_LOOKUP("vsync_clk", mdss_vsync_clk.c, "mdp.0"), |
Kevin Chan | b4b5f86 | 2012-08-23 14:34:33 -0700 | [diff] [blame] | 5150 | |
| 5151 | /* MM sensor clocks */ |
Sreesudhan Ramakrish Ramkumar | 9f2ea27 | 2012-08-28 18:31:25 -0700 | [diff] [blame] | 5152 | CLK_LOOKUP("cam_src_clk", mclk0_clk_src.c, "6e.qcom,camera"), |
Sreesudhan Ramakrish Ramkumar | 4f9d27f | 2012-08-28 23:51:38 -0700 | [diff] [blame] | 5153 | CLK_LOOKUP("cam_src_clk", mclk1_clk_src.c, "6c.qcom,camera"), |
Sreesudhan Ramakrish Ramkumar | 6be2781 | 2012-09-19 16:42:06 -0700 | [diff] [blame] | 5154 | CLK_LOOKUP("cam_src_clk", mclk1_clk_src.c, "90.qcom,camera"), |
Sreesudhan Ramakrish Ramkumar | 9f2ea27 | 2012-08-28 18:31:25 -0700 | [diff] [blame] | 5155 | CLK_LOOKUP("cam_clk", camss_mclk0_clk.c, "6e.qcom,camera"), |
Sreesudhan Ramakrish Ramkumar | 4f9d27f | 2012-08-28 23:51:38 -0700 | [diff] [blame] | 5156 | CLK_LOOKUP("cam_clk", camss_mclk1_clk.c, "6c.qcom,camera"), |
Sreesudhan Ramakrish Ramkumar | 6be2781 | 2012-09-19 16:42:06 -0700 | [diff] [blame] | 5157 | CLK_LOOKUP("cam_clk", camss_mclk1_clk.c, "90.qcom,camera"), |
Kevin Chan | b4b5f86 | 2012-08-23 14:34:33 -0700 | [diff] [blame] | 5158 | CLK_LOOKUP("cam_clk", camss_mclk1_clk.c, ""), |
| 5159 | CLK_LOOKUP("cam_clk", camss_mclk2_clk.c, ""), |
| 5160 | CLK_LOOKUP("cam_clk", camss_mclk3_clk.c, ""), |
| 5161 | CLK_LOOKUP("cam_gp0_src_clk", mmss_gp0_clk_src.c, ""), |
| 5162 | CLK_LOOKUP("cam_gp1_src_clk", mmss_gp1_clk_src.c, ""), |
| 5163 | CLK_LOOKUP("cam_gp0_clk", camss_gp0_clk.c, ""), |
| 5164 | CLK_LOOKUP("cam_gp1_clk", camss_gp1_clk.c, ""), |
| 5165 | /* CCI clocks */ |
| 5166 | CLK_LOOKUP("camss_top_ahb_clk", camss_top_ahb_clk.c, |
| 5167 | "fda0c000.qcom,cci"), |
| 5168 | CLK_LOOKUP("cci_ahb_clk", camss_cci_cci_ahb_clk.c, "fda0c000.qcom,cci"), |
| 5169 | CLK_LOOKUP("cci_src_clk", cci_clk_src.c, "fda0c000.qcom,cci"), |
| 5170 | CLK_LOOKUP("cci_clk", camss_cci_cci_clk.c, "fda0c000.qcom,cci"), |
| 5171 | /* CSIPHY clocks */ |
| 5172 | CLK_LOOKUP("ispif_ahb_clk", camss_ispif_ahb_clk.c, |
| 5173 | "fda0ac00.qcom,csiphy"), |
| 5174 | CLK_LOOKUP("csiphy_timer_src_clk", csi0phytimer_clk_src.c, |
| 5175 | "fda0ac00.qcom,csiphy"), |
| 5176 | CLK_LOOKUP("csiphy_timer_clk", camss_phy0_csi0phytimer_clk.c, |
| 5177 | "fda0ac00.qcom,csiphy"), |
| 5178 | CLK_LOOKUP("ispif_ahb_clk", camss_ispif_ahb_clk.c, |
| 5179 | "fda0b000.qcom,csiphy"), |
| 5180 | CLK_LOOKUP("csiphy_timer_src_clk", csi1phytimer_clk_src.c, |
| 5181 | "fda0b000.qcom,csiphy"), |
| 5182 | CLK_LOOKUP("csiphy_timer_clk", camss_phy1_csi1phytimer_clk.c, |
| 5183 | "fda0b000.qcom,csiphy"), |
| 5184 | CLK_LOOKUP("ispif_ahb_clk", camss_ispif_ahb_clk.c, |
| 5185 | "fda0b400.qcom,csiphy"), |
| 5186 | CLK_LOOKUP("csiphy_timer_src_clk", csi2phytimer_clk_src.c, |
| 5187 | "fda0b400.qcom,csiphy"), |
| 5188 | CLK_LOOKUP("csiphy_timer_clk", camss_phy2_csi2phytimer_clk.c, |
| 5189 | "fda0b400.qcom,csiphy"), |
| 5190 | /* CSID clocks */ |
Sreesudhan Ramakrish Ramkumar | 4f9d27f | 2012-08-28 23:51:38 -0700 | [diff] [blame] | 5191 | CLK_LOOKUP("csi0_ahb_clk", camss_csi0_ahb_clk.c, "fda08000.qcom,csid"), |
| 5192 | CLK_LOOKUP("csi0_src_clk", csi0_clk_src.c, "fda08000.qcom,csid"), |
| 5193 | CLK_LOOKUP("csi0_phy_clk", camss_csi0phy_clk.c, "fda08000.qcom,csid"), |
| 5194 | CLK_LOOKUP("csi0_clk", camss_csi0_clk.c, "fda08000.qcom,csid"), |
| 5195 | CLK_LOOKUP("csi0_pix_clk", camss_csi0pix_clk.c, "fda08000.qcom,csid"), |
| 5196 | CLK_LOOKUP("csi0_rdi_clk", camss_csi0rdi_clk.c, "fda08000.qcom,csid"), |
| 5197 | |
| 5198 | CLK_LOOKUP("csi0_ahb_clk", camss_csi0_ahb_clk.c, "fda08400.qcom,csid"), |
| 5199 | CLK_LOOKUP("csi1_ahb_clk", camss_csi1_ahb_clk.c, "fda08400.qcom,csid"), |
| 5200 | CLK_LOOKUP("csi0_src_clk", csi0_clk_src.c, "fda08400.qcom,csid"), |
| 5201 | CLK_LOOKUP("csi1_src_clk", csi1_clk_src.c, "fda08400.qcom,csid"), |
| 5202 | CLK_LOOKUP("csi0_phy_clk", camss_csi0phy_clk.c, "fda08400.qcom,csid"), |
| 5203 | CLK_LOOKUP("csi1_phy_clk", camss_csi1phy_clk.c, "fda08400.qcom,csid"), |
| 5204 | CLK_LOOKUP("csi0_clk", camss_csi0_clk.c, "fda08400.qcom,csid"), |
| 5205 | CLK_LOOKUP("csi1_clk", camss_csi1_clk.c, "fda08400.qcom,csid"), |
| 5206 | CLK_LOOKUP("csi0_pix_clk", camss_csi0pix_clk.c, "fda08400.qcom,csid"), |
| 5207 | CLK_LOOKUP("csi1_pix_clk", camss_csi1pix_clk.c, "fda08400.qcom,csid"), |
| 5208 | CLK_LOOKUP("csi0_rdi_clk", camss_csi0rdi_clk.c, "fda08400.qcom,csid"), |
| 5209 | CLK_LOOKUP("csi1_rdi_clk", camss_csi1rdi_clk.c, "fda08400.qcom,csid"), |
| 5210 | |
| 5211 | CLK_LOOKUP("csi0_ahb_clk", camss_csi0_ahb_clk.c, "fda08800.qcom,csid"), |
| 5212 | CLK_LOOKUP("csi2_ahb_clk", camss_csi2_ahb_clk.c, "fda08800.qcom,csid"), |
| 5213 | CLK_LOOKUP("csi0_src_clk", csi0_clk_src.c, "fda08800.qcom,csid"), |
| 5214 | CLK_LOOKUP("csi2_src_clk", csi2_clk_src.c, "fda08800.qcom,csid"), |
| 5215 | CLK_LOOKUP("csi0_phy_clk", camss_csi0phy_clk.c, "fda08800.qcom,csid"), |
| 5216 | CLK_LOOKUP("csi2_phy_clk", camss_csi2phy_clk.c, "fda08800.qcom,csid"), |
| 5217 | CLK_LOOKUP("csi0_clk", camss_csi0_clk.c, "fda08800.qcom,csid"), |
| 5218 | CLK_LOOKUP("csi2_clk", camss_csi2_clk.c, "fda08800.qcom,csid"), |
| 5219 | CLK_LOOKUP("csi0_pix_clk", camss_csi0pix_clk.c, "fda08800.qcom,csid"), |
| 5220 | CLK_LOOKUP("csi2_pix_clk", camss_csi2pix_clk.c, "fda08800.qcom,csid"), |
| 5221 | CLK_LOOKUP("csi0_rdi_clk", camss_csi0rdi_clk.c, "fda08800.qcom,csid"), |
| 5222 | CLK_LOOKUP("csi2_rdi_clk", camss_csi2rdi_clk.c, "fda08800.qcom,csid"), |
| 5223 | |
| 5224 | CLK_LOOKUP("csi0_ahb_clk", camss_csi0_ahb_clk.c, "fda08c00.qcom,csid"), |
| 5225 | CLK_LOOKUP("csi3_ahb_clk", camss_csi3_ahb_clk.c, "fda08c00.qcom,csid"), |
| 5226 | CLK_LOOKUP("csi0_src_clk", csi0_clk_src.c, "fda08c00.qcom,csid"), |
| 5227 | CLK_LOOKUP("csi3_src_clk", csi3_clk_src.c, "fda08c00.qcom,csid"), |
| 5228 | CLK_LOOKUP("csi0_phy_clk", camss_csi0phy_clk.c, "fda08c00.qcom,csid"), |
| 5229 | CLK_LOOKUP("csi3_phy_clk", camss_csi3phy_clk.c, "fda08c00.qcom,csid"), |
| 5230 | CLK_LOOKUP("csi0_clk", camss_csi0_clk.c, "fda08c00.qcom,csid"), |
| 5231 | CLK_LOOKUP("csi3_clk", camss_csi3_clk.c, "fda08c00.qcom,csid"), |
| 5232 | CLK_LOOKUP("csi0_pix_clk", camss_csi0pix_clk.c, "fda08c00.qcom,csid"), |
| 5233 | CLK_LOOKUP("csi3_pix_clk", camss_csi3pix_clk.c, "fda08c00.qcom,csid"), |
| 5234 | CLK_LOOKUP("csi0_rdi_clk", camss_csi0rdi_clk.c, "fda08c00.qcom,csid"), |
| 5235 | CLK_LOOKUP("csi3_rdi_clk", camss_csi3rdi_clk.c, "fda08c00.qcom,csid"), |
| 5236 | |
Kevin Chan | b4b5f86 | 2012-08-23 14:34:33 -0700 | [diff] [blame] | 5237 | /*VFE clocks*/ |
| 5238 | CLK_LOOKUP("camss_top_ahb_clk", camss_top_ahb_clk.c, |
| 5239 | "fda10000.qcom,vfe"), |
| 5240 | CLK_LOOKUP("vfe_clk_src", vfe0_clk_src.c, "fda10000.qcom,vfe"), |
| 5241 | CLK_LOOKUP("camss_vfe_vfe_clk", camss_vfe_vfe0_clk.c, |
| 5242 | "fda10000.qcom,vfe"), |
| 5243 | CLK_LOOKUP("camss_csi_vfe_clk", camss_csi_vfe0_clk.c, |
| 5244 | "fda10000.qcom,vfe"), |
| 5245 | CLK_LOOKUP("iface_clk", camss_vfe_vfe_ahb_clk.c, "fda10000.qcom,vfe"), |
| 5246 | CLK_LOOKUP("bus_clk", camss_vfe_vfe_axi_clk.c, "fda10000.qcom,vfe"), |
| 5247 | CLK_LOOKUP("alt_bus_clk", camss_vfe_vfe_ocmemnoc_clk.c, |
| 5248 | "fda10000.qcom,vfe"), |
| 5249 | CLK_LOOKUP("camss_top_ahb_clk", camss_top_ahb_clk.c, |
| 5250 | "fda14000.qcom,vfe"), |
| 5251 | CLK_LOOKUP("vfe_clk_src", vfe1_clk_src.c, "fda14000.qcom,vfe"), |
| 5252 | CLK_LOOKUP("camss_vfe_vfe_clk", camss_vfe_vfe1_clk.c, |
| 5253 | "fda14000.qcom,vfe"), |
| 5254 | CLK_LOOKUP("camss_csi_vfe_clk", camss_csi_vfe1_clk.c, |
| 5255 | "fda14000.qcom,vfe"), |
| 5256 | CLK_LOOKUP("iface_clk", camss_vfe_vfe_ahb_clk.c, "fda14000.qcom,vfe"), |
| 5257 | CLK_LOOKUP("bus_clk", camss_vfe_vfe_axi_clk.c, "fda14000.qcom,vfe"), |
| 5258 | CLK_LOOKUP("alt_bus_clk", camss_vfe_vfe_ocmemnoc_clk.c, |
| 5259 | "fda14000.qcom,vfe"), |
Ashwini Rao | ef0ff76 | 2012-08-28 16:36:45 -0700 | [diff] [blame] | 5260 | /*Jpeg Clocks*/ |
| 5261 | CLK_LOOKUP("core_clk", camss_jpeg_jpeg0_clk.c, "fda1c000.qcom,jpeg"), |
| 5262 | CLK_LOOKUP("core_clk", camss_jpeg_jpeg1_clk.c, "fda20000.qcom,jpeg"), |
| 5263 | CLK_LOOKUP("core_clk", camss_jpeg_jpeg2_clk.c, "fda24000.qcom,jpeg"), |
| 5264 | CLK_LOOKUP("iface_clk", camss_jpeg_jpeg_ahb_clk.c, |
| 5265 | "fda1c000.qcom,jpeg"), |
| 5266 | CLK_LOOKUP("iface_clk", camss_jpeg_jpeg_ahb_clk.c, |
| 5267 | "fda20000.qcom,jpeg"), |
| 5268 | CLK_LOOKUP("iface_clk", camss_jpeg_jpeg_ahb_clk.c, |
| 5269 | "fda24000.qcom,jpeg"), |
Sathish Ambley | d1b89ed | 2012-02-07 21:47:47 -0800 | [diff] [blame] | 5270 | CLK_LOOKUP("iface_clk", camss_jpeg_jpeg_ahb_clk.c, |
| 5271 | "fda64000.qcom,iommu"), |
| 5272 | CLK_LOOKUP("core_clk", camss_jpeg_jpeg_axi_clk.c, |
| 5273 | "fda64000.qcom,iommu"), |
Ashwini Rao | ef0ff76 | 2012-08-28 16:36:45 -0700 | [diff] [blame] | 5274 | CLK_LOOKUP("bus_clk0", camss_jpeg_jpeg_axi_clk.c, "fda1c000.qcom,jpeg"), |
| 5275 | CLK_LOOKUP("bus_clk0", camss_jpeg_jpeg_axi_clk.c, "fda20000.qcom,jpeg"), |
| 5276 | CLK_LOOKUP("bus_clk0", camss_jpeg_jpeg_axi_clk.c, "fda24000.qcom,jpeg"), |
| 5277 | CLK_LOOKUP("alt_bus_clk", camss_jpeg_jpeg_ocmemnoc_clk.c, |
| 5278 | "fda1c000.qcom,jpeg"), |
| 5279 | CLK_LOOKUP("alt_bus_clk", camss_jpeg_jpeg_ocmemnoc_clk.c, |
| 5280 | "fda20000.qcom,jpeg"), |
| 5281 | CLK_LOOKUP("alt_bus_clk", camss_jpeg_jpeg_ocmemnoc_clk.c, |
| 5282 | "fda24000.qcom,jpeg"), |
| 5283 | CLK_LOOKUP("camss_top_ahb_clk", camss_top_ahb_clk.c, |
| 5284 | "fda1c000.qcom,jpeg"), |
| 5285 | CLK_LOOKUP("camss_top_ahb_clk", camss_top_ahb_clk.c, |
| 5286 | "fda20000.qcom,jpeg"), |
| 5287 | CLK_LOOKUP("camss_top_ahb_clk", camss_top_ahb_clk.c, |
| 5288 | "fda24000.qcom,jpeg"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5289 | CLK_LOOKUP("iface_clk", camss_micro_ahb_clk.c, ""), |
Stepan Moskovchenko | 372cfb4 | 2012-07-10 20:19:11 -0700 | [diff] [blame] | 5290 | CLK_LOOKUP("iface_clk", camss_vfe_cpp_ahb_clk.c, "fda44000.qcom,iommu"), |
| 5291 | CLK_LOOKUP("core_clk", camss_vfe_cpp_clk.c, "fda44000.qcom,iommu"), |
Adrian Salido-Moreno | 5ef3ac0 | 2012-05-14 18:40:47 -0700 | [diff] [blame] | 5292 | CLK_LOOKUP("iface_clk", mdss_ahb_clk.c, "mdp.0"), |
Chandan Uddaraju | 09adf32 | 2012-08-16 02:55:23 -0700 | [diff] [blame] | 5293 | CLK_LOOKUP("iface_clk", mdss_ahb_clk.c, "mdss_dsi_clk_ctrl"), |
Asaf Penso | 6b5251b | 2012-10-11 12:27:03 -0700 | [diff] [blame] | 5294 | CLK_LOOKUP("iface_clk", mdss_ahb_clk.c, "fd923400.qcom,mdss_edp"), |
Sathish Ambley | d1b89ed | 2012-02-07 21:47:47 -0800 | [diff] [blame] | 5295 | CLK_LOOKUP("iface_clk", mdss_ahb_clk.c, "fd928000.qcom,iommu"), |
| 5296 | CLK_LOOKUP("core_clk", mdss_axi_clk.c, "fd928000.qcom,iommu"), |
Adrian Salido-Moreno | 5ef3ac0 | 2012-05-14 18:40:47 -0700 | [diff] [blame] | 5297 | CLK_LOOKUP("bus_clk", mdss_axi_clk.c, "mdp.0"), |
Vikram Mulukutla | e3b0306 | 2012-05-16 12:07:08 -0700 | [diff] [blame] | 5298 | CLK_LOOKUP("core_clk", oxili_gfx3d_clk.c, "fdb00000.qcom,kgsl-3d0"), |
| 5299 | CLK_LOOKUP("iface_clk", oxilicx_ahb_clk.c, "fdb00000.qcom,kgsl-3d0"), |
Vikram Mulukutla | 274b2d9 | 2012-07-13 15:53:04 -0700 | [diff] [blame] | 5300 | CLK_LOOKUP("mem_iface_clk", ocmemcx_ocmemnoc_clk.c, |
| 5301 | "fdb00000.qcom,kgsl-3d0"), |
Vikram Mulukutla | e3b0306 | 2012-05-16 12:07:08 -0700 | [diff] [blame] | 5302 | CLK_LOOKUP("core_clk", oxilicx_axi_clk.c, "fdb10000.qcom,iommu"), |
| 5303 | CLK_LOOKUP("iface_clk", oxilicx_ahb_clk.c, "fdb10000.qcom,iommu"), |
Stepan Moskovchenko | b26b8ca | 2012-07-24 19:42:44 -0700 | [diff] [blame] | 5304 | CLK_LOOKUP("alt_core_clk", oxili_gfx3d_clk.c, "fdb10000.qcom,iommu"), |
Naveen Ramaraj | bea2d5d | 2012-08-15 17:26:43 -0700 | [diff] [blame] | 5305 | CLK_LOOKUP("core_clk", ocmemgx_core_clk.c, "fdd00000.qcom,ocmem"), |
| 5306 | CLK_LOOKUP("iface_clk", ocmemcx_ocmemnoc_clk.c, "fdd00000.qcom,ocmem"), |
Sathish Ambley | d1b89ed | 2012-02-07 21:47:47 -0800 | [diff] [blame] | 5307 | CLK_LOOKUP("iface_clk", venus0_ahb_clk.c, "fdc84000.qcom,iommu"), |
Stepan Moskovchenko | b26b8ca | 2012-07-24 19:42:44 -0700 | [diff] [blame] | 5308 | CLK_LOOKUP("alt_core_clk", venus0_vcodec0_clk.c, "fdc84000.qcom,iommu"), |
Sathish Ambley | d1b89ed | 2012-02-07 21:47:47 -0800 | [diff] [blame] | 5309 | CLK_LOOKUP("core_clk", venus0_axi_clk.c, "fdc84000.qcom,iommu"), |
| 5310 | CLK_LOOKUP("bus_clk", venus0_axi_clk.c, ""), |
Tianyi Gou | 828798d | 2012-05-02 21:12:38 -0700 | [diff] [blame] | 5311 | CLK_LOOKUP("src_clk", vcodec0_clk_src.c, "fdce0000.qcom,venus"), |
| 5312 | CLK_LOOKUP("core_clk", venus0_vcodec0_clk.c, "fdce0000.qcom,venus"), |
| 5313 | CLK_LOOKUP("iface_clk", venus0_ahb_clk.c, "fdce0000.qcom,venus"), |
| 5314 | CLK_LOOKUP("bus_clk", venus0_axi_clk.c, "fdce0000.qcom,venus"), |
| 5315 | CLK_LOOKUP("mem_clk", venus0_ocmemnoc_clk.c, "fdce0000.qcom,venus"), |
Vinay Kalia | 40680aa | 2012-07-23 12:45:39 -0700 | [diff] [blame] | 5316 | CLK_LOOKUP("core_clk", venus0_vcodec0_clk.c, "fdc00000.qcom,vidc"), |
| 5317 | CLK_LOOKUP("iface_clk", venus0_ahb_clk.c, "fdc00000.qcom,vidc"), |
| 5318 | CLK_LOOKUP("bus_clk", venus0_axi_clk.c, "fdc00000.qcom,vidc"), |
| 5319 | CLK_LOOKUP("mem_clk", venus0_ocmemnoc_clk.c, "fdc00000.qcom,vidc"), |
Tianyi Gou | 828798d | 2012-05-02 21:12:38 -0700 | [diff] [blame] | 5320 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5321 | |
| 5322 | /* LPASS clocks */ |
Vikram Mulukutla | 6c0f1a7 | 2012-08-10 01:59:28 -0700 | [diff] [blame] | 5323 | CLK_LOOKUP("bus_clk", audio_core_ixfabric_clk.c, ""), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5324 | CLK_LOOKUP("core_clk", audio_core_slimbus_core_clk.c, "fe12f000.slim"), |
| 5325 | CLK_LOOKUP("iface_clk", audio_core_slimbus_lfabif_clk.c, |
| 5326 | "fe12f000.slim"), |
| 5327 | CLK_LOOKUP("core_clk", audio_core_lpaif_codec_spkr_clk_src.c, ""), |
| 5328 | CLK_LOOKUP("osr_clk", audio_core_lpaif_codec_spkr_osr_clk.c, ""), |
| 5329 | CLK_LOOKUP("ebit_clk", audio_core_lpaif_codec_spkr_ebit_clk.c, ""), |
| 5330 | CLK_LOOKUP("ibit_clk", audio_core_lpaif_codec_spkr_ibit_clk.c, ""), |
| 5331 | CLK_LOOKUP("core_clk", audio_core_lpaif_pri_clk_src.c, ""), |
| 5332 | CLK_LOOKUP("osr_clk", audio_core_lpaif_pri_osr_clk.c, ""), |
| 5333 | CLK_LOOKUP("ebit_clk", audio_core_lpaif_pri_ebit_clk.c, ""), |
| 5334 | CLK_LOOKUP("ibit_clk", audio_core_lpaif_pri_ibit_clk.c, ""), |
| 5335 | CLK_LOOKUP("core_clk", audio_core_lpaif_sec_clk_src.c, ""), |
| 5336 | CLK_LOOKUP("osr_clk", audio_core_lpaif_sec_osr_clk.c, ""), |
| 5337 | CLK_LOOKUP("ebit_clk", audio_core_lpaif_sec_ebit_clk.c, ""), |
| 5338 | CLK_LOOKUP("ibit_clk", audio_core_lpaif_sec_ibit_clk.c, ""), |
| 5339 | CLK_LOOKUP("core_clk", audio_core_lpaif_ter_clk_src.c, ""), |
| 5340 | CLK_LOOKUP("osr_clk", audio_core_lpaif_ter_osr_clk.c, ""), |
| 5341 | CLK_LOOKUP("ebit_clk", audio_core_lpaif_ter_ebit_clk.c, ""), |
| 5342 | CLK_LOOKUP("ibit_clk", audio_core_lpaif_ter_ibit_clk.c, ""), |
| 5343 | CLK_LOOKUP("core_clk", audio_core_lpaif_quad_clk_src.c, ""), |
| 5344 | CLK_LOOKUP("osr_clk", audio_core_lpaif_quad_osr_clk.c, ""), |
| 5345 | CLK_LOOKUP("ebit_clk", audio_core_lpaif_quad_ebit_clk.c, ""), |
| 5346 | CLK_LOOKUP("ibit_clk", audio_core_lpaif_quad_ibit_clk.c, ""), |
Phani Kumar Uppalapati | 978f18d | 2012-08-08 15:49:39 -0700 | [diff] [blame] | 5347 | CLK_LOOKUP("pcm_clk", audio_core_lpaif_pcm0_clk_src.c, |
Phani Kumar Uppalapati | 7474f3d | 2012-07-19 18:54:53 -0700 | [diff] [blame] | 5348 | "msm-dai-q6.4106"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5349 | CLK_LOOKUP("ebit_clk", audio_core_lpaif_pcm0_ebit_clk.c, ""), |
Phani Kumar Uppalapati | 7474f3d | 2012-07-19 18:54:53 -0700 | [diff] [blame] | 5350 | CLK_LOOKUP("ibit_clk", audio_core_lpaif_pcm0_ibit_clk.c, |
| 5351 | "msm-dai-q6.4106"), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5352 | CLK_LOOKUP("ibit_clk", audio_core_lpaif_pcm0_ibit_clk.c, ""), |
| 5353 | CLK_LOOKUP("core_clk", audio_core_lpaif_pcm1_clk_src.c, ""), |
| 5354 | CLK_LOOKUP("ebit_clk", audio_core_lpaif_pcm1_ebit_clk.c, ""), |
| 5355 | CLK_LOOKUP("ibit_clk", audio_core_lpaif_pcm1_ibit_clk.c, ""), |
Phani Kumar Uppalapati | 7474f3d | 2012-07-19 18:54:53 -0700 | [diff] [blame] | 5356 | CLK_LOOKUP("core_oe_src_clk", audio_core_lpaif_pcmoe_clk_src.c, |
| 5357 | "msm-dai-q6.4106"), |
| 5358 | CLK_LOOKUP("core_oe_clk", audio_core_lpaif_pcmoe_clk.c, |
| 5359 | "msm-dai-q6.4106"), |
Vikram Mulukutla | 97ac334 | 2012-08-21 12:55:13 -0700 | [diff] [blame] | 5360 | CLK_LOOKUP("br_clk", audio_wrapper_br_clk.c, "fdd00000.qcom,ocmem"), |
Matt Wagantall | eec0032 | 2012-08-23 16:53:25 -0700 | [diff] [blame] | 5361 | |
Matt Wagantall | 8c2246d | 2012-08-12 17:08:04 -0700 | [diff] [blame] | 5362 | CLK_LOOKUP("bus_clk", gcc_mss_q6_bimc_axi_clk.c, "pil-q6v5-mss"), |
Matt Wagantall | b2c78be | 2012-08-11 18:55:45 -0700 | [diff] [blame] | 5363 | CLK_LOOKUP("iface_clk", gcc_mss_cfg_ahb_clk.c, "pil-q6v5-mss"), |
| 5364 | CLK_LOOKUP("mem_clk", gcc_boot_rom_ahb_clk.c, "pil-q6v5-mss"), |
Vikram Mulukutla | 31926eb | 2012-08-12 19:58:08 -0700 | [diff] [blame] | 5365 | |
Matt Wagantall | b2c78be | 2012-08-11 18:55:45 -0700 | [diff] [blame] | 5366 | CLK_LOOKUP("core_clk", q6ss_xo_clk.c, "pil-q6v5-lpass"), |
| 5367 | CLK_LOOKUP("bus_clk", gcc_lpass_q6_axi_clk.c, "pil-q6v5-lpass"), |
| 5368 | CLK_LOOKUP("iface_clk", q6ss_ahb_lfabif_clk.c, "pil-q6v5-lpass"), |
| 5369 | CLK_LOOKUP("reg_clk", q6ss_ahbm_clk.c, "pil-q6v5-lpass"), |
Hariprasad Dhalinarasimha | de991f0 | 2012-05-31 13:15:51 -0700 | [diff] [blame] | 5370 | CLK_LOOKUP("core_clk", gcc_prng_ahb_clk.c, "msm_rng"), |
Vikram Mulukutla | a967db4 | 2012-05-10 16:20:40 -0700 | [diff] [blame] | 5371 | |
Vikram Mulukutla | b0ad9f3 | 2012-07-03 12:57:24 -0700 | [diff] [blame] | 5372 | CLK_LOOKUP("dfab_clk", pnoc_sps_clk.c, "msm_sps"), |
Vikram Mulukutla | d08a152 | 2012-05-24 15:24:01 -0700 | [diff] [blame] | 5373 | |
| 5374 | CLK_LOOKUP("bus_clk", snoc_clk.c, ""), |
| 5375 | CLK_LOOKUP("bus_clk", pnoc_clk.c, ""), |
| 5376 | CLK_LOOKUP("bus_clk", cnoc_clk.c, ""), |
| 5377 | CLK_LOOKUP("mem_clk", bimc_clk.c, ""), |
| 5378 | CLK_LOOKUP("mem_clk", ocmemgx_clk.c, ""), |
| 5379 | CLK_LOOKUP("bus_clk", snoc_a_clk.c, ""), |
| 5380 | CLK_LOOKUP("bus_clk", pnoc_a_clk.c, ""), |
| 5381 | CLK_LOOKUP("bus_clk", cnoc_a_clk.c, ""), |
| 5382 | CLK_LOOKUP("mem_clk", bimc_a_clk.c, ""), |
| 5383 | CLK_LOOKUP("mem_clk", ocmemgx_a_clk.c, ""), |
| 5384 | |
| 5385 | CLK_LOOKUP("bus_clk", cnoc_msmbus_clk.c, "msm_config_noc"), |
| 5386 | CLK_LOOKUP("bus_a_clk", cnoc_msmbus_a_clk.c, "msm_config_noc"), |
| 5387 | CLK_LOOKUP("bus_clk", snoc_msmbus_clk.c, "msm_sys_noc"), |
| 5388 | CLK_LOOKUP("bus_a_clk", snoc_msmbus_a_clk.c, "msm_sys_noc"), |
| 5389 | CLK_LOOKUP("bus_clk", pnoc_msmbus_clk.c, "msm_periph_noc"), |
| 5390 | CLK_LOOKUP("bus_a_clk", pnoc_msmbus_a_clk.c, "msm_periph_noc"), |
| 5391 | CLK_LOOKUP("mem_clk", bimc_msmbus_clk.c, "msm_bimc"), |
| 5392 | CLK_LOOKUP("mem_a_clk", bimc_msmbus_a_clk.c, "msm_bimc"), |
| 5393 | CLK_LOOKUP("mem_clk", bimc_acpu_a_clk.c, ""), |
| 5394 | CLK_LOOKUP("ocmem_clk", ocmemgx_msmbus_clk.c, "msm_bus"), |
| 5395 | CLK_LOOKUP("ocmem_a_clk", ocmemgx_msmbus_a_clk.c, "msm_bus"), |
| 5396 | CLK_LOOKUP("bus_clk", ocmemnoc_clk.c, "msm_ocmem_noc"), |
| 5397 | CLK_LOOKUP("bus_a_clk", ocmemnoc_clk.c, "msm_ocmem_noc"), |
Vikram Mulukutla | c15dac0 | 2012-08-09 13:31:08 -0700 | [diff] [blame] | 5398 | CLK_LOOKUP("bus_clk", mmss_s0_axi_clk.c, "msm_mmss_noc"), |
| 5399 | CLK_LOOKUP("bus_a_clk", mmss_s0_axi_clk.c, "msm_mmss_noc"), |
Vikram Mulukutla | 274b2d9 | 2012-07-13 15:53:04 -0700 | [diff] [blame] | 5400 | CLK_LOOKUP("iface_clk", gcc_mmss_noc_cfg_ahb_clk.c, ""), |
| 5401 | CLK_LOOKUP("iface_clk", gcc_ocmem_noc_cfg_ahb_clk.c, ""), |
Vikram Mulukutla | 0f63e00 | 2012-06-28 14:29:44 -0700 | [diff] [blame] | 5402 | |
| 5403 | CLK_LOOKUP("core_clk", qdss_clk.c, "coresight-tmc-etr"), |
| 5404 | CLK_LOOKUP("core_clk", qdss_clk.c, "coresight-tpiu"), |
| 5405 | CLK_LOOKUP("core_clk", qdss_clk.c, "coresight-replicator"), |
| 5406 | CLK_LOOKUP("core_clk", qdss_clk.c, "coresight-tmc-etf"), |
| 5407 | CLK_LOOKUP("core_clk", qdss_clk.c, "coresight-funnel-merg"), |
| 5408 | CLK_LOOKUP("core_clk", qdss_clk.c, "coresight-funnel-in0"), |
| 5409 | CLK_LOOKUP("core_clk", qdss_clk.c, "coresight-funnel-in1"), |
| 5410 | CLK_LOOKUP("core_clk", qdss_clk.c, "coresight-funnel-kpss"), |
| 5411 | CLK_LOOKUP("core_clk", qdss_clk.c, "coresight-funnel-mmss"), |
| 5412 | CLK_LOOKUP("core_clk", qdss_clk.c, "coresight-stm"), |
| 5413 | CLK_LOOKUP("core_clk", qdss_clk.c, "coresight-etm0"), |
| 5414 | CLK_LOOKUP("core_clk", qdss_clk.c, "coresight-etm1"), |
| 5415 | CLK_LOOKUP("core_clk", qdss_clk.c, "coresight-etm2"), |
| 5416 | CLK_LOOKUP("core_clk", qdss_clk.c, "coresight-etm3"), |
| 5417 | |
| 5418 | CLK_LOOKUP("core_a_clk", qdss_a_clk.c, "coresight-tmc-etr"), |
| 5419 | CLK_LOOKUP("core_a_clk", qdss_a_clk.c, "coresight-tpiu"), |
| 5420 | CLK_LOOKUP("core_a_clk", qdss_a_clk.c, "coresight-replicator"), |
| 5421 | CLK_LOOKUP("core_a_clk", qdss_a_clk.c, "coresight-tmc-etf"), |
| 5422 | CLK_LOOKUP("core_a_clk", qdss_a_clk.c, "coresight-funnel-merg"), |
| 5423 | CLK_LOOKUP("core_a_clk", qdss_a_clk.c, "coresight-funnel-in0"), |
| 5424 | CLK_LOOKUP("core_a_clk", qdss_a_clk.c, "coresight-funnel-in1"), |
| 5425 | CLK_LOOKUP("core_a_clk", qdss_a_clk.c, "coresight-funnel-kpss"), |
| 5426 | CLK_LOOKUP("core_a_clk", qdss_a_clk.c, "coresight-funnel-mmss"), |
| 5427 | CLK_LOOKUP("core_a_clk", qdss_a_clk.c, "coresight-stm"), |
| 5428 | CLK_LOOKUP("core_a_clk", qdss_a_clk.c, "coresight-etm0"), |
| 5429 | CLK_LOOKUP("core_a_clk", qdss_a_clk.c, "coresight-etm1"), |
| 5430 | CLK_LOOKUP("core_a_clk", qdss_a_clk.c, "coresight-etm2"), |
| 5431 | CLK_LOOKUP("core_a_clk", qdss_a_clk.c, "coresight-etm3"), |
Matt Wagantall | edf2fad | 2012-08-06 16:11:46 -0700 | [diff] [blame] | 5432 | |
| 5433 | CLK_LOOKUP("l2_m_clk", l2_m_clk, ""), |
| 5434 | CLK_LOOKUP("krait0_m_clk", krait0_m_clk, ""), |
| 5435 | CLK_LOOKUP("krait1_m_clk", krait1_m_clk, ""), |
| 5436 | CLK_LOOKUP("krait2_m_clk", krait2_m_clk, ""), |
| 5437 | CLK_LOOKUP("krait3_m_clk", krait3_m_clk, ""), |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5438 | }; |
| 5439 | |
| 5440 | static struct pll_config_regs gpll0_regs __initdata = { |
| 5441 | .l_reg = (void __iomem *)GPLL0_L_REG, |
| 5442 | .m_reg = (void __iomem *)GPLL0_M_REG, |
| 5443 | .n_reg = (void __iomem *)GPLL0_N_REG, |
| 5444 | .config_reg = (void __iomem *)GPLL0_USER_CTL_REG, |
| 5445 | .mode_reg = (void __iomem *)GPLL0_MODE_REG, |
| 5446 | .base = &virt_bases[GCC_BASE], |
| 5447 | }; |
| 5448 | |
| 5449 | /* GPLL0 at 600 MHz, main output enabled. */ |
| 5450 | static struct pll_config gpll0_config __initdata = { |
| 5451 | .l = 0x1f, |
| 5452 | .m = 0x1, |
| 5453 | .n = 0x4, |
| 5454 | .vco_val = 0x0, |
| 5455 | .vco_mask = BM(21, 20), |
| 5456 | .pre_div_val = 0x0, |
| 5457 | .pre_div_mask = BM(14, 12), |
| 5458 | .post_div_val = 0x0, |
| 5459 | .post_div_mask = BM(9, 8), |
| 5460 | .mn_ena_val = BIT(24), |
| 5461 | .mn_ena_mask = BIT(24), |
| 5462 | .main_output_val = BIT(0), |
| 5463 | .main_output_mask = BIT(0), |
| 5464 | }; |
| 5465 | |
| 5466 | static struct pll_config_regs gpll1_regs __initdata = { |
| 5467 | .l_reg = (void __iomem *)GPLL1_L_REG, |
| 5468 | .m_reg = (void __iomem *)GPLL1_M_REG, |
| 5469 | .n_reg = (void __iomem *)GPLL1_N_REG, |
| 5470 | .config_reg = (void __iomem *)GPLL1_USER_CTL_REG, |
| 5471 | .mode_reg = (void __iomem *)GPLL1_MODE_REG, |
| 5472 | .base = &virt_bases[GCC_BASE], |
| 5473 | }; |
| 5474 | |
| 5475 | /* GPLL1 at 480 MHz, main output enabled. */ |
| 5476 | static struct pll_config gpll1_config __initdata = { |
| 5477 | .l = 0x19, |
| 5478 | .m = 0x0, |
| 5479 | .n = 0x1, |
| 5480 | .vco_val = 0x0, |
| 5481 | .vco_mask = BM(21, 20), |
| 5482 | .pre_div_val = 0x0, |
| 5483 | .pre_div_mask = BM(14, 12), |
| 5484 | .post_div_val = 0x0, |
| 5485 | .post_div_mask = BM(9, 8), |
| 5486 | .main_output_val = BIT(0), |
| 5487 | .main_output_mask = BIT(0), |
| 5488 | }; |
| 5489 | |
| 5490 | static struct pll_config_regs mmpll0_regs __initdata = { |
| 5491 | .l_reg = (void __iomem *)MMPLL0_L_REG, |
| 5492 | .m_reg = (void __iomem *)MMPLL0_M_REG, |
| 5493 | .n_reg = (void __iomem *)MMPLL0_N_REG, |
| 5494 | .config_reg = (void __iomem *)MMPLL0_USER_CTL_REG, |
| 5495 | .mode_reg = (void __iomem *)MMPLL0_MODE_REG, |
| 5496 | .base = &virt_bases[MMSS_BASE], |
| 5497 | }; |
| 5498 | |
| 5499 | /* MMPLL0 at 800 MHz, main output enabled. */ |
| 5500 | static struct pll_config mmpll0_config __initdata = { |
| 5501 | .l = 0x29, |
| 5502 | .m = 0x2, |
| 5503 | .n = 0x3, |
| 5504 | .vco_val = 0x0, |
| 5505 | .vco_mask = BM(21, 20), |
| 5506 | .pre_div_val = 0x0, |
| 5507 | .pre_div_mask = BM(14, 12), |
| 5508 | .post_div_val = 0x0, |
| 5509 | .post_div_mask = BM(9, 8), |
| 5510 | .mn_ena_val = BIT(24), |
| 5511 | .mn_ena_mask = BIT(24), |
| 5512 | .main_output_val = BIT(0), |
| 5513 | .main_output_mask = BIT(0), |
| 5514 | }; |
| 5515 | |
| 5516 | static struct pll_config_regs mmpll1_regs __initdata = { |
| 5517 | .l_reg = (void __iomem *)MMPLL1_L_REG, |
| 5518 | .m_reg = (void __iomem *)MMPLL1_M_REG, |
| 5519 | .n_reg = (void __iomem *)MMPLL1_N_REG, |
| 5520 | .config_reg = (void __iomem *)MMPLL1_USER_CTL_REG, |
| 5521 | .mode_reg = (void __iomem *)MMPLL1_MODE_REG, |
| 5522 | .base = &virt_bases[MMSS_BASE], |
| 5523 | }; |
| 5524 | |
| 5525 | /* MMPLL1 at 1000 MHz, main output enabled. */ |
| 5526 | static struct pll_config mmpll1_config __initdata = { |
Vikram Mulukutla | d16a8f1 | 2012-07-20 13:33:45 -0700 | [diff] [blame] | 5527 | .l = 0x2C, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5528 | .m = 0x1, |
Vikram Mulukutla | d16a8f1 | 2012-07-20 13:33:45 -0700 | [diff] [blame] | 5529 | .n = 0x10, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5530 | .vco_val = 0x0, |
| 5531 | .vco_mask = BM(21, 20), |
| 5532 | .pre_div_val = 0x0, |
| 5533 | .pre_div_mask = BM(14, 12), |
| 5534 | .post_div_val = 0x0, |
| 5535 | .post_div_mask = BM(9, 8), |
| 5536 | .mn_ena_val = BIT(24), |
| 5537 | .mn_ena_mask = BIT(24), |
| 5538 | .main_output_val = BIT(0), |
| 5539 | .main_output_mask = BIT(0), |
| 5540 | }; |
| 5541 | |
| 5542 | static struct pll_config_regs mmpll3_regs __initdata = { |
| 5543 | .l_reg = (void __iomem *)MMPLL3_L_REG, |
| 5544 | .m_reg = (void __iomem *)MMPLL3_M_REG, |
| 5545 | .n_reg = (void __iomem *)MMPLL3_N_REG, |
| 5546 | .config_reg = (void __iomem *)MMPLL3_USER_CTL_REG, |
| 5547 | .mode_reg = (void __iomem *)MMPLL3_MODE_REG, |
| 5548 | .base = &virt_bases[MMSS_BASE], |
| 5549 | }; |
| 5550 | |
| 5551 | /* MMPLL3 at 820 MHz, main output enabled. */ |
| 5552 | static struct pll_config mmpll3_config __initdata = { |
| 5553 | .l = 0x2A, |
| 5554 | .m = 0x11, |
| 5555 | .n = 0x18, |
| 5556 | .vco_val = 0x0, |
| 5557 | .vco_mask = BM(21, 20), |
| 5558 | .pre_div_val = 0x0, |
| 5559 | .pre_div_mask = BM(14, 12), |
| 5560 | .post_div_val = 0x0, |
| 5561 | .post_div_mask = BM(9, 8), |
| 5562 | .mn_ena_val = BIT(24), |
| 5563 | .mn_ena_mask = BIT(24), |
| 5564 | .main_output_val = BIT(0), |
| 5565 | .main_output_mask = BIT(0), |
| 5566 | }; |
| 5567 | |
| 5568 | static struct pll_config_regs lpapll0_regs __initdata = { |
| 5569 | .l_reg = (void __iomem *)LPAPLL_L_REG, |
| 5570 | .m_reg = (void __iomem *)LPAPLL_M_REG, |
| 5571 | .n_reg = (void __iomem *)LPAPLL_N_REG, |
| 5572 | .config_reg = (void __iomem *)LPAPLL_USER_CTL_REG, |
| 5573 | .mode_reg = (void __iomem *)LPAPLL_MODE_REG, |
| 5574 | .base = &virt_bases[LPASS_BASE], |
| 5575 | }; |
| 5576 | |
| 5577 | /* LPAPLL0 at 491.52 MHz, main output enabled. */ |
| 5578 | static struct pll_config lpapll0_config __initdata = { |
| 5579 | .l = 0x33, |
| 5580 | .m = 0x1, |
| 5581 | .n = 0x5, |
| 5582 | .vco_val = 0x0, |
| 5583 | .vco_mask = BM(21, 20), |
| 5584 | .pre_div_val = BVAL(14, 12, 0x1), |
| 5585 | .pre_div_mask = BM(14, 12), |
| 5586 | .post_div_val = 0x0, |
| 5587 | .post_div_mask = BM(9, 8), |
| 5588 | .mn_ena_val = BIT(24), |
| 5589 | .mn_ena_mask = BIT(24), |
| 5590 | .main_output_val = BIT(0), |
| 5591 | .main_output_mask = BIT(0), |
| 5592 | }; |
| 5593 | |
Matt Wagantall | 8c55d7e | 2012-07-17 19:46:32 -0700 | [diff] [blame] | 5594 | #define PLL_AUX_OUTPUT_BIT 1 |
Matt Wagantall | e750237 | 2012-08-08 00:10:10 -0700 | [diff] [blame] | 5595 | #define PLL_AUX2_OUTPUT_BIT 2 |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5596 | |
Vikram Mulukutla | 14ee37d | 2012-08-08 15:18:09 -0700 | [diff] [blame] | 5597 | #define PWR_ON_MASK BIT(31) |
| 5598 | #define EN_REST_WAIT_MASK (0xF << 20) |
| 5599 | #define EN_FEW_WAIT_MASK (0xF << 16) |
| 5600 | #define CLK_DIS_WAIT_MASK (0xF << 12) |
| 5601 | #define SW_OVERRIDE_MASK BIT(2) |
| 5602 | #define HW_CONTROL_MASK BIT(1) |
| 5603 | #define SW_COLLAPSE_MASK BIT(0) |
| 5604 | |
| 5605 | /* Wait 2^n CXO cycles between all states. Here, n=2 (4 cycles). */ |
| 5606 | #define EN_REST_WAIT_VAL (0x2 << 20) |
| 5607 | #define EN_FEW_WAIT_VAL (0x2 << 16) |
| 5608 | #define CLK_DIS_WAIT_VAL (0x2 << 12) |
| 5609 | #define GDSC_TIMEOUT_US 50000 |
| 5610 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5611 | static void __init reg_init(void) |
| 5612 | { |
Vikram Mulukutla | 14ee37d | 2012-08-08 15:18:09 -0700 | [diff] [blame] | 5613 | u32 regval, status; |
| 5614 | int ret; |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5615 | |
| 5616 | if (!(readl_relaxed(GCC_REG_BASE(GPLL0_STATUS_REG)) |
| 5617 | & gpll0_clk_src.status_mask)) |
Vikram Mulukutla | 6da35d3 | 2012-07-18 13:55:31 -0700 | [diff] [blame] | 5618 | configure_sr_hpm_lp_pll(&gpll0_config, &gpll0_regs, 1); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5619 | |
| 5620 | if (!(readl_relaxed(GCC_REG_BASE(GPLL1_STATUS_REG)) |
| 5621 | & gpll1_clk_src.status_mask)) |
Vikram Mulukutla | 6da35d3 | 2012-07-18 13:55:31 -0700 | [diff] [blame] | 5622 | configure_sr_hpm_lp_pll(&gpll1_config, &gpll1_regs, 1); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5623 | |
Vikram Mulukutla | 6da35d3 | 2012-07-18 13:55:31 -0700 | [diff] [blame] | 5624 | configure_sr_hpm_lp_pll(&mmpll0_config, &mmpll0_regs, 1); |
| 5625 | configure_sr_hpm_lp_pll(&mmpll1_config, &mmpll1_regs, 1); |
| 5626 | configure_sr_hpm_lp_pll(&mmpll3_config, &mmpll3_regs, 0); |
| 5627 | configure_sr_hpm_lp_pll(&lpapll0_config, &lpapll0_regs, 1); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5628 | |
Matt Wagantall | e750237 | 2012-08-08 00:10:10 -0700 | [diff] [blame] | 5629 | /* Enable GPLL0's aux outputs. */ |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5630 | regval = readl_relaxed(GCC_REG_BASE(GPLL0_USER_CTL_REG)); |
Matt Wagantall | e750237 | 2012-08-08 00:10:10 -0700 | [diff] [blame] | 5631 | regval |= BIT(PLL_AUX_OUTPUT_BIT) | BIT(PLL_AUX2_OUTPUT_BIT); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5632 | writel_relaxed(regval, GCC_REG_BASE(GPLL0_USER_CTL_REG)); |
| 5633 | |
| 5634 | /* Vote for GPLL0 to turn on. Needed by acpuclock. */ |
| 5635 | regval = readl_relaxed(GCC_REG_BASE(APCS_GPLL_ENA_VOTE_REG)); |
| 5636 | regval |= BIT(0); |
| 5637 | writel_relaxed(regval, GCC_REG_BASE(APCS_GPLL_ENA_VOTE_REG)); |
| 5638 | |
| 5639 | /* |
| 5640 | * TODO: Confirm that no clocks need to be voted on in this sleep vote |
| 5641 | * register. |
| 5642 | */ |
| 5643 | writel_relaxed(0x0, GCC_REG_BASE(APCS_CLOCK_SLEEP_ENA_VOTE)); |
Vikram Mulukutla | 14ee37d | 2012-08-08 15:18:09 -0700 | [diff] [blame] | 5644 | |
| 5645 | /* |
| 5646 | * TODO: The following sequence enables the LPASS audio core GDSC. |
| 5647 | * Remove when this becomes unnecessary. |
| 5648 | */ |
| 5649 | |
| 5650 | /* |
| 5651 | * Disable HW trigger: collapse/restore occur based on registers writes. |
| 5652 | * Disable SW override: Use hardware state-machine for sequencing. |
| 5653 | */ |
| 5654 | regval = readl_relaxed(LPASS_REG_BASE(AUDIO_CORE_GDSCR)); |
| 5655 | regval &= ~(HW_CONTROL_MASK | SW_OVERRIDE_MASK); |
| 5656 | |
| 5657 | /* Configure wait time between states. */ |
| 5658 | regval &= ~(EN_REST_WAIT_MASK | EN_FEW_WAIT_MASK | CLK_DIS_WAIT_MASK); |
| 5659 | regval |= EN_REST_WAIT_VAL | EN_FEW_WAIT_VAL | CLK_DIS_WAIT_VAL; |
| 5660 | writel_relaxed(regval, LPASS_REG_BASE(AUDIO_CORE_GDSCR)); |
| 5661 | |
| 5662 | regval = readl_relaxed(LPASS_REG_BASE(AUDIO_CORE_GDSCR)); |
| 5663 | regval &= ~BIT(0); |
| 5664 | writel_relaxed(regval, LPASS_REG_BASE(AUDIO_CORE_GDSCR)); |
| 5665 | |
| 5666 | ret = readl_poll_timeout(LPASS_REG_BASE(AUDIO_CORE_GDSCR), status, |
| 5667 | status & PWR_ON_MASK, 50, GDSC_TIMEOUT_US); |
| 5668 | WARN(ret, "LPASS Audio Core GDSC did not power on.\n"); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5669 | } |
| 5670 | |
Vikram Mulukutla | fe0f5a5 | 2012-08-16 16:51:08 -0700 | [diff] [blame] | 5671 | static void __init mdss_clock_setup(void) |
| 5672 | { |
| 5673 | clk_ops_byte = clk_ops_rcg_mnd; |
| 5674 | clk_ops_byte.set_rate = set_rate_byte; |
| 5675 | clk_ops_dsi_byte_pll.get_parent = dsi_pll_clk_get_parent; |
| 5676 | |
| 5677 | clk_ops_pixel = clk_ops_rcg; |
| 5678 | clk_ops_pixel.set_rate = set_rate_pixel; |
| 5679 | clk_ops_dsi_pixel_pll.get_parent = dsi_pll_clk_get_parent; |
| 5680 | |
| 5681 | mdss_clk_ctrl_init(); |
| 5682 | } |
| 5683 | |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 5684 | static void __init msm8974_clock_post_init(void) |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5685 | { |
Vikram Mulukutla | d16a8f1 | 2012-07-20 13:33:45 -0700 | [diff] [blame] | 5686 | clk_set_rate(&axi_clk_src.c, 282000000); |
| 5687 | clk_set_rate(&ocmemnoc_clk_src.c, 282000000); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5688 | |
Vikram Mulukutla | f8634bb | 2012-06-28 16:21:21 -0700 | [diff] [blame] | 5689 | /* |
Vikram Mulukutla | 09e2081 | 2012-07-12 11:32:42 -0700 | [diff] [blame] | 5690 | * Hold an active set vote at a rate of 40MHz for the MMSS NOC AHB |
| 5691 | * source. Sleep set vote is 0. |
| 5692 | */ |
| 5693 | clk_set_rate(&mmssnoc_ahb_a_clk.c, 40000000); |
| 5694 | clk_prepare_enable(&mmssnoc_ahb_a_clk.c); |
| 5695 | |
| 5696 | /* |
Vikram Mulukutla | f8634bb | 2012-06-28 16:21:21 -0700 | [diff] [blame] | 5697 | * Hold an active set vote for CXO; this is because CXO is expected |
| 5698 | * to remain on whenever CPUs aren't power collapsed. |
| 5699 | */ |
| 5700 | clk_prepare_enable(&cxo_a_clk_src.c); |
| 5701 | |
Vikram Mulukutla | 6c0f1a7 | 2012-08-10 01:59:28 -0700 | [diff] [blame] | 5702 | /* TODO: Temporarily enable a clock to allow access to LPASS core |
| 5703 | * registers. |
| 5704 | */ |
| 5705 | clk_prepare_enable(&audio_core_ixfabric_clk.c); |
| 5706 | |
Vikram Mulukutla | 274b2d9 | 2012-07-13 15:53:04 -0700 | [diff] [blame] | 5707 | /* |
| 5708 | * TODO: Temporarily enable NOC configuration AHB clocks. Remove when |
| 5709 | * the bus driver is ready. |
| 5710 | */ |
| 5711 | clk_prepare_enable(&gcc_mmss_noc_cfg_ahb_clk.c); |
| 5712 | clk_prepare_enable(&gcc_ocmem_noc_cfg_ahb_clk.c); |
| 5713 | |
Vikram Mulukutla | fe0f5a5 | 2012-08-16 16:51:08 -0700 | [diff] [blame] | 5714 | mdss_clock_setup(); |
| 5715 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5716 | /* Set rates for single-rate clocks. */ |
| 5717 | clk_set_rate(&usb30_master_clk_src.c, |
| 5718 | usb30_master_clk_src.freq_tbl[0].freq_hz); |
| 5719 | clk_set_rate(&tsif_ref_clk_src.c, |
| 5720 | tsif_ref_clk_src.freq_tbl[0].freq_hz); |
| 5721 | clk_set_rate(&usb_hs_system_clk_src.c, |
| 5722 | usb_hs_system_clk_src.freq_tbl[0].freq_hz); |
| 5723 | clk_set_rate(&usb_hsic_clk_src.c, |
| 5724 | usb_hsic_clk_src.freq_tbl[0].freq_hz); |
| 5725 | clk_set_rate(&usb_hsic_io_cal_clk_src.c, |
| 5726 | usb_hsic_io_cal_clk_src.freq_tbl[0].freq_hz); |
| 5727 | clk_set_rate(&usb_hsic_system_clk_src.c, |
| 5728 | usb_hsic_system_clk_src.freq_tbl[0].freq_hz); |
| 5729 | clk_set_rate(&usb30_mock_utmi_clk_src.c, |
| 5730 | usb30_mock_utmi_clk_src.freq_tbl[0].freq_hz); |
| 5731 | clk_set_rate(&pdm2_clk_src.c, pdm2_clk_src.freq_tbl[0].freq_hz); |
| 5732 | clk_set_rate(&cci_clk_src.c, cci_clk_src.freq_tbl[0].freq_hz); |
| 5733 | clk_set_rate(&mclk0_clk_src.c, mclk0_clk_src.freq_tbl[0].freq_hz); |
| 5734 | clk_set_rate(&mclk1_clk_src.c, mclk1_clk_src.freq_tbl[0].freq_hz); |
| 5735 | clk_set_rate(&mclk2_clk_src.c, mclk2_clk_src.freq_tbl[0].freq_hz); |
| 5736 | clk_set_rate(&edpaux_clk_src.c, edpaux_clk_src.freq_tbl[0].freq_hz); |
| 5737 | clk_set_rate(&esc0_clk_src.c, esc0_clk_src.freq_tbl[0].freq_hz); |
| 5738 | clk_set_rate(&esc1_clk_src.c, esc1_clk_src.freq_tbl[0].freq_hz); |
| 5739 | clk_set_rate(&hdmi_clk_src.c, hdmi_clk_src.freq_tbl[0].freq_hz); |
| 5740 | clk_set_rate(&vsync_clk_src.c, vsync_clk_src.freq_tbl[0].freq_hz); |
| 5741 | clk_set_rate(&audio_core_slimbus_core_clk_src.c, |
| 5742 | audio_core_slimbus_core_clk_src.freq_tbl[0].freq_hz); |
| 5743 | } |
| 5744 | |
Matt Wagantall | edf2fad | 2012-08-06 16:11:46 -0700 | [diff] [blame] | 5745 | #define GCC_CC_PHYS 0xFC400000 |
| 5746 | #define GCC_CC_SIZE SZ_16K |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5747 | |
Matt Wagantall | edf2fad | 2012-08-06 16:11:46 -0700 | [diff] [blame] | 5748 | #define MMSS_CC_PHYS 0xFD8C0000 |
| 5749 | #define MMSS_CC_SIZE SZ_256K |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5750 | |
Matt Wagantall | edf2fad | 2012-08-06 16:11:46 -0700 | [diff] [blame] | 5751 | #define LPASS_CC_PHYS 0xFE000000 |
| 5752 | #define LPASS_CC_SIZE SZ_256K |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5753 | |
Matt Wagantall | edf2fad | 2012-08-06 16:11:46 -0700 | [diff] [blame] | 5754 | #define APCS_GCC_CC_PHYS 0xF9011000 |
| 5755 | #define APCS_GCC_CC_SIZE SZ_4K |
Vikram Mulukutla | a967db4 | 2012-05-10 16:20:40 -0700 | [diff] [blame] | 5756 | |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 5757 | static void __init msm8974_clock_pre_init(void) |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5758 | { |
| 5759 | virt_bases[GCC_BASE] = ioremap(GCC_CC_PHYS, GCC_CC_SIZE); |
| 5760 | if (!virt_bases[GCC_BASE]) |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 5761 | panic("clock-8974: Unable to ioremap GCC memory!"); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5762 | |
| 5763 | virt_bases[MMSS_BASE] = ioremap(MMSS_CC_PHYS, MMSS_CC_SIZE); |
| 5764 | if (!virt_bases[MMSS_BASE]) |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 5765 | panic("clock-8974: Unable to ioremap MMSS_CC memory!"); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5766 | |
| 5767 | virt_bases[LPASS_BASE] = ioremap(LPASS_CC_PHYS, LPASS_CC_SIZE); |
| 5768 | if (!virt_bases[LPASS_BASE]) |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 5769 | panic("clock-8974: Unable to ioremap LPASS_CC memory!"); |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5770 | |
Matt Wagantall | edf2fad | 2012-08-06 16:11:46 -0700 | [diff] [blame] | 5771 | virt_bases[APCS_BASE] = ioremap(APCS_GCC_CC_PHYS, APCS_GCC_CC_SIZE); |
| 5772 | if (!virt_bases[APCS_BASE]) |
| 5773 | panic("clock-8974: Unable to ioremap APCS_GCC_CC memory!"); |
| 5774 | |
Vikram Mulukutla | 6da35d3 | 2012-07-18 13:55:31 -0700 | [diff] [blame] | 5775 | clk_ops_local_pll.enable = sr_hpm_lp_pll_clk_enable; |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5776 | |
Vikram Mulukutla | b7a1a74 | 2012-05-30 17:24:33 -0700 | [diff] [blame] | 5777 | vdd_dig_reg = rpm_regulator_get(NULL, "vdd_dig"); |
| 5778 | if (IS_ERR(vdd_dig_reg)) |
Vikram Mulukutla | 19245e0 | 2012-07-23 15:58:04 -0700 | [diff] [blame] | 5779 | panic("clock-8974: Unable to get the vdd_dig regulator!"); |
Vikram Mulukutla | b7a1a74 | 2012-05-30 17:24:33 -0700 | [diff] [blame] | 5780 | |
| 5781 | /* |
| 5782 | * TODO: Set a voltage and enable vdd_dig, leaving the voltage high |
| 5783 | * until late_init. This may not be necessary with clock handoff; |
| 5784 | * Investigate this code on a real non-simulator target to determine |
| 5785 | * its necessity. |
| 5786 | */ |
| 5787 | vote_vdd_level(&vdd_dig, VDD_DIG_HIGH); |
| 5788 | rpm_regulator_enable(vdd_dig_reg); |
| 5789 | |
Vikram Mulukutla | 77140da | 2012-08-13 21:37:18 -0700 | [diff] [blame] | 5790 | enable_rpm_scaling(); |
| 5791 | |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5792 | reg_init(); |
| 5793 | } |
| 5794 | |
Vikram Mulukutla | b7a1a74 | 2012-05-30 17:24:33 -0700 | [diff] [blame] | 5795 | static int __init msm8974_clock_late_init(void) |
| 5796 | { |
| 5797 | return unvote_vdd_level(&vdd_dig, VDD_DIG_HIGH); |
| 5798 | } |
| 5799 | |
Vikram Mulukutla | 19245e0 | 2012-07-23 15:58:04 -0700 | [diff] [blame] | 5800 | static void __init msm8974_rumi_clock_pre_init(void) |
| 5801 | { |
| 5802 | virt_bases[GCC_BASE] = ioremap(GCC_CC_PHYS, GCC_CC_SIZE); |
| 5803 | if (!virt_bases[GCC_BASE]) |
| 5804 | panic("clock-8974: Unable to ioremap GCC memory!"); |
| 5805 | |
| 5806 | /* SDCC clocks are partially emulated in the RUMI */ |
| 5807 | sdcc1_apps_clk_src.freq_tbl = ftbl_gcc_sdcc_apps_rumi_clk; |
| 5808 | sdcc2_apps_clk_src.freq_tbl = ftbl_gcc_sdcc_apps_rumi_clk; |
| 5809 | sdcc3_apps_clk_src.freq_tbl = ftbl_gcc_sdcc_apps_rumi_clk; |
| 5810 | sdcc4_apps_clk_src.freq_tbl = ftbl_gcc_sdcc_apps_rumi_clk; |
| 5811 | |
| 5812 | vdd_dig_reg = rpm_regulator_get(NULL, "vdd_dig"); |
| 5813 | if (IS_ERR(vdd_dig_reg)) |
| 5814 | panic("clock-8974: Unable to get the vdd_dig regulator!"); |
| 5815 | |
| 5816 | /* |
| 5817 | * TODO: Set a voltage and enable vdd_dig, leaving the voltage high |
| 5818 | * until late_init. This may not be necessary with clock handoff; |
| 5819 | * Investigate this code on a real non-simulator target to determine |
| 5820 | * its necessity. |
| 5821 | */ |
| 5822 | vote_vdd_level(&vdd_dig, VDD_DIG_HIGH); |
| 5823 | rpm_regulator_enable(vdd_dig_reg); |
| 5824 | } |
| 5825 | |
Abhimanyu Kapur | 90ced6e | 2012-06-26 17:41:25 -0700 | [diff] [blame] | 5826 | struct clock_init_data msm8974_clock_init_data __initdata = { |
| 5827 | .table = msm_clocks_8974, |
| 5828 | .size = ARRAY_SIZE(msm_clocks_8974), |
| 5829 | .pre_init = msm8974_clock_pre_init, |
| 5830 | .post_init = msm8974_clock_post_init, |
Vikram Mulukutla | b7a1a74 | 2012-05-30 17:24:33 -0700 | [diff] [blame] | 5831 | .late_init = msm8974_clock_late_init, |
Vikram Mulukutla | aa3e011 | 2012-04-23 14:40:51 -0700 | [diff] [blame] | 5832 | }; |
Vikram Mulukutla | 19245e0 | 2012-07-23 15:58:04 -0700 | [diff] [blame] | 5833 | |
| 5834 | struct clock_init_data msm8974_rumi_clock_init_data __initdata = { |
| 5835 | .table = msm_clocks_8974_rumi, |
| 5836 | .size = ARRAY_SIZE(msm_clocks_8974_rumi), |
| 5837 | .pre_init = msm8974_rumi_clock_pre_init, |
| 5838 | }; |