Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -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 "clock.h" |
Pankaj Kumar | 3912c98 | 2011-12-07 16:59:03 +0530 | [diff] [blame] | 14 | #include "clock-pll.h" |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 15 | #include "clock-pcom.h" |
| 16 | #include "clock-voter.h" |
| 17 | |
Pankaj Kumar | 3912c98 | 2011-12-07 16:59:03 +0530 | [diff] [blame] | 18 | #include <mach/msm_iomap.h> |
| 19 | #include <mach/socinfo.h> |
| 20 | |
| 21 | #define PLLn_MODE(n) (MSM_CLK_CTL_BASE + 0x300 + 28 * (n)) |
| 22 | #define PLL4_MODE (MSM_CLK_CTL_BASE + 0x374) |
| 23 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 24 | static DEFINE_CLK_PCOM(adm_clk, ADM_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 25 | static DEFINE_CLK_PCOM(adsp_clk, ADSP_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 26 | static DEFINE_CLK_PCOM(ahb_m_clk, AHB_M_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 27 | static DEFINE_CLK_PCOM(ahb_s_clk, AHB_S_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 28 | static DEFINE_CLK_PCOM(cam_m_clk, CAM_M_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 29 | static DEFINE_CLK_PCOM(axi_rotator_clk, AXI_ROTATOR_CLK, 0); |
| 30 | static DEFINE_CLK_PCOM(ce_clk, CE_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 31 | static DEFINE_CLK_PCOM(csi0_clk, CSI0_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 32 | static DEFINE_CLK_PCOM(csi0_p_clk, CSI0_P_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 33 | static DEFINE_CLK_PCOM(csi0_vfe_clk, CSI0_VFE_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 34 | static DEFINE_CLK_PCOM(csi1_clk, CSI1_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 35 | static DEFINE_CLK_PCOM(csi1_p_clk, CSI1_P_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 36 | static DEFINE_CLK_PCOM(csi1_vfe_clk, CSI1_VFE_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 37 | |
Pankaj Kumar | 3912c98 | 2011-12-07 16:59:03 +0530 | [diff] [blame] | 38 | static struct pll_shared_clk pll0_clk = { |
| 39 | .id = PLL_0, |
| 40 | .mode_reg = PLLn_MODE(0), |
| 41 | .c = { |
| 42 | .ops = &clk_pll_ops, |
| 43 | .dbg_name = "pll0_clk", |
| 44 | CLK_INIT(pll0_clk.c), |
| 45 | }, |
| 46 | }; |
| 47 | |
| 48 | static struct pll_shared_clk pll1_clk = { |
| 49 | .id = PLL_1, |
| 50 | .mode_reg = PLLn_MODE(1), |
| 51 | .c = { |
| 52 | .ops = &clk_pll_ops, |
| 53 | .dbg_name = "pll1_clk", |
| 54 | CLK_INIT(pll1_clk.c), |
| 55 | }, |
| 56 | }; |
| 57 | |
| 58 | static struct pll_shared_clk pll2_clk = { |
| 59 | .id = PLL_2, |
| 60 | .mode_reg = PLLn_MODE(2), |
| 61 | .c = { |
| 62 | .ops = &clk_pll_ops, |
| 63 | .dbg_name = "pll2_clk", |
| 64 | CLK_INIT(pll2_clk.c), |
| 65 | }, |
| 66 | }; |
| 67 | |
| 68 | static struct pll_shared_clk pll4_clk = { |
| 69 | .id = PLL_4, |
| 70 | .mode_reg = PLL4_MODE, |
| 71 | .c = { |
| 72 | .ops = &clk_pll_ops, |
| 73 | .dbg_name = "pll4_clk", |
| 74 | CLK_INIT(pll4_clk.c), |
| 75 | }, |
| 76 | }; |
| 77 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 78 | static struct pcom_clk dsi_byte_clk = { |
| 79 | .id = P_DSI_BYTE_CLK, |
| 80 | .c = { |
| 81 | .ops = &clk_ops_pcom_ext_config, |
| 82 | .dbg_name = "dsi_byte_clk", |
| 83 | CLK_INIT(dsi_byte_clk.c), |
| 84 | }, |
| 85 | }; |
| 86 | |
| 87 | static struct pcom_clk dsi_clk = { |
| 88 | .id = P_DSI_CLK, |
| 89 | .c = { |
| 90 | .ops = &clk_ops_pcom_ext_config, |
| 91 | .dbg_name = "dsi_clk", |
| 92 | CLK_INIT(dsi_clk.c), |
| 93 | }, |
| 94 | }; |
| 95 | |
| 96 | static struct pcom_clk dsi_esc_clk = { |
| 97 | .id = P_DSI_ESC_CLK, |
| 98 | .c = { |
| 99 | .ops = &clk_ops_pcom_ext_config, |
| 100 | .dbg_name = "dsi_esc_clk", |
| 101 | CLK_INIT(dsi_esc_clk.c), |
| 102 | }, |
| 103 | }; |
| 104 | |
| 105 | static struct pcom_clk dsi_pixel_clk = { |
| 106 | .id = P_DSI_PIXEL_CLK, |
| 107 | .c = { |
| 108 | .ops = &clk_ops_pcom_ext_config, |
| 109 | .dbg_name = "dsi_pixel_clk", |
| 110 | CLK_INIT(dsi_pixel_clk.c), |
| 111 | }, |
| 112 | }; |
| 113 | |
| 114 | static DEFINE_CLK_PCOM(dsi_ref_clk, DSI_REF_CLK, 0); |
| 115 | static DEFINE_CLK_PCOM(ebi1_clk, EBI1_CLK, |
| 116 | CLKFLAG_SKIP_AUTO_OFF | CLKFLAG_MIN); |
| 117 | static DEFINE_CLK_PCOM(ebi2_clk, EBI2_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 118 | static DEFINE_CLK_PCOM(ecodec_clk, ECODEC_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 119 | static DEFINE_CLK_PCOM(emdh_clk, EMDH_CLK, CLKFLAG_MIN | CLKFLAG_MAX); |
| 120 | static DEFINE_CLK_PCOM(gp_clk, GP_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 121 | static DEFINE_CLK_PCOM(grp_2d_clk, GRP_2D_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 122 | static DEFINE_CLK_PCOM(grp_2d_p_clk, GRP_2D_P_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 123 | static DEFINE_CLK_PCOM(grp_3d_clk, GRP_3D_CLK, 0); |
| 124 | static DEFINE_CLK_PCOM(grp_3d_p_clk, GRP_3D_P_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 125 | static DEFINE_CLK_PCOM(gsbi1_qup_clk, GSBI1_QUP_CLK, 0); |
| 126 | static DEFINE_CLK_PCOM(gsbi1_qup_p_clk, GSBI1_QUP_P_CLK, 0); |
| 127 | static DEFINE_CLK_PCOM(gsbi2_qup_clk, GSBI2_QUP_CLK, 0); |
| 128 | static DEFINE_CLK_PCOM(gsbi2_qup_p_clk, GSBI2_QUP_P_CLK, 0); |
| 129 | static DEFINE_CLK_PCOM(gsbi_clk, GSBI_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 130 | static DEFINE_CLK_PCOM(gsbi_p_clk, GSBI_P_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 131 | static DEFINE_CLK_PCOM(hdmi_clk, HDMI_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 132 | static DEFINE_CLK_PCOM(i2c_clk, I2C_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 133 | static DEFINE_CLK_PCOM(icodec_rx_clk, ICODEC_RX_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 134 | static DEFINE_CLK_PCOM(icodec_tx_clk, ICODEC_TX_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 135 | static DEFINE_CLK_PCOM(imem_clk, IMEM_CLK, 0); |
| 136 | static DEFINE_CLK_PCOM(mdc_clk, MDC_CLK, CLKFLAG_SKIP_AUTO_OFF); |
Matt Wagantall | a12cc95 | 2011-11-08 18:14:50 -0800 | [diff] [blame] | 137 | static DEFINE_CLK_PCOM(mdp_clk, MDP_CLK, CLKFLAG_MIN); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 138 | static DEFINE_CLK_PCOM(mdp_lcdc_pad_pclk_clk, MDP_LCDC_PAD_PCLK_CLK, |
| 139 | CLKFLAG_SKIP_AUTO_OFF); |
| 140 | static DEFINE_CLK_PCOM(mdp_lcdc_pclk_clk, MDP_LCDC_PCLK_CLK, |
| 141 | CLKFLAG_SKIP_AUTO_OFF); |
| 142 | static DEFINE_CLK_PCOM(mdp_vsync_clk, MDP_VSYNC_CLK, 0); |
| 143 | static DEFINE_CLK_PCOM(mdp_dsi_p_clk, MDP_DSI_P_CLK, 0); |
| 144 | static DEFINE_CLK_PCOM(pbus_clk, PBUS_CLK, |
| 145 | CLKFLAG_SKIP_AUTO_OFF | CLKFLAG_MIN); |
| 146 | static DEFINE_CLK_PCOM(pcm_clk, PCM_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 147 | static DEFINE_CLK_PCOM(pmdh_clk, PMDH_CLK, CLKFLAG_MIN | CLKFLAG_MAX); |
| 148 | static DEFINE_CLK_PCOM(sdac_clk, SDAC_CLK, 0); |
| 149 | static DEFINE_CLK_PCOM(sdc1_clk, SDC1_CLK, 0); |
| 150 | static DEFINE_CLK_PCOM(sdc1_p_clk, SDC1_P_CLK, 0); |
| 151 | static DEFINE_CLK_PCOM(sdc2_clk, SDC2_CLK, 0); |
| 152 | static DEFINE_CLK_PCOM(sdc2_p_clk, SDC2_P_CLK, 0); |
| 153 | static DEFINE_CLK_PCOM(sdc3_clk, SDC3_CLK, 0); |
| 154 | static DEFINE_CLK_PCOM(sdc3_p_clk, SDC3_P_CLK, 0); |
| 155 | static DEFINE_CLK_PCOM(sdc4_clk, SDC4_CLK, 0); |
| 156 | static DEFINE_CLK_PCOM(sdc4_p_clk, SDC4_P_CLK, 0); |
| 157 | static DEFINE_CLK_PCOM(spi_clk, SPI_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 158 | static DEFINE_CLK_PCOM(tsif_clk, TSIF_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 159 | static DEFINE_CLK_PCOM(tsif_p_clk, TSIF_P_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 160 | static DEFINE_CLK_PCOM(tsif_ref_clk, TSIF_REF_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 161 | static DEFINE_CLK_PCOM(tv_dac_clk, TV_DAC_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 162 | static DEFINE_CLK_PCOM(tv_enc_clk, TV_ENC_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 163 | static DEFINE_CLK_PCOM(uart1_clk, UART1_CLK, 0); |
| 164 | static DEFINE_CLK_PCOM(uart1dm_clk, UART1DM_CLK, 0); |
| 165 | static DEFINE_CLK_PCOM(uart2_clk, UART2_CLK, 0); |
| 166 | static DEFINE_CLK_PCOM(uart2dm_clk, UART2DM_CLK, 0); |
| 167 | static DEFINE_CLK_PCOM(uart3_clk, UART3_CLK, 0); |
| 168 | static DEFINE_CLK_PCOM(usb_hs2_clk, USB_HS2_CLK, 0); |
| 169 | static DEFINE_CLK_PCOM(usb_hs2_p_clk, USB_HS2_P_CLK, 0); |
| 170 | static DEFINE_CLK_PCOM(usb_hs3_clk, USB_HS3_CLK, 0); |
| 171 | static DEFINE_CLK_PCOM(usb_hs3_p_clk, USB_HS3_P_CLK, 0); |
| 172 | static DEFINE_CLK_PCOM(usb_hs_clk, USB_HS_CLK, 0); |
| 173 | static DEFINE_CLK_PCOM(usb_hs_core_clk, USB_HS_CORE_CLK, 0); |
| 174 | static DEFINE_CLK_PCOM(usb_hs_p_clk, USB_HS_P_CLK, 0); |
| 175 | static DEFINE_CLK_PCOM(usb_otg_clk, USB_OTG_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 176 | static DEFINE_CLK_PCOM(usb_phy_clk, USB_PHY_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 177 | static DEFINE_CLK_PCOM(vdc_clk, VDC_CLK, CLKFLAG_MIN); |
| 178 | static DEFINE_CLK_PCOM(vfe_axi_clk, VFE_AXI_CLK, 0); |
| 179 | static DEFINE_CLK_PCOM(vfe_clk, VFE_CLK, 0); |
| 180 | static DEFINE_CLK_PCOM(vfe_mdc_clk, VFE_MDC_CLK, 0); |
| 181 | |
| 182 | static DEFINE_CLK_VOTER(ebi_acpu_clk, &ebi1_clk.c); |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 183 | static DEFINE_CLK_VOTER(ebi_grp_3d_clk, &ebi1_clk.c); |
| 184 | static DEFINE_CLK_VOTER(ebi_grp_2d_clk, &ebi1_clk.c); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 185 | static DEFINE_CLK_VOTER(ebi_lcdc_clk, &ebi1_clk.c); |
| 186 | static DEFINE_CLK_VOTER(ebi_mddi_clk, &ebi1_clk.c); |
| 187 | static DEFINE_CLK_VOTER(ebi_tv_clk, &ebi1_clk.c); |
| 188 | static DEFINE_CLK_VOTER(ebi_usb_clk, &ebi1_clk.c); |
| 189 | static DEFINE_CLK_VOTER(ebi_vfe_clk, &ebi1_clk.c); |
| 190 | static DEFINE_CLK_VOTER(ebi_adm_clk, &ebi1_clk.c); |
| 191 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 192 | static struct clk_lookup msm_clocks_7x01a[] = { |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 193 | CLK_LOOKUP("core_clk", adm_clk.c, "msm_dmov"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 194 | CLK_LOOKUP("adsp_clk", adsp_clk.c, NULL), |
| 195 | CLK_LOOKUP("ebi1_clk", ebi1_clk.c, NULL), |
| 196 | CLK_LOOKUP("ebi2_clk", ebi2_clk.c, NULL), |
| 197 | CLK_LOOKUP("ecodec_clk", ecodec_clk.c, NULL), |
| 198 | CLK_LOOKUP("emdh_clk", emdh_clk.c, NULL), |
Matt Wagantall | c00f95d | 2012-01-05 14:22:45 -0800 | [diff] [blame] | 199 | CLK_LOOKUP("core_clk", gp_clk.c, ""), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 200 | CLK_LOOKUP("core_clk", grp_3d_clk.c, "kgsl-3d0.0"), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 201 | CLK_LOOKUP("core_clk", i2c_clk.c, "msm_i2c.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 202 | CLK_LOOKUP("icodec_rx_clk", icodec_rx_clk.c, NULL), |
| 203 | CLK_LOOKUP("icodec_tx_clk", icodec_tx_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 204 | CLK_LOOKUP("mem_clk", imem_clk.c, NULL), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 205 | CLK_LOOKUP("mdc_clk", mdc_clk.c, NULL), |
| 206 | CLK_LOOKUP("mddi_clk", pmdh_clk.c, NULL), |
| 207 | CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL), |
| 208 | CLK_LOOKUP("pbus_clk", pbus_clk.c, NULL), |
| 209 | CLK_LOOKUP("pcm_clk", pcm_clk.c, NULL), |
| 210 | CLK_LOOKUP("sdac_clk", sdac_clk.c, NULL), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 211 | CLK_LOOKUP("core_clk", sdc1_clk.c, "msm_sdcc.1"), |
| 212 | CLK_LOOKUP("iface_clk", sdc1_p_clk.c, "msm_sdcc.1"), |
| 213 | CLK_LOOKUP("core_clk", sdc2_clk.c, "msm_sdcc.2"), |
| 214 | CLK_LOOKUP("iface_clk", sdc2_p_clk.c, "msm_sdcc.2"), |
| 215 | CLK_LOOKUP("core_clk", sdc3_clk.c, "msm_sdcc.3"), |
| 216 | CLK_LOOKUP("iface_clk", sdc3_p_clk.c, "msm_sdcc.3"), |
| 217 | CLK_LOOKUP("core_clk", sdc4_clk.c, "msm_sdcc.4"), |
| 218 | CLK_LOOKUP("iface_clk", sdc4_p_clk.c, "msm_sdcc.4"), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 219 | CLK_LOOKUP("core_clk", tsif_clk.c, "msm_tsif.0"), |
| 220 | CLK_LOOKUP("ref_clk", tsif_ref_clk.c, "msm_tsif.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 221 | CLK_LOOKUP("tv_dac_clk", tv_dac_clk.c, NULL), |
| 222 | CLK_LOOKUP("tv_enc_clk", tv_enc_clk.c, NULL), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 223 | CLK_LOOKUP("core_clk", uart1_clk.c, "msm_serial.0"), |
| 224 | CLK_LOOKUP("core_clk", uart2_clk.c, "msm_serial.1"), |
| 225 | CLK_LOOKUP("core_clk", uart3_clk.c, "msm_serial.2"), |
| 226 | CLK_LOOKUP("core_clk", uart1dm_clk.c, "msm_serial_hs.0"), |
| 227 | CLK_LOOKUP("core_clk", uart2dm_clk.c, "msm_serial_hs.1"), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 228 | CLK_LOOKUP("alt_core_clk", usb_hs_clk.c, "msm_otg"), |
| 229 | CLK_LOOKUP("iface_clk", usb_hs_p_clk.c, "msm_otg"), |
| 230 | CLK_LOOKUP("alt_core_clk", usb_hs_clk.c, "msm_hsusb_otg"), |
| 231 | CLK_LOOKUP("iface_clk", usb_hs_p_clk.c, "msm_hsusb_otg"), |
| 232 | CLK_LOOKUP("alt_core_clk", usb_hs_clk.c, "msm_hsusb_peripheral"), |
| 233 | CLK_LOOKUP("iface_clk", usb_hs_p_clk.c, "msm_hsusb_peripheral"), |
| 234 | CLK_LOOKUP("alt_core_clk", usb_otg_clk.c, NULL), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 235 | CLK_LOOKUP("vdc_clk", vdc_clk.c, NULL), |
| 236 | CLK_LOOKUP("vfe_clk", vfe_clk.c, NULL), |
| 237 | CLK_LOOKUP("vfe_mdc_clk", vfe_mdc_clk.c, NULL), |
| 238 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 239 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 240 | struct clock_init_data msm7x01a_clock_init_data __initdata = { |
| 241 | .table = msm_clocks_7x01a, |
| 242 | .size = ARRAY_SIZE(msm_clocks_7x01a), |
| 243 | }; |
| 244 | |
| 245 | static struct clk_lookup msm_clocks_7x27[] = { |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 246 | CLK_LOOKUP("core_clk", adm_clk.c, "msm_dmov"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 247 | CLK_LOOKUP("adsp_clk", adsp_clk.c, NULL), |
| 248 | CLK_LOOKUP("ebi1_clk", ebi1_clk.c, NULL), |
| 249 | CLK_LOOKUP("ebi2_clk", ebi2_clk.c, NULL), |
| 250 | CLK_LOOKUP("ecodec_clk", ecodec_clk.c, NULL), |
Matt Wagantall | c00f95d | 2012-01-05 14:22:45 -0800 | [diff] [blame] | 251 | CLK_LOOKUP("core_clk", gp_clk.c, ""), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 252 | CLK_LOOKUP("core_clk", grp_3d_clk.c, "kgsl-3d0.0"), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 253 | CLK_LOOKUP("core_clk", grp_3d_clk.c, "footswitch-pcom.2"), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 254 | CLK_LOOKUP("iface_clk", grp_3d_p_clk.c, "kgsl-3d0.0"), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 255 | CLK_LOOKUP("core_clk", i2c_clk.c, "msm_i2c.0"), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 256 | CLK_LOOKUP("iface_clk", grp_3d_p_clk.c, "footswitch-pcom.2"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 257 | CLK_LOOKUP("icodec_rx_clk", icodec_rx_clk.c, NULL), |
| 258 | CLK_LOOKUP("icodec_tx_clk", icodec_tx_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 259 | CLK_LOOKUP("mem_clk", imem_clk.c, NULL), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 260 | CLK_LOOKUP("mdc_clk", mdc_clk.c, NULL), |
| 261 | CLK_LOOKUP("mddi_clk", pmdh_clk.c, NULL), |
| 262 | CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL), |
| 263 | CLK_LOOKUP("mdp_lcdc_pclk_clk", mdp_lcdc_pclk_clk.c, NULL), |
| 264 | CLK_LOOKUP("mdp_lcdc_pad_pclk_clk", mdp_lcdc_pad_pclk_clk.c, NULL), |
| 265 | CLK_LOOKUP("mdp_vsync_clk", mdp_vsync_clk.c, NULL), |
| 266 | CLK_LOOKUP("pbus_clk", pbus_clk.c, NULL), |
| 267 | CLK_LOOKUP("pcm_clk", pcm_clk.c, NULL), |
| 268 | CLK_LOOKUP("sdac_clk", sdac_clk.c, NULL), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 269 | CLK_LOOKUP("core_clk", sdc1_clk.c, "msm_sdcc.1"), |
| 270 | CLK_LOOKUP("iface_clk", sdc1_p_clk.c, "msm_sdcc.1"), |
| 271 | CLK_LOOKUP("core_clk", sdc2_clk.c, "msm_sdcc.2"), |
| 272 | CLK_LOOKUP("iface_clk", sdc2_p_clk.c, "msm_sdcc.2"), |
| 273 | CLK_LOOKUP("core_clk", sdc3_clk.c, "msm_sdcc.3"), |
| 274 | CLK_LOOKUP("iface_clk", sdc3_p_clk.c, "msm_sdcc.3"), |
| 275 | CLK_LOOKUP("core_clk", sdc4_clk.c, "msm_sdcc.4"), |
| 276 | CLK_LOOKUP("iface_clk", sdc4_p_clk.c, "msm_sdcc.4"), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 277 | CLK_LOOKUP("core_clk", tsif_clk.c, "msm_tsif.0"), |
| 278 | CLK_LOOKUP("ref_clk", tsif_ref_clk.c, "msm_tsif.0"), |
| 279 | CLK_LOOKUP("iface_clk", tsif_p_clk.c, "msm_tsif.0"), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 280 | CLK_LOOKUP("core_clk", uart1_clk.c, "msm_serial.0"), |
| 281 | CLK_LOOKUP("core_clk", uart2_clk.c, "msm_serial.1"), |
| 282 | CLK_LOOKUP("core_clk", uart1dm_clk.c, "msm_serial_hs.0"), |
| 283 | CLK_LOOKUP("core_clk", uart2dm_clk.c, "msm_serial_hs.1"), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 284 | CLK_LOOKUP("alt_core_clk", usb_hs_clk.c, "msm_otg"), |
| 285 | CLK_LOOKUP("iface_clk", usb_hs_p_clk.c, "msm_otg"), |
| 286 | CLK_LOOKUP("alt_core_clk", usb_otg_clk.c, NULL), |
| 287 | CLK_LOOKUP("phy_clk", usb_phy_clk.c, "msm_otg"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 288 | CLK_LOOKUP("vdc_clk", vdc_clk.c, NULL), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 289 | CLK_LOOKUP("core_clk", vdc_clk.c, "footswitch-pcom.7"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 290 | CLK_LOOKUP("vfe_clk", vfe_clk.c, NULL), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 291 | CLK_LOOKUP("core_clk", vfe_clk.c, "footswitch-pcom.8"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 292 | CLK_LOOKUP("vfe_mdc_clk", vfe_mdc_clk.c, NULL), |
| 293 | |
| 294 | CLK_LOOKUP("ebi1_acpu_clk", ebi_acpu_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 295 | CLK_LOOKUP("bus_clk", ebi_grp_3d_clk.c, "kgsl-3d0.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 296 | CLK_LOOKUP("ebi1_lcdc_clk", ebi_lcdc_clk.c, NULL), |
| 297 | CLK_LOOKUP("ebi1_mddi_clk", ebi_mddi_clk.c, NULL), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 298 | CLK_LOOKUP("core_clk", ebi_usb_clk.c, "msm_otg"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 299 | CLK_LOOKUP("ebi1_vfe_clk", ebi_vfe_clk.c, NULL), |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 300 | CLK_LOOKUP("mem_clk", ebi_adm_clk.c, "msm_dmov"), |
Pankaj Kumar | 3912c98 | 2011-12-07 16:59:03 +0530 | [diff] [blame] | 301 | |
| 302 | CLK_LOOKUP("pll0_clk", pll0_clk.c, "acpu"), |
| 303 | CLK_LOOKUP("pll1_clk", pll1_clk.c, "acpu"), |
| 304 | CLK_LOOKUP("pll2_clk", pll2_clk.c, "acpu"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 305 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 306 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 307 | struct clock_init_data msm7x27_clock_init_data __initdata = { |
| 308 | .table = msm_clocks_7x27, |
| 309 | .size = ARRAY_SIZE(msm_clocks_7x27), |
Matt Wagantall | b64888f | 2012-04-02 21:35:07 -0700 | [diff] [blame^] | 310 | .pre_init = msm_shared_pll_control_init, |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 311 | }; |
| 312 | |
Pankaj Kumar | 3912c98 | 2011-12-07 16:59:03 +0530 | [diff] [blame] | 313 | /* Clock table for common clocks between 7627a and 7625a */ |
| 314 | static struct clk_lookup msm_cmn_clk_7625a_7627a[] __initdata = { |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 315 | CLK_LOOKUP("core_clk", adm_clk.c, "msm_dmov"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 316 | CLK_LOOKUP("adsp_clk", adsp_clk.c, NULL), |
| 317 | CLK_LOOKUP("ahb_m_clk", ahb_m_clk.c, NULL), |
| 318 | CLK_LOOKUP("ahb_s_clk", ahb_s_clk.c, NULL), |
| 319 | CLK_LOOKUP("cam_m_clk", cam_m_clk.c, NULL), |
Sandeep Kodimela | c6f7867 | 2012-03-07 10:44:04 +0530 | [diff] [blame] | 320 | CLK_LOOKUP("cam_clk", cam_m_clk.c, "0-0036"), |
| 321 | CLK_LOOKUP("cam_clk", cam_m_clk.c, "0-001b"), |
| 322 | CLK_LOOKUP("cam_clk", cam_m_clk.c, "0-0010"), |
Raju P.L.S.S.S.N | cc40097 | 2012-03-13 10:09:59 +0530 | [diff] [blame] | 323 | CLK_LOOKUP("cam_clk", cam_m_clk.c, "0-0078"), |
| 324 | CLK_LOOKUP("cam_clk", cam_m_clk.c, "0-006c"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 325 | CLK_LOOKUP("csi_clk", csi0_clk.c, "msm_camera_ov9726.0"), |
| 326 | CLK_LOOKUP("csi_pclk", csi0_p_clk.c, "msm_camera_ov9726.0"), |
| 327 | CLK_LOOKUP("csi_vfe_clk", csi0_vfe_clk.c, "msm_camera_ov9726.0"), |
Taniya Das | 7a22cdd | 2011-09-08 14:57:00 +0530 | [diff] [blame] | 328 | CLK_LOOKUP("csi_clk", csi0_clk.c, "msm_camera_ov7692.0"), |
| 329 | CLK_LOOKUP("csi_pclk", csi0_p_clk.c, "msm_camera_ov7692.0"), |
| 330 | CLK_LOOKUP("csi_vfe_clk", csi0_vfe_clk.c, "msm_camera_ov7692.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 331 | CLK_LOOKUP("csi_clk", csi1_clk.c, NULL), |
| 332 | CLK_LOOKUP("csi_pclk", csi1_p_clk.c, NULL), |
| 333 | CLK_LOOKUP("csi_vfe_clk", csi1_vfe_clk.c, NULL), |
Suresh Vankadara | 4d4d5c5 | 2012-01-18 00:45:49 +0530 | [diff] [blame] | 334 | CLK_LOOKUP("csi_clk", csi0_clk.c, "msm_csic.0"), |
| 335 | CLK_LOOKUP("csi_pclk", csi0_p_clk.c, "msm_csic.0"), |
| 336 | CLK_LOOKUP("csi_vfe_clk", csi0_vfe_clk.c, "msm_csic.0"), |
| 337 | CLK_LOOKUP("csi_clk", csi1_clk.c, "msm_csic.1"), |
| 338 | CLK_LOOKUP("csi_pclk", csi1_p_clk.c, "msm_csic.1"), |
| 339 | CLK_LOOKUP("csi_vfe_clk", csi1_vfe_clk.c, "msm_csic.1"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 340 | CLK_LOOKUP("dsi_byte_clk", dsi_byte_clk.c, NULL), |
| 341 | CLK_LOOKUP("dsi_clk", dsi_clk.c, NULL), |
| 342 | CLK_LOOKUP("dsi_esc_clk", dsi_esc_clk.c, NULL), |
| 343 | CLK_LOOKUP("dsi_pixel_clk", dsi_pixel_clk.c, NULL), |
| 344 | CLK_LOOKUP("dsi_ref_clk", dsi_ref_clk.c, NULL), |
| 345 | CLK_LOOKUP("ebi1_clk", ebi1_clk.c, NULL), |
| 346 | CLK_LOOKUP("ebi2_clk", ebi2_clk.c, NULL), |
| 347 | CLK_LOOKUP("ecodec_clk", ecodec_clk.c, NULL), |
Matt Wagantall | c00f95d | 2012-01-05 14:22:45 -0800 | [diff] [blame] | 348 | CLK_LOOKUP("core_clk", gp_clk.c, ""), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 349 | CLK_LOOKUP("core_clk", grp_3d_clk.c, "kgsl-3d0.0"), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 350 | CLK_LOOKUP("core_clk", grp_3d_clk.c, "footswitch-pcom.2"), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 351 | CLK_LOOKUP("iface_clk", grp_3d_p_clk.c, "kgsl-3d0.0"), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 352 | CLK_LOOKUP("iface_clk", grp_3d_p_clk.c, "footswitch-pcom.2"), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 353 | CLK_LOOKUP("core_clk", gsbi1_qup_clk.c, "qup_i2c.0"), |
| 354 | CLK_LOOKUP("core_clk", gsbi2_qup_clk.c, "qup_i2c.1"), |
| 355 | CLK_LOOKUP("iface_clk", gsbi1_qup_p_clk.c, "qup_i2c.0"), |
| 356 | CLK_LOOKUP("iface_clk", gsbi2_qup_p_clk.c, "qup_i2c.1"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 357 | CLK_LOOKUP("icodec_rx_clk", icodec_rx_clk.c, NULL), |
| 358 | CLK_LOOKUP("icodec_tx_clk", icodec_tx_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 359 | CLK_LOOKUP("mem_clk", imem_clk.c, NULL), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 360 | CLK_LOOKUP("mddi_clk", pmdh_clk.c, NULL), |
| 361 | CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL), |
| 362 | CLK_LOOKUP("mdp_lcdc_pclk_clk", mdp_lcdc_pclk_clk.c, NULL), |
| 363 | CLK_LOOKUP("mdp_lcdc_pad_pclk_clk", mdp_lcdc_pad_pclk_clk.c, NULL), |
| 364 | CLK_LOOKUP("mdp_vsync_clk", mdp_vsync_clk.c, NULL), |
| 365 | CLK_LOOKUP("mdp_dsi_pclk", mdp_dsi_p_clk.c, NULL), |
| 366 | CLK_LOOKUP("pbus_clk", pbus_clk.c, NULL), |
| 367 | CLK_LOOKUP("pcm_clk", pcm_clk.c, NULL), |
| 368 | CLK_LOOKUP("sdac_clk", sdac_clk.c, NULL), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 369 | CLK_LOOKUP("core_clk", sdc1_clk.c, "msm_sdcc.1"), |
| 370 | CLK_LOOKUP("iface_clk", sdc1_p_clk.c, "msm_sdcc.1"), |
| 371 | CLK_LOOKUP("core_clk", sdc2_clk.c, "msm_sdcc.2"), |
| 372 | CLK_LOOKUP("iface_clk", sdc2_p_clk.c, "msm_sdcc.2"), |
| 373 | CLK_LOOKUP("core_clk", sdc3_clk.c, "msm_sdcc.3"), |
| 374 | CLK_LOOKUP("iface_clk", sdc3_p_clk.c, "msm_sdcc.3"), |
| 375 | CLK_LOOKUP("core_clk", sdc4_clk.c, "msm_sdcc.4"), |
| 376 | CLK_LOOKUP("iface_clk", sdc4_p_clk.c, "msm_sdcc.4"), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 377 | CLK_LOOKUP("ref_clk", tsif_ref_clk.c, "msm_tsif.0"), |
| 378 | CLK_LOOKUP("iface_clk", tsif_p_clk.c, "msm_tsif.0"), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 379 | CLK_LOOKUP("core_clk", uart1_clk.c, "msm_serial.0"), |
| 380 | CLK_LOOKUP("core_clk", uart2_clk.c, "msm_serial.1"), |
| 381 | CLK_LOOKUP("core_clk", uart1dm_clk.c, "msm_serial_hs.0"), |
| 382 | CLK_LOOKUP("core_clk", uart2dm_clk.c, "msm_serial_hsl.0"), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 383 | CLK_LOOKUP("core_clk", usb_hs_core_clk.c, "msm_otg"), |
| 384 | CLK_LOOKUP("alt_core_clk", usb_hs_clk.c, "msm_otg"), |
| 385 | CLK_LOOKUP("iface_clk", usb_hs_p_clk.c, "msm_otg"), |
| 386 | CLK_LOOKUP("phy_clk", usb_phy_clk.c, "msm_otg"), |
| 387 | CLK_LOOKUP("alt_core_clk", usb_hs2_clk.c, "msm_hsusb_host.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 388 | CLK_LOOKUP("vdc_clk", vdc_clk.c, NULL), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 389 | CLK_LOOKUP("core_clk", vdc_clk.c, "footswitch-pcom.7"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 390 | CLK_LOOKUP("vfe_clk", vfe_clk.c, NULL), |
Suresh Vankadara | 4d4d5c5 | 2012-01-18 00:45:49 +0530 | [diff] [blame] | 391 | CLK_LOOKUP("vfe_clk", vfe_clk.c, "msm_vfe.0"), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 392 | CLK_LOOKUP("core_clk", vfe_clk.c, "footswitch-pcom.8"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 393 | CLK_LOOKUP("vfe_mdc_clk", vfe_mdc_clk.c, NULL), |
| 394 | |
| 395 | CLK_LOOKUP("ebi1_acpu_clk", ebi_acpu_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 396 | CLK_LOOKUP("bus_clk", ebi_grp_3d_clk.c, "kgsl-3d0.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 397 | CLK_LOOKUP("ebi1_lcdc_clk", ebi_lcdc_clk.c, NULL), |
| 398 | CLK_LOOKUP("ebi1_mddi_clk", ebi_mddi_clk.c, NULL), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 399 | CLK_LOOKUP("ebi1_vfe_clk", ebi_vfe_clk.c, NULL), |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 400 | CLK_LOOKUP("mem_clk", ebi_adm_clk.c, "msm_dmov"), |
Pankaj Kumar | 3912c98 | 2011-12-07 16:59:03 +0530 | [diff] [blame] | 401 | |
| 402 | CLK_LOOKUP("pll0_clk", pll0_clk.c, "acpu"), |
| 403 | CLK_LOOKUP("pll1_clk", pll1_clk.c, "acpu"), |
| 404 | CLK_LOOKUP("pll2_clk", pll2_clk.c, "acpu"), |
| 405 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 406 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 407 | |
Pankaj Kumar | 3912c98 | 2011-12-07 16:59:03 +0530 | [diff] [blame] | 408 | /* PLL 4 clock is available for 7627a target. */ |
| 409 | static struct clk_lookup msm_clk_7627a[] __initdata = { |
| 410 | CLK_LOOKUP("pll4_clk", pll4_clk.c, "acpu"), |
| 411 | }; |
| 412 | |
| 413 | static struct clk_lookup msm_clk_7627a_7625a[ARRAY_SIZE(msm_cmn_clk_7625a_7627a) |
| 414 | + ARRAY_SIZE(msm_clk_7627a)]; |
| 415 | |
Matt Wagantall | b64888f | 2012-04-02 21:35:07 -0700 | [diff] [blame^] | 416 | static void __init msm7627a_clock_pre_init(void) |
Pankaj Kumar | 3912c98 | 2011-12-07 16:59:03 +0530 | [diff] [blame] | 417 | { |
| 418 | int size = ARRAY_SIZE(msm_cmn_clk_7625a_7627a); |
| 419 | |
| 420 | /* Intialize shared PLL control structure */ |
| 421 | msm_shared_pll_control_init(); |
| 422 | |
| 423 | memcpy(&msm_clk_7627a_7625a, &msm_cmn_clk_7625a_7627a, |
| 424 | sizeof(msm_cmn_clk_7625a_7627a)); |
| 425 | if (!cpu_is_msm7x25a()) { |
| 426 | memcpy(&msm_clk_7627a_7625a[size], |
| 427 | &msm_clk_7627a, sizeof(msm_clk_7627a)); |
| 428 | size += ARRAY_SIZE(msm_clk_7627a); |
| 429 | } |
| 430 | msm7x27a_clock_init_data.size = size; |
| 431 | } |
| 432 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 433 | struct clock_init_data msm7x27a_clock_init_data __initdata = { |
Pankaj Kumar | 3912c98 | 2011-12-07 16:59:03 +0530 | [diff] [blame] | 434 | .table = msm_clk_7627a_7625a, |
Matt Wagantall | b64888f | 2012-04-02 21:35:07 -0700 | [diff] [blame^] | 435 | .pre_init = msm7627a_clock_pre_init, |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 436 | }; |
| 437 | |
| 438 | static struct clk_lookup msm_clocks_8x50[] = { |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 439 | CLK_LOOKUP("core_clk", adm_clk.c, "msm_dmov"), |
Matt Wagantall | c4b3a4d | 2011-08-17 16:58:39 -0700 | [diff] [blame] | 440 | CLK_LOOKUP("core_clk", ce_clk.c, "qce.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 441 | CLK_LOOKUP("ebi1_clk", ebi1_clk.c, NULL), |
| 442 | CLK_LOOKUP("ebi2_clk", ebi2_clk.c, NULL), |
| 443 | CLK_LOOKUP("ecodec_clk", ecodec_clk.c, NULL), |
| 444 | CLK_LOOKUP("emdh_clk", emdh_clk.c, NULL), |
Matt Wagantall | c00f95d | 2012-01-05 14:22:45 -0800 | [diff] [blame] | 445 | CLK_LOOKUP("core_clk", gp_clk.c, ""), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 446 | CLK_LOOKUP("core_clk", grp_3d_clk.c, "kgsl-3d0.0"), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 447 | CLK_LOOKUP("core_clk", i2c_clk.c, "msm_i2c.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 448 | CLK_LOOKUP("icodec_rx_clk", icodec_rx_clk.c, NULL), |
| 449 | CLK_LOOKUP("icodec_tx_clk", icodec_tx_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 450 | CLK_LOOKUP("mem_clk", imem_clk.c, NULL), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 451 | CLK_LOOKUP("mdc_clk", mdc_clk.c, NULL), |
| 452 | CLK_LOOKUP("mddi_clk", pmdh_clk.c, NULL), |
| 453 | CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL), |
| 454 | CLK_LOOKUP("mdp_lcdc_pclk_clk", mdp_lcdc_pclk_clk.c, NULL), |
| 455 | CLK_LOOKUP("mdp_lcdc_pad_pclk_clk", mdp_lcdc_pad_pclk_clk.c, NULL), |
| 456 | CLK_LOOKUP("mdp_vsync_clk", mdp_vsync_clk.c, NULL), |
| 457 | CLK_LOOKUP("pbus_clk", pbus_clk.c, NULL), |
| 458 | CLK_LOOKUP("pcm_clk", pcm_clk.c, NULL), |
| 459 | CLK_LOOKUP("sdac_clk", sdac_clk.c, NULL), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 460 | CLK_LOOKUP("core_clk", sdc1_clk.c, "msm_sdcc.1"), |
| 461 | CLK_LOOKUP("iface_clk", sdc1_p_clk.c, "msm_sdcc.1"), |
| 462 | CLK_LOOKUP("core_clk", sdc2_clk.c, "msm_sdcc.2"), |
| 463 | CLK_LOOKUP("iface_clk", sdc2_p_clk.c, "msm_sdcc.2"), |
| 464 | CLK_LOOKUP("core_clk", sdc3_clk.c, "msm_sdcc.3"), |
| 465 | CLK_LOOKUP("iface_clk", sdc3_p_clk.c, "msm_sdcc.3"), |
| 466 | CLK_LOOKUP("core_clk", sdc4_clk.c, "msm_sdcc.4"), |
| 467 | CLK_LOOKUP("iface_clk", sdc4_p_clk.c, "msm_sdcc.4"), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 468 | CLK_LOOKUP("core_clk", spi_clk.c, "spi_qsd.0"), |
| 469 | CLK_DUMMY("iface_clk", SPI_P_CLK, "spi_qsd.0", 0), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 470 | CLK_LOOKUP("core_clk", tsif_clk.c, "msm_tsif.0"), |
| 471 | CLK_LOOKUP("ref_clk", tsif_ref_clk.c, "msm_tsif.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 472 | CLK_LOOKUP("tv_dac_clk", tv_dac_clk.c, NULL), |
| 473 | CLK_LOOKUP("tv_enc_clk", tv_enc_clk.c, NULL), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 474 | CLK_LOOKUP("core_clk", uart1_clk.c, "msm_serial.0"), |
| 475 | CLK_LOOKUP("core_clk", uart2_clk.c, "msm_serial.1"), |
| 476 | CLK_LOOKUP("core_clk", uart3_clk.c, "msm_serial.2"), |
| 477 | CLK_LOOKUP("core_clk", uart1dm_clk.c, "msm_serial_hs.0"), |
| 478 | CLK_LOOKUP("core_clk", uart2dm_clk.c, "msm_serial_hs.1"), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 479 | CLK_LOOKUP("alt_core_clk", usb_hs_clk.c, "msm_otg"), |
| 480 | CLK_LOOKUP("iface_clk", usb_hs_p_clk.c, "msm_otg"), |
| 481 | CLK_LOOKUP("alt_core_clk", usb_otg_clk.c, NULL), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 482 | CLK_LOOKUP("vdc_clk", vdc_clk.c, NULL), |
| 483 | CLK_LOOKUP("vfe_clk", vfe_clk.c, NULL), |
| 484 | CLK_LOOKUP("vfe_mdc_clk", vfe_mdc_clk.c, NULL), |
| 485 | CLK_LOOKUP("vfe_axi_clk", vfe_axi_clk.c, NULL), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 486 | CLK_LOOKUP("alt_core_clk", usb_hs2_clk.c, "msm_hsusb_host.0"), |
| 487 | CLK_LOOKUP("iface_clk", usb_hs2_p_clk.c, "msm_hsusb_host.0"), |
Matt Wagantall | c00f95d | 2012-01-05 14:22:45 -0800 | [diff] [blame] | 488 | CLK_LOOKUP("alt_core_clk", usb_hs3_clk.c, ""), |
| 489 | CLK_LOOKUP("iface_clk", usb_hs3_p_clk.c, ""), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 490 | CLK_LOOKUP("phy_clk", usb_phy_clk.c, "msm_otg"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 491 | |
| 492 | CLK_LOOKUP("ebi1_acpu_clk", ebi_acpu_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 493 | CLK_LOOKUP("bus_clk", ebi_grp_3d_clk.c, "kgsl-3d0.0"), |
| 494 | CLK_LOOKUP("bus_clk", ebi_grp_2d_clk.c, "kgsl-2d0.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 495 | CLK_LOOKUP("ebi1_lcdc_clk", ebi_lcdc_clk.c, NULL), |
| 496 | CLK_LOOKUP("ebi1_mddi_clk", ebi_mddi_clk.c, NULL), |
| 497 | CLK_LOOKUP("ebi1_tv_clk", ebi_tv_clk.c, NULL), |
Manu Gautam | 5143b25 | 2012-01-05 19:25:23 -0800 | [diff] [blame] | 498 | CLK_LOOKUP("core_clk", ebi_usb_clk.c, "msm_otg"), |
| 499 | CLK_LOOKUP("core_clk", ebi_usb_clk.c, "msm_hsusb_host.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 500 | CLK_LOOKUP("ebi1_vfe_clk", ebi_vfe_clk.c, NULL), |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 501 | CLK_LOOKUP("mem_clk", ebi_adm_clk.c, "msm_dmov"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 502 | |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 503 | CLK_LOOKUP("iface_clk", grp_3d_p_clk.c, "kgsl-3d0.0"), |
| 504 | CLK_LOOKUP("core_clk", grp_2d_clk.c, "kgsl-2d0.0"), |
| 505 | CLK_LOOKUP("iface_clk", grp_2d_p_clk.c, "kgsl-2d0.0"), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 506 | CLK_LOOKUP("core_clk", gsbi_clk.c, "qup_i2c.4"), |
| 507 | CLK_LOOKUP("iface_clk", gsbi_p_clk.c, "qup_i2c.4"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 508 | }; |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 509 | |
| 510 | struct clock_init_data qds8x50_clock_init_data __initdata = { |
| 511 | .table = msm_clocks_8x50, |
| 512 | .size = ARRAY_SIZE(msm_clocks_8x50), |
| 513 | }; |