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