Lines Matching refs:clk

85 static struct clk *clk[clk_max];  variable
87 static struct clk ** const uart_clks[] __initconst = {
88 &clk[ipg],
89 &clk[uart1_gate],
90 &clk[uart2_gate],
91 &clk[uart3_gate],
117 clk[ckih] = imx_clk_fixed("ckih", 24000000); in _mx35_clocks_init()
118 clk[ckil] = imx_clk_fixed("ckih", 32768); in _mx35_clocks_init()
119 clk[mpll] = imx_clk_pllv1(IMX_PLLV1_IMX35, "mpll", "ckih", base + MX35_CCM_MPCTL); in _mx35_clocks_init()
120 clk[ppll] = imx_clk_pllv1(IMX_PLLV1_IMX35, "ppll", "ckih", base + MX35_CCM_PPCTL); in _mx35_clocks_init()
122 clk[mpll] = imx_clk_fixed_factor("mpll_075", "mpll", 3, 4); in _mx35_clocks_init()
125 clk[arm] = imx_clk_fixed_factor("arm", "mpll_075", 1, aad->arm); in _mx35_clocks_init()
127 clk[arm] = imx_clk_fixed_factor("arm", "mpll", 1, aad->arm); in _mx35_clocks_init()
129 if (clk_get_rate(clk[arm]) > 400000000) in _mx35_clocks_init()
140 clk[hsp] = imx_clk_fixed_factor("hsp", "arm", 1, hsp_div[hsp_sel]); in _mx35_clocks_init()
142 clk[ahb] = imx_clk_fixed_factor("ahb", "arm", 1, aad->ahb); in _mx35_clocks_init()
143 clk[ipg] = imx_clk_fixed_factor("ipg", "ahb", 1, 2); in _mx35_clocks_init()
145 clk[arm_per_div] = imx_clk_divider("arm_per_div", "arm", base + MX35_CCM_PDR4, 16, 6); in _mx35_clocks_init()
146 clk[ahb_per_div] = imx_clk_divider("ahb_per_div", "ahb", base + MXC_CCM_PDR0, 12, 3); in _mx35_clocks_init()
147clk[ipg_per] = imx_clk_mux("ipg_per", base + MXC_CCM_PDR0, 26, 1, ipg_per_sel, ARRAY_SIZE(ipg_per_… in _mx35_clocks_init()
149 clk[uart_sel] = imx_clk_mux("uart_sel", base + MX35_CCM_PDR3, 14, 1, std_sel, ARRAY_SIZE(std_sel)); in _mx35_clocks_init()
150 clk[uart_div] = imx_clk_divider("uart_div", "uart_sel", base + MX35_CCM_PDR4, 10, 6); in _mx35_clocks_init()
152clk[esdhc_sel] = imx_clk_mux("esdhc_sel", base + MX35_CCM_PDR4, 9, 1, std_sel, ARRAY_SIZE(std_sel)… in _mx35_clocks_init()
153 clk[esdhc1_div] = imx_clk_divider("esdhc1_div", "esdhc_sel", base + MX35_CCM_PDR3, 0, 6); in _mx35_clocks_init()
154 clk[esdhc2_div] = imx_clk_divider("esdhc2_div", "esdhc_sel", base + MX35_CCM_PDR3, 8, 6); in _mx35_clocks_init()
155 clk[esdhc3_div] = imx_clk_divider("esdhc3_div", "esdhc_sel", base + MX35_CCM_PDR3, 16, 6); in _mx35_clocks_init()
157clk[spdif_sel] = imx_clk_mux("spdif_sel", base + MX35_CCM_PDR3, 22, 1, std_sel, ARRAY_SIZE(std_sel… in _mx35_clocks_init()
158clk[spdif_div_pre] = imx_clk_divider("spdif_div_pre", "spdif_sel", base + MX35_CCM_PDR3, 29, 3); /… in _mx35_clocks_init()
159clk[spdif_div_post] = imx_clk_divider("spdif_div_post", "spdif_div_pre", base + MX35_CCM_PDR3, 23,… in _mx35_clocks_init()
161 clk[ssi_sel] = imx_clk_mux("ssi_sel", base + MX35_CCM_PDR2, 6, 1, std_sel, ARRAY_SIZE(std_sel)); in _mx35_clocks_init()
162 clk[ssi1_div_pre] = imx_clk_divider("ssi1_div_pre", "ssi_sel", base + MX35_CCM_PDR2, 24, 3); in _mx35_clocks_init()
163 clk[ssi1_div_post] = imx_clk_divider("ssi1_div_post", "ssi1_div_pre", base + MX35_CCM_PDR2, 0, 6); in _mx35_clocks_init()
164 clk[ssi2_div_pre] = imx_clk_divider("ssi2_div_pre", "ssi_sel", base + MX35_CCM_PDR2, 27, 3); in _mx35_clocks_init()
165 clk[ssi2_div_post] = imx_clk_divider("ssi2_div_post", "ssi2_div_pre", base + MX35_CCM_PDR2, 8, 6); in _mx35_clocks_init()
167 clk[usb_sel] = imx_clk_mux("usb_sel", base + MX35_CCM_PDR4, 9, 1, std_sel, ARRAY_SIZE(std_sel)); in _mx35_clocks_init()
168 clk[usb_div] = imx_clk_divider("usb_div", "usb_sel", base + MX35_CCM_PDR4, 22, 6); in _mx35_clocks_init()
170 clk[nfc_div] = imx_clk_divider("nfc_div", "ahb", base + MX35_CCM_PDR4, 28, 4); in _mx35_clocks_init()
172 clk[csi_sel] = imx_clk_mux("csi_sel", base + MX35_CCM_PDR2, 7, 1, std_sel, ARRAY_SIZE(std_sel)); in _mx35_clocks_init()
173 clk[csi_div] = imx_clk_divider("csi_div", "csi_sel", base + MX35_CCM_PDR2, 16, 6); in _mx35_clocks_init()
175 clk[asrc_gate] = imx_clk_gate2("asrc_gate", "ipg", base + MX35_CCM_CGR0, 0); in _mx35_clocks_init()
176 clk[pata_gate] = imx_clk_gate2("pata_gate", "ipg", base + MX35_CCM_CGR0, 2); in _mx35_clocks_init()
177 clk[audmux_gate] = imx_clk_gate2("audmux_gate", "ipg", base + MX35_CCM_CGR0, 4); in _mx35_clocks_init()
178 clk[can1_gate] = imx_clk_gate2("can1_gate", "ipg", base + MX35_CCM_CGR0, 6); in _mx35_clocks_init()
179 clk[can2_gate] = imx_clk_gate2("can2_gate", "ipg", base + MX35_CCM_CGR0, 8); in _mx35_clocks_init()
180 clk[cspi1_gate] = imx_clk_gate2("cspi1_gate", "ipg", base + MX35_CCM_CGR0, 10); in _mx35_clocks_init()
181 clk[cspi2_gate] = imx_clk_gate2("cspi2_gate", "ipg", base + MX35_CCM_CGR0, 12); in _mx35_clocks_init()
182 clk[ect_gate] = imx_clk_gate2("ect_gate", "ipg", base + MX35_CCM_CGR0, 14); in _mx35_clocks_init()
183 clk[edio_gate] = imx_clk_gate2("edio_gate", "ipg", base + MX35_CCM_CGR0, 16); in _mx35_clocks_init()
184 clk[emi_gate] = imx_clk_gate2("emi_gate", "ipg", base + MX35_CCM_CGR0, 18); in _mx35_clocks_init()
185 clk[epit1_gate] = imx_clk_gate2("epit1_gate", "ipg", base + MX35_CCM_CGR0, 20); in _mx35_clocks_init()
186 clk[epit2_gate] = imx_clk_gate2("epit2_gate", "ipg", base + MX35_CCM_CGR0, 22); in _mx35_clocks_init()
187 clk[esai_gate] = imx_clk_gate2("esai_gate", "ipg", base + MX35_CCM_CGR0, 24); in _mx35_clocks_init()
188 clk[esdhc1_gate] = imx_clk_gate2("esdhc1_gate", "esdhc1_div", base + MX35_CCM_CGR0, 26); in _mx35_clocks_init()
189 clk[esdhc2_gate] = imx_clk_gate2("esdhc2_gate", "esdhc2_div", base + MX35_CCM_CGR0, 28); in _mx35_clocks_init()
190 clk[esdhc3_gate] = imx_clk_gate2("esdhc3_gate", "esdhc3_div", base + MX35_CCM_CGR0, 30); in _mx35_clocks_init()
192 clk[fec_gate] = imx_clk_gate2("fec_gate", "ipg", base + MX35_CCM_CGR1, 0); in _mx35_clocks_init()
193 clk[gpio1_gate] = imx_clk_gate2("gpio1_gate", "ipg", base + MX35_CCM_CGR1, 2); in _mx35_clocks_init()
194 clk[gpio2_gate] = imx_clk_gate2("gpio2_gate", "ipg", base + MX35_CCM_CGR1, 4); in _mx35_clocks_init()
195 clk[gpio3_gate] = imx_clk_gate2("gpio3_gate", "ipg", base + MX35_CCM_CGR1, 6); in _mx35_clocks_init()
196 clk[gpt_gate] = imx_clk_gate2("gpt_gate", "ipg", base + MX35_CCM_CGR1, 8); in _mx35_clocks_init()
197 clk[i2c1_gate] = imx_clk_gate2("i2c1_gate", "ipg_per", base + MX35_CCM_CGR1, 10); in _mx35_clocks_init()
198 clk[i2c2_gate] = imx_clk_gate2("i2c2_gate", "ipg_per", base + MX35_CCM_CGR1, 12); in _mx35_clocks_init()
199 clk[i2c3_gate] = imx_clk_gate2("i2c3_gate", "ipg_per", base + MX35_CCM_CGR1, 14); in _mx35_clocks_init()
200 clk[iomuxc_gate] = imx_clk_gate2("iomuxc_gate", "ipg", base + MX35_CCM_CGR1, 16); in _mx35_clocks_init()
201 clk[ipu_gate] = imx_clk_gate2("ipu_gate", "hsp", base + MX35_CCM_CGR1, 18); in _mx35_clocks_init()
202 clk[kpp_gate] = imx_clk_gate2("kpp_gate", "ipg", base + MX35_CCM_CGR1, 20); in _mx35_clocks_init()
203 clk[mlb_gate] = imx_clk_gate2("mlb_gate", "ahb", base + MX35_CCM_CGR1, 22); in _mx35_clocks_init()
204 clk[mshc_gate] = imx_clk_gate2("mshc_gate", "dummy", base + MX35_CCM_CGR1, 24); in _mx35_clocks_init()
205 clk[owire_gate] = imx_clk_gate2("owire_gate", "ipg_per", base + MX35_CCM_CGR1, 26); in _mx35_clocks_init()
206 clk[pwm_gate] = imx_clk_gate2("pwm_gate", "ipg_per", base + MX35_CCM_CGR1, 28); in _mx35_clocks_init()
207 clk[rngc_gate] = imx_clk_gate2("rngc_gate", "ipg", base + MX35_CCM_CGR1, 30); in _mx35_clocks_init()
209 clk[rtc_gate] = imx_clk_gate2("rtc_gate", "ipg", base + MX35_CCM_CGR2, 0); in _mx35_clocks_init()
210 clk[rtic_gate] = imx_clk_gate2("rtic_gate", "ahb", base + MX35_CCM_CGR2, 2); in _mx35_clocks_init()
211 clk[scc_gate] = imx_clk_gate2("scc_gate", "ipg", base + MX35_CCM_CGR2, 4); in _mx35_clocks_init()
212 clk[sdma_gate] = imx_clk_gate2("sdma_gate", "ahb", base + MX35_CCM_CGR2, 6); in _mx35_clocks_init()
213 clk[spba_gate] = imx_clk_gate2("spba_gate", "ipg", base + MX35_CCM_CGR2, 8); in _mx35_clocks_init()
214 clk[spdif_gate] = imx_clk_gate2("spdif_gate", "spdif_div_post", base + MX35_CCM_CGR2, 10); in _mx35_clocks_init()
215 clk[ssi1_gate] = imx_clk_gate2("ssi1_gate", "ssi1_div_post", base + MX35_CCM_CGR2, 12); in _mx35_clocks_init()
216 clk[ssi2_gate] = imx_clk_gate2("ssi2_gate", "ssi2_div_post", base + MX35_CCM_CGR2, 14); in _mx35_clocks_init()
217 clk[uart1_gate] = imx_clk_gate2("uart1_gate", "uart_div", base + MX35_CCM_CGR2, 16); in _mx35_clocks_init()
218 clk[uart2_gate] = imx_clk_gate2("uart2_gate", "uart_div", base + MX35_CCM_CGR2, 18); in _mx35_clocks_init()
219 clk[uart3_gate] = imx_clk_gate2("uart3_gate", "uart_div", base + MX35_CCM_CGR2, 20); in _mx35_clocks_init()
220 clk[usbotg_gate] = imx_clk_gate2("usbotg_gate", "ahb", base + MX35_CCM_CGR2, 22); in _mx35_clocks_init()
221 clk[wdog_gate] = imx_clk_gate2("wdog_gate", "ipg", base + MX35_CCM_CGR2, 24); in _mx35_clocks_init()
222 clk[max_gate] = imx_clk_gate2("max_gate", "dummy", base + MX35_CCM_CGR2, 26); in _mx35_clocks_init()
223 clk[admux_gate] = imx_clk_gate2("admux_gate", "ipg", base + MX35_CCM_CGR2, 30); in _mx35_clocks_init()
225 clk[csi_gate] = imx_clk_gate2("csi_gate", "csi_div", base + MX35_CCM_CGR3, 0); in _mx35_clocks_init()
226 clk[iim_gate] = imx_clk_gate2("iim_gate", "ipg", base + MX35_CCM_CGR3, 2); in _mx35_clocks_init()
227 clk[gpu2d_gate] = imx_clk_gate2("gpu2d_gate", "ahb", base + MX35_CCM_CGR3, 4); in _mx35_clocks_init()
229 imx_check_clocks(clk, ARRAY_SIZE(clk)); in _mx35_clocks_init()
231 clk_prepare_enable(clk[spba_gate]); in _mx35_clocks_init()
232 clk_prepare_enable(clk[gpio1_gate]); in _mx35_clocks_init()
233 clk_prepare_enable(clk[gpio2_gate]); in _mx35_clocks_init()
234 clk_prepare_enable(clk[gpio3_gate]); in _mx35_clocks_init()
235 clk_prepare_enable(clk[iim_gate]); in _mx35_clocks_init()
236 clk_prepare_enable(clk[emi_gate]); in _mx35_clocks_init()
237 clk_prepare_enable(clk[max_gate]); in _mx35_clocks_init()
238 clk_prepare_enable(clk[iomuxc_gate]); in _mx35_clocks_init()
246 clk_prepare_enable(clk[scc_gate]); in _mx35_clocks_init()
257 clk_register_clkdev(clk[pata_gate], NULL, "pata_imx"); in mx35_clocks_init()
258 clk_register_clkdev(clk[can1_gate], NULL, "flexcan.0"); in mx35_clocks_init()
259 clk_register_clkdev(clk[can2_gate], NULL, "flexcan.1"); in mx35_clocks_init()
260 clk_register_clkdev(clk[cspi1_gate], "per", "imx35-cspi.0"); in mx35_clocks_init()
261 clk_register_clkdev(clk[cspi1_gate], "ipg", "imx35-cspi.0"); in mx35_clocks_init()
262 clk_register_clkdev(clk[cspi2_gate], "per", "imx35-cspi.1"); in mx35_clocks_init()
263 clk_register_clkdev(clk[cspi2_gate], "ipg", "imx35-cspi.1"); in mx35_clocks_init()
264 clk_register_clkdev(clk[epit1_gate], NULL, "imx-epit.0"); in mx35_clocks_init()
265 clk_register_clkdev(clk[epit2_gate], NULL, "imx-epit.1"); in mx35_clocks_init()
266 clk_register_clkdev(clk[esdhc1_gate], "per", "sdhci-esdhc-imx35.0"); in mx35_clocks_init()
267 clk_register_clkdev(clk[ipg], "ipg", "sdhci-esdhc-imx35.0"); in mx35_clocks_init()
268 clk_register_clkdev(clk[ahb], "ahb", "sdhci-esdhc-imx35.0"); in mx35_clocks_init()
269 clk_register_clkdev(clk[esdhc2_gate], "per", "sdhci-esdhc-imx35.1"); in mx35_clocks_init()
270 clk_register_clkdev(clk[ipg], "ipg", "sdhci-esdhc-imx35.1"); in mx35_clocks_init()
271 clk_register_clkdev(clk[ahb], "ahb", "sdhci-esdhc-imx35.1"); in mx35_clocks_init()
272 clk_register_clkdev(clk[esdhc3_gate], "per", "sdhci-esdhc-imx35.2"); in mx35_clocks_init()
273 clk_register_clkdev(clk[ipg], "ipg", "sdhci-esdhc-imx35.2"); in mx35_clocks_init()
274 clk_register_clkdev(clk[ahb], "ahb", "sdhci-esdhc-imx35.2"); in mx35_clocks_init()
276 clk_register_clkdev(clk[fec_gate], NULL, "imx27-fec.0"); in mx35_clocks_init()
277 clk_register_clkdev(clk[gpt_gate], "per", "imx-gpt.0"); in mx35_clocks_init()
278 clk_register_clkdev(clk[ipg], "ipg", "imx-gpt.0"); in mx35_clocks_init()
279 clk_register_clkdev(clk[i2c1_gate], NULL, "imx21-i2c.0"); in mx35_clocks_init()
280 clk_register_clkdev(clk[i2c2_gate], NULL, "imx21-i2c.1"); in mx35_clocks_init()
281 clk_register_clkdev(clk[i2c3_gate], NULL, "imx21-i2c.2"); in mx35_clocks_init()
282 clk_register_clkdev(clk[ipu_gate], NULL, "ipu-core"); in mx35_clocks_init()
283 clk_register_clkdev(clk[ipu_gate], NULL, "mx3_sdc_fb"); in mx35_clocks_init()
284 clk_register_clkdev(clk[kpp_gate], NULL, "imx-keypad"); in mx35_clocks_init()
285 clk_register_clkdev(clk[owire_gate], NULL, "mxc_w1"); in mx35_clocks_init()
286 clk_register_clkdev(clk[sdma_gate], NULL, "imx35-sdma"); in mx35_clocks_init()
287 clk_register_clkdev(clk[ssi1_gate], NULL, "imx-ssi.0"); in mx35_clocks_init()
288 clk_register_clkdev(clk[ssi2_gate], NULL, "imx-ssi.1"); in mx35_clocks_init()
290 clk_register_clkdev(clk[uart1_gate], "per", "imx21-uart.0"); in mx35_clocks_init()
291 clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.0"); in mx35_clocks_init()
292 clk_register_clkdev(clk[uart2_gate], "per", "imx21-uart.1"); in mx35_clocks_init()
293 clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.1"); in mx35_clocks_init()
294 clk_register_clkdev(clk[uart3_gate], "per", "imx21-uart.2"); in mx35_clocks_init()
295 clk_register_clkdev(clk[ipg], "ipg", "imx21-uart.2"); in mx35_clocks_init()
297 clk_register_clkdev(clk[ckil], "ref", "imx21-rtc"); in mx35_clocks_init()
298 clk_register_clkdev(clk[rtc_gate], "ipg", "imx21-rtc"); in mx35_clocks_init()
299 clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.0"); in mx35_clocks_init()
300 clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.0"); in mx35_clocks_init()
301 clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.0"); in mx35_clocks_init()
302 clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.1"); in mx35_clocks_init()
303 clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.1"); in mx35_clocks_init()
304 clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.1"); in mx35_clocks_init()
305 clk_register_clkdev(clk[usb_div], "per", "mxc-ehci.2"); in mx35_clocks_init()
306 clk_register_clkdev(clk[ipg], "ipg", "mxc-ehci.2"); in mx35_clocks_init()
307 clk_register_clkdev(clk[usbotg_gate], "ahb", "mxc-ehci.2"); in mx35_clocks_init()
308 clk_register_clkdev(clk[usb_div], "per", "imx-udc-mx27"); in mx35_clocks_init()
309 clk_register_clkdev(clk[ipg], "ipg", "imx-udc-mx27"); in mx35_clocks_init()
310 clk_register_clkdev(clk[usbotg_gate], "ahb", "imx-udc-mx27"); in mx35_clocks_init()
311 clk_register_clkdev(clk[wdog_gate], NULL, "imx2-wdt.0"); in mx35_clocks_init()
312 clk_register_clkdev(clk[nfc_div], NULL, "imx25-nand.0"); in mx35_clocks_init()
313 clk_register_clkdev(clk[csi_gate], NULL, "mx3-camera.0"); in mx35_clocks_init()
314 clk_register_clkdev(clk[admux_gate], "audmux", NULL); in mx35_clocks_init()
325 clk_data.clks = clk; in mx35_clocks_init_dt()
326 clk_data.clk_num = ARRAY_SIZE(clk); in mx35_clocks_init_dt()