4 * Copyright (C) 2007-2010, 2012 Texas Instruments, Inc.
5 * Copyright (C) 2007-2011 Nokia Corporation
7 * Written by Paul Walmsley
8 * With many device clock fixes by Kevin Hilman and Jouni Högander
9 * DPLL bypass clock support added by Roman Tereshonkov
14 * Virtual clocks are introduced as convenient tools.
15 * They are sources for other clocks and not supposed
16 * to be requested from drivers directly.
19 #include <linux/kernel.h>
20 #include <linux/clk.h>
21 #include <linux/list.h>
24 #include <plat/hardware.h>
25 #include <plat/clkdev_omap.h>
29 #include "clock3xxx.h"
30 #include "clock34xx.h"
31 #include "clock36xx.h"
32 #include "clock3517.h"
33 #include "cm2xxx_3xxx.h"
34 #include "cm-regbits-34xx.h"
35 #include "prm2xxx_3xxx.h"
36 #include "prm-regbits-34xx.h"
43 #define OMAP_CM_REGADDR OMAP34XX_CM_REGADDR
45 /* Maximum DPLL multiplier, divider values for OMAP3 */
46 #define OMAP3_MAX_DPLL_MULT 2047
47 #define OMAP3630_MAX_JTYPE_DPLL_MULT 4095
48 #define OMAP3_MAX_DPLL_DIV 128
51 * DPLL1 supplies clock to the MPU.
52 * DPLL2 supplies clock to the IVA2.
53 * DPLL3 supplies CORE domain clocks.
54 * DPLL4 supplies peripheral clocks.
55 * DPLL5 supplies other peripheral clocks (USBHOST, USIM).
58 /* Forward declarations for DPLL bypass clocks */
59 static struct clk dpll1_fck
;
60 static struct clk dpll2_fck
;
64 /* According to timer32k.c, this is a 32768Hz clock, not a 32000Hz clock. */
65 static struct clk omap_32k_fck
= {
66 .name
= "omap_32k_fck",
71 static struct clk secure_32k_fck
= {
72 .name
= "secure_32k_fck",
77 /* Virtual source clocks for osc_sys_ck */
78 static struct clk virt_12m_ck
= {
79 .name
= "virt_12m_ck",
84 static struct clk virt_13m_ck
= {
85 .name
= "virt_13m_ck",
90 static struct clk virt_16_8m_ck
= {
91 .name
= "virt_16_8m_ck",
96 static struct clk virt_38_4m_ck
= {
97 .name
= "virt_38_4m_ck",
102 static const struct clksel_rate osc_sys_12m_rates
[] = {
103 { .div
= 1, .val
= 0, .flags
= RATE_IN_3XXX
},
107 static const struct clksel_rate osc_sys_13m_rates
[] = {
108 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
112 static const struct clksel_rate osc_sys_16_8m_rates
[] = {
113 { .div
= 1, .val
= 5, .flags
= RATE_IN_3430ES2PLUS_36XX
},
117 static const struct clksel_rate osc_sys_19_2m_rates
[] = {
118 { .div
= 1, .val
= 2, .flags
= RATE_IN_3XXX
},
122 static const struct clksel_rate osc_sys_26m_rates
[] = {
123 { .div
= 1, .val
= 3, .flags
= RATE_IN_3XXX
},
127 static const struct clksel_rate osc_sys_38_4m_rates
[] = {
128 { .div
= 1, .val
= 4, .flags
= RATE_IN_3XXX
},
132 static const struct clksel osc_sys_clksel
[] = {
133 { .parent
= &virt_12m_ck
, .rates
= osc_sys_12m_rates
},
134 { .parent
= &virt_13m_ck
, .rates
= osc_sys_13m_rates
},
135 { .parent
= &virt_16_8m_ck
, .rates
= osc_sys_16_8m_rates
},
136 { .parent
= &virt_19200000_ck
, .rates
= osc_sys_19_2m_rates
},
137 { .parent
= &virt_26000000_ck
, .rates
= osc_sys_26m_rates
},
138 { .parent
= &virt_38_4m_ck
, .rates
= osc_sys_38_4m_rates
},
142 /* Oscillator clock */
143 /* 12, 13, 16.8, 19.2, 26, or 38.4 MHz */
144 static struct clk osc_sys_ck
= {
145 .name
= "osc_sys_ck",
147 .init
= &omap2_init_clksel_parent
,
148 .clksel_reg
= OMAP3430_PRM_CLKSEL
,
149 .clksel_mask
= OMAP3430_SYS_CLKIN_SEL_MASK
,
150 .clksel
= osc_sys_clksel
,
151 /* REVISIT: deal with autoextclkmode? */
152 .recalc
= &omap2_clksel_recalc
,
155 static const struct clksel_rate div2_rates
[] = {
156 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
157 { .div
= 2, .val
= 2, .flags
= RATE_IN_3XXX
},
161 static const struct clksel sys_clksel
[] = {
162 { .parent
= &osc_sys_ck
, .rates
= div2_rates
},
166 /* Latency: this clock is only enabled after PRM_CLKSETUP.SETUP_TIME */
167 /* Feeds DPLLs - divided first by PRM_CLKSRC_CTRL.SYSCLKDIV? */
168 static struct clk sys_ck
= {
171 .parent
= &osc_sys_ck
,
172 .init
= &omap2_init_clksel_parent
,
173 .clksel_reg
= OMAP3430_PRM_CLKSRC_CTRL
,
174 .clksel_mask
= OMAP_SYSCLKDIV_MASK
,
175 .clksel
= sys_clksel
,
176 .recalc
= &omap2_clksel_recalc
,
179 static struct clk sys_altclk
= {
180 .name
= "sys_altclk",
184 /* Optional external clock input for some McBSPs */
185 static struct clk mcbsp_clks
= {
186 .name
= "mcbsp_clks",
190 /* PRM EXTERNAL CLOCK OUTPUT */
192 static struct clk sys_clkout1
= {
193 .name
= "sys_clkout1",
194 .ops
= &clkops_omap2_dflt
,
195 .parent
= &osc_sys_ck
,
196 .enable_reg
= OMAP3430_PRM_CLKOUT_CTRL
,
197 .enable_bit
= OMAP3430_CLKOUT_EN_SHIFT
,
198 .recalc
= &followparent_recalc
,
205 static const struct clksel_rate div16_dpll_rates
[] = {
206 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
207 { .div
= 2, .val
= 2, .flags
= RATE_IN_3XXX
},
208 { .div
= 3, .val
= 3, .flags
= RATE_IN_3XXX
},
209 { .div
= 4, .val
= 4, .flags
= RATE_IN_3XXX
},
210 { .div
= 5, .val
= 5, .flags
= RATE_IN_3XXX
},
211 { .div
= 6, .val
= 6, .flags
= RATE_IN_3XXX
},
212 { .div
= 7, .val
= 7, .flags
= RATE_IN_3XXX
},
213 { .div
= 8, .val
= 8, .flags
= RATE_IN_3XXX
},
214 { .div
= 9, .val
= 9, .flags
= RATE_IN_3XXX
},
215 { .div
= 10, .val
= 10, .flags
= RATE_IN_3XXX
},
216 { .div
= 11, .val
= 11, .flags
= RATE_IN_3XXX
},
217 { .div
= 12, .val
= 12, .flags
= RATE_IN_3XXX
},
218 { .div
= 13, .val
= 13, .flags
= RATE_IN_3XXX
},
219 { .div
= 14, .val
= 14, .flags
= RATE_IN_3XXX
},
220 { .div
= 15, .val
= 15, .flags
= RATE_IN_3XXX
},
221 { .div
= 16, .val
= 16, .flags
= RATE_IN_3XXX
},
225 static const struct clksel_rate dpll4_rates
[] = {
226 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
227 { .div
= 2, .val
= 2, .flags
= RATE_IN_3XXX
},
228 { .div
= 3, .val
= 3, .flags
= RATE_IN_3XXX
},
229 { .div
= 4, .val
= 4, .flags
= RATE_IN_3XXX
},
230 { .div
= 5, .val
= 5, .flags
= RATE_IN_3XXX
},
231 { .div
= 6, .val
= 6, .flags
= RATE_IN_3XXX
},
232 { .div
= 7, .val
= 7, .flags
= RATE_IN_3XXX
},
233 { .div
= 8, .val
= 8, .flags
= RATE_IN_3XXX
},
234 { .div
= 9, .val
= 9, .flags
= RATE_IN_3XXX
},
235 { .div
= 10, .val
= 10, .flags
= RATE_IN_3XXX
},
236 { .div
= 11, .val
= 11, .flags
= RATE_IN_3XXX
},
237 { .div
= 12, .val
= 12, .flags
= RATE_IN_3XXX
},
238 { .div
= 13, .val
= 13, .flags
= RATE_IN_3XXX
},
239 { .div
= 14, .val
= 14, .flags
= RATE_IN_3XXX
},
240 { .div
= 15, .val
= 15, .flags
= RATE_IN_3XXX
},
241 { .div
= 16, .val
= 16, .flags
= RATE_IN_3XXX
},
242 { .div
= 17, .val
= 17, .flags
= RATE_IN_36XX
},
243 { .div
= 18, .val
= 18, .flags
= RATE_IN_36XX
},
244 { .div
= 19, .val
= 19, .flags
= RATE_IN_36XX
},
245 { .div
= 20, .val
= 20, .flags
= RATE_IN_36XX
},
246 { .div
= 21, .val
= 21, .flags
= RATE_IN_36XX
},
247 { .div
= 22, .val
= 22, .flags
= RATE_IN_36XX
},
248 { .div
= 23, .val
= 23, .flags
= RATE_IN_36XX
},
249 { .div
= 24, .val
= 24, .flags
= RATE_IN_36XX
},
250 { .div
= 25, .val
= 25, .flags
= RATE_IN_36XX
},
251 { .div
= 26, .val
= 26, .flags
= RATE_IN_36XX
},
252 { .div
= 27, .val
= 27, .flags
= RATE_IN_36XX
},
253 { .div
= 28, .val
= 28, .flags
= RATE_IN_36XX
},
254 { .div
= 29, .val
= 29, .flags
= RATE_IN_36XX
},
255 { .div
= 30, .val
= 30, .flags
= RATE_IN_36XX
},
256 { .div
= 31, .val
= 31, .flags
= RATE_IN_36XX
},
257 { .div
= 32, .val
= 32, .flags
= RATE_IN_36XX
},
262 /* MPU clock source */
264 static struct dpll_data dpll1_dd
= {
265 .mult_div1_reg
= OMAP_CM_REGADDR(MPU_MOD
, OMAP3430_CM_CLKSEL1_PLL
),
266 .mult_mask
= OMAP3430_MPU_DPLL_MULT_MASK
,
267 .div1_mask
= OMAP3430_MPU_DPLL_DIV_MASK
,
268 .clk_bypass
= &dpll1_fck
,
270 .freqsel_mask
= OMAP3430_MPU_DPLL_FREQSEL_MASK
,
271 .control_reg
= OMAP_CM_REGADDR(MPU_MOD
, OMAP3430_CM_CLKEN_PLL
),
272 .enable_mask
= OMAP3430_EN_MPU_DPLL_MASK
,
273 .modes
= (1 << DPLL_LOW_POWER_BYPASS
) | (1 << DPLL_LOCKED
),
274 .auto_recal_bit
= OMAP3430_EN_MPU_DPLL_DRIFTGUARD_SHIFT
,
275 .recal_en_bit
= OMAP3430_MPU_DPLL_RECAL_EN_SHIFT
,
276 .recal_st_bit
= OMAP3430_MPU_DPLL_ST_SHIFT
,
277 .autoidle_reg
= OMAP_CM_REGADDR(MPU_MOD
, OMAP3430_CM_AUTOIDLE_PLL
),
278 .autoidle_mask
= OMAP3430_AUTO_MPU_DPLL_MASK
,
279 .idlest_reg
= OMAP_CM_REGADDR(MPU_MOD
, OMAP3430_CM_IDLEST_PLL
),
280 .idlest_mask
= OMAP3430_ST_MPU_CLK_MASK
,
281 .max_multiplier
= OMAP3_MAX_DPLL_MULT
,
283 .max_divider
= OMAP3_MAX_DPLL_DIV
,
286 static struct clk dpll1_ck
= {
288 .ops
= &clkops_omap3_noncore_dpll_ops
,
290 .dpll_data
= &dpll1_dd
,
291 .round_rate
= &omap2_dpll_round_rate
,
292 .set_rate
= &omap3_noncore_dpll_set_rate
,
293 .clkdm_name
= "dpll1_clkdm",
294 .recalc
= &omap3_dpll_recalc
,
298 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
299 * DPLL isn't bypassed.
301 static struct clk dpll1_x2_ck
= {
302 .name
= "dpll1_x2_ck",
305 .clkdm_name
= "dpll1_clkdm",
306 .recalc
= &omap3_clkoutx2_recalc
,
309 /* On DPLL1, unlike other DPLLs, the divider is downstream from CLKOUTX2 */
310 static const struct clksel div16_dpll1_x2m2_clksel
[] = {
311 { .parent
= &dpll1_x2_ck
, .rates
= div16_dpll_rates
},
316 * Does not exist in the TRM - needed to separate the M2 divider from
317 * bypass selection in mpu_ck
319 static struct clk dpll1_x2m2_ck
= {
320 .name
= "dpll1_x2m2_ck",
322 .parent
= &dpll1_x2_ck
,
323 .init
= &omap2_init_clksel_parent
,
324 .clksel_reg
= OMAP_CM_REGADDR(MPU_MOD
, OMAP3430_CM_CLKSEL2_PLL
),
325 .clksel_mask
= OMAP3430_MPU_DPLL_CLKOUT_DIV_MASK
,
326 .clksel
= div16_dpll1_x2m2_clksel
,
327 .clkdm_name
= "dpll1_clkdm",
328 .recalc
= &omap2_clksel_recalc
,
332 /* IVA2 clock source */
335 static struct dpll_data dpll2_dd
= {
336 .mult_div1_reg
= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD
, OMAP3430_CM_CLKSEL1_PLL
),
337 .mult_mask
= OMAP3430_IVA2_DPLL_MULT_MASK
,
338 .div1_mask
= OMAP3430_IVA2_DPLL_DIV_MASK
,
339 .clk_bypass
= &dpll2_fck
,
341 .freqsel_mask
= OMAP3430_IVA2_DPLL_FREQSEL_MASK
,
342 .control_reg
= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD
, OMAP3430_CM_CLKEN_PLL
),
343 .enable_mask
= OMAP3430_EN_IVA2_DPLL_MASK
,
344 .modes
= (1 << DPLL_LOW_POWER_STOP
) | (1 << DPLL_LOCKED
) |
345 (1 << DPLL_LOW_POWER_BYPASS
),
346 .auto_recal_bit
= OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT
,
347 .recal_en_bit
= OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_SHIFT
,
348 .recal_st_bit
= OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_SHIFT
,
349 .autoidle_reg
= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD
, OMAP3430_CM_AUTOIDLE_PLL
),
350 .autoidle_mask
= OMAP3430_AUTO_IVA2_DPLL_MASK
,
351 .idlest_reg
= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD
, OMAP3430_CM_IDLEST_PLL
),
352 .idlest_mask
= OMAP3430_ST_IVA2_CLK_MASK
,
353 .max_multiplier
= OMAP3_MAX_DPLL_MULT
,
355 .max_divider
= OMAP3_MAX_DPLL_DIV
,
358 static struct clk dpll2_ck
= {
360 .ops
= &clkops_omap3_noncore_dpll_ops
,
362 .dpll_data
= &dpll2_dd
,
363 .round_rate
= &omap2_dpll_round_rate
,
364 .set_rate
= &omap3_noncore_dpll_set_rate
,
365 .clkdm_name
= "dpll2_clkdm",
366 .recalc
= &omap3_dpll_recalc
,
369 static const struct clksel div16_dpll2_m2x2_clksel
[] = {
370 { .parent
= &dpll2_ck
, .rates
= div16_dpll_rates
},
375 * The TRM is conflicted on whether IVA2 clock comes from DPLL2 CLKOUT
376 * or CLKOUTX2. CLKOUT seems most plausible.
378 static struct clk dpll2_m2_ck
= {
379 .name
= "dpll2_m2_ck",
382 .init
= &omap2_init_clksel_parent
,
383 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD
,
384 OMAP3430_CM_CLKSEL2_PLL
),
385 .clksel_mask
= OMAP3430_IVA2_DPLL_CLKOUT_DIV_MASK
,
386 .clksel
= div16_dpll2_m2x2_clksel
,
387 .clkdm_name
= "dpll2_clkdm",
388 .recalc
= &omap2_clksel_recalc
,
393 * Source clock for all interfaces and for some device fclks
394 * REVISIT: Also supports fast relock bypass - not included below
396 static struct dpll_data dpll3_dd
= {
397 .mult_div1_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKSEL1
),
398 .mult_mask
= OMAP3430_CORE_DPLL_MULT_MASK
,
399 .div1_mask
= OMAP3430_CORE_DPLL_DIV_MASK
,
400 .clk_bypass
= &sys_ck
,
402 .freqsel_mask
= OMAP3430_CORE_DPLL_FREQSEL_MASK
,
403 .control_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
404 .enable_mask
= OMAP3430_EN_CORE_DPLL_MASK
,
405 .auto_recal_bit
= OMAP3430_EN_CORE_DPLL_DRIFTGUARD_SHIFT
,
406 .recal_en_bit
= OMAP3430_CORE_DPLL_RECAL_EN_SHIFT
,
407 .recal_st_bit
= OMAP3430_CORE_DPLL_ST_SHIFT
,
408 .autoidle_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_AUTOIDLE
),
409 .autoidle_mask
= OMAP3430_AUTO_CORE_DPLL_MASK
,
410 .idlest_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_IDLEST
),
411 .idlest_mask
= OMAP3430_ST_CORE_CLK_MASK
,
412 .max_multiplier
= OMAP3_MAX_DPLL_MULT
,
414 .max_divider
= OMAP3_MAX_DPLL_DIV
,
417 static struct clk dpll3_ck
= {
419 .ops
= &clkops_omap3_core_dpll_ops
,
421 .dpll_data
= &dpll3_dd
,
422 .round_rate
= &omap2_dpll_round_rate
,
423 .clkdm_name
= "dpll3_clkdm",
424 .recalc
= &omap3_dpll_recalc
,
428 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
429 * DPLL isn't bypassed
431 static struct clk dpll3_x2_ck
= {
432 .name
= "dpll3_x2_ck",
435 .clkdm_name
= "dpll3_clkdm",
436 .recalc
= &omap3_clkoutx2_recalc
,
439 static const struct clksel_rate div31_dpll3_rates
[] = {
440 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
441 { .div
= 2, .val
= 2, .flags
= RATE_IN_3XXX
},
442 { .div
= 3, .val
= 3, .flags
= RATE_IN_3430ES2PLUS_36XX
},
443 { .div
= 4, .val
= 4, .flags
= RATE_IN_3430ES2PLUS_36XX
},
444 { .div
= 5, .val
= 5, .flags
= RATE_IN_3430ES2PLUS_36XX
},
445 { .div
= 6, .val
= 6, .flags
= RATE_IN_3430ES2PLUS_36XX
},
446 { .div
= 7, .val
= 7, .flags
= RATE_IN_3430ES2PLUS_36XX
},
447 { .div
= 8, .val
= 8, .flags
= RATE_IN_3430ES2PLUS_36XX
},
448 { .div
= 9, .val
= 9, .flags
= RATE_IN_3430ES2PLUS_36XX
},
449 { .div
= 10, .val
= 10, .flags
= RATE_IN_3430ES2PLUS_36XX
},
450 { .div
= 11, .val
= 11, .flags
= RATE_IN_3430ES2PLUS_36XX
},
451 { .div
= 12, .val
= 12, .flags
= RATE_IN_3430ES2PLUS_36XX
},
452 { .div
= 13, .val
= 13, .flags
= RATE_IN_3430ES2PLUS_36XX
},
453 { .div
= 14, .val
= 14, .flags
= RATE_IN_3430ES2PLUS_36XX
},
454 { .div
= 15, .val
= 15, .flags
= RATE_IN_3430ES2PLUS_36XX
},
455 { .div
= 16, .val
= 16, .flags
= RATE_IN_3430ES2PLUS_36XX
},
456 { .div
= 17, .val
= 17, .flags
= RATE_IN_3430ES2PLUS_36XX
},
457 { .div
= 18, .val
= 18, .flags
= RATE_IN_3430ES2PLUS_36XX
},
458 { .div
= 19, .val
= 19, .flags
= RATE_IN_3430ES2PLUS_36XX
},
459 { .div
= 20, .val
= 20, .flags
= RATE_IN_3430ES2PLUS_36XX
},
460 { .div
= 21, .val
= 21, .flags
= RATE_IN_3430ES2PLUS_36XX
},
461 { .div
= 22, .val
= 22, .flags
= RATE_IN_3430ES2PLUS_36XX
},
462 { .div
= 23, .val
= 23, .flags
= RATE_IN_3430ES2PLUS_36XX
},
463 { .div
= 24, .val
= 24, .flags
= RATE_IN_3430ES2PLUS_36XX
},
464 { .div
= 25, .val
= 25, .flags
= RATE_IN_3430ES2PLUS_36XX
},
465 { .div
= 26, .val
= 26, .flags
= RATE_IN_3430ES2PLUS_36XX
},
466 { .div
= 27, .val
= 27, .flags
= RATE_IN_3430ES2PLUS_36XX
},
467 { .div
= 28, .val
= 28, .flags
= RATE_IN_3430ES2PLUS_36XX
},
468 { .div
= 29, .val
= 29, .flags
= RATE_IN_3430ES2PLUS_36XX
},
469 { .div
= 30, .val
= 30, .flags
= RATE_IN_3430ES2PLUS_36XX
},
470 { .div
= 31, .val
= 31, .flags
= RATE_IN_3430ES2PLUS_36XX
},
474 static const struct clksel div31_dpll3m2_clksel
[] = {
475 { .parent
= &dpll3_ck
, .rates
= div31_dpll3_rates
},
479 /* DPLL3 output M2 - primary control point for CORE speed */
480 static struct clk dpll3_m2_ck
= {
481 .name
= "dpll3_m2_ck",
484 .init
= &omap2_init_clksel_parent
,
485 .clksel_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKSEL1
),
486 .clksel_mask
= OMAP3430_CORE_DPLL_CLKOUT_DIV_MASK
,
487 .clksel
= div31_dpll3m2_clksel
,
488 .clkdm_name
= "dpll3_clkdm",
489 .round_rate
= &omap2_clksel_round_rate
,
490 .set_rate
= &omap3_core_dpll_m2_set_rate
,
491 .recalc
= &omap2_clksel_recalc
,
494 static struct clk core_ck
= {
497 .parent
= &dpll3_m2_ck
,
498 .recalc
= &followparent_recalc
,
501 static struct clk dpll3_m2x2_ck
= {
502 .name
= "dpll3_m2x2_ck",
504 .parent
= &dpll3_m2_ck
,
505 .clkdm_name
= "dpll3_clkdm",
506 .recalc
= &omap3_clkoutx2_recalc
,
509 /* The PWRDN bit is apparently only available on 3430ES2 and above */
510 static const struct clksel div16_dpll3_clksel
[] = {
511 { .parent
= &dpll3_ck
, .rates
= div16_dpll_rates
},
515 /* This virtual clock is the source for dpll3_m3x2_ck */
516 static struct clk dpll3_m3_ck
= {
517 .name
= "dpll3_m3_ck",
520 .init
= &omap2_init_clksel_parent
,
521 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
522 .clksel_mask
= OMAP3430_DIV_DPLL3_MASK
,
523 .clksel
= div16_dpll3_clksel
,
524 .clkdm_name
= "dpll3_clkdm",
525 .recalc
= &omap2_clksel_recalc
,
528 /* The PWRDN bit is apparently only available on 3430ES2 and above */
529 static struct clk dpll3_m3x2_ck
= {
530 .name
= "dpll3_m3x2_ck",
531 .ops
= &clkops_omap2_dflt_wait
,
532 .parent
= &dpll3_m3_ck
,
533 .enable_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
534 .enable_bit
= OMAP3430_PWRDN_EMU_CORE_SHIFT
,
535 .flags
= INVERT_ENABLE
,
536 .clkdm_name
= "dpll3_clkdm",
537 .recalc
= &omap3_clkoutx2_recalc
,
540 static struct clk emu_core_alwon_ck
= {
541 .name
= "emu_core_alwon_ck",
543 .parent
= &dpll3_m3x2_ck
,
544 .clkdm_name
= "dpll3_clkdm",
545 .recalc
= &followparent_recalc
,
549 /* Supplies 96MHz, 54Mhz TV DAC, DSS fclk, CAM sensor clock, emul trace clk */
551 static struct dpll_data dpll4_dd
;
553 static struct dpll_data dpll4_dd_34xx __initdata
= {
554 .mult_div1_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKSEL2
),
555 .mult_mask
= OMAP3430_PERIPH_DPLL_MULT_MASK
,
556 .div1_mask
= OMAP3430_PERIPH_DPLL_DIV_MASK
,
557 .clk_bypass
= &sys_ck
,
559 .freqsel_mask
= OMAP3430_PERIPH_DPLL_FREQSEL_MASK
,
560 .control_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
561 .enable_mask
= OMAP3430_EN_PERIPH_DPLL_MASK
,
562 .modes
= (1 << DPLL_LOW_POWER_STOP
) | (1 << DPLL_LOCKED
),
563 .auto_recal_bit
= OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT
,
564 .recal_en_bit
= OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT
,
565 .recal_st_bit
= OMAP3430_PERIPH_DPLL_ST_SHIFT
,
566 .autoidle_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_AUTOIDLE
),
567 .autoidle_mask
= OMAP3430_AUTO_PERIPH_DPLL_MASK
,
568 .idlest_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_IDLEST
),
569 .idlest_mask
= OMAP3430_ST_PERIPH_CLK_MASK
,
570 .max_multiplier
= OMAP3_MAX_DPLL_MULT
,
572 .max_divider
= OMAP3_MAX_DPLL_DIV
,
575 static struct dpll_data dpll4_dd_3630 __initdata
= {
576 .mult_div1_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKSEL2
),
577 .mult_mask
= OMAP3630_PERIPH_DPLL_MULT_MASK
,
578 .div1_mask
= OMAP3430_PERIPH_DPLL_DIV_MASK
,
579 .clk_bypass
= &sys_ck
,
581 .control_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
582 .enable_mask
= OMAP3430_EN_PERIPH_DPLL_MASK
,
583 .modes
= (1 << DPLL_LOW_POWER_STOP
) | (1 << DPLL_LOCKED
),
584 .auto_recal_bit
= OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT
,
585 .recal_en_bit
= OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT
,
586 .recal_st_bit
= OMAP3430_PERIPH_DPLL_ST_SHIFT
,
587 .autoidle_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_AUTOIDLE
),
588 .autoidle_mask
= OMAP3430_AUTO_PERIPH_DPLL_MASK
,
589 .idlest_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_IDLEST
),
590 .idlest_mask
= OMAP3430_ST_PERIPH_CLK_MASK
,
591 .dco_mask
= OMAP3630_PERIPH_DPLL_DCO_SEL_MASK
,
592 .sddiv_mask
= OMAP3630_PERIPH_DPLL_SD_DIV_MASK
,
593 .max_multiplier
= OMAP3630_MAX_JTYPE_DPLL_MULT
,
595 .max_divider
= OMAP3_MAX_DPLL_DIV
,
599 static struct clk dpll4_ck
= {
601 .ops
= &clkops_omap3_noncore_dpll_ops
,
603 .dpll_data
= &dpll4_dd
,
604 .round_rate
= &omap2_dpll_round_rate
,
605 .set_rate
= &omap3_dpll4_set_rate
,
606 .clkdm_name
= "dpll4_clkdm",
607 .recalc
= &omap3_dpll_recalc
,
611 * This virtual clock provides the CLKOUTX2 output from the DPLL if the
612 * DPLL isn't bypassed --
613 * XXX does this serve any downstream clocks?
615 static struct clk dpll4_x2_ck
= {
616 .name
= "dpll4_x2_ck",
619 .clkdm_name
= "dpll4_clkdm",
620 .recalc
= &omap3_clkoutx2_recalc
,
623 static const struct clksel dpll4_clksel
[] = {
624 { .parent
= &dpll4_ck
, .rates
= dpll4_rates
},
628 /* This virtual clock is the source for dpll4_m2x2_ck */
629 static struct clk dpll4_m2_ck
= {
630 .name
= "dpll4_m2_ck",
633 .init
= &omap2_init_clksel_parent
,
634 .clksel_reg
= OMAP_CM_REGADDR(PLL_MOD
, OMAP3430_CM_CLKSEL3
),
635 .clksel_mask
= OMAP3630_DIV_96M_MASK
,
636 .clksel
= dpll4_clksel
,
637 .clkdm_name
= "dpll4_clkdm",
638 .recalc
= &omap2_clksel_recalc
,
641 /* The PWRDN bit is apparently only available on 3430ES2 and above */
642 static struct clk dpll4_m2x2_ck
= {
643 .name
= "dpll4_m2x2_ck",
644 .ops
= &clkops_omap2_dflt_wait
,
645 .parent
= &dpll4_m2_ck
,
646 .enable_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
647 .enable_bit
= OMAP3430_PWRDN_96M_SHIFT
,
648 .flags
= INVERT_ENABLE
,
649 .clkdm_name
= "dpll4_clkdm",
650 .recalc
= &omap3_clkoutx2_recalc
,
654 * DPLL4 generates DPLL4_M2X2_CLK which is then routed into the PRM as
655 * PRM_96M_ALWON_(F)CLK. Two clocks then emerge from the PRM:
656 * 96M_ALWON_FCLK (called "omap_96m_alwon_fck" below) and
660 /* Adding 192MHz Clock node needed by SGX */
661 static struct clk omap_192m_alwon_fck
= {
662 .name
= "omap_192m_alwon_fck",
664 .parent
= &dpll4_m2x2_ck
,
665 .recalc
= &followparent_recalc
,
668 static const struct clksel_rate omap_96m_alwon_fck_rates
[] = {
669 { .div
= 1, .val
= 1, .flags
= RATE_IN_36XX
},
670 { .div
= 2, .val
= 2, .flags
= RATE_IN_36XX
},
674 static const struct clksel omap_96m_alwon_fck_clksel
[] = {
675 { .parent
= &omap_192m_alwon_fck
, .rates
= omap_96m_alwon_fck_rates
},
679 static const struct clksel_rate omap_96m_dpll_rates
[] = {
680 { .div
= 1, .val
= 0, .flags
= RATE_IN_3XXX
},
684 static const struct clksel_rate omap_96m_sys_rates
[] = {
685 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
689 static struct clk omap_96m_alwon_fck
= {
690 .name
= "omap_96m_alwon_fck",
692 .parent
= &dpll4_m2x2_ck
,
693 .recalc
= &followparent_recalc
,
696 static struct clk omap_96m_alwon_fck_3630
= {
697 .name
= "omap_96m_alwon_fck",
698 .parent
= &omap_192m_alwon_fck
,
699 .init
= &omap2_init_clksel_parent
,
701 .recalc
= &omap2_clksel_recalc
,
702 .clksel_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
703 .clksel_mask
= OMAP3630_CLKSEL_96M_MASK
,
704 .clksel
= omap_96m_alwon_fck_clksel
707 static struct clk cm_96m_fck
= {
708 .name
= "cm_96m_fck",
710 .parent
= &omap_96m_alwon_fck
,
711 .recalc
= &followparent_recalc
,
714 static const struct clksel omap_96m_fck_clksel
[] = {
715 { .parent
= &cm_96m_fck
, .rates
= omap_96m_dpll_rates
},
716 { .parent
= &sys_ck
, .rates
= omap_96m_sys_rates
},
720 static struct clk omap_96m_fck
= {
721 .name
= "omap_96m_fck",
724 .init
= &omap2_init_clksel_parent
,
725 .clksel_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKSEL1
),
726 .clksel_mask
= OMAP3430_SOURCE_96M_MASK
,
727 .clksel
= omap_96m_fck_clksel
,
728 .recalc
= &omap2_clksel_recalc
,
731 /* This virtual clock is the source for dpll4_m3x2_ck */
732 static struct clk dpll4_m3_ck
= {
733 .name
= "dpll4_m3_ck",
736 .init
= &omap2_init_clksel_parent
,
737 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_CLKSEL
),
738 .clksel_mask
= OMAP3630_CLKSEL_TV_MASK
,
739 .clksel
= dpll4_clksel
,
740 .clkdm_name
= "dpll4_clkdm",
741 .recalc
= &omap2_clksel_recalc
,
744 /* The PWRDN bit is apparently only available on 3430ES2 and above */
745 static struct clk dpll4_m3x2_ck
= {
746 .name
= "dpll4_m3x2_ck",
747 .ops
= &clkops_omap2_dflt_wait
,
748 .parent
= &dpll4_m3_ck
,
749 .enable_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
750 .enable_bit
= OMAP3430_PWRDN_TV_SHIFT
,
751 .flags
= INVERT_ENABLE
,
752 .clkdm_name
= "dpll4_clkdm",
753 .recalc
= &omap3_clkoutx2_recalc
,
756 static const struct clksel_rate omap_54m_d4m3x2_rates
[] = {
757 { .div
= 1, .val
= 0, .flags
= RATE_IN_3XXX
},
761 static const struct clksel_rate omap_54m_alt_rates
[] = {
762 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
766 static const struct clksel omap_54m_clksel
[] = {
767 { .parent
= &dpll4_m3x2_ck
, .rates
= omap_54m_d4m3x2_rates
},
768 { .parent
= &sys_altclk
, .rates
= omap_54m_alt_rates
},
772 static struct clk omap_54m_fck
= {
773 .name
= "omap_54m_fck",
775 .init
= &omap2_init_clksel_parent
,
776 .clksel_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKSEL1
),
777 .clksel_mask
= OMAP3430_SOURCE_54M_MASK
,
778 .clksel
= omap_54m_clksel
,
779 .recalc
= &omap2_clksel_recalc
,
782 static const struct clksel_rate omap_48m_cm96m_rates
[] = {
783 { .div
= 2, .val
= 0, .flags
= RATE_IN_3XXX
},
787 static const struct clksel_rate omap_48m_alt_rates
[] = {
788 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
792 static const struct clksel omap_48m_clksel
[] = {
793 { .parent
= &cm_96m_fck
, .rates
= omap_48m_cm96m_rates
},
794 { .parent
= &sys_altclk
, .rates
= omap_48m_alt_rates
},
798 static struct clk omap_48m_fck
= {
799 .name
= "omap_48m_fck",
801 .init
= &omap2_init_clksel_parent
,
802 .clksel_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKSEL1
),
803 .clksel_mask
= OMAP3430_SOURCE_48M_MASK
,
804 .clksel
= omap_48m_clksel
,
805 .recalc
= &omap2_clksel_recalc
,
808 static struct clk omap_12m_fck
= {
809 .name
= "omap_12m_fck",
811 .parent
= &omap_48m_fck
,
813 .recalc
= &omap_fixed_divisor_recalc
,
816 /* This virtual clock is the source for dpll4_m4x2_ck */
817 static struct clk dpll4_m4_ck
= {
818 .name
= "dpll4_m4_ck",
821 .init
= &omap2_init_clksel_parent
,
822 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_CLKSEL
),
823 .clksel_mask
= OMAP3630_CLKSEL_DSS1_MASK
,
824 .clksel
= dpll4_clksel
,
825 .clkdm_name
= "dpll4_clkdm",
826 .recalc
= &omap2_clksel_recalc
,
827 .set_rate
= &omap2_clksel_set_rate
,
828 .round_rate
= &omap2_clksel_round_rate
,
831 /* The PWRDN bit is apparently only available on 3430ES2 and above */
832 static struct clk dpll4_m4x2_ck
= {
833 .name
= "dpll4_m4x2_ck",
834 .ops
= &clkops_omap2_dflt_wait
,
835 .parent
= &dpll4_m4_ck
,
836 .enable_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
837 .enable_bit
= OMAP3430_PWRDN_DSS1_SHIFT
,
838 .flags
= INVERT_ENABLE
,
839 .clkdm_name
= "dpll4_clkdm",
840 .recalc
= &omap3_clkoutx2_recalc
,
843 /* This virtual clock is the source for dpll4_m5x2_ck */
844 static struct clk dpll4_m5_ck
= {
845 .name
= "dpll4_m5_ck",
848 .init
= &omap2_init_clksel_parent
,
849 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_CAM_MOD
, CM_CLKSEL
),
850 .clksel_mask
= OMAP3630_CLKSEL_CAM_MASK
,
851 .clksel
= dpll4_clksel
,
852 .clkdm_name
= "dpll4_clkdm",
853 .set_rate
= &omap2_clksel_set_rate
,
854 .round_rate
= &omap2_clksel_round_rate
,
855 .recalc
= &omap2_clksel_recalc
,
858 /* The PWRDN bit is apparently only available on 3430ES2 and above */
859 static struct clk dpll4_m5x2_ck
= {
860 .name
= "dpll4_m5x2_ck",
861 .ops
= &clkops_omap2_dflt_wait
,
862 .parent
= &dpll4_m5_ck
,
863 .enable_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
864 .enable_bit
= OMAP3430_PWRDN_CAM_SHIFT
,
865 .flags
= INVERT_ENABLE
,
866 .clkdm_name
= "dpll4_clkdm",
867 .recalc
= &omap3_clkoutx2_recalc
,
870 /* This virtual clock is the source for dpll4_m6x2_ck */
871 static struct clk dpll4_m6_ck
= {
872 .name
= "dpll4_m6_ck",
875 .init
= &omap2_init_clksel_parent
,
876 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
877 .clksel_mask
= OMAP3630_DIV_DPLL4_MASK
,
878 .clksel
= dpll4_clksel
,
879 .clkdm_name
= "dpll4_clkdm",
880 .recalc
= &omap2_clksel_recalc
,
883 /* The PWRDN bit is apparently only available on 3430ES2 and above */
884 static struct clk dpll4_m6x2_ck
= {
885 .name
= "dpll4_m6x2_ck",
886 .ops
= &clkops_omap2_dflt_wait
,
887 .parent
= &dpll4_m6_ck
,
888 .enable_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
889 .enable_bit
= OMAP3430_PWRDN_EMU_PERIPH_SHIFT
,
890 .flags
= INVERT_ENABLE
,
891 .clkdm_name
= "dpll4_clkdm",
892 .recalc
= &omap3_clkoutx2_recalc
,
895 static struct clk emu_per_alwon_ck
= {
896 .name
= "emu_per_alwon_ck",
898 .parent
= &dpll4_m6x2_ck
,
899 .clkdm_name
= "dpll4_clkdm",
900 .recalc
= &followparent_recalc
,
904 /* Supplies 120MHz clock, USIM source clock */
907 static struct dpll_data dpll5_dd
= {
908 .mult_div1_reg
= OMAP_CM_REGADDR(PLL_MOD
, OMAP3430ES2_CM_CLKSEL4
),
909 .mult_mask
= OMAP3430ES2_PERIPH2_DPLL_MULT_MASK
,
910 .div1_mask
= OMAP3430ES2_PERIPH2_DPLL_DIV_MASK
,
911 .clk_bypass
= &sys_ck
,
913 .freqsel_mask
= OMAP3430ES2_PERIPH2_DPLL_FREQSEL_MASK
,
914 .control_reg
= OMAP_CM_REGADDR(PLL_MOD
, OMAP3430ES2_CM_CLKEN2
),
915 .enable_mask
= OMAP3430ES2_EN_PERIPH2_DPLL_MASK
,
916 .modes
= (1 << DPLL_LOW_POWER_STOP
) | (1 << DPLL_LOCKED
),
917 .auto_recal_bit
= OMAP3430ES2_EN_PERIPH2_DPLL_DRIFTGUARD_SHIFT
,
918 .recal_en_bit
= OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT
,
919 .recal_st_bit
= OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT
,
920 .autoidle_reg
= OMAP_CM_REGADDR(PLL_MOD
, OMAP3430ES2_CM_AUTOIDLE2_PLL
),
921 .autoidle_mask
= OMAP3430ES2_AUTO_PERIPH2_DPLL_MASK
,
922 .idlest_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_IDLEST2
),
923 .idlest_mask
= OMAP3430ES2_ST_PERIPH2_CLK_MASK
,
924 .max_multiplier
= OMAP3_MAX_DPLL_MULT
,
926 .max_divider
= OMAP3_MAX_DPLL_DIV
,
929 static struct clk dpll5_ck
= {
931 .ops
= &clkops_omap3_noncore_dpll_ops
,
933 .dpll_data
= &dpll5_dd
,
934 .round_rate
= &omap2_dpll_round_rate
,
935 .set_rate
= &omap3_noncore_dpll_set_rate
,
936 .clkdm_name
= "dpll5_clkdm",
937 .recalc
= &omap3_dpll_recalc
,
940 static const struct clksel div16_dpll5_clksel
[] = {
941 { .parent
= &dpll5_ck
, .rates
= div16_dpll_rates
},
945 static struct clk dpll5_m2_ck
= {
946 .name
= "dpll5_m2_ck",
949 .init
= &omap2_init_clksel_parent
,
950 .clksel_reg
= OMAP_CM_REGADDR(PLL_MOD
, OMAP3430ES2_CM_CLKSEL5
),
951 .clksel_mask
= OMAP3430ES2_DIV_120M_MASK
,
952 .clksel
= div16_dpll5_clksel
,
953 .clkdm_name
= "dpll5_clkdm",
954 .recalc
= &omap2_clksel_recalc
,
957 /* CM EXTERNAL CLOCK OUTPUTS */
959 static const struct clksel_rate clkout2_src_core_rates
[] = {
960 { .div
= 1, .val
= 0, .flags
= RATE_IN_3XXX
},
964 static const struct clksel_rate clkout2_src_sys_rates
[] = {
965 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
969 static const struct clksel_rate clkout2_src_96m_rates
[] = {
970 { .div
= 1, .val
= 2, .flags
= RATE_IN_3XXX
},
974 static const struct clksel_rate clkout2_src_54m_rates
[] = {
975 { .div
= 1, .val
= 3, .flags
= RATE_IN_3XXX
},
979 static const struct clksel clkout2_src_clksel
[] = {
980 { .parent
= &core_ck
, .rates
= clkout2_src_core_rates
},
981 { .parent
= &sys_ck
, .rates
= clkout2_src_sys_rates
},
982 { .parent
= &cm_96m_fck
, .rates
= clkout2_src_96m_rates
},
983 { .parent
= &omap_54m_fck
, .rates
= clkout2_src_54m_rates
},
987 static struct clk clkout2_src_ck
= {
988 .name
= "clkout2_src_ck",
989 .ops
= &clkops_omap2_dflt
,
990 .init
= &omap2_init_clksel_parent
,
991 .enable_reg
= OMAP3430_CM_CLKOUT_CTRL
,
992 .enable_bit
= OMAP3430_CLKOUT2_EN_SHIFT
,
993 .clksel_reg
= OMAP3430_CM_CLKOUT_CTRL
,
994 .clksel_mask
= OMAP3430_CLKOUT2SOURCE_MASK
,
995 .clksel
= clkout2_src_clksel
,
996 .clkdm_name
= "core_clkdm",
997 .recalc
= &omap2_clksel_recalc
,
1000 static const struct clksel_rate sys_clkout2_rates
[] = {
1001 { .div
= 1, .val
= 0, .flags
= RATE_IN_3XXX
},
1002 { .div
= 2, .val
= 1, .flags
= RATE_IN_3XXX
},
1003 { .div
= 4, .val
= 2, .flags
= RATE_IN_3XXX
},
1004 { .div
= 8, .val
= 3, .flags
= RATE_IN_3XXX
},
1005 { .div
= 16, .val
= 4, .flags
= RATE_IN_3XXX
},
1009 static const struct clksel sys_clkout2_clksel
[] = {
1010 { .parent
= &clkout2_src_ck
, .rates
= sys_clkout2_rates
},
1014 static struct clk sys_clkout2
= {
1015 .name
= "sys_clkout2",
1016 .ops
= &clkops_null
,
1017 .init
= &omap2_init_clksel_parent
,
1018 .clksel_reg
= OMAP3430_CM_CLKOUT_CTRL
,
1019 .clksel_mask
= OMAP3430_CLKOUT2_DIV_MASK
,
1020 .clksel
= sys_clkout2_clksel
,
1021 .recalc
= &omap2_clksel_recalc
,
1022 .round_rate
= &omap2_clksel_round_rate
,
1023 .set_rate
= &omap2_clksel_set_rate
1026 /* CM OUTPUT CLOCKS */
1028 static struct clk corex2_fck
= {
1029 .name
= "corex2_fck",
1030 .ops
= &clkops_null
,
1031 .parent
= &dpll3_m2x2_ck
,
1032 .recalc
= &followparent_recalc
,
1035 /* DPLL power domain clock controls */
1037 static const struct clksel_rate div4_rates
[] = {
1038 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
1039 { .div
= 2, .val
= 2, .flags
= RATE_IN_3XXX
},
1040 { .div
= 4, .val
= 4, .flags
= RATE_IN_3XXX
},
1044 static const struct clksel div4_core_clksel
[] = {
1045 { .parent
= &core_ck
, .rates
= div4_rates
},
1050 * REVISIT: Are these in DPLL power domain or CM power domain? docs
1051 * may be inconsistent here?
1053 static struct clk dpll1_fck
= {
1054 .name
= "dpll1_fck",
1055 .ops
= &clkops_null
,
1057 .init
= &omap2_init_clksel_parent
,
1058 .clksel_reg
= OMAP_CM_REGADDR(MPU_MOD
, OMAP3430_CM_CLKSEL1_PLL
),
1059 .clksel_mask
= OMAP3430_MPU_CLK_SRC_MASK
,
1060 .clksel
= div4_core_clksel
,
1061 .recalc
= &omap2_clksel_recalc
,
1064 static struct clk mpu_ck
= {
1066 .ops
= &clkops_null
,
1067 .parent
= &dpll1_x2m2_ck
,
1068 .clkdm_name
= "mpu_clkdm",
1069 .recalc
= &followparent_recalc
,
1072 /* arm_fck is divided by two when DPLL1 locked; otherwise, passthrough mpu_ck */
1073 static const struct clksel_rate arm_fck_rates
[] = {
1074 { .div
= 1, .val
= 0, .flags
= RATE_IN_3XXX
},
1075 { .div
= 2, .val
= 1, .flags
= RATE_IN_3XXX
},
1079 static const struct clksel arm_fck_clksel
[] = {
1080 { .parent
= &mpu_ck
, .rates
= arm_fck_rates
},
1084 static struct clk arm_fck
= {
1086 .ops
= &clkops_null
,
1088 .init
= &omap2_init_clksel_parent
,
1089 .clksel_reg
= OMAP_CM_REGADDR(MPU_MOD
, OMAP3430_CM_IDLEST_PLL
),
1090 .clksel_mask
= OMAP3430_ST_MPU_CLK_MASK
,
1091 .clksel
= arm_fck_clksel
,
1092 .clkdm_name
= "mpu_clkdm",
1093 .recalc
= &omap2_clksel_recalc
,
1096 /* XXX What about neon_clkdm ? */
1099 * REVISIT: This clock is never specifically defined in the 3430 TRM,
1100 * although it is referenced - so this is a guess
1102 static struct clk emu_mpu_alwon_ck
= {
1103 .name
= "emu_mpu_alwon_ck",
1104 .ops
= &clkops_null
,
1106 .recalc
= &followparent_recalc
,
1109 static struct clk dpll2_fck
= {
1110 .name
= "dpll2_fck",
1111 .ops
= &clkops_null
,
1113 .init
= &omap2_init_clksel_parent
,
1114 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD
, OMAP3430_CM_CLKSEL1_PLL
),
1115 .clksel_mask
= OMAP3430_IVA2_CLK_SRC_MASK
,
1116 .clksel
= div4_core_clksel
,
1117 .recalc
= &omap2_clksel_recalc
,
1120 static struct clk iva2_ck
= {
1122 .ops
= &clkops_omap2_dflt_wait
,
1123 .parent
= &dpll2_m2_ck
,
1124 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD
, CM_FCLKEN
),
1125 .enable_bit
= OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT
,
1126 .clkdm_name
= "iva2_clkdm",
1127 .recalc
= &followparent_recalc
,
1130 /* Common interface clocks */
1132 static const struct clksel div2_core_clksel
[] = {
1133 { .parent
= &core_ck
, .rates
= div2_rates
},
1137 static struct clk l3_ick
= {
1139 .ops
= &clkops_null
,
1141 .init
= &omap2_init_clksel_parent
,
1142 .clksel_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
1143 .clksel_mask
= OMAP3430_CLKSEL_L3_MASK
,
1144 .clksel
= div2_core_clksel
,
1145 .clkdm_name
= "core_l3_clkdm",
1146 .recalc
= &omap2_clksel_recalc
,
1149 static const struct clksel div2_l3_clksel
[] = {
1150 { .parent
= &l3_ick
, .rates
= div2_rates
},
1154 static struct clk l4_ick
= {
1156 .ops
= &clkops_null
,
1158 .init
= &omap2_init_clksel_parent
,
1159 .clksel_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
1160 .clksel_mask
= OMAP3430_CLKSEL_L4_MASK
,
1161 .clksel
= div2_l3_clksel
,
1162 .clkdm_name
= "core_l4_clkdm",
1163 .recalc
= &omap2_clksel_recalc
,
1167 static const struct clksel div2_l4_clksel
[] = {
1168 { .parent
= &l4_ick
, .rates
= div2_rates
},
1172 static struct clk rm_ick
= {
1174 .ops
= &clkops_null
,
1176 .init
= &omap2_init_clksel_parent
,
1177 .clksel_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_CLKSEL
),
1178 .clksel_mask
= OMAP3430_CLKSEL_RM_MASK
,
1179 .clksel
= div2_l4_clksel
,
1180 .recalc
= &omap2_clksel_recalc
,
1183 /* GFX power domain */
1185 /* GFX clocks are in 3430ES1 only. 3430ES2 and later uses the SGX instead */
1187 static const struct clksel gfx_l3_clksel
[] = {
1188 { .parent
= &l3_ick
, .rates
= gfx_l3_rates
},
1193 * Virtual parent clock for gfx_l3_ick and gfx_l3_fck
1194 * This interface clock does not have a CM_AUTOIDLE bit
1196 static struct clk gfx_l3_ck
= {
1197 .name
= "gfx_l3_ck",
1198 .ops
= &clkops_omap2_dflt_wait
,
1200 .enable_reg
= OMAP_CM_REGADDR(GFX_MOD
, CM_ICLKEN
),
1201 .enable_bit
= OMAP_EN_GFX_SHIFT
,
1202 .recalc
= &followparent_recalc
,
1205 static struct clk gfx_l3_fck
= {
1206 .name
= "gfx_l3_fck",
1207 .ops
= &clkops_null
,
1208 .parent
= &gfx_l3_ck
,
1209 .init
= &omap2_init_clksel_parent
,
1210 .clksel_reg
= OMAP_CM_REGADDR(GFX_MOD
, CM_CLKSEL
),
1211 .clksel_mask
= OMAP_CLKSEL_GFX_MASK
,
1212 .clksel
= gfx_l3_clksel
,
1213 .clkdm_name
= "gfx_3430es1_clkdm",
1214 .recalc
= &omap2_clksel_recalc
,
1217 static struct clk gfx_l3_ick
= {
1218 .name
= "gfx_l3_ick",
1219 .ops
= &clkops_null
,
1220 .parent
= &gfx_l3_ck
,
1221 .clkdm_name
= "gfx_3430es1_clkdm",
1222 .recalc
= &followparent_recalc
,
1225 static struct clk gfx_cg1_ck
= {
1226 .name
= "gfx_cg1_ck",
1227 .ops
= &clkops_omap2_dflt_wait
,
1228 .parent
= &gfx_l3_fck
, /* REVISIT: correct? */
1229 .enable_reg
= OMAP_CM_REGADDR(GFX_MOD
, CM_FCLKEN
),
1230 .enable_bit
= OMAP3430ES1_EN_2D_SHIFT
,
1231 .clkdm_name
= "gfx_3430es1_clkdm",
1232 .recalc
= &followparent_recalc
,
1235 static struct clk gfx_cg2_ck
= {
1236 .name
= "gfx_cg2_ck",
1237 .ops
= &clkops_omap2_dflt_wait
,
1238 .parent
= &gfx_l3_fck
, /* REVISIT: correct? */
1239 .enable_reg
= OMAP_CM_REGADDR(GFX_MOD
, CM_FCLKEN
),
1240 .enable_bit
= OMAP3430ES1_EN_3D_SHIFT
,
1241 .clkdm_name
= "gfx_3430es1_clkdm",
1242 .recalc
= &followparent_recalc
,
1245 /* SGX power domain - 3430ES2 only */
1247 static const struct clksel_rate sgx_core_rates
[] = {
1248 { .div
= 2, .val
= 5, .flags
= RATE_IN_36XX
},
1249 { .div
= 3, .val
= 0, .flags
= RATE_IN_3XXX
},
1250 { .div
= 4, .val
= 1, .flags
= RATE_IN_3XXX
},
1251 { .div
= 6, .val
= 2, .flags
= RATE_IN_3XXX
},
1255 static const struct clksel_rate sgx_192m_rates
[] = {
1256 { .div
= 1, .val
= 4, .flags
= RATE_IN_36XX
},
1260 static const struct clksel_rate sgx_corex2_rates
[] = {
1261 { .div
= 3, .val
= 6, .flags
= RATE_IN_36XX
},
1262 { .div
= 5, .val
= 7, .flags
= RATE_IN_36XX
},
1266 static const struct clksel_rate sgx_96m_rates
[] = {
1267 { .div
= 1, .val
= 3, .flags
= RATE_IN_3XXX
},
1271 static const struct clksel sgx_clksel
[] = {
1272 { .parent
= &core_ck
, .rates
= sgx_core_rates
},
1273 { .parent
= &cm_96m_fck
, .rates
= sgx_96m_rates
},
1274 { .parent
= &omap_192m_alwon_fck
, .rates
= sgx_192m_rates
},
1275 { .parent
= &corex2_fck
, .rates
= sgx_corex2_rates
},
1279 static struct clk sgx_fck
= {
1281 .ops
= &clkops_omap2_dflt_wait
,
1282 .init
= &omap2_init_clksel_parent
,
1283 .enable_reg
= OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD
, CM_FCLKEN
),
1284 .enable_bit
= OMAP3430ES2_CM_FCLKEN_SGX_EN_SGX_SHIFT
,
1285 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD
, CM_CLKSEL
),
1286 .clksel_mask
= OMAP3430ES2_CLKSEL_SGX_MASK
,
1287 .clksel
= sgx_clksel
,
1288 .clkdm_name
= "sgx_clkdm",
1289 .recalc
= &omap2_clksel_recalc
,
1290 .set_rate
= &omap2_clksel_set_rate
,
1291 .round_rate
= &omap2_clksel_round_rate
1294 /* This interface clock does not have a CM_AUTOIDLE bit */
1295 static struct clk sgx_ick
= {
1297 .ops
= &clkops_omap2_dflt_wait
,
1299 .enable_reg
= OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD
, CM_ICLKEN
),
1300 .enable_bit
= OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT
,
1301 .clkdm_name
= "sgx_clkdm",
1302 .recalc
= &followparent_recalc
,
1305 /* CORE power domain */
1307 static struct clk d2d_26m_fck
= {
1308 .name
= "d2d_26m_fck",
1309 .ops
= &clkops_omap2_dflt_wait
,
1311 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1312 .enable_bit
= OMAP3430ES1_EN_D2D_SHIFT
,
1313 .clkdm_name
= "d2d_clkdm",
1314 .recalc
= &followparent_recalc
,
1317 static struct clk modem_fck
= {
1318 .name
= "modem_fck",
1319 .ops
= &clkops_omap2_mdmclk_dflt_wait
,
1321 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1322 .enable_bit
= OMAP3430_EN_MODEM_SHIFT
,
1323 .clkdm_name
= "d2d_clkdm",
1324 .recalc
= &followparent_recalc
,
1327 static struct clk sad2d_ick
= {
1328 .name
= "sad2d_ick",
1329 .ops
= &clkops_omap2_iclk_dflt_wait
,
1331 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1332 .enable_bit
= OMAP3430_EN_SAD2D_SHIFT
,
1333 .clkdm_name
= "d2d_clkdm",
1334 .recalc
= &followparent_recalc
,
1337 static struct clk mad2d_ick
= {
1338 .name
= "mad2d_ick",
1339 .ops
= &clkops_omap2_iclk_dflt_wait
,
1341 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN3
),
1342 .enable_bit
= OMAP3430_EN_MAD2D_SHIFT
,
1343 .clkdm_name
= "d2d_clkdm",
1344 .recalc
= &followparent_recalc
,
1347 static const struct clksel omap343x_gpt_clksel
[] = {
1348 { .parent
= &omap_32k_fck
, .rates
= gpt_32k_rates
},
1349 { .parent
= &sys_ck
, .rates
= gpt_sys_rates
},
1353 static struct clk gpt10_fck
= {
1354 .name
= "gpt10_fck",
1355 .ops
= &clkops_omap2_dflt_wait
,
1357 .init
= &omap2_init_clksel_parent
,
1358 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1359 .enable_bit
= OMAP3430_EN_GPT10_SHIFT
,
1360 .clksel_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
1361 .clksel_mask
= OMAP3430_CLKSEL_GPT10_MASK
,
1362 .clksel
= omap343x_gpt_clksel
,
1363 .clkdm_name
= "core_l4_clkdm",
1364 .recalc
= &omap2_clksel_recalc
,
1367 static struct clk gpt11_fck
= {
1368 .name
= "gpt11_fck",
1369 .ops
= &clkops_omap2_dflt_wait
,
1371 .init
= &omap2_init_clksel_parent
,
1372 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1373 .enable_bit
= OMAP3430_EN_GPT11_SHIFT
,
1374 .clksel_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
1375 .clksel_mask
= OMAP3430_CLKSEL_GPT11_MASK
,
1376 .clksel
= omap343x_gpt_clksel
,
1377 .clkdm_name
= "core_l4_clkdm",
1378 .recalc
= &omap2_clksel_recalc
,
1381 static struct clk cpefuse_fck
= {
1382 .name
= "cpefuse_fck",
1383 .ops
= &clkops_omap2_dflt
,
1385 .clkdm_name
= "core_l4_clkdm",
1386 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, OMAP3430ES2_CM_FCLKEN3
),
1387 .enable_bit
= OMAP3430ES2_EN_CPEFUSE_SHIFT
,
1388 .recalc
= &followparent_recalc
,
1391 static struct clk ts_fck
= {
1393 .ops
= &clkops_omap2_dflt
,
1394 .parent
= &omap_32k_fck
,
1395 .clkdm_name
= "core_l4_clkdm",
1396 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, OMAP3430ES2_CM_FCLKEN3
),
1397 .enable_bit
= OMAP3430ES2_EN_TS_SHIFT
,
1398 .recalc
= &followparent_recalc
,
1401 static struct clk usbtll_fck
= {
1402 .name
= "usbtll_fck",
1403 .ops
= &clkops_omap2_dflt_wait
,
1404 .parent
= &dpll5_m2_ck
,
1405 .clkdm_name
= "core_l4_clkdm",
1406 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, OMAP3430ES2_CM_FCLKEN3
),
1407 .enable_bit
= OMAP3430ES2_EN_USBTLL_SHIFT
,
1408 .recalc
= &followparent_recalc
,
1411 /* CORE 96M FCLK-derived clocks */
1413 static struct clk core_96m_fck
= {
1414 .name
= "core_96m_fck",
1415 .ops
= &clkops_null
,
1416 .parent
= &omap_96m_fck
,
1417 .clkdm_name
= "core_l4_clkdm",
1418 .recalc
= &followparent_recalc
,
1421 static struct clk mmchs3_fck
= {
1422 .name
= "mmchs3_fck",
1423 .ops
= &clkops_omap2_dflt_wait
,
1424 .parent
= &core_96m_fck
,
1425 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1426 .enable_bit
= OMAP3430ES2_EN_MMC3_SHIFT
,
1427 .clkdm_name
= "core_l4_clkdm",
1428 .recalc
= &followparent_recalc
,
1431 static struct clk mmchs2_fck
= {
1432 .name
= "mmchs2_fck",
1433 .ops
= &clkops_omap2_dflt_wait
,
1434 .parent
= &core_96m_fck
,
1435 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1436 .enable_bit
= OMAP3430_EN_MMC2_SHIFT
,
1437 .clkdm_name
= "core_l4_clkdm",
1438 .recalc
= &followparent_recalc
,
1441 static struct clk mspro_fck
= {
1442 .name
= "mspro_fck",
1443 .ops
= &clkops_omap2_dflt_wait
,
1444 .parent
= &core_96m_fck
,
1445 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1446 .enable_bit
= OMAP3430_EN_MSPRO_SHIFT
,
1447 .clkdm_name
= "core_l4_clkdm",
1448 .recalc
= &followparent_recalc
,
1451 static struct clk mmchs1_fck
= {
1452 .name
= "mmchs1_fck",
1453 .ops
= &clkops_omap2_dflt_wait
,
1454 .parent
= &core_96m_fck
,
1455 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1456 .enable_bit
= OMAP3430_EN_MMC1_SHIFT
,
1457 .clkdm_name
= "core_l4_clkdm",
1458 .recalc
= &followparent_recalc
,
1461 static struct clk i2c3_fck
= {
1463 .ops
= &clkops_omap2_dflt_wait
,
1464 .parent
= &core_96m_fck
,
1465 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1466 .enable_bit
= OMAP3430_EN_I2C3_SHIFT
,
1467 .clkdm_name
= "core_l4_clkdm",
1468 .recalc
= &followparent_recalc
,
1471 static struct clk i2c2_fck
= {
1473 .ops
= &clkops_omap2_dflt_wait
,
1474 .parent
= &core_96m_fck
,
1475 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1476 .enable_bit
= OMAP3430_EN_I2C2_SHIFT
,
1477 .clkdm_name
= "core_l4_clkdm",
1478 .recalc
= &followparent_recalc
,
1481 static struct clk i2c1_fck
= {
1483 .ops
= &clkops_omap2_dflt_wait
,
1484 .parent
= &core_96m_fck
,
1485 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1486 .enable_bit
= OMAP3430_EN_I2C1_SHIFT
,
1487 .clkdm_name
= "core_l4_clkdm",
1488 .recalc
= &followparent_recalc
,
1492 * MCBSP 1 & 5 get their 96MHz clock from core_96m_fck;
1493 * MCBSP 2, 3, 4 get their 96MHz clock from per_96m_fck.
1495 static const struct clksel_rate common_mcbsp_96m_rates
[] = {
1496 { .div
= 1, .val
= 0, .flags
= RATE_IN_3XXX
},
1500 static const struct clksel_rate common_mcbsp_mcbsp_rates
[] = {
1501 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
1505 static const struct clksel mcbsp_15_clksel
[] = {
1506 { .parent
= &core_96m_fck
, .rates
= common_mcbsp_96m_rates
},
1507 { .parent
= &mcbsp_clks
, .rates
= common_mcbsp_mcbsp_rates
},
1511 static struct clk mcbsp5_fck
= {
1512 .name
= "mcbsp5_fck",
1513 .ops
= &clkops_omap2_dflt_wait
,
1514 .init
= &omap2_init_clksel_parent
,
1515 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1516 .enable_bit
= OMAP3430_EN_MCBSP5_SHIFT
,
1517 .clksel_reg
= OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1
),
1518 .clksel_mask
= OMAP2_MCBSP5_CLKS_MASK
,
1519 .clksel
= mcbsp_15_clksel
,
1520 .clkdm_name
= "core_l4_clkdm",
1521 .recalc
= &omap2_clksel_recalc
,
1524 static struct clk mcbsp1_fck
= {
1525 .name
= "mcbsp1_fck",
1526 .ops
= &clkops_omap2_dflt_wait
,
1527 .init
= &omap2_init_clksel_parent
,
1528 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1529 .enable_bit
= OMAP3430_EN_MCBSP1_SHIFT
,
1530 .clksel_reg
= OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0
),
1531 .clksel_mask
= OMAP2_MCBSP1_CLKS_MASK
,
1532 .clksel
= mcbsp_15_clksel
,
1533 .clkdm_name
= "core_l4_clkdm",
1534 .recalc
= &omap2_clksel_recalc
,
1537 /* CORE_48M_FCK-derived clocks */
1539 static struct clk core_48m_fck
= {
1540 .name
= "core_48m_fck",
1541 .ops
= &clkops_null
,
1542 .parent
= &omap_48m_fck
,
1543 .clkdm_name
= "core_l4_clkdm",
1544 .recalc
= &followparent_recalc
,
1547 static struct clk mcspi4_fck
= {
1548 .name
= "mcspi4_fck",
1549 .ops
= &clkops_omap2_dflt_wait
,
1550 .parent
= &core_48m_fck
,
1551 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1552 .enable_bit
= OMAP3430_EN_MCSPI4_SHIFT
,
1553 .recalc
= &followparent_recalc
,
1554 .clkdm_name
= "core_l4_clkdm",
1557 static struct clk mcspi3_fck
= {
1558 .name
= "mcspi3_fck",
1559 .ops
= &clkops_omap2_dflt_wait
,
1560 .parent
= &core_48m_fck
,
1561 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1562 .enable_bit
= OMAP3430_EN_MCSPI3_SHIFT
,
1563 .recalc
= &followparent_recalc
,
1564 .clkdm_name
= "core_l4_clkdm",
1567 static struct clk mcspi2_fck
= {
1568 .name
= "mcspi2_fck",
1569 .ops
= &clkops_omap2_dflt_wait
,
1570 .parent
= &core_48m_fck
,
1571 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1572 .enable_bit
= OMAP3430_EN_MCSPI2_SHIFT
,
1573 .recalc
= &followparent_recalc
,
1574 .clkdm_name
= "core_l4_clkdm",
1577 static struct clk mcspi1_fck
= {
1578 .name
= "mcspi1_fck",
1579 .ops
= &clkops_omap2_dflt_wait
,
1580 .parent
= &core_48m_fck
,
1581 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1582 .enable_bit
= OMAP3430_EN_MCSPI1_SHIFT
,
1583 .recalc
= &followparent_recalc
,
1584 .clkdm_name
= "core_l4_clkdm",
1587 static struct clk uart2_fck
= {
1588 .name
= "uart2_fck",
1589 .ops
= &clkops_omap2_dflt_wait
,
1590 .parent
= &core_48m_fck
,
1591 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1592 .enable_bit
= OMAP3430_EN_UART2_SHIFT
,
1593 .clkdm_name
= "core_l4_clkdm",
1594 .recalc
= &followparent_recalc
,
1597 static struct clk uart1_fck
= {
1598 .name
= "uart1_fck",
1599 .ops
= &clkops_omap2_dflt_wait
,
1600 .parent
= &core_48m_fck
,
1601 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1602 .enable_bit
= OMAP3430_EN_UART1_SHIFT
,
1603 .clkdm_name
= "core_l4_clkdm",
1604 .recalc
= &followparent_recalc
,
1607 static struct clk fshostusb_fck
= {
1608 .name
= "fshostusb_fck",
1609 .ops
= &clkops_omap2_dflt_wait
,
1610 .parent
= &core_48m_fck
,
1611 .clkdm_name
= "core_l4_clkdm",
1612 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1613 .enable_bit
= OMAP3430ES1_EN_FSHOSTUSB_SHIFT
,
1614 .recalc
= &followparent_recalc
,
1617 /* CORE_12M_FCK based clocks */
1619 static struct clk core_12m_fck
= {
1620 .name
= "core_12m_fck",
1621 .ops
= &clkops_null
,
1622 .parent
= &omap_12m_fck
,
1623 .clkdm_name
= "core_l4_clkdm",
1624 .recalc
= &followparent_recalc
,
1627 static struct clk hdq_fck
= {
1629 .ops
= &clkops_omap2_dflt_wait
,
1630 .parent
= &core_12m_fck
,
1631 .clkdm_name
= "core_l4_clkdm",
1632 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1633 .enable_bit
= OMAP3430_EN_HDQ_SHIFT
,
1634 .recalc
= &followparent_recalc
,
1637 /* DPLL3-derived clock */
1639 static const struct clksel_rate ssi_ssr_corex2_rates
[] = {
1640 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
1641 { .div
= 2, .val
= 2, .flags
= RATE_IN_3XXX
},
1642 { .div
= 3, .val
= 3, .flags
= RATE_IN_3XXX
},
1643 { .div
= 4, .val
= 4, .flags
= RATE_IN_3XXX
},
1644 { .div
= 6, .val
= 6, .flags
= RATE_IN_3XXX
},
1645 { .div
= 8, .val
= 8, .flags
= RATE_IN_3XXX
},
1649 static const struct clksel ssi_ssr_clksel
[] = {
1650 { .parent
= &corex2_fck
, .rates
= ssi_ssr_corex2_rates
},
1654 static struct clk ssi_ssr_fck_3430es1
= {
1655 .name
= "ssi_ssr_fck",
1656 .ops
= &clkops_omap2_dflt
,
1657 .init
= &omap2_init_clksel_parent
,
1658 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1659 .enable_bit
= OMAP3430_EN_SSI_SHIFT
,
1660 .clksel_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
1661 .clksel_mask
= OMAP3430_CLKSEL_SSI_MASK
,
1662 .clksel
= ssi_ssr_clksel
,
1663 .clkdm_name
= "core_l4_clkdm",
1664 .recalc
= &omap2_clksel_recalc
,
1667 static struct clk ssi_ssr_fck_3430es2
= {
1668 .name
= "ssi_ssr_fck",
1669 .ops
= &clkops_omap3430es2_ssi_wait
,
1670 .init
= &omap2_init_clksel_parent
,
1671 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1672 .enable_bit
= OMAP3430_EN_SSI_SHIFT
,
1673 .clksel_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
1674 .clksel_mask
= OMAP3430_CLKSEL_SSI_MASK
,
1675 .clksel
= ssi_ssr_clksel
,
1676 .clkdm_name
= "core_l4_clkdm",
1677 .recalc
= &omap2_clksel_recalc
,
1680 static struct clk ssi_sst_fck_3430es1
= {
1681 .name
= "ssi_sst_fck",
1682 .ops
= &clkops_null
,
1683 .parent
= &ssi_ssr_fck_3430es1
,
1685 .recalc
= &omap_fixed_divisor_recalc
,
1688 static struct clk ssi_sst_fck_3430es2
= {
1689 .name
= "ssi_sst_fck",
1690 .ops
= &clkops_null
,
1691 .parent
= &ssi_ssr_fck_3430es2
,
1693 .recalc
= &omap_fixed_divisor_recalc
,
1698 /* CORE_L3_ICK based clocks */
1701 * XXX must add clk_enable/clk_disable for these if standard code won't
1704 static struct clk core_l3_ick
= {
1705 .name
= "core_l3_ick",
1706 .ops
= &clkops_null
,
1708 .clkdm_name
= "core_l3_clkdm",
1709 .recalc
= &followparent_recalc
,
1712 static struct clk hsotgusb_ick_3430es1
= {
1713 .name
= "hsotgusb_ick",
1714 .ops
= &clkops_omap2_iclk_dflt
,
1715 .parent
= &core_l3_ick
,
1716 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1717 .enable_bit
= OMAP3430_EN_HSOTGUSB_SHIFT
,
1718 .clkdm_name
= "core_l3_clkdm",
1719 .recalc
= &followparent_recalc
,
1722 static struct clk hsotgusb_ick_3430es2
= {
1723 .name
= "hsotgusb_ick",
1724 .ops
= &clkops_omap3430es2_iclk_hsotgusb_wait
,
1725 .parent
= &core_l3_ick
,
1726 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1727 .enable_bit
= OMAP3430_EN_HSOTGUSB_SHIFT
,
1728 .clkdm_name
= "core_l3_clkdm",
1729 .recalc
= &followparent_recalc
,
1732 /* This interface clock does not have a CM_AUTOIDLE bit */
1733 static struct clk sdrc_ick
= {
1735 .ops
= &clkops_omap2_dflt_wait
,
1736 .parent
= &core_l3_ick
,
1737 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1738 .enable_bit
= OMAP3430_EN_SDRC_SHIFT
,
1739 .flags
= ENABLE_ON_INIT
,
1740 .clkdm_name
= "core_l3_clkdm",
1741 .recalc
= &followparent_recalc
,
1744 static struct clk gpmc_fck
= {
1746 .ops
= &clkops_null
,
1747 .parent
= &core_l3_ick
,
1748 .flags
= ENABLE_ON_INIT
, /* huh? */
1749 .clkdm_name
= "core_l3_clkdm",
1750 .recalc
= &followparent_recalc
,
1753 /* SECURITY_L3_ICK based clocks */
1755 static struct clk security_l3_ick
= {
1756 .name
= "security_l3_ick",
1757 .ops
= &clkops_null
,
1759 .recalc
= &followparent_recalc
,
1762 static struct clk pka_ick
= {
1764 .ops
= &clkops_omap2_iclk_dflt_wait
,
1765 .parent
= &security_l3_ick
,
1766 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN2
),
1767 .enable_bit
= OMAP3430_EN_PKA_SHIFT
,
1768 .recalc
= &followparent_recalc
,
1771 /* CORE_L4_ICK based clocks */
1773 static struct clk core_l4_ick
= {
1774 .name
= "core_l4_ick",
1775 .ops
= &clkops_null
,
1777 .clkdm_name
= "core_l4_clkdm",
1778 .recalc
= &followparent_recalc
,
1781 static struct clk usbtll_ick
= {
1782 .name
= "usbtll_ick",
1783 .ops
= &clkops_omap2_iclk_dflt_wait
,
1784 .parent
= &core_l4_ick
,
1785 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN3
),
1786 .enable_bit
= OMAP3430ES2_EN_USBTLL_SHIFT
,
1787 .clkdm_name
= "core_l4_clkdm",
1788 .recalc
= &followparent_recalc
,
1791 static struct clk mmchs3_ick
= {
1792 .name
= "mmchs3_ick",
1793 .ops
= &clkops_omap2_iclk_dflt_wait
,
1794 .parent
= &core_l4_ick
,
1795 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1796 .enable_bit
= OMAP3430ES2_EN_MMC3_SHIFT
,
1797 .clkdm_name
= "core_l4_clkdm",
1798 .recalc
= &followparent_recalc
,
1801 /* Intersystem Communication Registers - chassis mode only */
1802 static struct clk icr_ick
= {
1804 .ops
= &clkops_omap2_iclk_dflt_wait
,
1805 .parent
= &core_l4_ick
,
1806 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1807 .enable_bit
= OMAP3430_EN_ICR_SHIFT
,
1808 .clkdm_name
= "core_l4_clkdm",
1809 .recalc
= &followparent_recalc
,
1812 static struct clk aes2_ick
= {
1814 .ops
= &clkops_omap2_iclk_dflt_wait
,
1815 .parent
= &core_l4_ick
,
1816 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1817 .enable_bit
= OMAP3430_EN_AES2_SHIFT
,
1818 .clkdm_name
= "core_l4_clkdm",
1819 .recalc
= &followparent_recalc
,
1822 static struct clk sha12_ick
= {
1823 .name
= "sha12_ick",
1824 .ops
= &clkops_omap2_iclk_dflt_wait
,
1825 .parent
= &core_l4_ick
,
1826 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1827 .enable_bit
= OMAP3430_EN_SHA12_SHIFT
,
1828 .clkdm_name
= "core_l4_clkdm",
1829 .recalc
= &followparent_recalc
,
1832 static struct clk des2_ick
= {
1834 .ops
= &clkops_omap2_iclk_dflt_wait
,
1835 .parent
= &core_l4_ick
,
1836 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1837 .enable_bit
= OMAP3430_EN_DES2_SHIFT
,
1838 .clkdm_name
= "core_l4_clkdm",
1839 .recalc
= &followparent_recalc
,
1842 static struct clk mmchs2_ick
= {
1843 .name
= "mmchs2_ick",
1844 .ops
= &clkops_omap2_iclk_dflt_wait
,
1845 .parent
= &core_l4_ick
,
1846 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1847 .enable_bit
= OMAP3430_EN_MMC2_SHIFT
,
1848 .clkdm_name
= "core_l4_clkdm",
1849 .recalc
= &followparent_recalc
,
1852 static struct clk mmchs1_ick
= {
1853 .name
= "mmchs1_ick",
1854 .ops
= &clkops_omap2_iclk_dflt_wait
,
1855 .parent
= &core_l4_ick
,
1856 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1857 .enable_bit
= OMAP3430_EN_MMC1_SHIFT
,
1858 .clkdm_name
= "core_l4_clkdm",
1859 .recalc
= &followparent_recalc
,
1862 static struct clk mspro_ick
= {
1863 .name
= "mspro_ick",
1864 .ops
= &clkops_omap2_iclk_dflt_wait
,
1865 .parent
= &core_l4_ick
,
1866 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1867 .enable_bit
= OMAP3430_EN_MSPRO_SHIFT
,
1868 .clkdm_name
= "core_l4_clkdm",
1869 .recalc
= &followparent_recalc
,
1872 static struct clk hdq_ick
= {
1874 .ops
= &clkops_omap2_iclk_dflt_wait
,
1875 .parent
= &core_l4_ick
,
1876 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1877 .enable_bit
= OMAP3430_EN_HDQ_SHIFT
,
1878 .clkdm_name
= "core_l4_clkdm",
1879 .recalc
= &followparent_recalc
,
1882 static struct clk mcspi4_ick
= {
1883 .name
= "mcspi4_ick",
1884 .ops
= &clkops_omap2_iclk_dflt_wait
,
1885 .parent
= &core_l4_ick
,
1886 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1887 .enable_bit
= OMAP3430_EN_MCSPI4_SHIFT
,
1888 .clkdm_name
= "core_l4_clkdm",
1889 .recalc
= &followparent_recalc
,
1892 static struct clk mcspi3_ick
= {
1893 .name
= "mcspi3_ick",
1894 .ops
= &clkops_omap2_iclk_dflt_wait
,
1895 .parent
= &core_l4_ick
,
1896 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1897 .enable_bit
= OMAP3430_EN_MCSPI3_SHIFT
,
1898 .clkdm_name
= "core_l4_clkdm",
1899 .recalc
= &followparent_recalc
,
1902 static struct clk mcspi2_ick
= {
1903 .name
= "mcspi2_ick",
1904 .ops
= &clkops_omap2_iclk_dflt_wait
,
1905 .parent
= &core_l4_ick
,
1906 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1907 .enable_bit
= OMAP3430_EN_MCSPI2_SHIFT
,
1908 .clkdm_name
= "core_l4_clkdm",
1909 .recalc
= &followparent_recalc
,
1912 static struct clk mcspi1_ick
= {
1913 .name
= "mcspi1_ick",
1914 .ops
= &clkops_omap2_iclk_dflt_wait
,
1915 .parent
= &core_l4_ick
,
1916 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1917 .enable_bit
= OMAP3430_EN_MCSPI1_SHIFT
,
1918 .clkdm_name
= "core_l4_clkdm",
1919 .recalc
= &followparent_recalc
,
1922 static struct clk i2c3_ick
= {
1924 .ops
= &clkops_omap2_iclk_dflt_wait
,
1925 .parent
= &core_l4_ick
,
1926 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1927 .enable_bit
= OMAP3430_EN_I2C3_SHIFT
,
1928 .clkdm_name
= "core_l4_clkdm",
1929 .recalc
= &followparent_recalc
,
1932 static struct clk i2c2_ick
= {
1934 .ops
= &clkops_omap2_iclk_dflt_wait
,
1935 .parent
= &core_l4_ick
,
1936 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1937 .enable_bit
= OMAP3430_EN_I2C2_SHIFT
,
1938 .clkdm_name
= "core_l4_clkdm",
1939 .recalc
= &followparent_recalc
,
1942 static struct clk i2c1_ick
= {
1944 .ops
= &clkops_omap2_iclk_dflt_wait
,
1945 .parent
= &core_l4_ick
,
1946 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1947 .enable_bit
= OMAP3430_EN_I2C1_SHIFT
,
1948 .clkdm_name
= "core_l4_clkdm",
1949 .recalc
= &followparent_recalc
,
1952 static struct clk uart2_ick
= {
1953 .name
= "uart2_ick",
1954 .ops
= &clkops_omap2_iclk_dflt_wait
,
1955 .parent
= &core_l4_ick
,
1956 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1957 .enable_bit
= OMAP3430_EN_UART2_SHIFT
,
1958 .clkdm_name
= "core_l4_clkdm",
1959 .recalc
= &followparent_recalc
,
1962 static struct clk uart1_ick
= {
1963 .name
= "uart1_ick",
1964 .ops
= &clkops_omap2_iclk_dflt_wait
,
1965 .parent
= &core_l4_ick
,
1966 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1967 .enable_bit
= OMAP3430_EN_UART1_SHIFT
,
1968 .clkdm_name
= "core_l4_clkdm",
1969 .recalc
= &followparent_recalc
,
1972 static struct clk gpt11_ick
= {
1973 .name
= "gpt11_ick",
1974 .ops
= &clkops_omap2_iclk_dflt_wait
,
1975 .parent
= &core_l4_ick
,
1976 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1977 .enable_bit
= OMAP3430_EN_GPT11_SHIFT
,
1978 .clkdm_name
= "core_l4_clkdm",
1979 .recalc
= &followparent_recalc
,
1982 static struct clk gpt10_ick
= {
1983 .name
= "gpt10_ick",
1984 .ops
= &clkops_omap2_iclk_dflt_wait
,
1985 .parent
= &core_l4_ick
,
1986 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1987 .enable_bit
= OMAP3430_EN_GPT10_SHIFT
,
1988 .clkdm_name
= "core_l4_clkdm",
1989 .recalc
= &followparent_recalc
,
1992 static struct clk mcbsp5_ick
= {
1993 .name
= "mcbsp5_ick",
1994 .ops
= &clkops_omap2_iclk_dflt_wait
,
1995 .parent
= &core_l4_ick
,
1996 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1997 .enable_bit
= OMAP3430_EN_MCBSP5_SHIFT
,
1998 .clkdm_name
= "core_l4_clkdm",
1999 .recalc
= &followparent_recalc
,
2002 static struct clk mcbsp1_ick
= {
2003 .name
= "mcbsp1_ick",
2004 .ops
= &clkops_omap2_iclk_dflt_wait
,
2005 .parent
= &core_l4_ick
,
2006 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2007 .enable_bit
= OMAP3430_EN_MCBSP1_SHIFT
,
2008 .clkdm_name
= "core_l4_clkdm",
2009 .recalc
= &followparent_recalc
,
2012 static struct clk fac_ick
= {
2014 .ops
= &clkops_omap2_iclk_dflt_wait
,
2015 .parent
= &core_l4_ick
,
2016 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2017 .enable_bit
= OMAP3430ES1_EN_FAC_SHIFT
,
2018 .clkdm_name
= "core_l4_clkdm",
2019 .recalc
= &followparent_recalc
,
2022 static struct clk mailboxes_ick
= {
2023 .name
= "mailboxes_ick",
2024 .ops
= &clkops_omap2_iclk_dflt_wait
,
2025 .parent
= &core_l4_ick
,
2026 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2027 .enable_bit
= OMAP3430_EN_MAILBOXES_SHIFT
,
2028 .clkdm_name
= "core_l4_clkdm",
2029 .recalc
= &followparent_recalc
,
2032 static struct clk omapctrl_ick
= {
2033 .name
= "omapctrl_ick",
2034 .ops
= &clkops_omap2_iclk_dflt_wait
,
2035 .parent
= &core_l4_ick
,
2036 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2037 .enable_bit
= OMAP3430_EN_OMAPCTRL_SHIFT
,
2038 .flags
= ENABLE_ON_INIT
,
2039 .clkdm_name
= "core_l4_clkdm",
2040 .recalc
= &followparent_recalc
,
2043 /* SSI_L4_ICK based clocks */
2045 static struct clk ssi_l4_ick
= {
2046 .name
= "ssi_l4_ick",
2047 .ops
= &clkops_null
,
2049 .clkdm_name
= "core_l4_clkdm",
2050 .recalc
= &followparent_recalc
,
2053 static struct clk ssi_ick_3430es1
= {
2055 .ops
= &clkops_omap2_iclk_dflt
,
2056 .parent
= &ssi_l4_ick
,
2057 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2058 .enable_bit
= OMAP3430_EN_SSI_SHIFT
,
2059 .clkdm_name
= "core_l4_clkdm",
2060 .recalc
= &followparent_recalc
,
2063 static struct clk ssi_ick_3430es2
= {
2065 .ops
= &clkops_omap3430es2_iclk_ssi_wait
,
2066 .parent
= &ssi_l4_ick
,
2067 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2068 .enable_bit
= OMAP3430_EN_SSI_SHIFT
,
2069 .clkdm_name
= "core_l4_clkdm",
2070 .recalc
= &followparent_recalc
,
2073 /* REVISIT: Technically the TRM claims that this is CORE_CLK based,
2074 * but l4_ick makes more sense to me */
2076 static const struct clksel usb_l4_clksel
[] = {
2077 { .parent
= &l4_ick
, .rates
= div2_rates
},
2081 static struct clk usb_l4_ick
= {
2082 .name
= "usb_l4_ick",
2083 .ops
= &clkops_omap2_iclk_dflt_wait
,
2085 .init
= &omap2_init_clksel_parent
,
2086 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2087 .enable_bit
= OMAP3430ES1_EN_FSHOSTUSB_SHIFT
,
2088 .clksel_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
2089 .clksel_mask
= OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK
,
2090 .clksel
= usb_l4_clksel
,
2091 .clkdm_name
= "core_l4_clkdm",
2092 .recalc
= &omap2_clksel_recalc
,
2095 /* SECURITY_L4_ICK2 based clocks */
2097 static struct clk security_l4_ick2
= {
2098 .name
= "security_l4_ick2",
2099 .ops
= &clkops_null
,
2101 .recalc
= &followparent_recalc
,
2104 static struct clk aes1_ick
= {
2106 .ops
= &clkops_omap2_iclk_dflt_wait
,
2107 .parent
= &security_l4_ick2
,
2108 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN2
),
2109 .enable_bit
= OMAP3430_EN_AES1_SHIFT
,
2110 .recalc
= &followparent_recalc
,
2113 static struct clk rng_ick
= {
2115 .ops
= &clkops_omap2_iclk_dflt_wait
,
2116 .parent
= &security_l4_ick2
,
2117 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN2
),
2118 .enable_bit
= OMAP3430_EN_RNG_SHIFT
,
2119 .recalc
= &followparent_recalc
,
2122 static struct clk sha11_ick
= {
2123 .name
= "sha11_ick",
2124 .ops
= &clkops_omap2_iclk_dflt_wait
,
2125 .parent
= &security_l4_ick2
,
2126 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN2
),
2127 .enable_bit
= OMAP3430_EN_SHA11_SHIFT
,
2128 .recalc
= &followparent_recalc
,
2131 static struct clk des1_ick
= {
2133 .ops
= &clkops_omap2_iclk_dflt_wait
,
2134 .parent
= &security_l4_ick2
,
2135 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN2
),
2136 .enable_bit
= OMAP3430_EN_DES1_SHIFT
,
2137 .recalc
= &followparent_recalc
,
2141 static struct clk dss1_alwon_fck_3430es1
= {
2142 .name
= "dss1_alwon_fck",
2143 .ops
= &clkops_omap2_dflt
,
2144 .parent
= &dpll4_m4x2_ck
,
2145 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_FCLKEN
),
2146 .enable_bit
= OMAP3430_EN_DSS1_SHIFT
,
2147 .clkdm_name
= "dss_clkdm",
2148 .recalc
= &followparent_recalc
,
2151 static struct clk dss1_alwon_fck_3430es2
= {
2152 .name
= "dss1_alwon_fck",
2153 .ops
= &clkops_omap3430es2_dss_usbhost_wait
,
2154 .parent
= &dpll4_m4x2_ck
,
2155 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_FCLKEN
),
2156 .enable_bit
= OMAP3430_EN_DSS1_SHIFT
,
2157 .clkdm_name
= "dss_clkdm",
2158 .recalc
= &followparent_recalc
,
2161 static struct clk dss_tv_fck
= {
2162 .name
= "dss_tv_fck",
2163 .ops
= &clkops_omap2_dflt
,
2164 .parent
= &omap_54m_fck
,
2165 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_FCLKEN
),
2166 .enable_bit
= OMAP3430_EN_TV_SHIFT
,
2167 .clkdm_name
= "dss_clkdm",
2168 .recalc
= &followparent_recalc
,
2171 static struct clk dss_96m_fck
= {
2172 .name
= "dss_96m_fck",
2173 .ops
= &clkops_omap2_dflt
,
2174 .parent
= &omap_96m_fck
,
2175 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_FCLKEN
),
2176 .enable_bit
= OMAP3430_EN_TV_SHIFT
,
2177 .clkdm_name
= "dss_clkdm",
2178 .recalc
= &followparent_recalc
,
2181 static struct clk dss2_alwon_fck
= {
2182 .name
= "dss2_alwon_fck",
2183 .ops
= &clkops_omap2_dflt
,
2185 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_FCLKEN
),
2186 .enable_bit
= OMAP3430_EN_DSS2_SHIFT
,
2187 .clkdm_name
= "dss_clkdm",
2188 .recalc
= &followparent_recalc
,
2191 static struct clk dss_ick_3430es1
= {
2192 /* Handles both L3 and L4 clocks */
2194 .ops
= &clkops_omap2_iclk_dflt
,
2196 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_ICLKEN
),
2197 .enable_bit
= OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT
,
2198 .clkdm_name
= "dss_clkdm",
2199 .recalc
= &followparent_recalc
,
2202 static struct clk dss_ick_3430es2
= {
2203 /* Handles both L3 and L4 clocks */
2205 .ops
= &clkops_omap3430es2_iclk_dss_usbhost_wait
,
2207 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_ICLKEN
),
2208 .enable_bit
= OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT
,
2209 .clkdm_name
= "dss_clkdm",
2210 .recalc
= &followparent_recalc
,
2215 static struct clk cam_mclk
= {
2217 .ops
= &clkops_omap2_dflt
,
2218 .parent
= &dpll4_m5x2_ck
,
2219 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_CAM_MOD
, CM_FCLKEN
),
2220 .enable_bit
= OMAP3430_EN_CAM_SHIFT
,
2221 .clkdm_name
= "cam_clkdm",
2222 .recalc
= &followparent_recalc
,
2225 static struct clk cam_ick
= {
2226 /* Handles both L3 and L4 clocks */
2228 .ops
= &clkops_omap2_iclk_dflt
,
2230 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_CAM_MOD
, CM_ICLKEN
),
2231 .enable_bit
= OMAP3430_EN_CAM_SHIFT
,
2232 .clkdm_name
= "cam_clkdm",
2233 .recalc
= &followparent_recalc
,
2236 static struct clk csi2_96m_fck
= {
2237 .name
= "csi2_96m_fck",
2238 .ops
= &clkops_omap2_dflt
,
2239 .parent
= &core_96m_fck
,
2240 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_CAM_MOD
, CM_FCLKEN
),
2241 .enable_bit
= OMAP3430_EN_CSI2_SHIFT
,
2242 .clkdm_name
= "cam_clkdm",
2243 .recalc
= &followparent_recalc
,
2246 /* USBHOST - 3430ES2 only */
2248 static struct clk usbhost_120m_fck
= {
2249 .name
= "usbhost_120m_fck",
2250 .ops
= &clkops_omap2_dflt
,
2251 .parent
= &dpll5_m2_ck
,
2252 .enable_reg
= OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD
, CM_FCLKEN
),
2253 .enable_bit
= OMAP3430ES2_EN_USBHOST2_SHIFT
,
2254 .clkdm_name
= "usbhost_clkdm",
2255 .recalc
= &followparent_recalc
,
2258 static struct clk usbhost_48m_fck
= {
2259 .name
= "usbhost_48m_fck",
2260 .ops
= &clkops_omap3430es2_dss_usbhost_wait
,
2261 .parent
= &omap_48m_fck
,
2262 .enable_reg
= OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD
, CM_FCLKEN
),
2263 .enable_bit
= OMAP3430ES2_EN_USBHOST1_SHIFT
,
2264 .clkdm_name
= "usbhost_clkdm",
2265 .recalc
= &followparent_recalc
,
2268 static struct clk usbhost_ick
= {
2269 /* Handles both L3 and L4 clocks */
2270 .name
= "usbhost_ick",
2271 .ops
= &clkops_omap3430es2_iclk_dss_usbhost_wait
,
2273 .enable_reg
= OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD
, CM_ICLKEN
),
2274 .enable_bit
= OMAP3430ES2_EN_USBHOST_SHIFT
,
2275 .clkdm_name
= "usbhost_clkdm",
2276 .recalc
= &followparent_recalc
,
2281 static const struct clksel_rate usim_96m_rates
[] = {
2282 { .div
= 2, .val
= 3, .flags
= RATE_IN_3XXX
},
2283 { .div
= 4, .val
= 4, .flags
= RATE_IN_3XXX
},
2284 { .div
= 8, .val
= 5, .flags
= RATE_IN_3XXX
},
2285 { .div
= 10, .val
= 6, .flags
= RATE_IN_3XXX
},
2289 static const struct clksel_rate usim_120m_rates
[] = {
2290 { .div
= 4, .val
= 7, .flags
= RATE_IN_3XXX
},
2291 { .div
= 8, .val
= 8, .flags
= RATE_IN_3XXX
},
2292 { .div
= 16, .val
= 9, .flags
= RATE_IN_3XXX
},
2293 { .div
= 20, .val
= 10, .flags
= RATE_IN_3XXX
},
2297 static const struct clksel usim_clksel
[] = {
2298 { .parent
= &omap_96m_fck
, .rates
= usim_96m_rates
},
2299 { .parent
= &dpll5_m2_ck
, .rates
= usim_120m_rates
},
2300 { .parent
= &sys_ck
, .rates
= div2_rates
},
2305 static struct clk usim_fck
= {
2307 .ops
= &clkops_omap2_dflt_wait
,
2308 .init
= &omap2_init_clksel_parent
,
2309 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_FCLKEN
),
2310 .enable_bit
= OMAP3430ES2_EN_USIMOCP_SHIFT
,
2311 .clksel_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_CLKSEL
),
2312 .clksel_mask
= OMAP3430ES2_CLKSEL_USIMOCP_MASK
,
2313 .clksel
= usim_clksel
,
2314 .recalc
= &omap2_clksel_recalc
,
2317 /* XXX should gpt1's clksel have wkup_32k_fck as the 32k opt? */
2318 static struct clk gpt1_fck
= {
2320 .ops
= &clkops_omap2_dflt_wait
,
2321 .init
= &omap2_init_clksel_parent
,
2322 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_FCLKEN
),
2323 .enable_bit
= OMAP3430_EN_GPT1_SHIFT
,
2324 .clksel_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_CLKSEL
),
2325 .clksel_mask
= OMAP3430_CLKSEL_GPT1_MASK
,
2326 .clksel
= omap343x_gpt_clksel
,
2327 .clkdm_name
= "wkup_clkdm",
2328 .recalc
= &omap2_clksel_recalc
,
2331 static struct clk wkup_32k_fck
= {
2332 .name
= "wkup_32k_fck",
2333 .ops
= &clkops_null
,
2334 .parent
= &omap_32k_fck
,
2335 .clkdm_name
= "wkup_clkdm",
2336 .recalc
= &followparent_recalc
,
2339 static struct clk gpio1_dbck
= {
2340 .name
= "gpio1_dbck",
2341 .ops
= &clkops_omap2_dflt
,
2342 .parent
= &wkup_32k_fck
,
2343 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_FCLKEN
),
2344 .enable_bit
= OMAP3430_EN_GPIO1_SHIFT
,
2345 .clkdm_name
= "wkup_clkdm",
2346 .recalc
= &followparent_recalc
,
2349 static struct clk wdt2_fck
= {
2351 .ops
= &clkops_omap2_dflt_wait
,
2352 .parent
= &wkup_32k_fck
,
2353 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_FCLKEN
),
2354 .enable_bit
= OMAP3430_EN_WDT2_SHIFT
,
2355 .clkdm_name
= "wkup_clkdm",
2356 .recalc
= &followparent_recalc
,
2359 static struct clk wkup_l4_ick
= {
2360 .name
= "wkup_l4_ick",
2361 .ops
= &clkops_null
,
2363 .clkdm_name
= "wkup_clkdm",
2364 .recalc
= &followparent_recalc
,
2368 /* Never specifically named in the TRM, so we have to infer a likely name */
2369 static struct clk usim_ick
= {
2371 .ops
= &clkops_omap2_iclk_dflt_wait
,
2372 .parent
= &wkup_l4_ick
,
2373 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_ICLKEN
),
2374 .enable_bit
= OMAP3430ES2_EN_USIMOCP_SHIFT
,
2375 .clkdm_name
= "wkup_clkdm",
2376 .recalc
= &followparent_recalc
,
2379 static struct clk wdt2_ick
= {
2381 .ops
= &clkops_omap2_iclk_dflt_wait
,
2382 .parent
= &wkup_l4_ick
,
2383 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_ICLKEN
),
2384 .enable_bit
= OMAP3430_EN_WDT2_SHIFT
,
2385 .clkdm_name
= "wkup_clkdm",
2386 .recalc
= &followparent_recalc
,
2389 static struct clk wdt1_ick
= {
2391 .ops
= &clkops_omap2_iclk_dflt_wait
,
2392 .parent
= &wkup_l4_ick
,
2393 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_ICLKEN
),
2394 .enable_bit
= OMAP3430_EN_WDT1_SHIFT
,
2395 .clkdm_name
= "wkup_clkdm",
2396 .recalc
= &followparent_recalc
,
2399 static struct clk gpio1_ick
= {
2400 .name
= "gpio1_ick",
2401 .ops
= &clkops_omap2_iclk_dflt_wait
,
2402 .parent
= &wkup_l4_ick
,
2403 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_ICLKEN
),
2404 .enable_bit
= OMAP3430_EN_GPIO1_SHIFT
,
2405 .clkdm_name
= "wkup_clkdm",
2406 .recalc
= &followparent_recalc
,
2409 static struct clk omap_32ksync_ick
= {
2410 .name
= "omap_32ksync_ick",
2411 .ops
= &clkops_omap2_iclk_dflt_wait
,
2412 .parent
= &wkup_l4_ick
,
2413 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_ICLKEN
),
2414 .enable_bit
= OMAP3430_EN_32KSYNC_SHIFT
,
2415 .clkdm_name
= "wkup_clkdm",
2416 .recalc
= &followparent_recalc
,
2419 /* XXX This clock no longer exists in 3430 TRM rev F */
2420 static struct clk gpt12_ick
= {
2421 .name
= "gpt12_ick",
2422 .ops
= &clkops_omap2_iclk_dflt_wait
,
2423 .parent
= &wkup_l4_ick
,
2424 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_ICLKEN
),
2425 .enable_bit
= OMAP3430_EN_GPT12_SHIFT
,
2426 .clkdm_name
= "wkup_clkdm",
2427 .recalc
= &followparent_recalc
,
2430 static struct clk gpt1_ick
= {
2432 .ops
= &clkops_omap2_iclk_dflt_wait
,
2433 .parent
= &wkup_l4_ick
,
2434 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_ICLKEN
),
2435 .enable_bit
= OMAP3430_EN_GPT1_SHIFT
,
2436 .clkdm_name
= "wkup_clkdm",
2437 .recalc
= &followparent_recalc
,
2442 /* PER clock domain */
2444 static struct clk per_96m_fck
= {
2445 .name
= "per_96m_fck",
2446 .ops
= &clkops_null
,
2447 .parent
= &omap_96m_alwon_fck
,
2448 .clkdm_name
= "per_clkdm",
2449 .recalc
= &followparent_recalc
,
2452 static struct clk per_48m_fck
= {
2453 .name
= "per_48m_fck",
2454 .ops
= &clkops_null
,
2455 .parent
= &omap_48m_fck
,
2456 .clkdm_name
= "per_clkdm",
2457 .recalc
= &followparent_recalc
,
2460 static struct clk uart3_fck
= {
2461 .name
= "uart3_fck",
2462 .ops
= &clkops_omap2_dflt_wait
,
2463 .parent
= &per_48m_fck
,
2464 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2465 .enable_bit
= OMAP3430_EN_UART3_SHIFT
,
2466 .clkdm_name
= "per_clkdm",
2467 .recalc
= &followparent_recalc
,
2470 static struct clk uart4_fck
= {
2471 .name
= "uart4_fck",
2472 .ops
= &clkops_omap2_dflt_wait
,
2473 .parent
= &per_48m_fck
,
2474 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2475 .enable_bit
= OMAP3630_EN_UART4_SHIFT
,
2476 .clkdm_name
= "per_clkdm",
2477 .recalc
= &followparent_recalc
,
2480 static struct clk uart4_fck_am35xx
= {
2481 .name
= "uart4_fck",
2482 .ops
= &clkops_omap2_dflt_wait
,
2483 .parent
= &core_48m_fck
,
2484 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2485 .enable_bit
= AM35XX_EN_UART4_SHIFT
,
2486 .clkdm_name
= "core_l4_clkdm",
2487 .recalc
= &followparent_recalc
,
2490 static struct clk gpt2_fck
= {
2492 .ops
= &clkops_omap2_dflt_wait
,
2493 .init
= &omap2_init_clksel_parent
,
2494 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2495 .enable_bit
= OMAP3430_EN_GPT2_SHIFT
,
2496 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
2497 .clksel_mask
= OMAP3430_CLKSEL_GPT2_MASK
,
2498 .clksel
= omap343x_gpt_clksel
,
2499 .clkdm_name
= "per_clkdm",
2500 .recalc
= &omap2_clksel_recalc
,
2503 static struct clk gpt3_fck
= {
2505 .ops
= &clkops_omap2_dflt_wait
,
2506 .init
= &omap2_init_clksel_parent
,
2507 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2508 .enable_bit
= OMAP3430_EN_GPT3_SHIFT
,
2509 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
2510 .clksel_mask
= OMAP3430_CLKSEL_GPT3_MASK
,
2511 .clksel
= omap343x_gpt_clksel
,
2512 .clkdm_name
= "per_clkdm",
2513 .recalc
= &omap2_clksel_recalc
,
2516 static struct clk gpt4_fck
= {
2518 .ops
= &clkops_omap2_dflt_wait
,
2519 .init
= &omap2_init_clksel_parent
,
2520 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2521 .enable_bit
= OMAP3430_EN_GPT4_SHIFT
,
2522 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
2523 .clksel_mask
= OMAP3430_CLKSEL_GPT4_MASK
,
2524 .clksel
= omap343x_gpt_clksel
,
2525 .clkdm_name
= "per_clkdm",
2526 .recalc
= &omap2_clksel_recalc
,
2529 static struct clk gpt5_fck
= {
2531 .ops
= &clkops_omap2_dflt_wait
,
2532 .init
= &omap2_init_clksel_parent
,
2533 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2534 .enable_bit
= OMAP3430_EN_GPT5_SHIFT
,
2535 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
2536 .clksel_mask
= OMAP3430_CLKSEL_GPT5_MASK
,
2537 .clksel
= omap343x_gpt_clksel
,
2538 .clkdm_name
= "per_clkdm",
2539 .recalc
= &omap2_clksel_recalc
,
2542 static struct clk gpt6_fck
= {
2544 .ops
= &clkops_omap2_dflt_wait
,
2545 .init
= &omap2_init_clksel_parent
,
2546 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2547 .enable_bit
= OMAP3430_EN_GPT6_SHIFT
,
2548 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
2549 .clksel_mask
= OMAP3430_CLKSEL_GPT6_MASK
,
2550 .clksel
= omap343x_gpt_clksel
,
2551 .clkdm_name
= "per_clkdm",
2552 .recalc
= &omap2_clksel_recalc
,
2555 static struct clk gpt7_fck
= {
2557 .ops
= &clkops_omap2_dflt_wait
,
2558 .init
= &omap2_init_clksel_parent
,
2559 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2560 .enable_bit
= OMAP3430_EN_GPT7_SHIFT
,
2561 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
2562 .clksel_mask
= OMAP3430_CLKSEL_GPT7_MASK
,
2563 .clksel
= omap343x_gpt_clksel
,
2564 .clkdm_name
= "per_clkdm",
2565 .recalc
= &omap2_clksel_recalc
,
2568 static struct clk gpt8_fck
= {
2570 .ops
= &clkops_omap2_dflt_wait
,
2571 .init
= &omap2_init_clksel_parent
,
2572 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2573 .enable_bit
= OMAP3430_EN_GPT8_SHIFT
,
2574 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
2575 .clksel_mask
= OMAP3430_CLKSEL_GPT8_MASK
,
2576 .clksel
= omap343x_gpt_clksel
,
2577 .clkdm_name
= "per_clkdm",
2578 .recalc
= &omap2_clksel_recalc
,
2581 static struct clk gpt9_fck
= {
2583 .ops
= &clkops_omap2_dflt_wait
,
2584 .init
= &omap2_init_clksel_parent
,
2585 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2586 .enable_bit
= OMAP3430_EN_GPT9_SHIFT
,
2587 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
2588 .clksel_mask
= OMAP3430_CLKSEL_GPT9_MASK
,
2589 .clksel
= omap343x_gpt_clksel
,
2590 .clkdm_name
= "per_clkdm",
2591 .recalc
= &omap2_clksel_recalc
,
2594 static struct clk per_32k_alwon_fck
= {
2595 .name
= "per_32k_alwon_fck",
2596 .ops
= &clkops_null
,
2597 .parent
= &omap_32k_fck
,
2598 .clkdm_name
= "per_clkdm",
2599 .recalc
= &followparent_recalc
,
2602 static struct clk gpio6_dbck
= {
2603 .name
= "gpio6_dbck",
2604 .ops
= &clkops_omap2_dflt
,
2605 .parent
= &per_32k_alwon_fck
,
2606 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2607 .enable_bit
= OMAP3430_EN_GPIO6_SHIFT
,
2608 .clkdm_name
= "per_clkdm",
2609 .recalc
= &followparent_recalc
,
2612 static struct clk gpio5_dbck
= {
2613 .name
= "gpio5_dbck",
2614 .ops
= &clkops_omap2_dflt
,
2615 .parent
= &per_32k_alwon_fck
,
2616 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2617 .enable_bit
= OMAP3430_EN_GPIO5_SHIFT
,
2618 .clkdm_name
= "per_clkdm",
2619 .recalc
= &followparent_recalc
,
2622 static struct clk gpio4_dbck
= {
2623 .name
= "gpio4_dbck",
2624 .ops
= &clkops_omap2_dflt
,
2625 .parent
= &per_32k_alwon_fck
,
2626 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2627 .enable_bit
= OMAP3430_EN_GPIO4_SHIFT
,
2628 .clkdm_name
= "per_clkdm",
2629 .recalc
= &followparent_recalc
,
2632 static struct clk gpio3_dbck
= {
2633 .name
= "gpio3_dbck",
2634 .ops
= &clkops_omap2_dflt
,
2635 .parent
= &per_32k_alwon_fck
,
2636 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2637 .enable_bit
= OMAP3430_EN_GPIO3_SHIFT
,
2638 .clkdm_name
= "per_clkdm",
2639 .recalc
= &followparent_recalc
,
2642 static struct clk gpio2_dbck
= {
2643 .name
= "gpio2_dbck",
2644 .ops
= &clkops_omap2_dflt
,
2645 .parent
= &per_32k_alwon_fck
,
2646 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2647 .enable_bit
= OMAP3430_EN_GPIO2_SHIFT
,
2648 .clkdm_name
= "per_clkdm",
2649 .recalc
= &followparent_recalc
,
2652 static struct clk wdt3_fck
= {
2654 .ops
= &clkops_omap2_dflt_wait
,
2655 .parent
= &per_32k_alwon_fck
,
2656 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2657 .enable_bit
= OMAP3430_EN_WDT3_SHIFT
,
2658 .clkdm_name
= "per_clkdm",
2659 .recalc
= &followparent_recalc
,
2662 static struct clk per_l4_ick
= {
2663 .name
= "per_l4_ick",
2664 .ops
= &clkops_null
,
2666 .clkdm_name
= "per_clkdm",
2667 .recalc
= &followparent_recalc
,
2670 static struct clk gpio6_ick
= {
2671 .name
= "gpio6_ick",
2672 .ops
= &clkops_omap2_iclk_dflt_wait
,
2673 .parent
= &per_l4_ick
,
2674 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2675 .enable_bit
= OMAP3430_EN_GPIO6_SHIFT
,
2676 .clkdm_name
= "per_clkdm",
2677 .recalc
= &followparent_recalc
,
2680 static struct clk gpio5_ick
= {
2681 .name
= "gpio5_ick",
2682 .ops
= &clkops_omap2_iclk_dflt_wait
,
2683 .parent
= &per_l4_ick
,
2684 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2685 .enable_bit
= OMAP3430_EN_GPIO5_SHIFT
,
2686 .clkdm_name
= "per_clkdm",
2687 .recalc
= &followparent_recalc
,
2690 static struct clk gpio4_ick
= {
2691 .name
= "gpio4_ick",
2692 .ops
= &clkops_omap2_iclk_dflt_wait
,
2693 .parent
= &per_l4_ick
,
2694 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2695 .enable_bit
= OMAP3430_EN_GPIO4_SHIFT
,
2696 .clkdm_name
= "per_clkdm",
2697 .recalc
= &followparent_recalc
,
2700 static struct clk gpio3_ick
= {
2701 .name
= "gpio3_ick",
2702 .ops
= &clkops_omap2_iclk_dflt_wait
,
2703 .parent
= &per_l4_ick
,
2704 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2705 .enable_bit
= OMAP3430_EN_GPIO3_SHIFT
,
2706 .clkdm_name
= "per_clkdm",
2707 .recalc
= &followparent_recalc
,
2710 static struct clk gpio2_ick
= {
2711 .name
= "gpio2_ick",
2712 .ops
= &clkops_omap2_iclk_dflt_wait
,
2713 .parent
= &per_l4_ick
,
2714 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2715 .enable_bit
= OMAP3430_EN_GPIO2_SHIFT
,
2716 .clkdm_name
= "per_clkdm",
2717 .recalc
= &followparent_recalc
,
2720 static struct clk wdt3_ick
= {
2722 .ops
= &clkops_omap2_iclk_dflt_wait
,
2723 .parent
= &per_l4_ick
,
2724 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2725 .enable_bit
= OMAP3430_EN_WDT3_SHIFT
,
2726 .clkdm_name
= "per_clkdm",
2727 .recalc
= &followparent_recalc
,
2730 static struct clk uart3_ick
= {
2731 .name
= "uart3_ick",
2732 .ops
= &clkops_omap2_iclk_dflt_wait
,
2733 .parent
= &per_l4_ick
,
2734 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2735 .enable_bit
= OMAP3430_EN_UART3_SHIFT
,
2736 .clkdm_name
= "per_clkdm",
2737 .recalc
= &followparent_recalc
,
2740 static struct clk uart4_ick
= {
2741 .name
= "uart4_ick",
2742 .ops
= &clkops_omap2_iclk_dflt_wait
,
2743 .parent
= &per_l4_ick
,
2744 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2745 .enable_bit
= OMAP3630_EN_UART4_SHIFT
,
2746 .clkdm_name
= "per_clkdm",
2747 .recalc
= &followparent_recalc
,
2750 static struct clk gpt9_ick
= {
2752 .ops
= &clkops_omap2_iclk_dflt_wait
,
2753 .parent
= &per_l4_ick
,
2754 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2755 .enable_bit
= OMAP3430_EN_GPT9_SHIFT
,
2756 .clkdm_name
= "per_clkdm",
2757 .recalc
= &followparent_recalc
,
2760 static struct clk gpt8_ick
= {
2762 .ops
= &clkops_omap2_iclk_dflt_wait
,
2763 .parent
= &per_l4_ick
,
2764 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2765 .enable_bit
= OMAP3430_EN_GPT8_SHIFT
,
2766 .clkdm_name
= "per_clkdm",
2767 .recalc
= &followparent_recalc
,
2770 static struct clk gpt7_ick
= {
2772 .ops
= &clkops_omap2_iclk_dflt_wait
,
2773 .parent
= &per_l4_ick
,
2774 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2775 .enable_bit
= OMAP3430_EN_GPT7_SHIFT
,
2776 .clkdm_name
= "per_clkdm",
2777 .recalc
= &followparent_recalc
,
2780 static struct clk gpt6_ick
= {
2782 .ops
= &clkops_omap2_iclk_dflt_wait
,
2783 .parent
= &per_l4_ick
,
2784 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2785 .enable_bit
= OMAP3430_EN_GPT6_SHIFT
,
2786 .clkdm_name
= "per_clkdm",
2787 .recalc
= &followparent_recalc
,
2790 static struct clk gpt5_ick
= {
2792 .ops
= &clkops_omap2_iclk_dflt_wait
,
2793 .parent
= &per_l4_ick
,
2794 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2795 .enable_bit
= OMAP3430_EN_GPT5_SHIFT
,
2796 .clkdm_name
= "per_clkdm",
2797 .recalc
= &followparent_recalc
,
2800 static struct clk gpt4_ick
= {
2802 .ops
= &clkops_omap2_iclk_dflt_wait
,
2803 .parent
= &per_l4_ick
,
2804 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2805 .enable_bit
= OMAP3430_EN_GPT4_SHIFT
,
2806 .clkdm_name
= "per_clkdm",
2807 .recalc
= &followparent_recalc
,
2810 static struct clk gpt3_ick
= {
2812 .ops
= &clkops_omap2_iclk_dflt_wait
,
2813 .parent
= &per_l4_ick
,
2814 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2815 .enable_bit
= OMAP3430_EN_GPT3_SHIFT
,
2816 .clkdm_name
= "per_clkdm",
2817 .recalc
= &followparent_recalc
,
2820 static struct clk gpt2_ick
= {
2822 .ops
= &clkops_omap2_iclk_dflt_wait
,
2823 .parent
= &per_l4_ick
,
2824 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2825 .enable_bit
= OMAP3430_EN_GPT2_SHIFT
,
2826 .clkdm_name
= "per_clkdm",
2827 .recalc
= &followparent_recalc
,
2830 static struct clk mcbsp2_ick
= {
2831 .name
= "mcbsp2_ick",
2832 .ops
= &clkops_omap2_iclk_dflt_wait
,
2833 .parent
= &per_l4_ick
,
2834 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2835 .enable_bit
= OMAP3430_EN_MCBSP2_SHIFT
,
2836 .clkdm_name
= "per_clkdm",
2837 .recalc
= &followparent_recalc
,
2840 static struct clk mcbsp3_ick
= {
2841 .name
= "mcbsp3_ick",
2842 .ops
= &clkops_omap2_iclk_dflt_wait
,
2843 .parent
= &per_l4_ick
,
2844 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2845 .enable_bit
= OMAP3430_EN_MCBSP3_SHIFT
,
2846 .clkdm_name
= "per_clkdm",
2847 .recalc
= &followparent_recalc
,
2850 static struct clk mcbsp4_ick
= {
2851 .name
= "mcbsp4_ick",
2852 .ops
= &clkops_omap2_iclk_dflt_wait
,
2853 .parent
= &per_l4_ick
,
2854 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2855 .enable_bit
= OMAP3430_EN_MCBSP4_SHIFT
,
2856 .clkdm_name
= "per_clkdm",
2857 .recalc
= &followparent_recalc
,
2860 static const struct clksel mcbsp_234_clksel
[] = {
2861 { .parent
= &per_96m_fck
, .rates
= common_mcbsp_96m_rates
},
2862 { .parent
= &mcbsp_clks
, .rates
= common_mcbsp_mcbsp_rates
},
2866 static struct clk mcbsp2_fck
= {
2867 .name
= "mcbsp2_fck",
2868 .ops
= &clkops_omap2_dflt_wait
,
2869 .init
= &omap2_init_clksel_parent
,
2870 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2871 .enable_bit
= OMAP3430_EN_MCBSP2_SHIFT
,
2872 .clksel_reg
= OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0
),
2873 .clksel_mask
= OMAP2_MCBSP2_CLKS_MASK
,
2874 .clksel
= mcbsp_234_clksel
,
2875 .clkdm_name
= "per_clkdm",
2876 .recalc
= &omap2_clksel_recalc
,
2879 static struct clk mcbsp3_fck
= {
2880 .name
= "mcbsp3_fck",
2881 .ops
= &clkops_omap2_dflt_wait
,
2882 .init
= &omap2_init_clksel_parent
,
2883 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2884 .enable_bit
= OMAP3430_EN_MCBSP3_SHIFT
,
2885 .clksel_reg
= OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1
),
2886 .clksel_mask
= OMAP2_MCBSP3_CLKS_MASK
,
2887 .clksel
= mcbsp_234_clksel
,
2888 .clkdm_name
= "per_clkdm",
2889 .recalc
= &omap2_clksel_recalc
,
2892 static struct clk mcbsp4_fck
= {
2893 .name
= "mcbsp4_fck",
2894 .ops
= &clkops_omap2_dflt_wait
,
2895 .init
= &omap2_init_clksel_parent
,
2896 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2897 .enable_bit
= OMAP3430_EN_MCBSP4_SHIFT
,
2898 .clksel_reg
= OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1
),
2899 .clksel_mask
= OMAP2_MCBSP4_CLKS_MASK
,
2900 .clksel
= mcbsp_234_clksel
,
2901 .clkdm_name
= "per_clkdm",
2902 .recalc
= &omap2_clksel_recalc
,
2907 /* More information: ARM Cortex-A8 Technical Reference Manual, sect 10.1 */
2909 static const struct clksel_rate emu_src_sys_rates
[] = {
2910 { .div
= 1, .val
= 0, .flags
= RATE_IN_3XXX
},
2914 static const struct clksel_rate emu_src_core_rates
[] = {
2915 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
2919 static const struct clksel_rate emu_src_per_rates
[] = {
2920 { .div
= 1, .val
= 2, .flags
= RATE_IN_3XXX
},
2924 static const struct clksel_rate emu_src_mpu_rates
[] = {
2925 { .div
= 1, .val
= 3, .flags
= RATE_IN_3XXX
},
2929 static const struct clksel emu_src_clksel
[] = {
2930 { .parent
= &sys_ck
, .rates
= emu_src_sys_rates
},
2931 { .parent
= &emu_core_alwon_ck
, .rates
= emu_src_core_rates
},
2932 { .parent
= &emu_per_alwon_ck
, .rates
= emu_src_per_rates
},
2933 { .parent
= &emu_mpu_alwon_ck
, .rates
= emu_src_mpu_rates
},
2938 * Like the clkout_src clocks, emu_src_clk is a virtual clock, existing only
2939 * to switch the source of some of the EMU clocks.
2940 * XXX Are there CLKEN bits for these EMU clks?
2942 static struct clk emu_src_ck
= {
2943 .name
= "emu_src_ck",
2944 .ops
= &clkops_null
,
2945 .init
= &omap2_init_clksel_parent
,
2946 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
2947 .clksel_mask
= OMAP3430_MUX_CTRL_MASK
,
2948 .clksel
= emu_src_clksel
,
2949 .clkdm_name
= "emu_clkdm",
2950 .recalc
= &omap2_clksel_recalc
,
2953 static const struct clksel_rate pclk_emu_rates
[] = {
2954 { .div
= 2, .val
= 2, .flags
= RATE_IN_3XXX
},
2955 { .div
= 3, .val
= 3, .flags
= RATE_IN_3XXX
},
2956 { .div
= 4, .val
= 4, .flags
= RATE_IN_3XXX
},
2957 { .div
= 6, .val
= 6, .flags
= RATE_IN_3XXX
},
2961 static const struct clksel pclk_emu_clksel
[] = {
2962 { .parent
= &emu_src_ck
, .rates
= pclk_emu_rates
},
2966 static struct clk pclk_fck
= {
2968 .ops
= &clkops_null
,
2969 .init
= &omap2_init_clksel_parent
,
2970 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
2971 .clksel_mask
= OMAP3430_CLKSEL_PCLK_MASK
,
2972 .clksel
= pclk_emu_clksel
,
2973 .clkdm_name
= "emu_clkdm",
2974 .recalc
= &omap2_clksel_recalc
,
2977 static const struct clksel_rate pclkx2_emu_rates
[] = {
2978 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
2979 { .div
= 2, .val
= 2, .flags
= RATE_IN_3XXX
},
2980 { .div
= 3, .val
= 3, .flags
= RATE_IN_3XXX
},
2984 static const struct clksel pclkx2_emu_clksel
[] = {
2985 { .parent
= &emu_src_ck
, .rates
= pclkx2_emu_rates
},
2989 static struct clk pclkx2_fck
= {
2990 .name
= "pclkx2_fck",
2991 .ops
= &clkops_null
,
2992 .init
= &omap2_init_clksel_parent
,
2993 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
2994 .clksel_mask
= OMAP3430_CLKSEL_PCLKX2_MASK
,
2995 .clksel
= pclkx2_emu_clksel
,
2996 .clkdm_name
= "emu_clkdm",
2997 .recalc
= &omap2_clksel_recalc
,
3000 static const struct clksel atclk_emu_clksel
[] = {
3001 { .parent
= &emu_src_ck
, .rates
= div2_rates
},
3005 static struct clk atclk_fck
= {
3006 .name
= "atclk_fck",
3007 .ops
= &clkops_null
,
3008 .init
= &omap2_init_clksel_parent
,
3009 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
3010 .clksel_mask
= OMAP3430_CLKSEL_ATCLK_MASK
,
3011 .clksel
= atclk_emu_clksel
,
3012 .clkdm_name
= "emu_clkdm",
3013 .recalc
= &omap2_clksel_recalc
,
3016 static struct clk traceclk_src_fck
= {
3017 .name
= "traceclk_src_fck",
3018 .ops
= &clkops_null
,
3019 .init
= &omap2_init_clksel_parent
,
3020 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
3021 .clksel_mask
= OMAP3430_TRACE_MUX_CTRL_MASK
,
3022 .clksel
= emu_src_clksel
,
3023 .clkdm_name
= "emu_clkdm",
3024 .recalc
= &omap2_clksel_recalc
,
3027 static const struct clksel_rate traceclk_rates
[] = {
3028 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
3029 { .div
= 2, .val
= 2, .flags
= RATE_IN_3XXX
},
3030 { .div
= 4, .val
= 4, .flags
= RATE_IN_3XXX
},
3034 static const struct clksel traceclk_clksel
[] = {
3035 { .parent
= &traceclk_src_fck
, .rates
= traceclk_rates
},
3039 static struct clk traceclk_fck
= {
3040 .name
= "traceclk_fck",
3041 .ops
= &clkops_null
,
3042 .init
= &omap2_init_clksel_parent
,
3043 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
3044 .clksel_mask
= OMAP3430_CLKSEL_TRACECLK_MASK
,
3045 .clksel
= traceclk_clksel
,
3046 .clkdm_name
= "emu_clkdm",
3047 .recalc
= &omap2_clksel_recalc
,
3052 /* SmartReflex fclk (VDD1) */
3053 static struct clk sr1_fck
= {
3055 .ops
= &clkops_omap2_dflt_wait
,
3057 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_FCLKEN
),
3058 .enable_bit
= OMAP3430_EN_SR1_SHIFT
,
3059 .clkdm_name
= "wkup_clkdm",
3060 .recalc
= &followparent_recalc
,
3063 /* SmartReflex fclk (VDD2) */
3064 static struct clk sr2_fck
= {
3066 .ops
= &clkops_omap2_dflt_wait
,
3068 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_FCLKEN
),
3069 .enable_bit
= OMAP3430_EN_SR2_SHIFT
,
3070 .clkdm_name
= "wkup_clkdm",
3071 .recalc
= &followparent_recalc
,
3074 static struct clk sr_l4_ick
= {
3075 .name
= "sr_l4_ick",
3076 .ops
= &clkops_null
, /* RMK: missing? */
3078 .clkdm_name
= "core_l4_clkdm",
3079 .recalc
= &followparent_recalc
,
3082 /* SECURE_32K_FCK clocks */
3084 static struct clk gpt12_fck
= {
3085 .name
= "gpt12_fck",
3086 .ops
= &clkops_null
,
3087 .parent
= &secure_32k_fck
,
3088 .clkdm_name
= "wkup_clkdm",
3089 .recalc
= &followparent_recalc
,
3092 static struct clk wdt1_fck
= {
3094 .ops
= &clkops_null
,
3095 .parent
= &secure_32k_fck
,
3096 .clkdm_name
= "wkup_clkdm",
3097 .recalc
= &followparent_recalc
,
3100 /* Clocks for AM35XX */
3101 static struct clk ipss_ick
= {
3103 .ops
= &clkops_am35xx_ipss_wait
,
3104 .parent
= &core_l3_ick
,
3105 .clkdm_name
= "core_l3_clkdm",
3106 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
3107 .enable_bit
= AM35XX_EN_IPSS_SHIFT
,
3108 .recalc
= &followparent_recalc
,
3111 static struct clk emac_ick
= {
3113 .ops
= &clkops_am35xx_ipss_module_wait
,
3114 .parent
= &ipss_ick
,
3115 .clkdm_name
= "core_l3_clkdm",
3116 .enable_reg
= OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL
),
3117 .enable_bit
= AM35XX_CPGMAC_VBUSP_CLK_SHIFT
,
3118 .recalc
= &followparent_recalc
,
3121 static struct clk rmii_ck
= {
3123 .ops
= &clkops_null
,
3127 static struct clk emac_fck
= {
3129 .ops
= &clkops_omap2_dflt
,
3131 .enable_reg
= OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL
),
3132 .enable_bit
= AM35XX_CPGMAC_FCLK_SHIFT
,
3133 .recalc
= &followparent_recalc
,
3136 static struct clk hsotgusb_ick_am35xx
= {
3137 .name
= "hsotgusb_ick",
3138 .ops
= &clkops_am35xx_ipss_module_wait
,
3139 .parent
= &ipss_ick
,
3140 .clkdm_name
= "core_l3_clkdm",
3141 .enable_reg
= OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL
),
3142 .enable_bit
= AM35XX_USBOTG_VBUSP_CLK_SHIFT
,
3143 .recalc
= &followparent_recalc
,
3146 static struct clk hsotgusb_fck_am35xx
= {
3147 .name
= "hsotgusb_fck",
3148 .ops
= &clkops_omap2_dflt
,
3150 .clkdm_name
= "core_l3_clkdm",
3151 .enable_reg
= OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL
),
3152 .enable_bit
= AM35XX_USBOTG_FCLK_SHIFT
,
3153 .recalc
= &followparent_recalc
,
3156 static struct clk hecc_ck
= {
3158 .ops
= &clkops_am35xx_ipss_module_wait
,
3160 .clkdm_name
= "core_l3_clkdm",
3161 .enable_reg
= OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL
),
3162 .enable_bit
= AM35XX_HECC_VBUSP_CLK_SHIFT
,
3163 .recalc
= &followparent_recalc
,
3166 static struct clk vpfe_ick
= {
3168 .ops
= &clkops_am35xx_ipss_module_wait
,
3169 .parent
= &ipss_ick
,
3170 .clkdm_name
= "core_l3_clkdm",
3171 .enable_reg
= OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL
),
3172 .enable_bit
= AM35XX_VPFE_VBUSP_CLK_SHIFT
,
3173 .recalc
= &followparent_recalc
,
3176 static struct clk pclk_ck
= {
3178 .ops
= &clkops_null
,
3182 static struct clk vpfe_fck
= {
3184 .ops
= &clkops_omap2_dflt
,
3186 .enable_reg
= OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL
),
3187 .enable_bit
= AM35XX_VPFE_FCLK_SHIFT
,
3188 .recalc
= &followparent_recalc
,
3192 * The UART1/2 functional clock acts as the functional clock for
3193 * UART4. No separate fclk control available. XXX Well now we have a
3194 * uart4_fck that is apparently used as the UART4 functional clock,
3195 * but it also seems that uart1_fck or uart2_fck are still needed, at
3196 * least for UART4 softresets to complete. This really needs
3199 static struct clk uart4_ick_am35xx
= {
3200 .name
= "uart4_ick",
3201 .ops
= &clkops_omap2_iclk_dflt_wait
,
3202 .parent
= &core_l4_ick
,
3203 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
3204 .enable_bit
= AM35XX_EN_UART4_SHIFT
,
3205 .clkdm_name
= "core_l4_clkdm",
3206 .recalc
= &followparent_recalc
,
3209 static struct clk dummy_apb_pclk
= {
3211 .ops
= &clkops_null
,
3218 /* XXX At some point we should rename this file to clock3xxx_data.c */
3219 static struct omap_clk omap3xxx_clks
[] = {
3220 CLK(NULL
, "apb_pclk", &dummy_apb_pclk
, CK_3XXX
),
3221 CLK(NULL
, "omap_32k_fck", &omap_32k_fck
, CK_3XXX
),
3222 CLK(NULL
, "virt_12m_ck", &virt_12m_ck
, CK_3XXX
),
3223 CLK(NULL
, "virt_13m_ck", &virt_13m_ck
, CK_3XXX
),
3224 CLK(NULL
, "virt_16_8m_ck", &virt_16_8m_ck
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3225 CLK(NULL
, "virt_19200000_ck", &virt_19200000_ck
, CK_3XXX
),
3226 CLK(NULL
, "virt_26000000_ck", &virt_26000000_ck
, CK_3XXX
),
3227 CLK(NULL
, "virt_38_4m_ck", &virt_38_4m_ck
, CK_3XXX
),
3228 CLK(NULL
, "osc_sys_ck", &osc_sys_ck
, CK_3XXX
),
3229 CLK(NULL
, "sys_ck", &sys_ck
, CK_3XXX
),
3230 CLK(NULL
, "sys_altclk", &sys_altclk
, CK_3XXX
),
3231 CLK(NULL
, "mcbsp_clks", &mcbsp_clks
, CK_3XXX
),
3232 CLK(NULL
, "sys_clkout1", &sys_clkout1
, CK_3XXX
),
3233 CLK(NULL
, "dpll1_ck", &dpll1_ck
, CK_3XXX
),
3234 CLK(NULL
, "dpll1_x2_ck", &dpll1_x2_ck
, CK_3XXX
),
3235 CLK(NULL
, "dpll1_x2m2_ck", &dpll1_x2m2_ck
, CK_3XXX
),
3236 CLK(NULL
, "dpll2_ck", &dpll2_ck
, CK_34XX
| CK_36XX
),
3237 CLK(NULL
, "dpll2_m2_ck", &dpll2_m2_ck
, CK_34XX
| CK_36XX
),
3238 CLK(NULL
, "dpll3_ck", &dpll3_ck
, CK_3XXX
),
3239 CLK(NULL
, "core_ck", &core_ck
, CK_3XXX
),
3240 CLK(NULL
, "dpll3_x2_ck", &dpll3_x2_ck
, CK_3XXX
),
3241 CLK(NULL
, "dpll3_m2_ck", &dpll3_m2_ck
, CK_3XXX
),
3242 CLK(NULL
, "dpll3_m2x2_ck", &dpll3_m2x2_ck
, CK_3XXX
),
3243 CLK(NULL
, "dpll3_m3_ck", &dpll3_m3_ck
, CK_3XXX
),
3244 CLK(NULL
, "dpll3_m3x2_ck", &dpll3_m3x2_ck
, CK_3XXX
),
3245 CLK("etb", "emu_core_alwon_ck", &emu_core_alwon_ck
, CK_3XXX
),
3246 CLK(NULL
, "dpll4_ck", &dpll4_ck
, CK_3XXX
),
3247 CLK(NULL
, "dpll4_x2_ck", &dpll4_x2_ck
, CK_3XXX
),
3248 CLK(NULL
, "omap_192m_alwon_fck", &omap_192m_alwon_fck
, CK_36XX
),
3249 CLK(NULL
, "omap_96m_alwon_fck", &omap_96m_alwon_fck
, CK_3XXX
),
3250 CLK(NULL
, "omap_96m_fck", &omap_96m_fck
, CK_3XXX
),
3251 CLK(NULL
, "cm_96m_fck", &cm_96m_fck
, CK_3XXX
),
3252 CLK(NULL
, "omap_54m_fck", &omap_54m_fck
, CK_3XXX
),
3253 CLK(NULL
, "omap_48m_fck", &omap_48m_fck
, CK_3XXX
),
3254 CLK(NULL
, "omap_12m_fck", &omap_12m_fck
, CK_3XXX
),
3255 CLK(NULL
, "dpll4_m2_ck", &dpll4_m2_ck
, CK_3XXX
),
3256 CLK(NULL
, "dpll4_m2x2_ck", &dpll4_m2x2_ck
, CK_3XXX
),
3257 CLK(NULL
, "dpll4_m3_ck", &dpll4_m3_ck
, CK_3XXX
),
3258 CLK(NULL
, "dpll4_m3x2_ck", &dpll4_m3x2_ck
, CK_3XXX
),
3259 CLK(NULL
, "dpll4_m4_ck", &dpll4_m4_ck
, CK_3XXX
),
3260 CLK(NULL
, "dpll4_m4x2_ck", &dpll4_m4x2_ck
, CK_3XXX
),
3261 CLK(NULL
, "dpll4_m5_ck", &dpll4_m5_ck
, CK_3XXX
),
3262 CLK(NULL
, "dpll4_m5x2_ck", &dpll4_m5x2_ck
, CK_3XXX
),
3263 CLK(NULL
, "dpll4_m6_ck", &dpll4_m6_ck
, CK_3XXX
),
3264 CLK(NULL
, "dpll4_m6x2_ck", &dpll4_m6x2_ck
, CK_3XXX
),
3265 CLK("etb", "emu_per_alwon_ck", &emu_per_alwon_ck
, CK_3XXX
),
3266 CLK(NULL
, "dpll5_ck", &dpll5_ck
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3267 CLK(NULL
, "dpll5_m2_ck", &dpll5_m2_ck
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3268 CLK(NULL
, "clkout2_src_ck", &clkout2_src_ck
, CK_3XXX
),
3269 CLK(NULL
, "sys_clkout2", &sys_clkout2
, CK_3XXX
),
3270 CLK(NULL
, "corex2_fck", &corex2_fck
, CK_3XXX
),
3271 CLK(NULL
, "dpll1_fck", &dpll1_fck
, CK_3XXX
),
3272 CLK(NULL
, "mpu_ck", &mpu_ck
, CK_3XXX
),
3273 CLK(NULL
, "arm_fck", &arm_fck
, CK_3XXX
),
3274 CLK("etb", "emu_mpu_alwon_ck", &emu_mpu_alwon_ck
, CK_3XXX
),
3275 CLK(NULL
, "dpll2_fck", &dpll2_fck
, CK_34XX
| CK_36XX
),
3276 CLK(NULL
, "iva2_ck", &iva2_ck
, CK_34XX
| CK_36XX
),
3277 CLK(NULL
, "l3_ick", &l3_ick
, CK_3XXX
),
3278 CLK(NULL
, "l4_ick", &l4_ick
, CK_3XXX
),
3279 CLK(NULL
, "rm_ick", &rm_ick
, CK_3XXX
),
3280 CLK(NULL
, "gfx_l3_ck", &gfx_l3_ck
, CK_3430ES1
),
3281 CLK(NULL
, "gfx_l3_fck", &gfx_l3_fck
, CK_3430ES1
),
3282 CLK(NULL
, "gfx_l3_ick", &gfx_l3_ick
, CK_3430ES1
),
3283 CLK(NULL
, "gfx_cg1_ck", &gfx_cg1_ck
, CK_3430ES1
),
3284 CLK(NULL
, "gfx_cg2_ck", &gfx_cg2_ck
, CK_3430ES1
),
3285 CLK(NULL
, "sgx_fck", &sgx_fck
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3286 CLK(NULL
, "sgx_ick", &sgx_ick
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3287 CLK(NULL
, "d2d_26m_fck", &d2d_26m_fck
, CK_3430ES1
),
3288 CLK(NULL
, "modem_fck", &modem_fck
, CK_34XX
| CK_36XX
),
3289 CLK(NULL
, "sad2d_ick", &sad2d_ick
, CK_34XX
| CK_36XX
),
3290 CLK(NULL
, "mad2d_ick", &mad2d_ick
, CK_34XX
| CK_36XX
),
3291 CLK(NULL
, "gpt10_fck", &gpt10_fck
, CK_3XXX
),
3292 CLK(NULL
, "gpt11_fck", &gpt11_fck
, CK_3XXX
),
3293 CLK(NULL
, "cpefuse_fck", &cpefuse_fck
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3294 CLK(NULL
, "ts_fck", &ts_fck
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3295 CLK(NULL
, "usbtll_fck", &usbtll_fck
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3296 CLK("usbhs_omap", "usbtll_fck", &usbtll_fck
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3297 CLK(NULL
, "core_96m_fck", &core_96m_fck
, CK_3XXX
),
3298 CLK(NULL
, "mmchs3_fck", &mmchs3_fck
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3299 CLK(NULL
, "mmchs2_fck", &mmchs2_fck
, CK_3XXX
),
3300 CLK(NULL
, "mspro_fck", &mspro_fck
, CK_34XX
| CK_36XX
),
3301 CLK(NULL
, "mmchs1_fck", &mmchs1_fck
, CK_3XXX
),
3302 CLK(NULL
, "i2c3_fck", &i2c3_fck
, CK_3XXX
),
3303 CLK(NULL
, "i2c2_fck", &i2c2_fck
, CK_3XXX
),
3304 CLK(NULL
, "i2c1_fck", &i2c1_fck
, CK_3XXX
),
3305 CLK(NULL
, "mcbsp5_fck", &mcbsp5_fck
, CK_3XXX
),
3306 CLK(NULL
, "mcbsp1_fck", &mcbsp1_fck
, CK_3XXX
),
3307 CLK(NULL
, "core_48m_fck", &core_48m_fck
, CK_3XXX
),
3308 CLK(NULL
, "mcspi4_fck", &mcspi4_fck
, CK_3XXX
),
3309 CLK(NULL
, "mcspi3_fck", &mcspi3_fck
, CK_3XXX
),
3310 CLK(NULL
, "mcspi2_fck", &mcspi2_fck
, CK_3XXX
),
3311 CLK(NULL
, "mcspi1_fck", &mcspi1_fck
, CK_3XXX
),
3312 CLK(NULL
, "uart2_fck", &uart2_fck
, CK_3XXX
),
3313 CLK(NULL
, "uart1_fck", &uart1_fck
, CK_3XXX
),
3314 CLK(NULL
, "fshostusb_fck", &fshostusb_fck
, CK_3430ES1
),
3315 CLK(NULL
, "core_12m_fck", &core_12m_fck
, CK_3XXX
),
3316 CLK("omap_hdq.0", "fck", &hdq_fck
, CK_3XXX
),
3317 CLK(NULL
, "ssi_ssr_fck", &ssi_ssr_fck_3430es1
, CK_3430ES1
),
3318 CLK(NULL
, "ssi_ssr_fck", &ssi_ssr_fck_3430es2
, CK_3430ES2PLUS
| CK_36XX
),
3319 CLK(NULL
, "ssi_sst_fck", &ssi_sst_fck_3430es1
, CK_3430ES1
),
3320 CLK(NULL
, "ssi_sst_fck", &ssi_sst_fck_3430es2
, CK_3430ES2PLUS
| CK_36XX
),
3321 CLK(NULL
, "core_l3_ick", &core_l3_ick
, CK_3XXX
),
3322 CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es1
, CK_3430ES1
),
3323 CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es2
, CK_3430ES2PLUS
| CK_36XX
),
3324 CLK(NULL
, "sdrc_ick", &sdrc_ick
, CK_3XXX
),
3325 CLK(NULL
, "gpmc_fck", &gpmc_fck
, CK_3XXX
),
3326 CLK(NULL
, "security_l3_ick", &security_l3_ick
, CK_34XX
| CK_36XX
),
3327 CLK(NULL
, "pka_ick", &pka_ick
, CK_34XX
| CK_36XX
),
3328 CLK(NULL
, "core_l4_ick", &core_l4_ick
, CK_3XXX
),
3329 CLK(NULL
, "usbtll_ick", &usbtll_ick
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3330 CLK("usbhs_omap", "usbtll_ick", &usbtll_ick
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3331 CLK("omap_hsmmc.2", "ick", &mmchs3_ick
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3332 CLK(NULL
, "icr_ick", &icr_ick
, CK_34XX
| CK_36XX
),
3333 CLK("omap-aes", "ick", &aes2_ick
, CK_34XX
| CK_36XX
),
3334 CLK("omap-sham", "ick", &sha12_ick
, CK_34XX
| CK_36XX
),
3335 CLK(NULL
, "des2_ick", &des2_ick
, CK_34XX
| CK_36XX
),
3336 CLK("omap_hsmmc.1", "ick", &mmchs2_ick
, CK_3XXX
),
3337 CLK("omap_hsmmc.0", "ick", &mmchs1_ick
, CK_3XXX
),
3338 CLK(NULL
, "mspro_ick", &mspro_ick
, CK_34XX
| CK_36XX
),
3339 CLK("omap_hdq.0", "ick", &hdq_ick
, CK_3XXX
),
3340 CLK("omap2_mcspi.4", "ick", &mcspi4_ick
, CK_3XXX
),
3341 CLK("omap2_mcspi.3", "ick", &mcspi3_ick
, CK_3XXX
),
3342 CLK("omap2_mcspi.2", "ick", &mcspi2_ick
, CK_3XXX
),
3343 CLK("omap2_mcspi.1", "ick", &mcspi1_ick
, CK_3XXX
),
3344 CLK("omap_i2c.3", "ick", &i2c3_ick
, CK_3XXX
),
3345 CLK("omap_i2c.2", "ick", &i2c2_ick
, CK_3XXX
),
3346 CLK("omap_i2c.1", "ick", &i2c1_ick
, CK_3XXX
),
3347 CLK(NULL
, "uart2_ick", &uart2_ick
, CK_3XXX
),
3348 CLK(NULL
, "uart1_ick", &uart1_ick
, CK_3XXX
),
3349 CLK(NULL
, "gpt11_ick", &gpt11_ick
, CK_3XXX
),
3350 CLK(NULL
, "gpt10_ick", &gpt10_ick
, CK_3XXX
),
3351 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick
, CK_3XXX
),
3352 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick
, CK_3XXX
),
3353 CLK(NULL
, "fac_ick", &fac_ick
, CK_3430ES1
),
3354 CLK(NULL
, "mailboxes_ick", &mailboxes_ick
, CK_34XX
| CK_36XX
),
3355 CLK(NULL
, "omapctrl_ick", &omapctrl_ick
, CK_3XXX
),
3356 CLK(NULL
, "ssi_l4_ick", &ssi_l4_ick
, CK_34XX
| CK_36XX
),
3357 CLK(NULL
, "ssi_ick", &ssi_ick_3430es1
, CK_3430ES1
),
3358 CLK(NULL
, "ssi_ick", &ssi_ick_3430es2
, CK_3430ES2PLUS
| CK_36XX
),
3359 CLK(NULL
, "usb_l4_ick", &usb_l4_ick
, CK_3430ES1
),
3360 CLK(NULL
, "security_l4_ick2", &security_l4_ick2
, CK_34XX
| CK_36XX
),
3361 CLK(NULL
, "aes1_ick", &aes1_ick
, CK_34XX
| CK_36XX
),
3362 CLK("omap_rng", "ick", &rng_ick
, CK_34XX
| CK_36XX
),
3363 CLK(NULL
, "sha11_ick", &sha11_ick
, CK_34XX
| CK_36XX
),
3364 CLK(NULL
, "des1_ick", &des1_ick
, CK_34XX
| CK_36XX
),
3365 CLK(NULL
, "dss1_alwon_fck", &dss1_alwon_fck_3430es1
, CK_3430ES1
),
3366 CLK(NULL
, "dss1_alwon_fck", &dss1_alwon_fck_3430es2
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3367 CLK(NULL
, "dss_tv_fck", &dss_tv_fck
, CK_3XXX
),
3368 CLK(NULL
, "dss_96m_fck", &dss_96m_fck
, CK_3XXX
),
3369 CLK(NULL
, "dss2_alwon_fck", &dss2_alwon_fck
, CK_3XXX
),
3370 CLK("omapdss_dss", "ick", &dss_ick_3430es1
, CK_3430ES1
),
3371 CLK("omapdss_dss", "ick", &dss_ick_3430es2
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3372 CLK(NULL
, "cam_mclk", &cam_mclk
, CK_34XX
| CK_36XX
),
3373 CLK(NULL
, "cam_ick", &cam_ick
, CK_34XX
| CK_36XX
),
3374 CLK(NULL
, "csi2_96m_fck", &csi2_96m_fck
, CK_34XX
| CK_36XX
),
3375 CLK(NULL
, "usbhost_120m_fck", &usbhost_120m_fck
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3376 CLK(NULL
, "usbhost_48m_fck", &usbhost_48m_fck
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3377 CLK(NULL
, "usbhost_ick", &usbhost_ick
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3378 CLK("usbhs_omap", "usbhost_ick", &usbhost_ick
, CK_3430ES2PLUS
| CK_AM35XX
| CK_36XX
),
3379 CLK(NULL
, "utmi_p1_gfclk", &dummy_ck
, CK_3XXX
),
3380 CLK(NULL
, "utmi_p2_gfclk", &dummy_ck
, CK_3XXX
),
3381 CLK(NULL
, "xclk60mhsp1_ck", &dummy_ck
, CK_3XXX
),
3382 CLK(NULL
, "xclk60mhsp2_ck", &dummy_ck
, CK_3XXX
),
3383 CLK(NULL
, "usb_host_hs_utmi_p1_clk", &dummy_ck
, CK_3XXX
),
3384 CLK(NULL
, "usb_host_hs_utmi_p2_clk", &dummy_ck
, CK_3XXX
),
3385 CLK("usbhs_omap", "usb_tll_hs_usb_ch0_clk", &dummy_ck
, CK_3XXX
),
3386 CLK("usbhs_omap", "usb_tll_hs_usb_ch1_clk", &dummy_ck
, CK_3XXX
),
3387 CLK(NULL
, "init_60m_fclk", &dummy_ck
, CK_3XXX
),
3388 CLK(NULL
, "usim_fck", &usim_fck
, CK_3430ES2PLUS
| CK_36XX
),
3389 CLK(NULL
, "gpt1_fck", &gpt1_fck
, CK_3XXX
),
3390 CLK(NULL
, "wkup_32k_fck", &wkup_32k_fck
, CK_3XXX
),
3391 CLK(NULL
, "gpio1_dbck", &gpio1_dbck
, CK_3XXX
),
3392 CLK(NULL
, "wdt2_fck", &wdt2_fck
, CK_3XXX
),
3393 CLK(NULL
, "wkup_l4_ick", &wkup_l4_ick
, CK_34XX
| CK_36XX
),
3394 CLK(NULL
, "usim_ick", &usim_ick
, CK_3430ES2PLUS
| CK_36XX
),
3395 CLK("omap_wdt", "ick", &wdt2_ick
, CK_3XXX
),
3396 CLK(NULL
, "wdt1_ick", &wdt1_ick
, CK_3XXX
),
3397 CLK(NULL
, "gpio1_ick", &gpio1_ick
, CK_3XXX
),
3398 CLK(NULL
, "omap_32ksync_ick", &omap_32ksync_ick
, CK_3XXX
),
3399 CLK(NULL
, "gpt12_ick", &gpt12_ick
, CK_3XXX
),
3400 CLK(NULL
, "gpt1_ick", &gpt1_ick
, CK_3XXX
),
3401 CLK(NULL
, "per_96m_fck", &per_96m_fck
, CK_3XXX
),
3402 CLK(NULL
, "per_48m_fck", &per_48m_fck
, CK_3XXX
),
3403 CLK(NULL
, "uart3_fck", &uart3_fck
, CK_3XXX
),
3404 CLK(NULL
, "uart4_fck", &uart4_fck
, CK_36XX
),
3405 CLK(NULL
, "uart4_fck", &uart4_fck_am35xx
, CK_AM35XX
),
3406 CLK(NULL
, "gpt2_fck", &gpt2_fck
, CK_3XXX
),
3407 CLK(NULL
, "gpt3_fck", &gpt3_fck
, CK_3XXX
),
3408 CLK(NULL
, "gpt4_fck", &gpt4_fck
, CK_3XXX
),
3409 CLK(NULL
, "gpt5_fck", &gpt5_fck
, CK_3XXX
),
3410 CLK(NULL
, "gpt6_fck", &gpt6_fck
, CK_3XXX
),
3411 CLK(NULL
, "gpt7_fck", &gpt7_fck
, CK_3XXX
),
3412 CLK(NULL
, "gpt8_fck", &gpt8_fck
, CK_3XXX
),
3413 CLK(NULL
, "gpt9_fck", &gpt9_fck
, CK_3XXX
),
3414 CLK(NULL
, "per_32k_alwon_fck", &per_32k_alwon_fck
, CK_3XXX
),
3415 CLK(NULL
, "gpio6_dbck", &gpio6_dbck
, CK_3XXX
),
3416 CLK(NULL
, "gpio5_dbck", &gpio5_dbck
, CK_3XXX
),
3417 CLK(NULL
, "gpio4_dbck", &gpio4_dbck
, CK_3XXX
),
3418 CLK(NULL
, "gpio3_dbck", &gpio3_dbck
, CK_3XXX
),
3419 CLK(NULL
, "gpio2_dbck", &gpio2_dbck
, CK_3XXX
),
3420 CLK(NULL
, "wdt3_fck", &wdt3_fck
, CK_3XXX
),
3421 CLK(NULL
, "per_l4_ick", &per_l4_ick
, CK_3XXX
),
3422 CLK(NULL
, "gpio6_ick", &gpio6_ick
, CK_3XXX
),
3423 CLK(NULL
, "gpio5_ick", &gpio5_ick
, CK_3XXX
),
3424 CLK(NULL
, "gpio4_ick", &gpio4_ick
, CK_3XXX
),
3425 CLK(NULL
, "gpio3_ick", &gpio3_ick
, CK_3XXX
),
3426 CLK(NULL
, "gpio2_ick", &gpio2_ick
, CK_3XXX
),
3427 CLK(NULL
, "wdt3_ick", &wdt3_ick
, CK_3XXX
),
3428 CLK(NULL
, "uart3_ick", &uart3_ick
, CK_3XXX
),
3429 CLK(NULL
, "uart4_ick", &uart4_ick
, CK_36XX
),
3430 CLK(NULL
, "gpt9_ick", &gpt9_ick
, CK_3XXX
),
3431 CLK(NULL
, "gpt8_ick", &gpt8_ick
, CK_3XXX
),
3432 CLK(NULL
, "gpt7_ick", &gpt7_ick
, CK_3XXX
),
3433 CLK(NULL
, "gpt6_ick", &gpt6_ick
, CK_3XXX
),
3434 CLK(NULL
, "gpt5_ick", &gpt5_ick
, CK_3XXX
),
3435 CLK(NULL
, "gpt4_ick", &gpt4_ick
, CK_3XXX
),
3436 CLK(NULL
, "gpt3_ick", &gpt3_ick
, CK_3XXX
),
3437 CLK(NULL
, "gpt2_ick", &gpt2_ick
, CK_3XXX
),
3438 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick
, CK_3XXX
),
3439 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick
, CK_3XXX
),
3440 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick
, CK_3XXX
),
3441 CLK(NULL
, "mcbsp2_fck", &mcbsp2_fck
, CK_3XXX
),
3442 CLK(NULL
, "mcbsp3_fck", &mcbsp3_fck
, CK_3XXX
),
3443 CLK(NULL
, "mcbsp4_fck", &mcbsp4_fck
, CK_3XXX
),
3444 CLK("etb", "emu_src_ck", &emu_src_ck
, CK_3XXX
),
3445 CLK(NULL
, "pclk_fck", &pclk_fck
, CK_3XXX
),
3446 CLK(NULL
, "pclkx2_fck", &pclkx2_fck
, CK_3XXX
),
3447 CLK(NULL
, "atclk_fck", &atclk_fck
, CK_3XXX
),
3448 CLK(NULL
, "traceclk_src_fck", &traceclk_src_fck
, CK_3XXX
),
3449 CLK(NULL
, "traceclk_fck", &traceclk_fck
, CK_3XXX
),
3450 CLK(NULL
, "sr1_fck", &sr1_fck
, CK_34XX
| CK_36XX
),
3451 CLK(NULL
, "sr2_fck", &sr2_fck
, CK_34XX
| CK_36XX
),
3452 CLK(NULL
, "sr_l4_ick", &sr_l4_ick
, CK_34XX
| CK_36XX
),
3453 CLK(NULL
, "secure_32k_fck", &secure_32k_fck
, CK_3XXX
),
3454 CLK(NULL
, "gpt12_fck", &gpt12_fck
, CK_3XXX
),
3455 CLK(NULL
, "wdt1_fck", &wdt1_fck
, CK_3XXX
),
3456 CLK(NULL
, "ipss_ick", &ipss_ick
, CK_AM35XX
),
3457 CLK(NULL
, "rmii_ck", &rmii_ck
, CK_AM35XX
),
3458 CLK(NULL
, "pclk_ck", &pclk_ck
, CK_AM35XX
),
3459 CLK("davinci_emac.0", NULL
, &emac_ick
, CK_AM35XX
),
3460 CLK("davinci_mdio.0", NULL
, &emac_fck
, CK_AM35XX
),
3461 CLK("vpfe-capture", "master", &vpfe_ick
, CK_AM35XX
),
3462 CLK("vpfe-capture", "slave", &vpfe_fck
, CK_AM35XX
),
3463 CLK(NULL
, "hsotgusb_ick", &hsotgusb_ick_am35xx
, CK_AM35XX
),
3464 CLK(NULL
, "hsotgusb_fck", &hsotgusb_fck_am35xx
, CK_AM35XX
),
3465 CLK(NULL
, "hecc_ck", &hecc_ck
, CK_AM35XX
),
3466 CLK(NULL
, "uart4_ick", &uart4_ick_am35xx
, CK_AM35XX
),
3467 CLK(NULL
, "timer_32k_ck", &omap_32k_fck
, CK_3XXX
),
3468 CLK(NULL
, "timer_sys_ck", &sys_ck
, CK_3XXX
),
3472 int __init
omap3xxx_clk_init(void)
3477 if (soc_is_am35xx()) {
3478 cpu_mask
= RATE_IN_34XX
;
3479 cpu_clkflg
= CK_AM35XX
;
3480 } else if (cpu_is_omap3630()) {
3481 cpu_mask
= (RATE_IN_34XX
| RATE_IN_36XX
);
3482 cpu_clkflg
= CK_36XX
;
3483 } else if (cpu_is_ti816x()) {
3484 cpu_mask
= RATE_IN_TI816X
;
3485 cpu_clkflg
= CK_TI816X
;
3486 } else if (soc_is_am33xx()) {
3487 cpu_mask
= RATE_IN_AM33XX
;
3488 } else if (cpu_is_ti814x()) {
3489 cpu_mask
= RATE_IN_TI814X
;
3490 } else if (cpu_is_omap34xx()) {
3491 if (omap_rev() == OMAP3430_REV_ES1_0
) {
3492 cpu_mask
= RATE_IN_3430ES1
;
3493 cpu_clkflg
= CK_3430ES1
;
3496 * Assume that anything that we haven't matched yet
3497 * has 3430ES2-type clocks.
3499 cpu_mask
= RATE_IN_3430ES2PLUS
;
3500 cpu_clkflg
= CK_3430ES2PLUS
;
3503 WARN(1, "clock: could not identify OMAP3 variant\n");
3506 if (omap3_has_192mhz_clk())
3507 omap_96m_alwon_fck
= omap_96m_alwon_fck_3630
;
3509 if (cpu_is_omap3630()) {
3511 * XXX This type of dynamic rewriting of the clock tree is
3512 * deprecated and should be revised soon.
3514 * For 3630: override clkops_omap2_dflt_wait for the
3515 * clocks affected from PWRDN reset Limitation
3518 &clkops_omap36xx_pwrdn_with_hsdiv_wait_restore
;
3520 &clkops_omap36xx_pwrdn_with_hsdiv_wait_restore
;
3522 &clkops_omap36xx_pwrdn_with_hsdiv_wait_restore
;
3524 &clkops_omap36xx_pwrdn_with_hsdiv_wait_restore
;
3526 &clkops_omap36xx_pwrdn_with_hsdiv_wait_restore
;
3528 &clkops_omap36xx_pwrdn_with_hsdiv_wait_restore
;
3532 * XXX This type of dynamic rewriting of the clock tree is
3533 * deprecated and should be revised soon.
3535 if (cpu_is_omap3630())
3536 dpll4_dd
= dpll4_dd_3630
;
3538 dpll4_dd
= dpll4_dd_34xx
;
3540 clk_init(&omap2_clk_functions
);
3542 for (c
= omap3xxx_clks
; c
< omap3xxx_clks
+ ARRAY_SIZE(omap3xxx_clks
);
3544 clk_preinit(c
->lk
.clk
);
3546 for (c
= omap3xxx_clks
; c
< omap3xxx_clks
+ ARRAY_SIZE(omap3xxx_clks
);
3548 if (c
->cpu
& cpu_clkflg
) {
3550 clk_register(c
->lk
.clk
);
3551 omap2_init_clk_clkdm(c
->lk
.clk
);
3554 /* Disable autoidle on all clocks; let the PM code enable it later */
3555 omap_clk_disable_autoidle_all();
3557 recalculate_root_clocks();
3559 pr_info("Clocking rate (Crystal/Core/MPU): %ld.%01ld/%ld/%ld MHz\n",
3560 (osc_sys_ck
.rate
/ 1000000), (osc_sys_ck
.rate
/ 100000) % 10,
3561 (core_ck
.rate
/ 1000000), (arm_fck
.rate
/ 1000000));
3564 * Only enable those clocks we will need, let the drivers
3565 * enable other clocks as necessary
3567 clk_enable_init_clocks();
3570 * Lock DPLL5 -- here only until other device init code can
3573 if (!cpu_is_ti81xx() && (omap_rev() >= OMAP3430_REV_ES2_0
))
3574 omap3_clk_lock_dpll5();
3576 /* Avoid sleeping during omap3_core_dpll_m2_set_rate() */
3577 sdrc_ick_p
= clk_get(NULL
, "sdrc_ick");
3578 arm_fck_p
= clk_get(NULL
, "arm_fck");