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