Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 1 | /* Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
| 13 | #include "clock.h" |
| 14 | #include "clock-pcom.h" |
| 15 | #include "clock-voter.h" |
| 16 | |
| 17 | static DEFINE_CLK_PCOM(adm_clk, ADM_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 18 | static DEFINE_CLK_PCOM(adsp_clk, ADSP_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 19 | static DEFINE_CLK_PCOM(ahb_m_clk, AHB_M_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 20 | static DEFINE_CLK_PCOM(ahb_s_clk, AHB_S_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 21 | static DEFINE_CLK_PCOM(cam_m_clk, CAM_M_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 22 | static DEFINE_CLK_PCOM(axi_rotator_clk, AXI_ROTATOR_CLK, 0); |
| 23 | static DEFINE_CLK_PCOM(ce_clk, CE_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 24 | static DEFINE_CLK_PCOM(csi0_clk, CSI0_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 25 | static DEFINE_CLK_PCOM(csi0_p_clk, CSI0_P_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 26 | static DEFINE_CLK_PCOM(csi0_vfe_clk, CSI0_VFE_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 27 | static DEFINE_CLK_PCOM(csi1_clk, CSI1_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 28 | static DEFINE_CLK_PCOM(csi1_p_clk, CSI1_P_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 29 | static DEFINE_CLK_PCOM(csi1_vfe_clk, CSI1_VFE_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 30 | |
| 31 | static struct pcom_clk dsi_byte_clk = { |
| 32 | .id = P_DSI_BYTE_CLK, |
| 33 | .c = { |
| 34 | .ops = &clk_ops_pcom_ext_config, |
| 35 | .dbg_name = "dsi_byte_clk", |
| 36 | CLK_INIT(dsi_byte_clk.c), |
| 37 | }, |
| 38 | }; |
| 39 | |
| 40 | static struct pcom_clk dsi_clk = { |
| 41 | .id = P_DSI_CLK, |
| 42 | .c = { |
| 43 | .ops = &clk_ops_pcom_ext_config, |
| 44 | .dbg_name = "dsi_clk", |
| 45 | CLK_INIT(dsi_clk.c), |
| 46 | }, |
| 47 | }; |
| 48 | |
| 49 | static struct pcom_clk dsi_esc_clk = { |
| 50 | .id = P_DSI_ESC_CLK, |
| 51 | .c = { |
| 52 | .ops = &clk_ops_pcom_ext_config, |
| 53 | .dbg_name = "dsi_esc_clk", |
| 54 | CLK_INIT(dsi_esc_clk.c), |
| 55 | }, |
| 56 | }; |
| 57 | |
| 58 | static struct pcom_clk dsi_pixel_clk = { |
| 59 | .id = P_DSI_PIXEL_CLK, |
| 60 | .c = { |
| 61 | .ops = &clk_ops_pcom_ext_config, |
| 62 | .dbg_name = "dsi_pixel_clk", |
| 63 | CLK_INIT(dsi_pixel_clk.c), |
| 64 | }, |
| 65 | }; |
| 66 | |
| 67 | static DEFINE_CLK_PCOM(dsi_ref_clk, DSI_REF_CLK, 0); |
| 68 | static DEFINE_CLK_PCOM(ebi1_clk, EBI1_CLK, |
| 69 | CLKFLAG_SKIP_AUTO_OFF | CLKFLAG_MIN); |
| 70 | static DEFINE_CLK_PCOM(ebi2_clk, EBI2_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 71 | static DEFINE_CLK_PCOM(ecodec_clk, ECODEC_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 72 | static DEFINE_CLK_PCOM(emdh_clk, EMDH_CLK, CLKFLAG_MIN | CLKFLAG_MAX); |
| 73 | static DEFINE_CLK_PCOM(gp_clk, GP_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 74 | static DEFINE_CLK_PCOM(grp_2d_clk, GRP_2D_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 75 | static DEFINE_CLK_PCOM(grp_2d_p_clk, GRP_2D_P_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 76 | static DEFINE_CLK_PCOM(grp_3d_clk, GRP_3D_CLK, 0); |
| 77 | static DEFINE_CLK_PCOM(grp_3d_p_clk, GRP_3D_P_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 78 | static DEFINE_CLK_PCOM(gsbi1_qup_clk, GSBI1_QUP_CLK, 0); |
| 79 | static DEFINE_CLK_PCOM(gsbi1_qup_p_clk, GSBI1_QUP_P_CLK, 0); |
| 80 | static DEFINE_CLK_PCOM(gsbi2_qup_clk, GSBI2_QUP_CLK, 0); |
| 81 | static DEFINE_CLK_PCOM(gsbi2_qup_p_clk, GSBI2_QUP_P_CLK, 0); |
| 82 | static DEFINE_CLK_PCOM(gsbi_clk, GSBI_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 83 | static DEFINE_CLK_PCOM(gsbi_p_clk, GSBI_P_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 84 | static DEFINE_CLK_PCOM(hdmi_clk, HDMI_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 85 | static DEFINE_CLK_PCOM(i2c_clk, I2C_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 86 | static DEFINE_CLK_PCOM(icodec_rx_clk, ICODEC_RX_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 87 | static DEFINE_CLK_PCOM(icodec_tx_clk, ICODEC_TX_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 88 | static DEFINE_CLK_PCOM(imem_clk, IMEM_CLK, 0); |
| 89 | static DEFINE_CLK_PCOM(mdc_clk, MDC_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 90 | static DEFINE_CLK_PCOM(mdp_clk, MDP_CLK, 0); |
| 91 | static DEFINE_CLK_PCOM(mdp_lcdc_pad_pclk_clk, MDP_LCDC_PAD_PCLK_CLK, |
| 92 | CLKFLAG_SKIP_AUTO_OFF); |
| 93 | static DEFINE_CLK_PCOM(mdp_lcdc_pclk_clk, MDP_LCDC_PCLK_CLK, |
| 94 | CLKFLAG_SKIP_AUTO_OFF); |
| 95 | static DEFINE_CLK_PCOM(mdp_vsync_clk, MDP_VSYNC_CLK, 0); |
| 96 | static DEFINE_CLK_PCOM(mdp_dsi_p_clk, MDP_DSI_P_CLK, 0); |
| 97 | static DEFINE_CLK_PCOM(pbus_clk, PBUS_CLK, |
| 98 | CLKFLAG_SKIP_AUTO_OFF | CLKFLAG_MIN); |
| 99 | static DEFINE_CLK_PCOM(pcm_clk, PCM_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 100 | static DEFINE_CLK_PCOM(pmdh_clk, PMDH_CLK, CLKFLAG_MIN | CLKFLAG_MAX); |
| 101 | static DEFINE_CLK_PCOM(sdac_clk, SDAC_CLK, 0); |
| 102 | static DEFINE_CLK_PCOM(sdc1_clk, SDC1_CLK, 0); |
| 103 | static DEFINE_CLK_PCOM(sdc1_p_clk, SDC1_P_CLK, 0); |
| 104 | static DEFINE_CLK_PCOM(sdc2_clk, SDC2_CLK, 0); |
| 105 | static DEFINE_CLK_PCOM(sdc2_p_clk, SDC2_P_CLK, 0); |
| 106 | static DEFINE_CLK_PCOM(sdc3_clk, SDC3_CLK, 0); |
| 107 | static DEFINE_CLK_PCOM(sdc3_p_clk, SDC3_P_CLK, 0); |
| 108 | static DEFINE_CLK_PCOM(sdc4_clk, SDC4_CLK, 0); |
| 109 | static DEFINE_CLK_PCOM(sdc4_p_clk, SDC4_P_CLK, 0); |
| 110 | static DEFINE_CLK_PCOM(spi_clk, SPI_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 111 | static DEFINE_CLK_PCOM(tsif_clk, TSIF_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 112 | static DEFINE_CLK_PCOM(tsif_p_clk, TSIF_P_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 113 | static DEFINE_CLK_PCOM(tsif_ref_clk, TSIF_REF_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 114 | static DEFINE_CLK_PCOM(tv_dac_clk, TV_DAC_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 115 | static DEFINE_CLK_PCOM(tv_enc_clk, TV_ENC_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 116 | static DEFINE_CLK_PCOM(uart1_clk, UART1_CLK, 0); |
| 117 | static DEFINE_CLK_PCOM(uart1dm_clk, UART1DM_CLK, 0); |
| 118 | static DEFINE_CLK_PCOM(uart2_clk, UART2_CLK, 0); |
| 119 | static DEFINE_CLK_PCOM(uart2dm_clk, UART2DM_CLK, 0); |
| 120 | static DEFINE_CLK_PCOM(uart3_clk, UART3_CLK, 0); |
| 121 | static DEFINE_CLK_PCOM(usb_hs2_clk, USB_HS2_CLK, 0); |
| 122 | static DEFINE_CLK_PCOM(usb_hs2_p_clk, USB_HS2_P_CLK, 0); |
| 123 | static DEFINE_CLK_PCOM(usb_hs3_clk, USB_HS3_CLK, 0); |
| 124 | static DEFINE_CLK_PCOM(usb_hs3_p_clk, USB_HS3_P_CLK, 0); |
| 125 | static DEFINE_CLK_PCOM(usb_hs_clk, USB_HS_CLK, 0); |
| 126 | static DEFINE_CLK_PCOM(usb_hs_core_clk, USB_HS_CORE_CLK, 0); |
| 127 | static DEFINE_CLK_PCOM(usb_hs_p_clk, USB_HS_P_CLK, 0); |
| 128 | static DEFINE_CLK_PCOM(usb_otg_clk, USB_OTG_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 129 | static DEFINE_CLK_PCOM(usb_phy_clk, USB_PHY_CLK, CLKFLAG_SKIP_AUTO_OFF); |
| 130 | static DEFINE_CLK_PCOM(vdc_clk, VDC_CLK, CLKFLAG_MIN); |
| 131 | static DEFINE_CLK_PCOM(vfe_axi_clk, VFE_AXI_CLK, 0); |
| 132 | static DEFINE_CLK_PCOM(vfe_clk, VFE_CLK, 0); |
| 133 | static DEFINE_CLK_PCOM(vfe_mdc_clk, VFE_MDC_CLK, 0); |
| 134 | |
| 135 | static DEFINE_CLK_VOTER(ebi_acpu_clk, &ebi1_clk.c); |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 136 | static DEFINE_CLK_VOTER(ebi_grp_3d_clk, &ebi1_clk.c); |
| 137 | static DEFINE_CLK_VOTER(ebi_grp_2d_clk, &ebi1_clk.c); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 138 | static DEFINE_CLK_VOTER(ebi_lcdc_clk, &ebi1_clk.c); |
| 139 | static DEFINE_CLK_VOTER(ebi_mddi_clk, &ebi1_clk.c); |
| 140 | static DEFINE_CLK_VOTER(ebi_tv_clk, &ebi1_clk.c); |
| 141 | static DEFINE_CLK_VOTER(ebi_usb_clk, &ebi1_clk.c); |
| 142 | static DEFINE_CLK_VOTER(ebi_vfe_clk, &ebi1_clk.c); |
| 143 | static DEFINE_CLK_VOTER(ebi_adm_clk, &ebi1_clk.c); |
| 144 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 145 | static struct clk_lookup msm_clocks_7x01a[] = { |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 146 | CLK_LOOKUP("core_clk", adm_clk.c, "msm_dmov"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 147 | CLK_LOOKUP("adsp_clk", adsp_clk.c, NULL), |
| 148 | CLK_LOOKUP("ebi1_clk", ebi1_clk.c, NULL), |
| 149 | CLK_LOOKUP("ebi2_clk", ebi2_clk.c, NULL), |
| 150 | CLK_LOOKUP("ecodec_clk", ecodec_clk.c, NULL), |
| 151 | CLK_LOOKUP("emdh_clk", emdh_clk.c, NULL), |
| 152 | CLK_LOOKUP("gp_clk", gp_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 153 | CLK_LOOKUP("core_clk", grp_3d_clk.c, "kgsl-3d0.0"), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 154 | CLK_LOOKUP("core_clk", i2c_clk.c, "msm_i2c.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 155 | CLK_LOOKUP("icodec_rx_clk", icodec_rx_clk.c, NULL), |
| 156 | CLK_LOOKUP("icodec_tx_clk", icodec_tx_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 157 | CLK_LOOKUP("mem_clk", imem_clk.c, NULL), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 158 | CLK_LOOKUP("mdc_clk", mdc_clk.c, NULL), |
| 159 | CLK_LOOKUP("mddi_clk", pmdh_clk.c, NULL), |
| 160 | CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL), |
| 161 | CLK_LOOKUP("pbus_clk", pbus_clk.c, NULL), |
| 162 | CLK_LOOKUP("pcm_clk", pcm_clk.c, NULL), |
| 163 | CLK_LOOKUP("sdac_clk", sdac_clk.c, NULL), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 164 | CLK_LOOKUP("core_clk", sdc1_clk.c, "msm_sdcc.1"), |
| 165 | CLK_LOOKUP("iface_clk", sdc1_p_clk.c, "msm_sdcc.1"), |
| 166 | CLK_LOOKUP("core_clk", sdc2_clk.c, "msm_sdcc.2"), |
| 167 | CLK_LOOKUP("iface_clk", sdc2_p_clk.c, "msm_sdcc.2"), |
| 168 | CLK_LOOKUP("core_clk", sdc3_clk.c, "msm_sdcc.3"), |
| 169 | CLK_LOOKUP("iface_clk", sdc3_p_clk.c, "msm_sdcc.3"), |
| 170 | CLK_LOOKUP("core_clk", sdc4_clk.c, "msm_sdcc.4"), |
| 171 | CLK_LOOKUP("iface_clk", sdc4_p_clk.c, "msm_sdcc.4"), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 172 | CLK_LOOKUP("core_clk", tsif_clk.c, "msm_tsif.0"), |
| 173 | CLK_LOOKUP("ref_clk", tsif_ref_clk.c, "msm_tsif.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 174 | CLK_LOOKUP("tv_dac_clk", tv_dac_clk.c, NULL), |
| 175 | CLK_LOOKUP("tv_enc_clk", tv_enc_clk.c, NULL), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 176 | CLK_LOOKUP("core_clk", uart1_clk.c, "msm_serial.0"), |
| 177 | CLK_LOOKUP("core_clk", uart2_clk.c, "msm_serial.1"), |
| 178 | CLK_LOOKUP("core_clk", uart3_clk.c, "msm_serial.2"), |
| 179 | CLK_LOOKUP("core_clk", uart1dm_clk.c, "msm_serial_hs.0"), |
| 180 | CLK_LOOKUP("core_clk", uart2dm_clk.c, "msm_serial_hs.1"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 181 | CLK_LOOKUP("usb_hs_clk", usb_hs_clk.c, "msm_otg"), |
| 182 | CLK_LOOKUP("usb_hs_pclk", usb_hs_p_clk.c, "msm_otg"), |
| 183 | CLK_LOOKUP("usb_otg_clk", usb_otg_clk.c, NULL), |
| 184 | CLK_LOOKUP("vdc_clk", vdc_clk.c, NULL), |
| 185 | CLK_LOOKUP("vfe_clk", vfe_clk.c, NULL), |
| 186 | CLK_LOOKUP("vfe_mdc_clk", vfe_mdc_clk.c, NULL), |
| 187 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 188 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 189 | struct clock_init_data msm7x01a_clock_init_data __initdata = { |
| 190 | .table = msm_clocks_7x01a, |
| 191 | .size = ARRAY_SIZE(msm_clocks_7x01a), |
| 192 | }; |
| 193 | |
| 194 | static struct clk_lookup msm_clocks_7x27[] = { |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 195 | CLK_LOOKUP("core_clk", adm_clk.c, "msm_dmov"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 196 | CLK_LOOKUP("adsp_clk", adsp_clk.c, NULL), |
| 197 | CLK_LOOKUP("ebi1_clk", ebi1_clk.c, NULL), |
| 198 | CLK_LOOKUP("ebi2_clk", ebi2_clk.c, NULL), |
| 199 | CLK_LOOKUP("ecodec_clk", ecodec_clk.c, NULL), |
| 200 | CLK_LOOKUP("gp_clk", gp_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 201 | CLK_LOOKUP("core_clk", grp_3d_clk.c, "kgsl-3d0.0"), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 202 | CLK_LOOKUP("core_clk", grp_3d_clk.c, "footswitch-pcom.2"), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 203 | CLK_LOOKUP("iface_clk", grp_3d_p_clk.c, "kgsl-3d0.0"), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 204 | CLK_LOOKUP("core_clk", i2c_clk.c, "msm_i2c.0"), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 205 | CLK_LOOKUP("iface_clk", grp_3d_p_clk.c, "footswitch-pcom.2"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 206 | CLK_LOOKUP("icodec_rx_clk", icodec_rx_clk.c, NULL), |
| 207 | CLK_LOOKUP("icodec_tx_clk", icodec_tx_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 208 | CLK_LOOKUP("mem_clk", imem_clk.c, NULL), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 209 | CLK_LOOKUP("mdc_clk", mdc_clk.c, NULL), |
| 210 | CLK_LOOKUP("mddi_clk", pmdh_clk.c, NULL), |
| 211 | CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL), |
| 212 | CLK_LOOKUP("mdp_lcdc_pclk_clk", mdp_lcdc_pclk_clk.c, NULL), |
| 213 | CLK_LOOKUP("mdp_lcdc_pad_pclk_clk", mdp_lcdc_pad_pclk_clk.c, NULL), |
| 214 | CLK_LOOKUP("mdp_vsync_clk", mdp_vsync_clk.c, NULL), |
| 215 | CLK_LOOKUP("pbus_clk", pbus_clk.c, NULL), |
| 216 | CLK_LOOKUP("pcm_clk", pcm_clk.c, NULL), |
| 217 | CLK_LOOKUP("sdac_clk", sdac_clk.c, NULL), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 218 | CLK_LOOKUP("core_clk", sdc1_clk.c, "msm_sdcc.1"), |
| 219 | CLK_LOOKUP("iface_clk", sdc1_p_clk.c, "msm_sdcc.1"), |
| 220 | CLK_LOOKUP("core_clk", sdc2_clk.c, "msm_sdcc.2"), |
| 221 | CLK_LOOKUP("iface_clk", sdc2_p_clk.c, "msm_sdcc.2"), |
| 222 | CLK_LOOKUP("core_clk", sdc3_clk.c, "msm_sdcc.3"), |
| 223 | CLK_LOOKUP("iface_clk", sdc3_p_clk.c, "msm_sdcc.3"), |
| 224 | CLK_LOOKUP("core_clk", sdc4_clk.c, "msm_sdcc.4"), |
| 225 | CLK_LOOKUP("iface_clk", sdc4_p_clk.c, "msm_sdcc.4"), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 226 | CLK_LOOKUP("core_clk", tsif_clk.c, "msm_tsif.0"), |
| 227 | CLK_LOOKUP("ref_clk", tsif_ref_clk.c, "msm_tsif.0"), |
| 228 | CLK_LOOKUP("iface_clk", tsif_p_clk.c, "msm_tsif.0"), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 229 | CLK_LOOKUP("core_clk", uart1_clk.c, "msm_serial.0"), |
| 230 | CLK_LOOKUP("core_clk", uart2_clk.c, "msm_serial.1"), |
| 231 | CLK_LOOKUP("core_clk", uart1dm_clk.c, "msm_serial_hs.0"), |
| 232 | CLK_LOOKUP("core_clk", uart2dm_clk.c, "msm_serial_hs.1"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 233 | CLK_LOOKUP("usb_hs_clk", usb_hs_clk.c, NULL), |
| 234 | CLK_LOOKUP("usb_hs_pclk", usb_hs_p_clk.c, NULL), |
| 235 | CLK_LOOKUP("usb_otg_clk", usb_otg_clk.c, NULL), |
| 236 | CLK_LOOKUP("usb_phy_clk", usb_phy_clk.c, NULL), |
| 237 | CLK_LOOKUP("vdc_clk", vdc_clk.c, NULL), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 238 | CLK_LOOKUP("core_clk", vdc_clk.c, "footswitch-pcom.7"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 239 | CLK_LOOKUP("vfe_clk", vfe_clk.c, NULL), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 240 | CLK_LOOKUP("core_clk", vfe_clk.c, "footswitch-pcom.8"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 241 | CLK_LOOKUP("vfe_mdc_clk", vfe_mdc_clk.c, NULL), |
| 242 | |
| 243 | CLK_LOOKUP("ebi1_acpu_clk", ebi_acpu_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 244 | CLK_LOOKUP("bus_clk", ebi_grp_3d_clk.c, "kgsl-3d0.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 245 | CLK_LOOKUP("ebi1_lcdc_clk", ebi_lcdc_clk.c, NULL), |
| 246 | CLK_LOOKUP("ebi1_mddi_clk", ebi_mddi_clk.c, NULL), |
| 247 | CLK_LOOKUP("ebi1_usb_clk", ebi_usb_clk.c, NULL), |
| 248 | CLK_LOOKUP("ebi1_vfe_clk", ebi_vfe_clk.c, NULL), |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 249 | CLK_LOOKUP("mem_clk", ebi_adm_clk.c, "msm_dmov"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 250 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 251 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 252 | struct clock_init_data msm7x27_clock_init_data __initdata = { |
| 253 | .table = msm_clocks_7x27, |
| 254 | .size = ARRAY_SIZE(msm_clocks_7x27), |
| 255 | }; |
| 256 | |
| 257 | static struct clk_lookup msm_clocks_7x27a[] = { |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 258 | CLK_LOOKUP("core_clk", adm_clk.c, "msm_dmov"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 259 | CLK_LOOKUP("adsp_clk", adsp_clk.c, NULL), |
| 260 | CLK_LOOKUP("ahb_m_clk", ahb_m_clk.c, NULL), |
| 261 | CLK_LOOKUP("ahb_s_clk", ahb_s_clk.c, NULL), |
| 262 | CLK_LOOKUP("cam_m_clk", cam_m_clk.c, NULL), |
| 263 | CLK_LOOKUP("csi_clk", csi0_clk.c, "msm_camera_ov9726.0"), |
| 264 | CLK_LOOKUP("csi_pclk", csi0_p_clk.c, "msm_camera_ov9726.0"), |
| 265 | CLK_LOOKUP("csi_vfe_clk", csi0_vfe_clk.c, "msm_camera_ov9726.0"), |
| 266 | CLK_LOOKUP("csi_clk", csi1_clk.c, NULL), |
| 267 | CLK_LOOKUP("csi_pclk", csi1_p_clk.c, NULL), |
| 268 | CLK_LOOKUP("csi_vfe_clk", csi1_vfe_clk.c, NULL), |
| 269 | CLK_LOOKUP("dsi_byte_clk", dsi_byte_clk.c, NULL), |
| 270 | CLK_LOOKUP("dsi_clk", dsi_clk.c, NULL), |
| 271 | CLK_LOOKUP("dsi_esc_clk", dsi_esc_clk.c, NULL), |
| 272 | CLK_LOOKUP("dsi_pixel_clk", dsi_pixel_clk.c, NULL), |
| 273 | CLK_LOOKUP("dsi_ref_clk", dsi_ref_clk.c, NULL), |
| 274 | CLK_LOOKUP("ebi1_clk", ebi1_clk.c, NULL), |
| 275 | CLK_LOOKUP("ebi2_clk", ebi2_clk.c, NULL), |
| 276 | CLK_LOOKUP("ecodec_clk", ecodec_clk.c, NULL), |
| 277 | CLK_LOOKUP("gp_clk", gp_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 278 | CLK_LOOKUP("core_clk", grp_3d_clk.c, "kgsl-3d0.0"), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 279 | CLK_LOOKUP("core_clk", grp_3d_clk.c, "footswitch-pcom.2"), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 280 | CLK_LOOKUP("iface_clk", grp_3d_p_clk.c, "kgsl-3d0.0"), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 281 | CLK_LOOKUP("iface_clk", grp_3d_p_clk.c, "footswitch-pcom.2"), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 282 | CLK_LOOKUP("core_clk", gsbi1_qup_clk.c, "qup_i2c.0"), |
| 283 | CLK_LOOKUP("core_clk", gsbi2_qup_clk.c, "qup_i2c.1"), |
| 284 | CLK_LOOKUP("iface_clk", gsbi1_qup_p_clk.c, "qup_i2c.0"), |
| 285 | CLK_LOOKUP("iface_clk", gsbi2_qup_p_clk.c, "qup_i2c.1"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 286 | CLK_LOOKUP("icodec_rx_clk", icodec_rx_clk.c, NULL), |
| 287 | CLK_LOOKUP("icodec_tx_clk", icodec_tx_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 288 | CLK_LOOKUP("mem_clk", imem_clk.c, NULL), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 289 | CLK_LOOKUP("mddi_clk", pmdh_clk.c, NULL), |
| 290 | CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL), |
| 291 | CLK_LOOKUP("mdp_lcdc_pclk_clk", mdp_lcdc_pclk_clk.c, NULL), |
| 292 | CLK_LOOKUP("mdp_lcdc_pad_pclk_clk", mdp_lcdc_pad_pclk_clk.c, NULL), |
| 293 | CLK_LOOKUP("mdp_vsync_clk", mdp_vsync_clk.c, NULL), |
| 294 | CLK_LOOKUP("mdp_dsi_pclk", mdp_dsi_p_clk.c, NULL), |
| 295 | CLK_LOOKUP("pbus_clk", pbus_clk.c, NULL), |
| 296 | CLK_LOOKUP("pcm_clk", pcm_clk.c, NULL), |
| 297 | CLK_LOOKUP("sdac_clk", sdac_clk.c, NULL), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 298 | CLK_LOOKUP("core_clk", sdc1_clk.c, "msm_sdcc.1"), |
| 299 | CLK_LOOKUP("iface_clk", sdc1_p_clk.c, "msm_sdcc.1"), |
| 300 | CLK_LOOKUP("core_clk", sdc2_clk.c, "msm_sdcc.2"), |
| 301 | CLK_LOOKUP("iface_clk", sdc2_p_clk.c, "msm_sdcc.2"), |
| 302 | CLK_LOOKUP("core_clk", sdc3_clk.c, "msm_sdcc.3"), |
| 303 | CLK_LOOKUP("iface_clk", sdc3_p_clk.c, "msm_sdcc.3"), |
| 304 | CLK_LOOKUP("core_clk", sdc4_clk.c, "msm_sdcc.4"), |
| 305 | CLK_LOOKUP("iface_clk", sdc4_p_clk.c, "msm_sdcc.4"), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 306 | CLK_LOOKUP("ref_clk", tsif_ref_clk.c, "msm_tsif.0"), |
| 307 | CLK_LOOKUP("iface_clk", tsif_p_clk.c, "msm_tsif.0"), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 308 | CLK_LOOKUP("core_clk", uart1_clk.c, "msm_serial.0"), |
| 309 | CLK_LOOKUP("core_clk", uart2_clk.c, "msm_serial.1"), |
| 310 | CLK_LOOKUP("core_clk", uart1dm_clk.c, "msm_serial_hs.0"), |
| 311 | CLK_LOOKUP("core_clk", uart2dm_clk.c, "msm_serial_hsl.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 312 | CLK_LOOKUP("usb_hs_core_clk", usb_hs_core_clk.c, NULL), |
| 313 | CLK_LOOKUP("usb_hs2_clk", usb_hs2_clk.c, NULL), |
| 314 | CLK_LOOKUP("usb_hs_clk", usb_hs_clk.c, NULL), |
| 315 | CLK_LOOKUP("usb_hs_pclk", usb_hs_p_clk.c, NULL), |
| 316 | CLK_LOOKUP("usb_phy_clk", usb_phy_clk.c, NULL), |
| 317 | CLK_LOOKUP("vdc_clk", vdc_clk.c, NULL), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 318 | CLK_LOOKUP("core_clk", vdc_clk.c, "footswitch-pcom.7"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 319 | CLK_LOOKUP("vfe_clk", vfe_clk.c, NULL), |
Matt Wagantall | 4972271 | 2011-08-17 18:50:53 -0700 | [diff] [blame] | 320 | CLK_LOOKUP("core_clk", vfe_clk.c, "footswitch-pcom.8"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 321 | CLK_LOOKUP("vfe_mdc_clk", vfe_mdc_clk.c, NULL), |
| 322 | |
| 323 | CLK_LOOKUP("ebi1_acpu_clk", ebi_acpu_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 324 | CLK_LOOKUP("bus_clk", ebi_grp_3d_clk.c, "kgsl-3d0.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 325 | CLK_LOOKUP("ebi1_lcdc_clk", ebi_lcdc_clk.c, NULL), |
| 326 | CLK_LOOKUP("ebi1_mddi_clk", ebi_mddi_clk.c, NULL), |
| 327 | CLK_LOOKUP("ebi1_usb_clk", ebi_usb_clk.c, NULL), |
| 328 | CLK_LOOKUP("ebi1_vfe_clk", ebi_vfe_clk.c, NULL), |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 329 | CLK_LOOKUP("mem_clk", ebi_adm_clk.c, "msm_dmov"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 330 | }; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 331 | |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 332 | struct clock_init_data msm7x27a_clock_init_data __initdata = { |
| 333 | .table = msm_clocks_7x27a, |
| 334 | .size = ARRAY_SIZE(msm_clocks_7x27a), |
| 335 | }; |
| 336 | |
| 337 | static struct clk_lookup msm_clocks_8x50[] = { |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 338 | CLK_LOOKUP("core_clk", adm_clk.c, "msm_dmov"), |
Matt Wagantall | c4b3a4d | 2011-08-17 16:58:39 -0700 | [diff] [blame] | 339 | CLK_LOOKUP("core_clk", ce_clk.c, "qce.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 340 | CLK_LOOKUP("ebi1_clk", ebi1_clk.c, NULL), |
| 341 | CLK_LOOKUP("ebi2_clk", ebi2_clk.c, NULL), |
| 342 | CLK_LOOKUP("ecodec_clk", ecodec_clk.c, NULL), |
| 343 | CLK_LOOKUP("emdh_clk", emdh_clk.c, NULL), |
| 344 | CLK_LOOKUP("gp_clk", gp_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 345 | CLK_LOOKUP("core_clk", grp_3d_clk.c, "kgsl-3d0.0"), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 346 | CLK_LOOKUP("core_clk", i2c_clk.c, "msm_i2c.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 347 | CLK_LOOKUP("icodec_rx_clk", icodec_rx_clk.c, NULL), |
| 348 | CLK_LOOKUP("icodec_tx_clk", icodec_tx_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 349 | CLK_LOOKUP("mem_clk", imem_clk.c, NULL), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 350 | CLK_LOOKUP("mdc_clk", mdc_clk.c, NULL), |
| 351 | CLK_LOOKUP("mddi_clk", pmdh_clk.c, NULL), |
| 352 | CLK_LOOKUP("mdp_clk", mdp_clk.c, NULL), |
| 353 | CLK_LOOKUP("mdp_lcdc_pclk_clk", mdp_lcdc_pclk_clk.c, NULL), |
| 354 | CLK_LOOKUP("mdp_lcdc_pad_pclk_clk", mdp_lcdc_pad_pclk_clk.c, NULL), |
| 355 | CLK_LOOKUP("mdp_vsync_clk", mdp_vsync_clk.c, NULL), |
| 356 | CLK_LOOKUP("pbus_clk", pbus_clk.c, NULL), |
| 357 | CLK_LOOKUP("pcm_clk", pcm_clk.c, NULL), |
| 358 | CLK_LOOKUP("sdac_clk", sdac_clk.c, NULL), |
Matt Wagantall | 37ce384 | 2011-08-17 16:00:36 -0700 | [diff] [blame] | 359 | CLK_LOOKUP("core_clk", sdc1_clk.c, "msm_sdcc.1"), |
| 360 | CLK_LOOKUP("iface_clk", sdc1_p_clk.c, "msm_sdcc.1"), |
| 361 | CLK_LOOKUP("core_clk", sdc2_clk.c, "msm_sdcc.2"), |
| 362 | CLK_LOOKUP("iface_clk", sdc2_p_clk.c, "msm_sdcc.2"), |
| 363 | CLK_LOOKUP("core_clk", sdc3_clk.c, "msm_sdcc.3"), |
| 364 | CLK_LOOKUP("iface_clk", sdc3_p_clk.c, "msm_sdcc.3"), |
| 365 | CLK_LOOKUP("core_clk", sdc4_clk.c, "msm_sdcc.4"), |
| 366 | CLK_LOOKUP("iface_clk", sdc4_p_clk.c, "msm_sdcc.4"), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 367 | CLK_LOOKUP("core_clk", spi_clk.c, "spi_qsd.0"), |
| 368 | CLK_DUMMY("iface_clk", SPI_P_CLK, "spi_qsd.0", 0), |
Matt Wagantall | 640e5fd | 2011-08-17 16:08:53 -0700 | [diff] [blame] | 369 | CLK_LOOKUP("core_clk", tsif_clk.c, "msm_tsif.0"), |
| 370 | CLK_LOOKUP("ref_clk", tsif_ref_clk.c, "msm_tsif.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 371 | CLK_LOOKUP("tv_dac_clk", tv_dac_clk.c, NULL), |
| 372 | CLK_LOOKUP("tv_enc_clk", tv_enc_clk.c, NULL), |
Matt Wagantall | e252237 | 2011-08-17 14:52:21 -0700 | [diff] [blame] | 373 | CLK_LOOKUP("core_clk", uart1_clk.c, "msm_serial.0"), |
| 374 | CLK_LOOKUP("core_clk", uart2_clk.c, "msm_serial.1"), |
| 375 | CLK_LOOKUP("core_clk", uart3_clk.c, "msm_serial.2"), |
| 376 | CLK_LOOKUP("core_clk", uart1dm_clk.c, "msm_serial_hs.0"), |
| 377 | CLK_LOOKUP("core_clk", uart2dm_clk.c, "msm_serial_hs.1"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 378 | CLK_LOOKUP("usb_hs_clk", usb_hs_clk.c, NULL), |
| 379 | CLK_LOOKUP("usb_hs_pclk", usb_hs_p_clk.c, NULL), |
| 380 | CLK_LOOKUP("usb_otg_clk", usb_otg_clk.c, NULL), |
| 381 | CLK_LOOKUP("vdc_clk", vdc_clk.c, NULL), |
| 382 | CLK_LOOKUP("vfe_clk", vfe_clk.c, NULL), |
| 383 | CLK_LOOKUP("vfe_mdc_clk", vfe_mdc_clk.c, NULL), |
| 384 | CLK_LOOKUP("vfe_axi_clk", vfe_axi_clk.c, NULL), |
| 385 | CLK_LOOKUP("usb_hs2_clk", usb_hs2_clk.c, NULL), |
| 386 | CLK_LOOKUP("usb_hs2_pclk", usb_hs2_p_clk.c, NULL), |
| 387 | CLK_LOOKUP("usb_hs3_clk", usb_hs3_clk.c, NULL), |
| 388 | CLK_LOOKUP("usb_hs3_pclk", usb_hs3_p_clk.c, NULL), |
| 389 | CLK_LOOKUP("usb_phy_clk", usb_phy_clk.c, NULL), |
| 390 | |
| 391 | CLK_LOOKUP("ebi1_acpu_clk", ebi_acpu_clk.c, NULL), |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 392 | CLK_LOOKUP("bus_clk", ebi_grp_3d_clk.c, "kgsl-3d0.0"), |
| 393 | CLK_LOOKUP("bus_clk", ebi_grp_2d_clk.c, "kgsl-2d0.0"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 394 | CLK_LOOKUP("ebi1_lcdc_clk", ebi_lcdc_clk.c, NULL), |
| 395 | CLK_LOOKUP("ebi1_mddi_clk", ebi_mddi_clk.c, NULL), |
| 396 | CLK_LOOKUP("ebi1_tv_clk", ebi_tv_clk.c, NULL), |
| 397 | CLK_LOOKUP("ebi1_usb_clk", ebi_usb_clk.c, NULL), |
| 398 | CLK_LOOKUP("ebi1_vfe_clk", ebi_vfe_clk.c, NULL), |
Matt Wagantall | e1a8606 | 2011-08-18 17:46:10 -0700 | [diff] [blame] | 399 | CLK_LOOKUP("mem_clk", ebi_adm_clk.c, "msm_dmov"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 400 | |
Matt Wagantall | 9dc0163 | 2011-08-17 18:55:04 -0700 | [diff] [blame] | 401 | CLK_LOOKUP("iface_clk", grp_3d_p_clk.c, "kgsl-3d0.0"), |
| 402 | CLK_LOOKUP("core_clk", grp_2d_clk.c, "kgsl-2d0.0"), |
| 403 | CLK_LOOKUP("iface_clk", grp_2d_p_clk.c, "kgsl-2d0.0"), |
Matt Wagantall | ac29485 | 2011-08-17 15:44:58 -0700 | [diff] [blame] | 404 | CLK_LOOKUP("core_clk", gsbi_clk.c, "qup_i2c.4"), |
| 405 | CLK_LOOKUP("iface_clk", gsbi_p_clk.c, "qup_i2c.4"), |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 406 | }; |
Stephen Boyd | bb600ae | 2011-08-02 20:11:40 -0700 | [diff] [blame] | 407 | |
| 408 | struct clock_init_data qds8x50_clock_init_data __initdata = { |
| 409 | .table = msm_clocks_8x50, |
| 410 | .size = ARRAY_SIZE(msm_clocks_8x50), |
| 411 | }; |