4 * Copyright (C) 2007-2012 Texas Instruments, Inc.
5 * Copyright (C) 2007-2011 Nokia Corporation
7 * Written by Paul Walmsley
8 * Updated to COMMON clk data format by Rajendra Nayak <rnayak@ti.com>
9 * With many device clock fixes by Kevin Hilman and Jouni Högander
10 * DPLL bypass clock support added by Roman Tereshonkov
15 * Virtual clocks are introduced as convenient tools.
16 * They are sources for other clocks and not supposed
17 * to be requested from drivers directly.
20 #include <linux/kernel.h>
21 #include <linux/clk.h>
22 #include <linux/clk-private.h>
23 #include <linux/list.h>
29 #include "clock3xxx.h"
30 #include "clock34xx.h"
31 #include "clock36xx.h"
32 #include "clock3517.h"
34 #include "cm-regbits-34xx.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
50 DEFINE_CLK_FIXED_RATE(dummy_apb_pclk
, CLK_IS_ROOT
, 0x0, 0x0);
52 DEFINE_CLK_FIXED_RATE(mcbsp_clks
, CLK_IS_ROOT
, 0x0, 0x0);
54 DEFINE_CLK_FIXED_RATE(omap_32k_fck
, CLK_IS_ROOT
, 32768, 0x0);
56 DEFINE_CLK_FIXED_RATE(pclk_ck
, CLK_IS_ROOT
, 27000000, 0x0);
58 DEFINE_CLK_FIXED_RATE(rmii_ck
, CLK_IS_ROOT
, 50000000, 0x0);
60 DEFINE_CLK_FIXED_RATE(secure_32k_fck
, CLK_IS_ROOT
, 32768, 0x0);
62 DEFINE_CLK_FIXED_RATE(sys_altclk
, CLK_IS_ROOT
, 0x0, 0x0);
64 DEFINE_CLK_FIXED_RATE(virt_12m_ck
, CLK_IS_ROOT
, 12000000, 0x0);
66 DEFINE_CLK_FIXED_RATE(virt_13m_ck
, CLK_IS_ROOT
, 13000000, 0x0);
68 DEFINE_CLK_FIXED_RATE(virt_16_8m_ck
, CLK_IS_ROOT
, 16800000, 0x0);
70 DEFINE_CLK_FIXED_RATE(virt_19200000_ck
, CLK_IS_ROOT
, 19200000, 0x0);
72 DEFINE_CLK_FIXED_RATE(virt_26000000_ck
, CLK_IS_ROOT
, 26000000, 0x0);
74 DEFINE_CLK_FIXED_RATE(virt_38_4m_ck
, CLK_IS_ROOT
, 38400000, 0x0);
76 static const char *osc_sys_ck_parent_names
[] = {
77 "virt_12m_ck", "virt_13m_ck", "virt_19200000_ck", "virt_26000000_ck",
78 "virt_38_4m_ck", "virt_16_8m_ck",
81 DEFINE_CLK_MUX(osc_sys_ck
, osc_sys_ck_parent_names
, NULL
, 0x0,
82 OMAP3430_PRM_CLKSEL
, OMAP3430_SYS_CLKIN_SEL_SHIFT
,
83 OMAP3430_SYS_CLKIN_SEL_WIDTH
, 0x0, NULL
);
85 DEFINE_CLK_DIVIDER(sys_ck
, "osc_sys_ck", &osc_sys_ck
, 0x0,
86 OMAP3430_PRM_CLKSRC_CTRL
, OMAP_SYSCLKDIV_SHIFT
,
87 OMAP_SYSCLKDIV_WIDTH
, CLK_DIVIDER_ONE_BASED
, NULL
);
89 static struct dpll_data dpll3_dd
= {
90 .mult_div1_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKSEL1
),
91 .mult_mask
= OMAP3430_CORE_DPLL_MULT_MASK
,
92 .div1_mask
= OMAP3430_CORE_DPLL_DIV_MASK
,
93 .clk_bypass
= &sys_ck
,
95 .freqsel_mask
= OMAP3430_CORE_DPLL_FREQSEL_MASK
,
96 .control_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
97 .enable_mask
= OMAP3430_EN_CORE_DPLL_MASK
,
98 .auto_recal_bit
= OMAP3430_EN_CORE_DPLL_DRIFTGUARD_SHIFT
,
99 .recal_en_bit
= OMAP3430_CORE_DPLL_RECAL_EN_SHIFT
,
100 .recal_st_bit
= OMAP3430_CORE_DPLL_ST_SHIFT
,
101 .autoidle_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_AUTOIDLE
),
102 .autoidle_mask
= OMAP3430_AUTO_CORE_DPLL_MASK
,
103 .idlest_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_IDLEST
),
104 .idlest_mask
= OMAP3430_ST_CORE_CLK_MASK
,
105 .max_multiplier
= OMAP3_MAX_DPLL_MULT
,
107 .max_divider
= OMAP3_MAX_DPLL_DIV
,
110 static struct clk dpll3_ck
;
112 static const char *dpll3_ck_parent_names
[] = {
116 static const struct clk_ops dpll3_ck_ops
= {
117 .init
= &omap2_init_clk_clkdm
,
118 .get_parent
= &omap2_init_dpll_parent
,
119 .recalc_rate
= &omap3_dpll_recalc
,
120 .round_rate
= &omap2_dpll_round_rate
,
123 static struct clk_hw_omap dpll3_ck_hw
= {
127 .ops
= &clkhwops_omap3_dpll
,
128 .dpll_data
= &dpll3_dd
,
129 .clkdm_name
= "dpll3_clkdm",
132 DEFINE_STRUCT_CLK(dpll3_ck
, dpll3_ck_parent_names
, dpll3_ck_ops
);
134 DEFINE_CLK_DIVIDER(dpll3_m2_ck
, "dpll3_ck", &dpll3_ck
, 0x0,
135 OMAP_CM_REGADDR(PLL_MOD
, CM_CLKSEL1
),
136 OMAP3430_CORE_DPLL_CLKOUT_DIV_SHIFT
,
137 OMAP3430_CORE_DPLL_CLKOUT_DIV_WIDTH
,
138 CLK_DIVIDER_ONE_BASED
, NULL
);
140 static struct clk core_ck
;
142 static const char *core_ck_parent_names
[] = {
146 static const struct clk_ops core_ck_ops
= {};
148 DEFINE_STRUCT_CLK_HW_OMAP(core_ck
, NULL
);
149 DEFINE_STRUCT_CLK(core_ck
, core_ck_parent_names
, core_ck_ops
);
151 DEFINE_CLK_DIVIDER(l3_ick
, "core_ck", &core_ck
, 0x0,
152 OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
153 OMAP3430_CLKSEL_L3_SHIFT
, OMAP3430_CLKSEL_L3_WIDTH
,
154 CLK_DIVIDER_ONE_BASED
, NULL
);
156 DEFINE_CLK_DIVIDER(l4_ick
, "l3_ick", &l3_ick
, 0x0,
157 OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
158 OMAP3430_CLKSEL_L4_SHIFT
, OMAP3430_CLKSEL_L4_WIDTH
,
159 CLK_DIVIDER_ONE_BASED
, NULL
);
161 static struct clk security_l4_ick2
;
163 static const char *security_l4_ick2_parent_names
[] = {
167 DEFINE_STRUCT_CLK_HW_OMAP(security_l4_ick2
, NULL
);
168 DEFINE_STRUCT_CLK(security_l4_ick2
, security_l4_ick2_parent_names
, core_ck_ops
);
170 static struct clk aes1_ick
;
172 static const char *aes1_ick_parent_names
[] = {
176 static const struct clk_ops aes1_ick_ops
= {
177 .enable
= &omap2_dflt_clk_enable
,
178 .disable
= &omap2_dflt_clk_disable
,
179 .is_enabled
= &omap2_dflt_clk_is_enabled
,
182 static struct clk_hw_omap aes1_ick_hw
= {
186 .ops
= &clkhwops_iclk_wait
,
187 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN2
),
188 .enable_bit
= OMAP3430_EN_AES1_SHIFT
,
191 DEFINE_STRUCT_CLK(aes1_ick
, aes1_ick_parent_names
, aes1_ick_ops
);
193 static struct clk core_l4_ick
;
195 static const struct clk_ops core_l4_ick_ops
= {
196 .init
= &omap2_init_clk_clkdm
,
199 DEFINE_STRUCT_CLK_HW_OMAP(core_l4_ick
, "core_l4_clkdm");
200 DEFINE_STRUCT_CLK(core_l4_ick
, security_l4_ick2_parent_names
, core_l4_ick_ops
);
202 static struct clk aes2_ick
;
204 static const char *aes2_ick_parent_names
[] = {
208 static const struct clk_ops aes2_ick_ops
= {
209 .init
= &omap2_init_clk_clkdm
,
210 .enable
= &omap2_dflt_clk_enable
,
211 .disable
= &omap2_dflt_clk_disable
,
212 .is_enabled
= &omap2_dflt_clk_is_enabled
,
215 static struct clk_hw_omap aes2_ick_hw
= {
219 .ops
= &clkhwops_iclk_wait
,
220 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
221 .enable_bit
= OMAP3430_EN_AES2_SHIFT
,
222 .clkdm_name
= "core_l4_clkdm",
225 DEFINE_STRUCT_CLK(aes2_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
227 static struct clk dpll1_fck
;
229 static struct dpll_data dpll1_dd
= {
230 .mult_div1_reg
= OMAP_CM_REGADDR(MPU_MOD
, OMAP3430_CM_CLKSEL1_PLL
),
231 .mult_mask
= OMAP3430_MPU_DPLL_MULT_MASK
,
232 .div1_mask
= OMAP3430_MPU_DPLL_DIV_MASK
,
233 .clk_bypass
= &dpll1_fck
,
235 .freqsel_mask
= OMAP3430_MPU_DPLL_FREQSEL_MASK
,
236 .control_reg
= OMAP_CM_REGADDR(MPU_MOD
, OMAP3430_CM_CLKEN_PLL
),
237 .enable_mask
= OMAP3430_EN_MPU_DPLL_MASK
,
238 .modes
= (1 << DPLL_LOW_POWER_BYPASS
) | (1 << DPLL_LOCKED
),
239 .auto_recal_bit
= OMAP3430_EN_MPU_DPLL_DRIFTGUARD_SHIFT
,
240 .recal_en_bit
= OMAP3430_MPU_DPLL_RECAL_EN_SHIFT
,
241 .recal_st_bit
= OMAP3430_MPU_DPLL_ST_SHIFT
,
242 .autoidle_reg
= OMAP_CM_REGADDR(MPU_MOD
, OMAP3430_CM_AUTOIDLE_PLL
),
243 .autoidle_mask
= OMAP3430_AUTO_MPU_DPLL_MASK
,
244 .idlest_reg
= OMAP_CM_REGADDR(MPU_MOD
, OMAP3430_CM_IDLEST_PLL
),
245 .idlest_mask
= OMAP3430_ST_MPU_CLK_MASK
,
246 .max_multiplier
= OMAP3_MAX_DPLL_MULT
,
248 .max_divider
= OMAP3_MAX_DPLL_DIV
,
251 static struct clk dpll1_ck
;
253 static const struct clk_ops dpll1_ck_ops
= {
254 .init
= &omap2_init_clk_clkdm
,
255 .enable
= &omap3_noncore_dpll_enable
,
256 .disable
= &omap3_noncore_dpll_disable
,
257 .get_parent
= &omap2_init_dpll_parent
,
258 .recalc_rate
= &omap3_dpll_recalc
,
259 .set_rate
= &omap3_noncore_dpll_set_rate
,
260 .round_rate
= &omap2_dpll_round_rate
,
263 static struct clk_hw_omap dpll1_ck_hw
= {
267 .ops
= &clkhwops_omap3_dpll
,
268 .dpll_data
= &dpll1_dd
,
269 .clkdm_name
= "dpll1_clkdm",
272 DEFINE_STRUCT_CLK(dpll1_ck
, dpll3_ck_parent_names
, dpll1_ck_ops
);
274 DEFINE_CLK_FIXED_FACTOR(dpll1_x2_ck
, "dpll1_ck", &dpll1_ck
, 0x0, 2, 1);
276 DEFINE_CLK_DIVIDER(dpll1_x2m2_ck
, "dpll1_x2_ck", &dpll1_x2_ck
, 0x0,
277 OMAP_CM_REGADDR(MPU_MOD
, OMAP3430_CM_CLKSEL2_PLL
),
278 OMAP3430_MPU_DPLL_CLKOUT_DIV_SHIFT
,
279 OMAP3430_MPU_DPLL_CLKOUT_DIV_WIDTH
,
280 CLK_DIVIDER_ONE_BASED
, NULL
);
282 static struct clk mpu_ck
;
284 static const char *mpu_ck_parent_names
[] = {
288 DEFINE_STRUCT_CLK_HW_OMAP(mpu_ck
, "mpu_clkdm");
289 DEFINE_STRUCT_CLK(mpu_ck
, mpu_ck_parent_names
, core_l4_ick_ops
);
291 DEFINE_CLK_DIVIDER(arm_fck
, "mpu_ck", &mpu_ck
, 0x0,
292 OMAP_CM_REGADDR(MPU_MOD
, OMAP3430_CM_IDLEST_PLL
),
293 OMAP3430_ST_MPU_CLK_SHIFT
, OMAP3430_ST_MPU_CLK_WIDTH
,
296 static struct clk cam_ick
;
298 static struct clk_hw_omap cam_ick_hw
= {
302 .ops
= &clkhwops_iclk
,
303 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_CAM_MOD
, CM_ICLKEN
),
304 .enable_bit
= OMAP3430_EN_CAM_SHIFT
,
305 .clkdm_name
= "cam_clkdm",
308 DEFINE_STRUCT_CLK(cam_ick
, security_l4_ick2_parent_names
, aes2_ick_ops
);
311 /* Supplies 96MHz, 54Mhz TV DAC, DSS fclk, CAM sensor clock, emul trace clk */
313 static struct dpll_data dpll4_dd
;
315 static struct dpll_data dpll4_dd_34xx __initdata
= {
316 .mult_div1_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKSEL2
),
317 .mult_mask
= OMAP3430_PERIPH_DPLL_MULT_MASK
,
318 .div1_mask
= OMAP3430_PERIPH_DPLL_DIV_MASK
,
319 .clk_bypass
= &sys_ck
,
321 .freqsel_mask
= OMAP3430_PERIPH_DPLL_FREQSEL_MASK
,
322 .control_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
323 .enable_mask
= OMAP3430_EN_PERIPH_DPLL_MASK
,
324 .modes
= (1 << DPLL_LOW_POWER_STOP
) | (1 << DPLL_LOCKED
),
325 .auto_recal_bit
= OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT
,
326 .recal_en_bit
= OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT
,
327 .recal_st_bit
= OMAP3430_PERIPH_DPLL_ST_SHIFT
,
328 .autoidle_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_AUTOIDLE
),
329 .autoidle_mask
= OMAP3430_AUTO_PERIPH_DPLL_MASK
,
330 .idlest_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_IDLEST
),
331 .idlest_mask
= OMAP3430_ST_PERIPH_CLK_MASK
,
332 .max_multiplier
= OMAP3_MAX_DPLL_MULT
,
334 .max_divider
= OMAP3_MAX_DPLL_DIV
,
337 static struct dpll_data dpll4_dd_3630 __initdata
= {
338 .mult_div1_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKSEL2
),
339 .mult_mask
= OMAP3630_PERIPH_DPLL_MULT_MASK
,
340 .div1_mask
= OMAP3430_PERIPH_DPLL_DIV_MASK
,
341 .clk_bypass
= &sys_ck
,
343 .control_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
344 .enable_mask
= OMAP3430_EN_PERIPH_DPLL_MASK
,
345 .modes
= (1 << DPLL_LOW_POWER_STOP
) | (1 << DPLL_LOCKED
),
346 .auto_recal_bit
= OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT
,
347 .recal_en_bit
= OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT
,
348 .recal_st_bit
= OMAP3430_PERIPH_DPLL_ST_SHIFT
,
349 .autoidle_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_AUTOIDLE
),
350 .autoidle_mask
= OMAP3430_AUTO_PERIPH_DPLL_MASK
,
351 .idlest_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_IDLEST
),
352 .idlest_mask
= OMAP3430_ST_PERIPH_CLK_MASK
,
353 .dco_mask
= OMAP3630_PERIPH_DPLL_DCO_SEL_MASK
,
354 .sddiv_mask
= OMAP3630_PERIPH_DPLL_SD_DIV_MASK
,
355 .max_multiplier
= OMAP3630_MAX_JTYPE_DPLL_MULT
,
357 .max_divider
= OMAP3_MAX_DPLL_DIV
,
361 static struct clk dpll4_ck
;
363 static const struct clk_ops dpll4_ck_ops
= {
364 .init
= &omap2_init_clk_clkdm
,
365 .enable
= &omap3_noncore_dpll_enable
,
366 .disable
= &omap3_noncore_dpll_disable
,
367 .get_parent
= &omap2_init_dpll_parent
,
368 .recalc_rate
= &omap3_dpll_recalc
,
369 .set_rate
= &omap3_dpll4_set_rate
,
370 .round_rate
= &omap2_dpll_round_rate
,
373 static struct clk_hw_omap dpll4_ck_hw
= {
377 .dpll_data
= &dpll4_dd
,
378 .ops
= &clkhwops_omap3_dpll
,
379 .clkdm_name
= "dpll4_clkdm",
382 DEFINE_STRUCT_CLK(dpll4_ck
, dpll3_ck_parent_names
, dpll4_ck_ops
);
384 DEFINE_CLK_DIVIDER(dpll4_m5_ck
, "dpll4_ck", &dpll4_ck
, 0x0,
385 OMAP_CM_REGADDR(OMAP3430_CAM_MOD
, CM_CLKSEL
),
386 OMAP3430_CLKSEL_CAM_SHIFT
, OMAP3630_CLKSEL_CAM_WIDTH
,
387 CLK_DIVIDER_ONE_BASED
, NULL
);
389 static struct clk dpll4_m5x2_ck
;
391 static const char *dpll4_m5x2_ck_parent_names
[] = {
395 static const struct clk_ops dpll4_m5x2_ck_ops
= {
396 .init
= &omap2_init_clk_clkdm
,
397 .enable
= &omap2_dflt_clk_enable
,
398 .disable
= &omap2_dflt_clk_disable
,
399 .is_enabled
= &omap2_dflt_clk_is_enabled
,
400 .recalc_rate
= &omap3_clkoutx2_recalc
,
403 static const struct clk_ops dpll4_m5x2_ck_3630_ops
= {
404 .init
= &omap2_init_clk_clkdm
,
405 .enable
= &omap36xx_pwrdn_clk_enable_with_hsdiv_restore
,
406 .disable
= &omap2_dflt_clk_disable
,
407 .recalc_rate
= &omap3_clkoutx2_recalc
,
410 static struct clk_hw_omap dpll4_m5x2_ck_hw
= {
412 .clk
= &dpll4_m5x2_ck
,
414 .ops
= &clkhwops_wait
,
415 .enable_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
416 .enable_bit
= OMAP3430_PWRDN_CAM_SHIFT
,
417 .flags
= INVERT_ENABLE
,
418 .clkdm_name
= "dpll4_clkdm",
421 DEFINE_STRUCT_CLK(dpll4_m5x2_ck
, dpll4_m5x2_ck_parent_names
, dpll4_m5x2_ck_ops
);
423 static struct clk dpll4_m5x2_ck_3630
= {
424 .name
= "dpll4_m5x2_ck",
425 .hw
= &dpll4_m5x2_ck_hw
.hw
,
426 .parent_names
= dpll4_m5x2_ck_parent_names
,
427 .num_parents
= ARRAY_SIZE(dpll4_m5x2_ck_parent_names
),
428 .ops
= &dpll4_m5x2_ck_3630_ops
,
429 .flags
= CLK_SET_RATE_PARENT
,
432 static struct clk cam_mclk
;
434 static const char *cam_mclk_parent_names
[] = {
438 static struct clk_hw_omap cam_mclk_hw
= {
442 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_CAM_MOD
, CM_FCLKEN
),
443 .enable_bit
= OMAP3430_EN_CAM_SHIFT
,
444 .clkdm_name
= "cam_clkdm",
447 static struct clk cam_mclk
= {
449 .hw
= &cam_mclk_hw
.hw
,
450 .parent_names
= cam_mclk_parent_names
,
451 .num_parents
= ARRAY_SIZE(cam_mclk_parent_names
),
452 .ops
= &aes2_ick_ops
,
453 .flags
= CLK_SET_RATE_PARENT
,
456 static const struct clksel_rate clkout2_src_core_rates
[] = {
457 { .div
= 1, .val
= 0, .flags
= RATE_IN_3XXX
},
461 static const struct clksel_rate clkout2_src_sys_rates
[] = {
462 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
466 static const struct clksel_rate clkout2_src_96m_rates
[] = {
467 { .div
= 1, .val
= 2, .flags
= RATE_IN_3XXX
},
471 DEFINE_CLK_DIVIDER(dpll4_m2_ck
, "dpll4_ck", &dpll4_ck
, 0x0,
472 OMAP_CM_REGADDR(PLL_MOD
, OMAP3430_CM_CLKSEL3
),
473 OMAP3430_DIV_96M_SHIFT
, OMAP3630_DIV_96M_WIDTH
,
474 CLK_DIVIDER_ONE_BASED
, NULL
);
476 static struct clk dpll4_m2x2_ck
;
478 static const char *dpll4_m2x2_ck_parent_names
[] = {
482 static struct clk_hw_omap dpll4_m2x2_ck_hw
= {
484 .clk
= &dpll4_m2x2_ck
,
486 .ops
= &clkhwops_wait
,
487 .enable_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
488 .enable_bit
= OMAP3430_PWRDN_96M_SHIFT
,
489 .flags
= INVERT_ENABLE
,
490 .clkdm_name
= "dpll4_clkdm",
493 DEFINE_STRUCT_CLK(dpll4_m2x2_ck
, dpll4_m2x2_ck_parent_names
, dpll4_m5x2_ck_ops
);
495 static struct clk dpll4_m2x2_ck_3630
= {
496 .name
= "dpll4_m2x2_ck",
497 .hw
= &dpll4_m2x2_ck_hw
.hw
,
498 .parent_names
= dpll4_m2x2_ck_parent_names
,
499 .num_parents
= ARRAY_SIZE(dpll4_m2x2_ck_parent_names
),
500 .ops
= &dpll4_m5x2_ck_3630_ops
,
503 static struct clk omap_96m_alwon_fck
;
505 static const char *omap_96m_alwon_fck_parent_names
[] = {
509 DEFINE_STRUCT_CLK_HW_OMAP(omap_96m_alwon_fck
, NULL
);
510 DEFINE_STRUCT_CLK(omap_96m_alwon_fck
, omap_96m_alwon_fck_parent_names
,
513 static struct clk cm_96m_fck
;
515 static const char *cm_96m_fck_parent_names
[] = {
516 "omap_96m_alwon_fck",
519 DEFINE_STRUCT_CLK_HW_OMAP(cm_96m_fck
, NULL
);
520 DEFINE_STRUCT_CLK(cm_96m_fck
, cm_96m_fck_parent_names
, core_ck_ops
);
522 static const struct clksel_rate clkout2_src_54m_rates
[] = {
523 { .div
= 1, .val
= 3, .flags
= RATE_IN_3XXX
},
527 DEFINE_CLK_DIVIDER(dpll4_m3_ck
, "dpll4_ck", &dpll4_ck
, 0x0,
528 OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_CLKSEL
),
529 OMAP3430_CLKSEL_TV_SHIFT
, OMAP3630_CLKSEL_TV_WIDTH
,
530 CLK_DIVIDER_ONE_BASED
, NULL
);
532 static struct clk dpll4_m3x2_ck
;
534 static const char *dpll4_m3x2_ck_parent_names
[] = {
538 static struct clk_hw_omap dpll4_m3x2_ck_hw
= {
540 .clk
= &dpll4_m3x2_ck
,
542 .ops
= &clkhwops_wait
,
543 .enable_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
544 .enable_bit
= OMAP3430_PWRDN_TV_SHIFT
,
545 .flags
= INVERT_ENABLE
,
546 .clkdm_name
= "dpll4_clkdm",
549 DEFINE_STRUCT_CLK(dpll4_m3x2_ck
, dpll4_m3x2_ck_parent_names
, dpll4_m5x2_ck_ops
);
551 static struct clk dpll4_m3x2_ck_3630
= {
552 .name
= "dpll4_m3x2_ck",
553 .hw
= &dpll4_m3x2_ck_hw
.hw
,
554 .parent_names
= dpll4_m3x2_ck_parent_names
,
555 .num_parents
= ARRAY_SIZE(dpll4_m3x2_ck_parent_names
),
556 .ops
= &dpll4_m5x2_ck_3630_ops
,
559 static const char *omap_54m_fck_parent_names
[] = {
560 "dpll4_m3x2_ck", "sys_altclk",
563 DEFINE_CLK_MUX(omap_54m_fck
, omap_54m_fck_parent_names
, NULL
, 0x0,
564 OMAP_CM_REGADDR(PLL_MOD
, CM_CLKSEL1
), OMAP3430_SOURCE_54M_SHIFT
,
565 OMAP3430_SOURCE_54M_WIDTH
, 0x0, NULL
);
567 static const struct clksel clkout2_src_clksel
[] = {
568 { .parent
= &core_ck
, .rates
= clkout2_src_core_rates
},
569 { .parent
= &sys_ck
, .rates
= clkout2_src_sys_rates
},
570 { .parent
= &cm_96m_fck
, .rates
= clkout2_src_96m_rates
},
571 { .parent
= &omap_54m_fck
, .rates
= clkout2_src_54m_rates
},
575 static const char *clkout2_src_ck_parent_names
[] = {
576 "core_ck", "sys_ck", "cm_96m_fck", "omap_54m_fck",
579 static const struct clk_ops clkout2_src_ck_ops
= {
580 .init
= &omap2_init_clk_clkdm
,
581 .enable
= &omap2_dflt_clk_enable
,
582 .disable
= &omap2_dflt_clk_disable
,
583 .is_enabled
= &omap2_dflt_clk_is_enabled
,
584 .recalc_rate
= &omap2_clksel_recalc
,
585 .get_parent
= &omap2_clksel_find_parent_index
,
586 .set_parent
= &omap2_clksel_set_parent
,
589 DEFINE_CLK_OMAP_MUX_GATE(clkout2_src_ck
, "core_clkdm",
590 clkout2_src_clksel
, OMAP3430_CM_CLKOUT_CTRL
,
591 OMAP3430_CLKOUT2SOURCE_MASK
,
592 OMAP3430_CM_CLKOUT_CTRL
, OMAP3430_CLKOUT2_EN_SHIFT
,
593 NULL
, clkout2_src_ck_parent_names
, clkout2_src_ck_ops
);
595 static const struct clksel_rate omap_48m_cm96m_rates
[] = {
596 { .div
= 2, .val
= 0, .flags
= RATE_IN_3XXX
},
600 static const struct clksel_rate omap_48m_alt_rates
[] = {
601 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
605 static const struct clksel omap_48m_clksel
[] = {
606 { .parent
= &cm_96m_fck
, .rates
= omap_48m_cm96m_rates
},
607 { .parent
= &sys_altclk
, .rates
= omap_48m_alt_rates
},
611 static const char *omap_48m_fck_parent_names
[] = {
612 "cm_96m_fck", "sys_altclk",
615 static struct clk omap_48m_fck
;
617 static const struct clk_ops omap_48m_fck_ops
= {
618 .recalc_rate
= &omap2_clksel_recalc
,
619 .get_parent
= &omap2_clksel_find_parent_index
,
620 .set_parent
= &omap2_clksel_set_parent
,
623 static struct clk_hw_omap omap_48m_fck_hw
= {
625 .clk
= &omap_48m_fck
,
627 .clksel
= omap_48m_clksel
,
628 .clksel_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKSEL1
),
629 .clksel_mask
= OMAP3430_SOURCE_48M_MASK
,
632 DEFINE_STRUCT_CLK(omap_48m_fck
, omap_48m_fck_parent_names
, omap_48m_fck_ops
);
634 DEFINE_CLK_FIXED_FACTOR(omap_12m_fck
, "omap_48m_fck", &omap_48m_fck
, 0x0, 1, 4);
636 static struct clk core_12m_fck
;
638 static const char *core_12m_fck_parent_names
[] = {
642 DEFINE_STRUCT_CLK_HW_OMAP(core_12m_fck
, "core_l4_clkdm");
643 DEFINE_STRUCT_CLK(core_12m_fck
, core_12m_fck_parent_names
, core_l4_ick_ops
);
645 static struct clk core_48m_fck
;
647 static const char *core_48m_fck_parent_names
[] = {
651 DEFINE_STRUCT_CLK_HW_OMAP(core_48m_fck
, "core_l4_clkdm");
652 DEFINE_STRUCT_CLK(core_48m_fck
, core_48m_fck_parent_names
, core_l4_ick_ops
);
654 static const char *omap_96m_fck_parent_names
[] = {
655 "cm_96m_fck", "sys_ck",
658 DEFINE_CLK_MUX(omap_96m_fck
, omap_96m_fck_parent_names
, NULL
, 0x0,
659 OMAP_CM_REGADDR(PLL_MOD
, CM_CLKSEL1
),
660 OMAP3430_SOURCE_96M_SHIFT
, OMAP3430_SOURCE_96M_WIDTH
, 0x0, NULL
);
662 static struct clk core_96m_fck
;
664 static const char *core_96m_fck_parent_names
[] = {
668 DEFINE_STRUCT_CLK_HW_OMAP(core_96m_fck
, "core_l4_clkdm");
669 DEFINE_STRUCT_CLK(core_96m_fck
, core_96m_fck_parent_names
, core_l4_ick_ops
);
671 static struct clk core_l3_ick
;
673 static const char *core_l3_ick_parent_names
[] = {
677 DEFINE_STRUCT_CLK_HW_OMAP(core_l3_ick
, "core_l3_clkdm");
678 DEFINE_STRUCT_CLK(core_l3_ick
, core_l3_ick_parent_names
, core_l4_ick_ops
);
680 DEFINE_CLK_FIXED_FACTOR(dpll3_m2x2_ck
, "dpll3_m2_ck", &dpll3_m2_ck
, 0x0, 2, 1);
682 static struct clk corex2_fck
;
684 static const char *corex2_fck_parent_names
[] = {
688 DEFINE_STRUCT_CLK_HW_OMAP(corex2_fck
, NULL
);
689 DEFINE_STRUCT_CLK(corex2_fck
, corex2_fck_parent_names
, core_ck_ops
);
691 static struct clk cpefuse_fck
;
693 static struct clk_hw_omap cpefuse_fck_hw
= {
697 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, OMAP3430ES2_CM_FCLKEN3
),
698 .enable_bit
= OMAP3430ES2_EN_CPEFUSE_SHIFT
,
699 .clkdm_name
= "core_l4_clkdm",
702 DEFINE_STRUCT_CLK(cpefuse_fck
, dpll3_ck_parent_names
, aes2_ick_ops
);
704 static struct clk csi2_96m_fck
;
706 static const char *csi2_96m_fck_parent_names
[] = {
710 static struct clk_hw_omap csi2_96m_fck_hw
= {
712 .clk
= &csi2_96m_fck
,
714 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_CAM_MOD
, CM_FCLKEN
),
715 .enable_bit
= OMAP3430_EN_CSI2_SHIFT
,
716 .clkdm_name
= "cam_clkdm",
719 DEFINE_STRUCT_CLK(csi2_96m_fck
, csi2_96m_fck_parent_names
, aes2_ick_ops
);
721 static struct clk d2d_26m_fck
;
723 static struct clk_hw_omap d2d_26m_fck_hw
= {
727 .ops
= &clkhwops_wait
,
728 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
729 .enable_bit
= OMAP3430ES1_EN_D2D_SHIFT
,
730 .clkdm_name
= "d2d_clkdm",
733 DEFINE_STRUCT_CLK(d2d_26m_fck
, dpll3_ck_parent_names
, aes2_ick_ops
);
735 static struct clk des1_ick
;
737 static struct clk_hw_omap des1_ick_hw
= {
741 .ops
= &clkhwops_iclk_wait
,
742 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN2
),
743 .enable_bit
= OMAP3430_EN_DES1_SHIFT
,
746 DEFINE_STRUCT_CLK(des1_ick
, aes1_ick_parent_names
, aes1_ick_ops
);
748 static struct clk des2_ick
;
750 static struct clk_hw_omap des2_ick_hw
= {
754 .ops
= &clkhwops_iclk_wait
,
755 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
756 .enable_bit
= OMAP3430_EN_DES2_SHIFT
,
757 .clkdm_name
= "core_l4_clkdm",
760 DEFINE_STRUCT_CLK(des2_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
762 DEFINE_CLK_DIVIDER(dpll1_fck
, "core_ck", &core_ck
, 0x0,
763 OMAP_CM_REGADDR(MPU_MOD
, OMAP3430_CM_CLKSEL1_PLL
),
764 OMAP3430_MPU_CLK_SRC_SHIFT
, OMAP3430_MPU_CLK_SRC_WIDTH
,
765 CLK_DIVIDER_ONE_BASED
, NULL
);
767 static struct clk dpll2_fck
;
769 static struct dpll_data dpll2_dd
= {
770 .mult_div1_reg
= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD
, OMAP3430_CM_CLKSEL1_PLL
),
771 .mult_mask
= OMAP3430_IVA2_DPLL_MULT_MASK
,
772 .div1_mask
= OMAP3430_IVA2_DPLL_DIV_MASK
,
773 .clk_bypass
= &dpll2_fck
,
775 .freqsel_mask
= OMAP3430_IVA2_DPLL_FREQSEL_MASK
,
776 .control_reg
= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD
, OMAP3430_CM_CLKEN_PLL
),
777 .enable_mask
= OMAP3430_EN_IVA2_DPLL_MASK
,
778 .modes
= ((1 << DPLL_LOW_POWER_STOP
) | (1 << DPLL_LOCKED
) |
779 (1 << DPLL_LOW_POWER_BYPASS
)),
780 .auto_recal_bit
= OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT
,
781 .recal_en_bit
= OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_SHIFT
,
782 .recal_st_bit
= OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_SHIFT
,
783 .autoidle_reg
= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD
, OMAP3430_CM_AUTOIDLE_PLL
),
784 .autoidle_mask
= OMAP3430_AUTO_IVA2_DPLL_MASK
,
785 .idlest_reg
= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD
, OMAP3430_CM_IDLEST_PLL
),
786 .idlest_mask
= OMAP3430_ST_IVA2_CLK_MASK
,
787 .max_multiplier
= OMAP3_MAX_DPLL_MULT
,
789 .max_divider
= OMAP3_MAX_DPLL_DIV
,
792 static struct clk dpll2_ck
;
794 static struct clk_hw_omap dpll2_ck_hw
= {
798 .ops
= &clkhwops_omap3_dpll
,
799 .dpll_data
= &dpll2_dd
,
800 .clkdm_name
= "dpll2_clkdm",
803 DEFINE_STRUCT_CLK(dpll2_ck
, dpll3_ck_parent_names
, dpll1_ck_ops
);
805 DEFINE_CLK_DIVIDER(dpll2_fck
, "core_ck", &core_ck
, 0x0,
806 OMAP_CM_REGADDR(OMAP3430_IVA2_MOD
, OMAP3430_CM_CLKSEL1_PLL
),
807 OMAP3430_IVA2_CLK_SRC_SHIFT
, OMAP3430_IVA2_CLK_SRC_WIDTH
,
808 CLK_DIVIDER_ONE_BASED
, NULL
);
810 DEFINE_CLK_DIVIDER(dpll2_m2_ck
, "dpll2_ck", &dpll2_ck
, 0x0,
811 OMAP_CM_REGADDR(OMAP3430_IVA2_MOD
, OMAP3430_CM_CLKSEL2_PLL
),
812 OMAP3430_IVA2_DPLL_CLKOUT_DIV_SHIFT
,
813 OMAP3430_IVA2_DPLL_CLKOUT_DIV_WIDTH
,
814 CLK_DIVIDER_ONE_BASED
, NULL
);
816 DEFINE_CLK_DIVIDER(dpll3_m3_ck
, "dpll3_ck", &dpll3_ck
, 0x0,
817 OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
818 OMAP3430_DIV_DPLL3_SHIFT
, OMAP3430_DIV_DPLL3_WIDTH
,
819 CLK_DIVIDER_ONE_BASED
, NULL
);
821 static struct clk dpll3_m3x2_ck
;
823 static const char *dpll3_m3x2_ck_parent_names
[] = {
827 static struct clk_hw_omap dpll3_m3x2_ck_hw
= {
829 .clk
= &dpll3_m3x2_ck
,
831 .ops
= &clkhwops_wait
,
832 .enable_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
833 .enable_bit
= OMAP3430_PWRDN_EMU_CORE_SHIFT
,
834 .flags
= INVERT_ENABLE
,
835 .clkdm_name
= "dpll3_clkdm",
838 DEFINE_STRUCT_CLK(dpll3_m3x2_ck
, dpll3_m3x2_ck_parent_names
, dpll4_m5x2_ck_ops
);
840 static struct clk dpll3_m3x2_ck_3630
= {
841 .name
= "dpll3_m3x2_ck",
842 .hw
= &dpll3_m3x2_ck_hw
.hw
,
843 .parent_names
= dpll3_m3x2_ck_parent_names
,
844 .num_parents
= ARRAY_SIZE(dpll3_m3x2_ck_parent_names
),
845 .ops
= &dpll4_m5x2_ck_3630_ops
,
848 DEFINE_CLK_FIXED_FACTOR(dpll3_x2_ck
, "dpll3_ck", &dpll3_ck
, 0x0, 2, 1);
850 DEFINE_CLK_DIVIDER(dpll4_m4_ck
, "dpll4_ck", &dpll4_ck
, 0x0,
851 OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_CLKSEL
),
852 OMAP3430_CLKSEL_DSS1_SHIFT
, OMAP3630_CLKSEL_DSS1_WIDTH
,
853 CLK_DIVIDER_ONE_BASED
, NULL
);
855 static struct clk dpll4_m4x2_ck
;
857 static const char *dpll4_m4x2_ck_parent_names
[] = {
861 static struct clk_hw_omap dpll4_m4x2_ck_hw
= {
863 .clk
= &dpll4_m4x2_ck
,
865 .ops
= &clkhwops_wait
,
866 .enable_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
867 .enable_bit
= OMAP3430_PWRDN_DSS1_SHIFT
,
868 .flags
= INVERT_ENABLE
,
869 .clkdm_name
= "dpll4_clkdm",
872 DEFINE_STRUCT_CLK(dpll4_m4x2_ck
, dpll4_m4x2_ck_parent_names
, dpll4_m5x2_ck_ops
);
874 static struct clk dpll4_m4x2_ck_3630
= {
875 .name
= "dpll4_m4x2_ck",
876 .hw
= &dpll4_m4x2_ck_hw
.hw
,
877 .parent_names
= dpll4_m4x2_ck_parent_names
,
878 .num_parents
= ARRAY_SIZE(dpll4_m4x2_ck_parent_names
),
879 .ops
= &dpll4_m5x2_ck_3630_ops
,
882 DEFINE_CLK_DIVIDER(dpll4_m6_ck
, "dpll4_ck", &dpll4_ck
, 0x0,
883 OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
884 OMAP3430_DIV_DPLL4_SHIFT
, OMAP3630_DIV_DPLL4_WIDTH
,
885 CLK_DIVIDER_ONE_BASED
, NULL
);
887 static struct clk dpll4_m6x2_ck
;
889 static const char *dpll4_m6x2_ck_parent_names
[] = {
893 static struct clk_hw_omap dpll4_m6x2_ck_hw
= {
895 .clk
= &dpll4_m6x2_ck
,
897 .ops
= &clkhwops_wait
,
898 .enable_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_CLKEN
),
899 .enable_bit
= OMAP3430_PWRDN_EMU_PERIPH_SHIFT
,
900 .flags
= INVERT_ENABLE
,
901 .clkdm_name
= "dpll4_clkdm",
904 DEFINE_STRUCT_CLK(dpll4_m6x2_ck
, dpll4_m6x2_ck_parent_names
, dpll4_m5x2_ck_ops
);
906 static struct clk dpll4_m6x2_ck_3630
= {
907 .name
= "dpll4_m6x2_ck",
908 .hw
= &dpll4_m6x2_ck_hw
.hw
,
909 .parent_names
= dpll4_m6x2_ck_parent_names
,
910 .num_parents
= ARRAY_SIZE(dpll4_m6x2_ck_parent_names
),
911 .ops
= &dpll4_m5x2_ck_3630_ops
,
914 DEFINE_CLK_FIXED_FACTOR(dpll4_x2_ck
, "dpll4_ck", &dpll4_ck
, 0x0, 2, 1);
916 static struct dpll_data dpll5_dd
= {
917 .mult_div1_reg
= OMAP_CM_REGADDR(PLL_MOD
, OMAP3430ES2_CM_CLKSEL4
),
918 .mult_mask
= OMAP3430ES2_PERIPH2_DPLL_MULT_MASK
,
919 .div1_mask
= OMAP3430ES2_PERIPH2_DPLL_DIV_MASK
,
920 .clk_bypass
= &sys_ck
,
922 .freqsel_mask
= OMAP3430ES2_PERIPH2_DPLL_FREQSEL_MASK
,
923 .control_reg
= OMAP_CM_REGADDR(PLL_MOD
, OMAP3430ES2_CM_CLKEN2
),
924 .enable_mask
= OMAP3430ES2_EN_PERIPH2_DPLL_MASK
,
925 .modes
= (1 << DPLL_LOW_POWER_STOP
) | (1 << DPLL_LOCKED
),
926 .auto_recal_bit
= OMAP3430ES2_EN_PERIPH2_DPLL_DRIFTGUARD_SHIFT
,
927 .recal_en_bit
= OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT
,
928 .recal_st_bit
= OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT
,
929 .autoidle_reg
= OMAP_CM_REGADDR(PLL_MOD
, OMAP3430ES2_CM_AUTOIDLE2_PLL
),
930 .autoidle_mask
= OMAP3430ES2_AUTO_PERIPH2_DPLL_MASK
,
931 .idlest_reg
= OMAP_CM_REGADDR(PLL_MOD
, CM_IDLEST2
),
932 .idlest_mask
= OMAP3430ES2_ST_PERIPH2_CLK_MASK
,
933 .max_multiplier
= OMAP3_MAX_DPLL_MULT
,
935 .max_divider
= OMAP3_MAX_DPLL_DIV
,
938 static struct clk dpll5_ck
;
940 static struct clk_hw_omap dpll5_ck_hw
= {
944 .ops
= &clkhwops_omap3_dpll
,
945 .dpll_data
= &dpll5_dd
,
946 .clkdm_name
= "dpll5_clkdm",
949 DEFINE_STRUCT_CLK(dpll5_ck
, dpll3_ck_parent_names
, dpll1_ck_ops
);
951 DEFINE_CLK_DIVIDER(dpll5_m2_ck
, "dpll5_ck", &dpll5_ck
, 0x0,
952 OMAP_CM_REGADDR(PLL_MOD
, OMAP3430ES2_CM_CLKSEL5
),
953 OMAP3430ES2_DIV_120M_SHIFT
, OMAP3430ES2_DIV_120M_WIDTH
,
954 CLK_DIVIDER_ONE_BASED
, NULL
);
956 static struct clk dss1_alwon_fck_3430es1
;
958 static const char *dss1_alwon_fck_3430es1_parent_names
[] = {
962 static struct clk_hw_omap dss1_alwon_fck_3430es1_hw
= {
964 .clk
= &dss1_alwon_fck_3430es1
,
966 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_FCLKEN
),
967 .enable_bit
= OMAP3430_EN_DSS1_SHIFT
,
968 .clkdm_name
= "dss_clkdm",
971 DEFINE_STRUCT_CLK(dss1_alwon_fck_3430es1
, dss1_alwon_fck_3430es1_parent_names
,
974 static struct clk dss1_alwon_fck_3430es2
;
976 static struct clk_hw_omap dss1_alwon_fck_3430es2_hw
= {
978 .clk
= &dss1_alwon_fck_3430es2
,
980 .ops
= &clkhwops_omap3430es2_dss_usbhost_wait
,
981 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_FCLKEN
),
982 .enable_bit
= OMAP3430_EN_DSS1_SHIFT
,
983 .clkdm_name
= "dss_clkdm",
986 DEFINE_STRUCT_CLK(dss1_alwon_fck_3430es2
, dss1_alwon_fck_3430es1_parent_names
,
989 static struct clk dss2_alwon_fck
;
991 static struct clk_hw_omap dss2_alwon_fck_hw
= {
993 .clk
= &dss2_alwon_fck
,
995 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_FCLKEN
),
996 .enable_bit
= OMAP3430_EN_DSS2_SHIFT
,
997 .clkdm_name
= "dss_clkdm",
1000 DEFINE_STRUCT_CLK(dss2_alwon_fck
, dpll3_ck_parent_names
, aes2_ick_ops
);
1002 static struct clk dss_96m_fck
;
1004 static struct clk_hw_omap dss_96m_fck_hw
= {
1006 .clk
= &dss_96m_fck
,
1008 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_FCLKEN
),
1009 .enable_bit
= OMAP3430_EN_TV_SHIFT
,
1010 .clkdm_name
= "dss_clkdm",
1013 DEFINE_STRUCT_CLK(dss_96m_fck
, core_96m_fck_parent_names
, aes2_ick_ops
);
1015 static struct clk dss_ick_3430es1
;
1017 static struct clk_hw_omap dss_ick_3430es1_hw
= {
1019 .clk
= &dss_ick_3430es1
,
1021 .ops
= &clkhwops_iclk
,
1022 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_ICLKEN
),
1023 .enable_bit
= OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT
,
1024 .clkdm_name
= "dss_clkdm",
1027 DEFINE_STRUCT_CLK(dss_ick_3430es1
, security_l4_ick2_parent_names
, aes2_ick_ops
);
1029 static struct clk dss_ick_3430es2
;
1031 static struct clk_hw_omap dss_ick_3430es2_hw
= {
1033 .clk
= &dss_ick_3430es2
,
1035 .ops
= &clkhwops_omap3430es2_iclk_dss_usbhost_wait
,
1036 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_ICLKEN
),
1037 .enable_bit
= OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT
,
1038 .clkdm_name
= "dss_clkdm",
1041 DEFINE_STRUCT_CLK(dss_ick_3430es2
, security_l4_ick2_parent_names
, aes2_ick_ops
);
1043 static struct clk dss_tv_fck
;
1045 static const char *dss_tv_fck_parent_names
[] = {
1049 static struct clk_hw_omap dss_tv_fck_hw
= {
1053 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_DSS_MOD
, CM_FCLKEN
),
1054 .enable_bit
= OMAP3430_EN_TV_SHIFT
,
1055 .clkdm_name
= "dss_clkdm",
1058 DEFINE_STRUCT_CLK(dss_tv_fck
, dss_tv_fck_parent_names
, aes2_ick_ops
);
1060 static struct clk emac_fck
;
1062 static const char *emac_fck_parent_names
[] = {
1066 static struct clk_hw_omap emac_fck_hw
= {
1070 .enable_reg
= OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL
),
1071 .enable_bit
= AM35XX_CPGMAC_FCLK_SHIFT
,
1074 DEFINE_STRUCT_CLK(emac_fck
, emac_fck_parent_names
, aes1_ick_ops
);
1076 static struct clk ipss_ick
;
1078 static const char *ipss_ick_parent_names
[] = {
1082 static struct clk_hw_omap ipss_ick_hw
= {
1086 .ops
= &clkhwops_am35xx_ipss_wait
,
1087 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1088 .enable_bit
= AM35XX_EN_IPSS_SHIFT
,
1089 .clkdm_name
= "core_l3_clkdm",
1092 DEFINE_STRUCT_CLK(ipss_ick
, ipss_ick_parent_names
, aes2_ick_ops
);
1094 static struct clk emac_ick
;
1096 static const char *emac_ick_parent_names
[] = {
1100 static struct clk_hw_omap emac_ick_hw
= {
1104 .ops
= &clkhwops_am35xx_ipss_module_wait
,
1105 .enable_reg
= OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL
),
1106 .enable_bit
= AM35XX_CPGMAC_VBUSP_CLK_SHIFT
,
1107 .clkdm_name
= "core_l3_clkdm",
1110 DEFINE_STRUCT_CLK(emac_ick
, emac_ick_parent_names
, aes2_ick_ops
);
1112 static struct clk emu_core_alwon_ck
;
1114 static const char *emu_core_alwon_ck_parent_names
[] = {
1118 DEFINE_STRUCT_CLK_HW_OMAP(emu_core_alwon_ck
, "dpll3_clkdm");
1119 DEFINE_STRUCT_CLK(emu_core_alwon_ck
, emu_core_alwon_ck_parent_names
,
1122 static struct clk emu_mpu_alwon_ck
;
1124 static const char *emu_mpu_alwon_ck_parent_names
[] = {
1128 DEFINE_STRUCT_CLK_HW_OMAP(emu_mpu_alwon_ck
, NULL
);
1129 DEFINE_STRUCT_CLK(emu_mpu_alwon_ck
, emu_mpu_alwon_ck_parent_names
, core_ck_ops
);
1131 static struct clk emu_per_alwon_ck
;
1133 static const char *emu_per_alwon_ck_parent_names
[] = {
1137 DEFINE_STRUCT_CLK_HW_OMAP(emu_per_alwon_ck
, "dpll4_clkdm");
1138 DEFINE_STRUCT_CLK(emu_per_alwon_ck
, emu_per_alwon_ck_parent_names
,
1141 static const char *emu_src_ck_parent_names
[] = {
1142 "sys_ck", "emu_core_alwon_ck", "emu_per_alwon_ck", "emu_mpu_alwon_ck",
1145 static const struct clksel_rate emu_src_sys_rates
[] = {
1146 { .div
= 1, .val
= 0, .flags
= RATE_IN_3XXX
},
1150 static const struct clksel_rate emu_src_core_rates
[] = {
1151 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
1155 static const struct clksel_rate emu_src_per_rates
[] = {
1156 { .div
= 1, .val
= 2, .flags
= RATE_IN_3XXX
},
1160 static const struct clksel_rate emu_src_mpu_rates
[] = {
1161 { .div
= 1, .val
= 3, .flags
= RATE_IN_3XXX
},
1165 static const struct clksel emu_src_clksel
[] = {
1166 { .parent
= &sys_ck
, .rates
= emu_src_sys_rates
},
1167 { .parent
= &emu_core_alwon_ck
, .rates
= emu_src_core_rates
},
1168 { .parent
= &emu_per_alwon_ck
, .rates
= emu_src_per_rates
},
1169 { .parent
= &emu_mpu_alwon_ck
, .rates
= emu_src_mpu_rates
},
1173 static const struct clk_ops emu_src_ck_ops
= {
1174 .init
= &omap2_init_clk_clkdm
,
1175 .recalc_rate
= &omap2_clksel_recalc
,
1176 .get_parent
= &omap2_clksel_find_parent_index
,
1177 .set_parent
= &omap2_clksel_set_parent
,
1178 .enable
= &omap2_clkops_enable_clkdm
,
1179 .disable
= &omap2_clkops_disable_clkdm
,
1182 static struct clk emu_src_ck
;
1184 static struct clk_hw_omap emu_src_ck_hw
= {
1188 .clksel
= emu_src_clksel
,
1189 .clksel_reg
= OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
1190 .clksel_mask
= OMAP3430_MUX_CTRL_MASK
,
1191 .clkdm_name
= "emu_clkdm",
1194 DEFINE_STRUCT_CLK(emu_src_ck
, emu_src_ck_parent_names
, emu_src_ck_ops
);
1196 DEFINE_CLK_DIVIDER(atclk_fck
, "emu_src_ck", &emu_src_ck
, 0x0,
1197 OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
1198 OMAP3430_CLKSEL_ATCLK_SHIFT
, OMAP3430_CLKSEL_ATCLK_WIDTH
,
1199 CLK_DIVIDER_ONE_BASED
, NULL
);
1201 static struct clk fac_ick
;
1203 static struct clk_hw_omap fac_ick_hw
= {
1207 .ops
= &clkhwops_iclk_wait
,
1208 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1209 .enable_bit
= OMAP3430ES1_EN_FAC_SHIFT
,
1210 .clkdm_name
= "core_l4_clkdm",
1213 DEFINE_STRUCT_CLK(fac_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
1215 static struct clk fshostusb_fck
;
1217 static const char *fshostusb_fck_parent_names
[] = {
1221 static struct clk_hw_omap fshostusb_fck_hw
= {
1223 .clk
= &fshostusb_fck
,
1225 .ops
= &clkhwops_wait
,
1226 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1227 .enable_bit
= OMAP3430ES1_EN_FSHOSTUSB_SHIFT
,
1228 .clkdm_name
= "core_l4_clkdm",
1231 DEFINE_STRUCT_CLK(fshostusb_fck
, fshostusb_fck_parent_names
, aes2_ick_ops
);
1233 static struct clk gfx_l3_ck
;
1235 static struct clk_hw_omap gfx_l3_ck_hw
= {
1239 .ops
= &clkhwops_wait
,
1240 .enable_reg
= OMAP_CM_REGADDR(GFX_MOD
, CM_ICLKEN
),
1241 .enable_bit
= OMAP_EN_GFX_SHIFT
,
1242 .clkdm_name
= "gfx_3430es1_clkdm",
1245 DEFINE_STRUCT_CLK(gfx_l3_ck
, core_l3_ick_parent_names
, aes1_ick_ops
);
1247 DEFINE_CLK_DIVIDER(gfx_l3_fck
, "l3_ick", &l3_ick
, 0x0,
1248 OMAP_CM_REGADDR(GFX_MOD
, CM_CLKSEL
),
1249 OMAP_CLKSEL_GFX_SHIFT
, OMAP_CLKSEL_GFX_WIDTH
,
1250 CLK_DIVIDER_ONE_BASED
, NULL
);
1252 static struct clk gfx_cg1_ck
;
1254 static const char *gfx_cg1_ck_parent_names
[] = {
1258 static struct clk_hw_omap gfx_cg1_ck_hw
= {
1262 .ops
= &clkhwops_wait
,
1263 .enable_reg
= OMAP_CM_REGADDR(GFX_MOD
, CM_FCLKEN
),
1264 .enable_bit
= OMAP3430ES1_EN_2D_SHIFT
,
1265 .clkdm_name
= "gfx_3430es1_clkdm",
1268 DEFINE_STRUCT_CLK(gfx_cg1_ck
, gfx_cg1_ck_parent_names
, aes2_ick_ops
);
1270 static struct clk gfx_cg2_ck
;
1272 static struct clk_hw_omap gfx_cg2_ck_hw
= {
1276 .ops
= &clkhwops_wait
,
1277 .enable_reg
= OMAP_CM_REGADDR(GFX_MOD
, CM_FCLKEN
),
1278 .enable_bit
= OMAP3430ES1_EN_3D_SHIFT
,
1279 .clkdm_name
= "gfx_3430es1_clkdm",
1282 DEFINE_STRUCT_CLK(gfx_cg2_ck
, gfx_cg1_ck_parent_names
, aes2_ick_ops
);
1284 static struct clk gfx_l3_ick
;
1286 static const char *gfx_l3_ick_parent_names
[] = {
1290 DEFINE_STRUCT_CLK_HW_OMAP(gfx_l3_ick
, "gfx_3430es1_clkdm");
1291 DEFINE_STRUCT_CLK(gfx_l3_ick
, gfx_l3_ick_parent_names
, core_l4_ick_ops
);
1293 static struct clk wkup_32k_fck
;
1295 static const char *wkup_32k_fck_parent_names
[] = {
1299 DEFINE_STRUCT_CLK_HW_OMAP(wkup_32k_fck
, "wkup_clkdm");
1300 DEFINE_STRUCT_CLK(wkup_32k_fck
, wkup_32k_fck_parent_names
, core_l4_ick_ops
);
1302 static struct clk gpio1_dbck
;
1304 static const char *gpio1_dbck_parent_names
[] = {
1308 static struct clk_hw_omap gpio1_dbck_hw
= {
1312 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_FCLKEN
),
1313 .enable_bit
= OMAP3430_EN_GPIO1_SHIFT
,
1314 .clkdm_name
= "wkup_clkdm",
1317 DEFINE_STRUCT_CLK(gpio1_dbck
, gpio1_dbck_parent_names
, aes2_ick_ops
);
1319 static struct clk wkup_l4_ick
;
1321 DEFINE_STRUCT_CLK_HW_OMAP(wkup_l4_ick
, "wkup_clkdm");
1322 DEFINE_STRUCT_CLK(wkup_l4_ick
, dpll3_ck_parent_names
, core_l4_ick_ops
);
1324 static struct clk gpio1_ick
;
1326 static const char *gpio1_ick_parent_names
[] = {
1330 static struct clk_hw_omap gpio1_ick_hw
= {
1334 .ops
= &clkhwops_iclk_wait
,
1335 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_ICLKEN
),
1336 .enable_bit
= OMAP3430_EN_GPIO1_SHIFT
,
1337 .clkdm_name
= "wkup_clkdm",
1340 DEFINE_STRUCT_CLK(gpio1_ick
, gpio1_ick_parent_names
, aes2_ick_ops
);
1342 static struct clk per_32k_alwon_fck
;
1344 DEFINE_STRUCT_CLK_HW_OMAP(per_32k_alwon_fck
, "per_clkdm");
1345 DEFINE_STRUCT_CLK(per_32k_alwon_fck
, wkup_32k_fck_parent_names
,
1348 static struct clk gpio2_dbck
;
1350 static const char *gpio2_dbck_parent_names
[] = {
1351 "per_32k_alwon_fck",
1354 static struct clk_hw_omap gpio2_dbck_hw
= {
1358 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
1359 .enable_bit
= OMAP3430_EN_GPIO2_SHIFT
,
1360 .clkdm_name
= "per_clkdm",
1363 DEFINE_STRUCT_CLK(gpio2_dbck
, gpio2_dbck_parent_names
, aes2_ick_ops
);
1365 static struct clk per_l4_ick
;
1367 DEFINE_STRUCT_CLK_HW_OMAP(per_l4_ick
, "per_clkdm");
1368 DEFINE_STRUCT_CLK(per_l4_ick
, security_l4_ick2_parent_names
, core_l4_ick_ops
);
1370 static struct clk gpio2_ick
;
1372 static const char *gpio2_ick_parent_names
[] = {
1376 static struct clk_hw_omap gpio2_ick_hw
= {
1380 .ops
= &clkhwops_iclk_wait
,
1381 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
1382 .enable_bit
= OMAP3430_EN_GPIO2_SHIFT
,
1383 .clkdm_name
= "per_clkdm",
1386 DEFINE_STRUCT_CLK(gpio2_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
1388 static struct clk gpio3_dbck
;
1390 static struct clk_hw_omap gpio3_dbck_hw
= {
1394 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
1395 .enable_bit
= OMAP3430_EN_GPIO3_SHIFT
,
1396 .clkdm_name
= "per_clkdm",
1399 DEFINE_STRUCT_CLK(gpio3_dbck
, gpio2_dbck_parent_names
, aes2_ick_ops
);
1401 static struct clk gpio3_ick
;
1403 static struct clk_hw_omap gpio3_ick_hw
= {
1407 .ops
= &clkhwops_iclk_wait
,
1408 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
1409 .enable_bit
= OMAP3430_EN_GPIO3_SHIFT
,
1410 .clkdm_name
= "per_clkdm",
1413 DEFINE_STRUCT_CLK(gpio3_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
1415 static struct clk gpio4_dbck
;
1417 static struct clk_hw_omap gpio4_dbck_hw
= {
1421 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
1422 .enable_bit
= OMAP3430_EN_GPIO4_SHIFT
,
1423 .clkdm_name
= "per_clkdm",
1426 DEFINE_STRUCT_CLK(gpio4_dbck
, gpio2_dbck_parent_names
, aes2_ick_ops
);
1428 static struct clk gpio4_ick
;
1430 static struct clk_hw_omap gpio4_ick_hw
= {
1434 .ops
= &clkhwops_iclk_wait
,
1435 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
1436 .enable_bit
= OMAP3430_EN_GPIO4_SHIFT
,
1437 .clkdm_name
= "per_clkdm",
1440 DEFINE_STRUCT_CLK(gpio4_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
1442 static struct clk gpio5_dbck
;
1444 static struct clk_hw_omap gpio5_dbck_hw
= {
1448 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
1449 .enable_bit
= OMAP3430_EN_GPIO5_SHIFT
,
1450 .clkdm_name
= "per_clkdm",
1453 DEFINE_STRUCT_CLK(gpio5_dbck
, gpio2_dbck_parent_names
, aes2_ick_ops
);
1455 static struct clk gpio5_ick
;
1457 static struct clk_hw_omap gpio5_ick_hw
= {
1461 .ops
= &clkhwops_iclk_wait
,
1462 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
1463 .enable_bit
= OMAP3430_EN_GPIO5_SHIFT
,
1464 .clkdm_name
= "per_clkdm",
1467 DEFINE_STRUCT_CLK(gpio5_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
1469 static struct clk gpio6_dbck
;
1471 static struct clk_hw_omap gpio6_dbck_hw
= {
1475 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
1476 .enable_bit
= OMAP3430_EN_GPIO6_SHIFT
,
1477 .clkdm_name
= "per_clkdm",
1480 DEFINE_STRUCT_CLK(gpio6_dbck
, gpio2_dbck_parent_names
, aes2_ick_ops
);
1482 static struct clk gpio6_ick
;
1484 static struct clk_hw_omap gpio6_ick_hw
= {
1488 .ops
= &clkhwops_iclk_wait
,
1489 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
1490 .enable_bit
= OMAP3430_EN_GPIO6_SHIFT
,
1491 .clkdm_name
= "per_clkdm",
1494 DEFINE_STRUCT_CLK(gpio6_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
1496 static struct clk gpmc_fck
;
1498 static struct clk_hw_omap gpmc_fck_hw
= {
1502 .flags
= ENABLE_ON_INIT
,
1503 .clkdm_name
= "core_l3_clkdm",
1506 DEFINE_STRUCT_CLK(gpmc_fck
, ipss_ick_parent_names
, core_l4_ick_ops
);
1508 static const struct clksel omap343x_gpt_clksel
[] = {
1509 { .parent
= &omap_32k_fck
, .rates
= gpt_32k_rates
},
1510 { .parent
= &sys_ck
, .rates
= gpt_sys_rates
},
1514 static const char *gpt10_fck_parent_names
[] = {
1515 "omap_32k_fck", "sys_ck",
1518 DEFINE_CLK_OMAP_MUX_GATE(gpt10_fck
, "core_l4_clkdm", omap343x_gpt_clksel
,
1519 OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
1520 OMAP3430_CLKSEL_GPT10_MASK
,
1521 OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1522 OMAP3430_EN_GPT10_SHIFT
, &clkhwops_wait
,
1523 gpt10_fck_parent_names
, clkout2_src_ck_ops
);
1525 static struct clk gpt10_ick
;
1527 static struct clk_hw_omap gpt10_ick_hw
= {
1531 .ops
= &clkhwops_iclk_wait
,
1532 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1533 .enable_bit
= OMAP3430_EN_GPT10_SHIFT
,
1534 .clkdm_name
= "core_l4_clkdm",
1537 DEFINE_STRUCT_CLK(gpt10_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
1539 DEFINE_CLK_OMAP_MUX_GATE(gpt11_fck
, "core_l4_clkdm", omap343x_gpt_clksel
,
1540 OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
1541 OMAP3430_CLKSEL_GPT11_MASK
,
1542 OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1543 OMAP3430_EN_GPT11_SHIFT
, &clkhwops_wait
,
1544 gpt10_fck_parent_names
, clkout2_src_ck_ops
);
1546 static struct clk gpt11_ick
;
1548 static struct clk_hw_omap gpt11_ick_hw
= {
1552 .ops
= &clkhwops_iclk_wait
,
1553 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1554 .enable_bit
= OMAP3430_EN_GPT11_SHIFT
,
1555 .clkdm_name
= "core_l4_clkdm",
1558 DEFINE_STRUCT_CLK(gpt11_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
1560 static struct clk gpt12_fck
;
1562 static const char *gpt12_fck_parent_names
[] = {
1566 DEFINE_STRUCT_CLK_HW_OMAP(gpt12_fck
, "wkup_clkdm");
1567 DEFINE_STRUCT_CLK(gpt12_fck
, gpt12_fck_parent_names
, core_l4_ick_ops
);
1569 static struct clk gpt12_ick
;
1571 static struct clk_hw_omap gpt12_ick_hw
= {
1575 .ops
= &clkhwops_iclk_wait
,
1576 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_ICLKEN
),
1577 .enable_bit
= OMAP3430_EN_GPT12_SHIFT
,
1578 .clkdm_name
= "wkup_clkdm",
1581 DEFINE_STRUCT_CLK(gpt12_ick
, gpio1_ick_parent_names
, aes2_ick_ops
);
1583 DEFINE_CLK_OMAP_MUX_GATE(gpt1_fck
, "wkup_clkdm", omap343x_gpt_clksel
,
1584 OMAP_CM_REGADDR(WKUP_MOD
, CM_CLKSEL
),
1585 OMAP3430_CLKSEL_GPT1_MASK
,
1586 OMAP_CM_REGADDR(WKUP_MOD
, CM_FCLKEN
),
1587 OMAP3430_EN_GPT1_SHIFT
, &clkhwops_wait
,
1588 gpt10_fck_parent_names
, clkout2_src_ck_ops
);
1590 static struct clk gpt1_ick
;
1592 static struct clk_hw_omap gpt1_ick_hw
= {
1596 .ops
= &clkhwops_iclk_wait
,
1597 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_ICLKEN
),
1598 .enable_bit
= OMAP3430_EN_GPT1_SHIFT
,
1599 .clkdm_name
= "wkup_clkdm",
1602 DEFINE_STRUCT_CLK(gpt1_ick
, gpio1_ick_parent_names
, aes2_ick_ops
);
1604 DEFINE_CLK_OMAP_MUX_GATE(gpt2_fck
, "per_clkdm", omap343x_gpt_clksel
,
1605 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
1606 OMAP3430_CLKSEL_GPT2_MASK
,
1607 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
1608 OMAP3430_EN_GPT2_SHIFT
, &clkhwops_wait
,
1609 gpt10_fck_parent_names
, clkout2_src_ck_ops
);
1611 static struct clk gpt2_ick
;
1613 static struct clk_hw_omap gpt2_ick_hw
= {
1617 .ops
= &clkhwops_iclk_wait
,
1618 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
1619 .enable_bit
= OMAP3430_EN_GPT2_SHIFT
,
1620 .clkdm_name
= "per_clkdm",
1623 DEFINE_STRUCT_CLK(gpt2_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
1625 DEFINE_CLK_OMAP_MUX_GATE(gpt3_fck
, "per_clkdm", omap343x_gpt_clksel
,
1626 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
1627 OMAP3430_CLKSEL_GPT3_MASK
,
1628 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
1629 OMAP3430_EN_GPT3_SHIFT
, &clkhwops_wait
,
1630 gpt10_fck_parent_names
, clkout2_src_ck_ops
);
1632 static struct clk gpt3_ick
;
1634 static struct clk_hw_omap gpt3_ick_hw
= {
1638 .ops
= &clkhwops_iclk_wait
,
1639 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
1640 .enable_bit
= OMAP3430_EN_GPT3_SHIFT
,
1641 .clkdm_name
= "per_clkdm",
1644 DEFINE_STRUCT_CLK(gpt3_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
1646 DEFINE_CLK_OMAP_MUX_GATE(gpt4_fck
, "per_clkdm", omap343x_gpt_clksel
,
1647 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
1648 OMAP3430_CLKSEL_GPT4_MASK
,
1649 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
1650 OMAP3430_EN_GPT4_SHIFT
, &clkhwops_wait
,
1651 gpt10_fck_parent_names
, clkout2_src_ck_ops
);
1653 static struct clk gpt4_ick
;
1655 static struct clk_hw_omap gpt4_ick_hw
= {
1659 .ops
= &clkhwops_iclk_wait
,
1660 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
1661 .enable_bit
= OMAP3430_EN_GPT4_SHIFT
,
1662 .clkdm_name
= "per_clkdm",
1665 DEFINE_STRUCT_CLK(gpt4_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
1667 DEFINE_CLK_OMAP_MUX_GATE(gpt5_fck
, "per_clkdm", omap343x_gpt_clksel
,
1668 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
1669 OMAP3430_CLKSEL_GPT5_MASK
,
1670 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
1671 OMAP3430_EN_GPT5_SHIFT
, &clkhwops_wait
,
1672 gpt10_fck_parent_names
, clkout2_src_ck_ops
);
1674 static struct clk gpt5_ick
;
1676 static struct clk_hw_omap gpt5_ick_hw
= {
1680 .ops
= &clkhwops_iclk_wait
,
1681 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
1682 .enable_bit
= OMAP3430_EN_GPT5_SHIFT
,
1683 .clkdm_name
= "per_clkdm",
1686 DEFINE_STRUCT_CLK(gpt5_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
1688 DEFINE_CLK_OMAP_MUX_GATE(gpt6_fck
, "per_clkdm", omap343x_gpt_clksel
,
1689 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
1690 OMAP3430_CLKSEL_GPT6_MASK
,
1691 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
1692 OMAP3430_EN_GPT6_SHIFT
, &clkhwops_wait
,
1693 gpt10_fck_parent_names
, clkout2_src_ck_ops
);
1695 static struct clk gpt6_ick
;
1697 static struct clk_hw_omap gpt6_ick_hw
= {
1701 .ops
= &clkhwops_iclk_wait
,
1702 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
1703 .enable_bit
= OMAP3430_EN_GPT6_SHIFT
,
1704 .clkdm_name
= "per_clkdm",
1707 DEFINE_STRUCT_CLK(gpt6_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
1709 DEFINE_CLK_OMAP_MUX_GATE(gpt7_fck
, "per_clkdm", omap343x_gpt_clksel
,
1710 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
1711 OMAP3430_CLKSEL_GPT7_MASK
,
1712 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
1713 OMAP3430_EN_GPT7_SHIFT
, &clkhwops_wait
,
1714 gpt10_fck_parent_names
, clkout2_src_ck_ops
);
1716 static struct clk gpt7_ick
;
1718 static struct clk_hw_omap gpt7_ick_hw
= {
1722 .ops
= &clkhwops_iclk_wait
,
1723 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
1724 .enable_bit
= OMAP3430_EN_GPT7_SHIFT
,
1725 .clkdm_name
= "per_clkdm",
1728 DEFINE_STRUCT_CLK(gpt7_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
1730 DEFINE_CLK_OMAP_MUX_GATE(gpt8_fck
, "per_clkdm", omap343x_gpt_clksel
,
1731 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
1732 OMAP3430_CLKSEL_GPT8_MASK
,
1733 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
1734 OMAP3430_EN_GPT8_SHIFT
, &clkhwops_wait
,
1735 gpt10_fck_parent_names
, clkout2_src_ck_ops
);
1737 static struct clk gpt8_ick
;
1739 static struct clk_hw_omap gpt8_ick_hw
= {
1743 .ops
= &clkhwops_iclk_wait
,
1744 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
1745 .enable_bit
= OMAP3430_EN_GPT8_SHIFT
,
1746 .clkdm_name
= "per_clkdm",
1749 DEFINE_STRUCT_CLK(gpt8_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
1751 DEFINE_CLK_OMAP_MUX_GATE(gpt9_fck
, "per_clkdm", omap343x_gpt_clksel
,
1752 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_CLKSEL
),
1753 OMAP3430_CLKSEL_GPT9_MASK
,
1754 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
1755 OMAP3430_EN_GPT9_SHIFT
, &clkhwops_wait
,
1756 gpt10_fck_parent_names
, clkout2_src_ck_ops
);
1758 static struct clk gpt9_ick
;
1760 static struct clk_hw_omap gpt9_ick_hw
= {
1764 .ops
= &clkhwops_iclk_wait
,
1765 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
1766 .enable_bit
= OMAP3430_EN_GPT9_SHIFT
,
1767 .clkdm_name
= "per_clkdm",
1770 DEFINE_STRUCT_CLK(gpt9_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
1772 static struct clk hdq_fck
;
1774 static const char *hdq_fck_parent_names
[] = {
1778 static struct clk_hw_omap hdq_fck_hw
= {
1782 .ops
= &clkhwops_wait
,
1783 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1784 .enable_bit
= OMAP3430_EN_HDQ_SHIFT
,
1785 .clkdm_name
= "core_l4_clkdm",
1788 DEFINE_STRUCT_CLK(hdq_fck
, hdq_fck_parent_names
, aes2_ick_ops
);
1790 static struct clk hdq_ick
;
1792 static struct clk_hw_omap hdq_ick_hw
= {
1796 .ops
= &clkhwops_iclk_wait
,
1797 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1798 .enable_bit
= OMAP3430_EN_HDQ_SHIFT
,
1799 .clkdm_name
= "core_l4_clkdm",
1802 DEFINE_STRUCT_CLK(hdq_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
1804 static struct clk hecc_ck
;
1806 static struct clk_hw_omap hecc_ck_hw
= {
1810 .ops
= &clkhwops_am35xx_ipss_module_wait
,
1811 .enable_reg
= OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL
),
1812 .enable_bit
= AM35XX_HECC_VBUSP_CLK_SHIFT
,
1813 .clkdm_name
= "core_l3_clkdm",
1816 DEFINE_STRUCT_CLK(hecc_ck
, dpll3_ck_parent_names
, aes2_ick_ops
);
1818 static struct clk hsotgusb_fck_am35xx
;
1820 static struct clk_hw_omap hsotgusb_fck_am35xx_hw
= {
1822 .clk
= &hsotgusb_fck_am35xx
,
1824 .enable_reg
= OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL
),
1825 .enable_bit
= AM35XX_USBOTG_FCLK_SHIFT
,
1826 .clkdm_name
= "core_l3_clkdm",
1829 DEFINE_STRUCT_CLK(hsotgusb_fck_am35xx
, dpll3_ck_parent_names
, aes2_ick_ops
);
1831 static struct clk hsotgusb_ick_3430es1
;
1833 static struct clk_hw_omap hsotgusb_ick_3430es1_hw
= {
1835 .clk
= &hsotgusb_ick_3430es1
,
1837 .ops
= &clkhwops_iclk
,
1838 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1839 .enable_bit
= OMAP3430_EN_HSOTGUSB_SHIFT
,
1840 .clkdm_name
= "core_l3_clkdm",
1843 DEFINE_STRUCT_CLK(hsotgusb_ick_3430es1
, ipss_ick_parent_names
, aes2_ick_ops
);
1845 static struct clk hsotgusb_ick_3430es2
;
1847 static struct clk_hw_omap hsotgusb_ick_3430es2_hw
= {
1849 .clk
= &hsotgusb_ick_3430es2
,
1851 .ops
= &clkhwops_omap3430es2_iclk_hsotgusb_wait
,
1852 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1853 .enable_bit
= OMAP3430_EN_HSOTGUSB_SHIFT
,
1854 .clkdm_name
= "core_l3_clkdm",
1857 DEFINE_STRUCT_CLK(hsotgusb_ick_3430es2
, ipss_ick_parent_names
, aes2_ick_ops
);
1859 static struct clk hsotgusb_ick_am35xx
;
1861 static struct clk_hw_omap hsotgusb_ick_am35xx_hw
= {
1863 .clk
= &hsotgusb_ick_am35xx
,
1865 .ops
= &clkhwops_am35xx_ipss_module_wait
,
1866 .enable_reg
= OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL
),
1867 .enable_bit
= AM35XX_USBOTG_VBUSP_CLK_SHIFT
,
1868 .clkdm_name
= "core_l3_clkdm",
1871 DEFINE_STRUCT_CLK(hsotgusb_ick_am35xx
, emac_ick_parent_names
, aes2_ick_ops
);
1873 static struct clk i2c1_fck
;
1875 static struct clk_hw_omap i2c1_fck_hw
= {
1879 .ops
= &clkhwops_wait
,
1880 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1881 .enable_bit
= OMAP3430_EN_I2C1_SHIFT
,
1882 .clkdm_name
= "core_l4_clkdm",
1885 DEFINE_STRUCT_CLK(i2c1_fck
, csi2_96m_fck_parent_names
, aes2_ick_ops
);
1887 static struct clk i2c1_ick
;
1889 static struct clk_hw_omap i2c1_ick_hw
= {
1893 .ops
= &clkhwops_iclk_wait
,
1894 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1895 .enable_bit
= OMAP3430_EN_I2C1_SHIFT
,
1896 .clkdm_name
= "core_l4_clkdm",
1899 DEFINE_STRUCT_CLK(i2c1_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
1901 static struct clk i2c2_fck
;
1903 static struct clk_hw_omap i2c2_fck_hw
= {
1907 .ops
= &clkhwops_wait
,
1908 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1909 .enable_bit
= OMAP3430_EN_I2C2_SHIFT
,
1910 .clkdm_name
= "core_l4_clkdm",
1913 DEFINE_STRUCT_CLK(i2c2_fck
, csi2_96m_fck_parent_names
, aes2_ick_ops
);
1915 static struct clk i2c2_ick
;
1917 static struct clk_hw_omap i2c2_ick_hw
= {
1921 .ops
= &clkhwops_iclk_wait
,
1922 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1923 .enable_bit
= OMAP3430_EN_I2C2_SHIFT
,
1924 .clkdm_name
= "core_l4_clkdm",
1927 DEFINE_STRUCT_CLK(i2c2_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
1929 static struct clk i2c3_fck
;
1931 static struct clk_hw_omap i2c3_fck_hw
= {
1935 .ops
= &clkhwops_wait
,
1936 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
1937 .enable_bit
= OMAP3430_EN_I2C3_SHIFT
,
1938 .clkdm_name
= "core_l4_clkdm",
1941 DEFINE_STRUCT_CLK(i2c3_fck
, csi2_96m_fck_parent_names
, aes2_ick_ops
);
1943 static struct clk i2c3_ick
;
1945 static struct clk_hw_omap i2c3_ick_hw
= {
1949 .ops
= &clkhwops_iclk_wait
,
1950 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1951 .enable_bit
= OMAP3430_EN_I2C3_SHIFT
,
1952 .clkdm_name
= "core_l4_clkdm",
1955 DEFINE_STRUCT_CLK(i2c3_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
1957 static struct clk icr_ick
;
1959 static struct clk_hw_omap icr_ick_hw
= {
1963 .ops
= &clkhwops_iclk_wait
,
1964 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
1965 .enable_bit
= OMAP3430_EN_ICR_SHIFT
,
1966 .clkdm_name
= "core_l4_clkdm",
1969 DEFINE_STRUCT_CLK(icr_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
1971 static struct clk iva2_ck
;
1973 static const char *iva2_ck_parent_names
[] = {
1977 static struct clk_hw_omap iva2_ck_hw
= {
1981 .ops
= &clkhwops_wait
,
1982 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_IVA2_MOD
, CM_FCLKEN
),
1983 .enable_bit
= OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT
,
1984 .clkdm_name
= "iva2_clkdm",
1987 DEFINE_STRUCT_CLK(iva2_ck
, iva2_ck_parent_names
, aes2_ick_ops
);
1989 static struct clk mad2d_ick
;
1991 static struct clk_hw_omap mad2d_ick_hw
= {
1995 .ops
= &clkhwops_iclk_wait
,
1996 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN3
),
1997 .enable_bit
= OMAP3430_EN_MAD2D_SHIFT
,
1998 .clkdm_name
= "d2d_clkdm",
2001 DEFINE_STRUCT_CLK(mad2d_ick
, core_l3_ick_parent_names
, aes2_ick_ops
);
2003 static struct clk mailboxes_ick
;
2005 static struct clk_hw_omap mailboxes_ick_hw
= {
2007 .clk
= &mailboxes_ick
,
2009 .ops
= &clkhwops_iclk_wait
,
2010 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2011 .enable_bit
= OMAP3430_EN_MAILBOXES_SHIFT
,
2012 .clkdm_name
= "core_l4_clkdm",
2015 DEFINE_STRUCT_CLK(mailboxes_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2017 static const struct clksel_rate common_mcbsp_96m_rates
[] = {
2018 { .div
= 1, .val
= 0, .flags
= RATE_IN_3XXX
},
2022 static const struct clksel_rate common_mcbsp_mcbsp_rates
[] = {
2023 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
2027 static const struct clksel mcbsp_15_clksel
[] = {
2028 { .parent
= &core_96m_fck
, .rates
= common_mcbsp_96m_rates
},
2029 { .parent
= &mcbsp_clks
, .rates
= common_mcbsp_mcbsp_rates
},
2033 static const char *mcbsp1_fck_parent_names
[] = {
2034 "core_96m_fck", "mcbsp_clks",
2037 DEFINE_CLK_OMAP_MUX_GATE(mcbsp1_fck
, "core_l4_clkdm", mcbsp_15_clksel
,
2038 OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0
),
2039 OMAP2_MCBSP1_CLKS_MASK
,
2040 OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2041 OMAP3430_EN_MCBSP1_SHIFT
, &clkhwops_wait
,
2042 mcbsp1_fck_parent_names
, clkout2_src_ck_ops
);
2044 static struct clk mcbsp1_ick
;
2046 static struct clk_hw_omap mcbsp1_ick_hw
= {
2050 .ops
= &clkhwops_iclk_wait
,
2051 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2052 .enable_bit
= OMAP3430_EN_MCBSP1_SHIFT
,
2053 .clkdm_name
= "core_l4_clkdm",
2056 DEFINE_STRUCT_CLK(mcbsp1_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2058 static struct clk per_96m_fck
;
2060 DEFINE_STRUCT_CLK_HW_OMAP(per_96m_fck
, "per_clkdm");
2061 DEFINE_STRUCT_CLK(per_96m_fck
, cm_96m_fck_parent_names
, core_l4_ick_ops
);
2063 static const struct clksel mcbsp_234_clksel
[] = {
2064 { .parent
= &per_96m_fck
, .rates
= common_mcbsp_96m_rates
},
2065 { .parent
= &mcbsp_clks
, .rates
= common_mcbsp_mcbsp_rates
},
2069 static const char *mcbsp2_fck_parent_names
[] = {
2070 "per_96m_fck", "mcbsp_clks",
2073 DEFINE_CLK_OMAP_MUX_GATE(mcbsp2_fck
, "per_clkdm", mcbsp_234_clksel
,
2074 OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0
),
2075 OMAP2_MCBSP2_CLKS_MASK
,
2076 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2077 OMAP3430_EN_MCBSP2_SHIFT
, &clkhwops_wait
,
2078 mcbsp2_fck_parent_names
, clkout2_src_ck_ops
);
2080 static struct clk mcbsp2_ick
;
2082 static struct clk_hw_omap mcbsp2_ick_hw
= {
2086 .ops
= &clkhwops_iclk_wait
,
2087 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2088 .enable_bit
= OMAP3430_EN_MCBSP2_SHIFT
,
2089 .clkdm_name
= "per_clkdm",
2092 DEFINE_STRUCT_CLK(mcbsp2_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
2094 DEFINE_CLK_OMAP_MUX_GATE(mcbsp3_fck
, "per_clkdm", mcbsp_234_clksel
,
2095 OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1
),
2096 OMAP2_MCBSP3_CLKS_MASK
,
2097 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2098 OMAP3430_EN_MCBSP3_SHIFT
, &clkhwops_wait
,
2099 mcbsp2_fck_parent_names
, clkout2_src_ck_ops
);
2101 static struct clk mcbsp3_ick
;
2103 static struct clk_hw_omap mcbsp3_ick_hw
= {
2107 .ops
= &clkhwops_iclk_wait
,
2108 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2109 .enable_bit
= OMAP3430_EN_MCBSP3_SHIFT
,
2110 .clkdm_name
= "per_clkdm",
2113 DEFINE_STRUCT_CLK(mcbsp3_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
2115 DEFINE_CLK_OMAP_MUX_GATE(mcbsp4_fck
, "per_clkdm", mcbsp_234_clksel
,
2116 OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1
),
2117 OMAP2_MCBSP4_CLKS_MASK
,
2118 OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2119 OMAP3430_EN_MCBSP4_SHIFT
, &clkhwops_wait
,
2120 mcbsp2_fck_parent_names
, clkout2_src_ck_ops
);
2122 static struct clk mcbsp4_ick
;
2124 static struct clk_hw_omap mcbsp4_ick_hw
= {
2128 .ops
= &clkhwops_iclk_wait
,
2129 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2130 .enable_bit
= OMAP3430_EN_MCBSP4_SHIFT
,
2131 .clkdm_name
= "per_clkdm",
2134 DEFINE_STRUCT_CLK(mcbsp4_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
2136 DEFINE_CLK_OMAP_MUX_GATE(mcbsp5_fck
, "core_l4_clkdm", mcbsp_15_clksel
,
2137 OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1
),
2138 OMAP2_MCBSP5_CLKS_MASK
,
2139 OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2140 OMAP3430_EN_MCBSP5_SHIFT
, &clkhwops_wait
,
2141 mcbsp1_fck_parent_names
, clkout2_src_ck_ops
);
2143 static struct clk mcbsp5_ick
;
2145 static struct clk_hw_omap mcbsp5_ick_hw
= {
2149 .ops
= &clkhwops_iclk_wait
,
2150 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2151 .enable_bit
= OMAP3430_EN_MCBSP5_SHIFT
,
2152 .clkdm_name
= "core_l4_clkdm",
2155 DEFINE_STRUCT_CLK(mcbsp5_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2157 static struct clk mcspi1_fck
;
2159 static struct clk_hw_omap mcspi1_fck_hw
= {
2163 .ops
= &clkhwops_wait
,
2164 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2165 .enable_bit
= OMAP3430_EN_MCSPI1_SHIFT
,
2166 .clkdm_name
= "core_l4_clkdm",
2169 DEFINE_STRUCT_CLK(mcspi1_fck
, fshostusb_fck_parent_names
, aes2_ick_ops
);
2171 static struct clk mcspi1_ick
;
2173 static struct clk_hw_omap mcspi1_ick_hw
= {
2177 .ops
= &clkhwops_iclk_wait
,
2178 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2179 .enable_bit
= OMAP3430_EN_MCSPI1_SHIFT
,
2180 .clkdm_name
= "core_l4_clkdm",
2183 DEFINE_STRUCT_CLK(mcspi1_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2185 static struct clk mcspi2_fck
;
2187 static struct clk_hw_omap mcspi2_fck_hw
= {
2191 .ops
= &clkhwops_wait
,
2192 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2193 .enable_bit
= OMAP3430_EN_MCSPI2_SHIFT
,
2194 .clkdm_name
= "core_l4_clkdm",
2197 DEFINE_STRUCT_CLK(mcspi2_fck
, fshostusb_fck_parent_names
, aes2_ick_ops
);
2199 static struct clk mcspi2_ick
;
2201 static struct clk_hw_omap mcspi2_ick_hw
= {
2205 .ops
= &clkhwops_iclk_wait
,
2206 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2207 .enable_bit
= OMAP3430_EN_MCSPI2_SHIFT
,
2208 .clkdm_name
= "core_l4_clkdm",
2211 DEFINE_STRUCT_CLK(mcspi2_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2213 static struct clk mcspi3_fck
;
2215 static struct clk_hw_omap mcspi3_fck_hw
= {
2219 .ops
= &clkhwops_wait
,
2220 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2221 .enable_bit
= OMAP3430_EN_MCSPI3_SHIFT
,
2222 .clkdm_name
= "core_l4_clkdm",
2225 DEFINE_STRUCT_CLK(mcspi3_fck
, fshostusb_fck_parent_names
, aes2_ick_ops
);
2227 static struct clk mcspi3_ick
;
2229 static struct clk_hw_omap mcspi3_ick_hw
= {
2233 .ops
= &clkhwops_iclk_wait
,
2234 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2235 .enable_bit
= OMAP3430_EN_MCSPI3_SHIFT
,
2236 .clkdm_name
= "core_l4_clkdm",
2239 DEFINE_STRUCT_CLK(mcspi3_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2241 static struct clk mcspi4_fck
;
2243 static struct clk_hw_omap mcspi4_fck_hw
= {
2247 .ops
= &clkhwops_wait
,
2248 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2249 .enable_bit
= OMAP3430_EN_MCSPI4_SHIFT
,
2250 .clkdm_name
= "core_l4_clkdm",
2253 DEFINE_STRUCT_CLK(mcspi4_fck
, fshostusb_fck_parent_names
, aes2_ick_ops
);
2255 static struct clk mcspi4_ick
;
2257 static struct clk_hw_omap mcspi4_ick_hw
= {
2261 .ops
= &clkhwops_iclk_wait
,
2262 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2263 .enable_bit
= OMAP3430_EN_MCSPI4_SHIFT
,
2264 .clkdm_name
= "core_l4_clkdm",
2267 DEFINE_STRUCT_CLK(mcspi4_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2269 static struct clk mmchs1_fck
;
2271 static struct clk_hw_omap mmchs1_fck_hw
= {
2275 .ops
= &clkhwops_wait
,
2276 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2277 .enable_bit
= OMAP3430_EN_MMC1_SHIFT
,
2278 .clkdm_name
= "core_l4_clkdm",
2281 DEFINE_STRUCT_CLK(mmchs1_fck
, csi2_96m_fck_parent_names
, aes2_ick_ops
);
2283 static struct clk mmchs1_ick
;
2285 static struct clk_hw_omap mmchs1_ick_hw
= {
2289 .ops
= &clkhwops_iclk_wait
,
2290 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2291 .enable_bit
= OMAP3430_EN_MMC1_SHIFT
,
2292 .clkdm_name
= "core_l4_clkdm",
2295 DEFINE_STRUCT_CLK(mmchs1_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2297 static struct clk mmchs2_fck
;
2299 static struct clk_hw_omap mmchs2_fck_hw
= {
2303 .ops
= &clkhwops_wait
,
2304 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2305 .enable_bit
= OMAP3430_EN_MMC2_SHIFT
,
2306 .clkdm_name
= "core_l4_clkdm",
2309 DEFINE_STRUCT_CLK(mmchs2_fck
, csi2_96m_fck_parent_names
, aes2_ick_ops
);
2311 static struct clk mmchs2_ick
;
2313 static struct clk_hw_omap mmchs2_ick_hw
= {
2317 .ops
= &clkhwops_iclk_wait
,
2318 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2319 .enable_bit
= OMAP3430_EN_MMC2_SHIFT
,
2320 .clkdm_name
= "core_l4_clkdm",
2323 DEFINE_STRUCT_CLK(mmchs2_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2325 static struct clk mmchs3_fck
;
2327 static struct clk_hw_omap mmchs3_fck_hw
= {
2331 .ops
= &clkhwops_wait
,
2332 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2333 .enable_bit
= OMAP3430ES2_EN_MMC3_SHIFT
,
2334 .clkdm_name
= "core_l4_clkdm",
2337 DEFINE_STRUCT_CLK(mmchs3_fck
, csi2_96m_fck_parent_names
, aes2_ick_ops
);
2339 static struct clk mmchs3_ick
;
2341 static struct clk_hw_omap mmchs3_ick_hw
= {
2345 .ops
= &clkhwops_iclk_wait
,
2346 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2347 .enable_bit
= OMAP3430ES2_EN_MMC3_SHIFT
,
2348 .clkdm_name
= "core_l4_clkdm",
2351 DEFINE_STRUCT_CLK(mmchs3_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2353 static struct clk modem_fck
;
2355 static struct clk_hw_omap modem_fck_hw
= {
2359 .ops
= &clkhwops_iclk_wait
,
2360 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2361 .enable_bit
= OMAP3430_EN_MODEM_SHIFT
,
2362 .clkdm_name
= "d2d_clkdm",
2365 DEFINE_STRUCT_CLK(modem_fck
, dpll3_ck_parent_names
, aes2_ick_ops
);
2367 static struct clk mspro_fck
;
2369 static struct clk_hw_omap mspro_fck_hw
= {
2373 .ops
= &clkhwops_wait
,
2374 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2375 .enable_bit
= OMAP3430_EN_MSPRO_SHIFT
,
2376 .clkdm_name
= "core_l4_clkdm",
2379 DEFINE_STRUCT_CLK(mspro_fck
, csi2_96m_fck_parent_names
, aes2_ick_ops
);
2381 static struct clk mspro_ick
;
2383 static struct clk_hw_omap mspro_ick_hw
= {
2387 .ops
= &clkhwops_iclk_wait
,
2388 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2389 .enable_bit
= OMAP3430_EN_MSPRO_SHIFT
,
2390 .clkdm_name
= "core_l4_clkdm",
2393 DEFINE_STRUCT_CLK(mspro_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2395 static struct clk omap_192m_alwon_fck
;
2397 DEFINE_STRUCT_CLK_HW_OMAP(omap_192m_alwon_fck
, NULL
);
2398 DEFINE_STRUCT_CLK(omap_192m_alwon_fck
, omap_96m_alwon_fck_parent_names
,
2401 static struct clk omap_32ksync_ick
;
2403 static struct clk_hw_omap omap_32ksync_ick_hw
= {
2405 .clk
= &omap_32ksync_ick
,
2407 .ops
= &clkhwops_iclk_wait
,
2408 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_ICLKEN
),
2409 .enable_bit
= OMAP3430_EN_32KSYNC_SHIFT
,
2410 .clkdm_name
= "wkup_clkdm",
2413 DEFINE_STRUCT_CLK(omap_32ksync_ick
, gpio1_ick_parent_names
, aes2_ick_ops
);
2415 static const struct clksel_rate omap_96m_alwon_fck_rates
[] = {
2416 { .div
= 1, .val
= 1, .flags
= RATE_IN_36XX
},
2417 { .div
= 2, .val
= 2, .flags
= RATE_IN_36XX
},
2421 static const struct clksel omap_96m_alwon_fck_clksel
[] = {
2422 { .parent
= &omap_192m_alwon_fck
, .rates
= omap_96m_alwon_fck_rates
},
2426 static struct clk omap_96m_alwon_fck_3630
;
2428 static const char *omap_96m_alwon_fck_3630_parent_names
[] = {
2429 "omap_192m_alwon_fck",
2432 static const struct clk_ops omap_96m_alwon_fck_3630_ops
= {
2433 .set_rate
= &omap2_clksel_set_rate
,
2434 .recalc_rate
= &omap2_clksel_recalc
,
2435 .round_rate
= &omap2_clksel_round_rate
,
2438 static struct clk_hw_omap omap_96m_alwon_fck_3630_hw
= {
2440 .clk
= &omap_96m_alwon_fck_3630
,
2442 .clksel
= omap_96m_alwon_fck_clksel
,
2443 .clksel_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
2444 .clksel_mask
= OMAP3630_CLKSEL_96M_MASK
,
2447 static struct clk omap_96m_alwon_fck_3630
= {
2448 .name
= "omap_96m_alwon_fck",
2449 .hw
= &omap_96m_alwon_fck_3630_hw
.hw
,
2450 .parent_names
= omap_96m_alwon_fck_3630_parent_names
,
2451 .num_parents
= ARRAY_SIZE(omap_96m_alwon_fck_3630_parent_names
),
2452 .ops
= &omap_96m_alwon_fck_3630_ops
,
2455 static struct clk omapctrl_ick
;
2457 static struct clk_hw_omap omapctrl_ick_hw
= {
2459 .clk
= &omapctrl_ick
,
2461 .ops
= &clkhwops_iclk_wait
,
2462 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2463 .enable_bit
= OMAP3430_EN_OMAPCTRL_SHIFT
,
2464 .flags
= ENABLE_ON_INIT
,
2465 .clkdm_name
= "core_l4_clkdm",
2468 DEFINE_STRUCT_CLK(omapctrl_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2470 DEFINE_CLK_DIVIDER(pclk_fck
, "emu_src_ck", &emu_src_ck
, 0x0,
2471 OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
2472 OMAP3430_CLKSEL_PCLK_SHIFT
, OMAP3430_CLKSEL_PCLK_WIDTH
,
2473 CLK_DIVIDER_ONE_BASED
, NULL
);
2475 DEFINE_CLK_DIVIDER(pclkx2_fck
, "emu_src_ck", &emu_src_ck
, 0x0,
2476 OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
2477 OMAP3430_CLKSEL_PCLKX2_SHIFT
, OMAP3430_CLKSEL_PCLKX2_WIDTH
,
2478 CLK_DIVIDER_ONE_BASED
, NULL
);
2480 static struct clk per_48m_fck
;
2482 DEFINE_STRUCT_CLK_HW_OMAP(per_48m_fck
, "per_clkdm");
2483 DEFINE_STRUCT_CLK(per_48m_fck
, core_48m_fck_parent_names
, core_l4_ick_ops
);
2485 static struct clk security_l3_ick
;
2487 DEFINE_STRUCT_CLK_HW_OMAP(security_l3_ick
, NULL
);
2488 DEFINE_STRUCT_CLK(security_l3_ick
, core_l3_ick_parent_names
, core_ck_ops
);
2490 static struct clk pka_ick
;
2492 static const char *pka_ick_parent_names
[] = {
2496 static struct clk_hw_omap pka_ick_hw
= {
2500 .ops
= &clkhwops_iclk_wait
,
2501 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN2
),
2502 .enable_bit
= OMAP3430_EN_PKA_SHIFT
,
2505 DEFINE_STRUCT_CLK(pka_ick
, pka_ick_parent_names
, aes1_ick_ops
);
2507 DEFINE_CLK_DIVIDER(rm_ick
, "l4_ick", &l4_ick
, 0x0,
2508 OMAP_CM_REGADDR(WKUP_MOD
, CM_CLKSEL
),
2509 OMAP3430_CLKSEL_RM_SHIFT
, OMAP3430_CLKSEL_RM_WIDTH
,
2510 CLK_DIVIDER_ONE_BASED
, NULL
);
2512 static struct clk rng_ick
;
2514 static struct clk_hw_omap rng_ick_hw
= {
2518 .ops
= &clkhwops_iclk_wait
,
2519 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN2
),
2520 .enable_bit
= OMAP3430_EN_RNG_SHIFT
,
2523 DEFINE_STRUCT_CLK(rng_ick
, aes1_ick_parent_names
, aes1_ick_ops
);
2525 static struct clk sad2d_ick
;
2527 static struct clk_hw_omap sad2d_ick_hw
= {
2531 .ops
= &clkhwops_iclk_wait
,
2532 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2533 .enable_bit
= OMAP3430_EN_SAD2D_SHIFT
,
2534 .clkdm_name
= "d2d_clkdm",
2537 DEFINE_STRUCT_CLK(sad2d_ick
, core_l3_ick_parent_names
, aes2_ick_ops
);
2539 static struct clk sdrc_ick
;
2541 static struct clk_hw_omap sdrc_ick_hw
= {
2545 .ops
= &clkhwops_wait
,
2546 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2547 .enable_bit
= OMAP3430_EN_SDRC_SHIFT
,
2548 .flags
= ENABLE_ON_INIT
,
2549 .clkdm_name
= "core_l3_clkdm",
2552 DEFINE_STRUCT_CLK(sdrc_ick
, ipss_ick_parent_names
, aes2_ick_ops
);
2554 static const struct clksel_rate sgx_core_rates
[] = {
2555 { .div
= 2, .val
= 5, .flags
= RATE_IN_36XX
},
2556 { .div
= 3, .val
= 0, .flags
= RATE_IN_3XXX
},
2557 { .div
= 4, .val
= 1, .flags
= RATE_IN_3XXX
},
2558 { .div
= 6, .val
= 2, .flags
= RATE_IN_3XXX
},
2562 static const struct clksel_rate sgx_96m_rates
[] = {
2563 { .div
= 1, .val
= 3, .flags
= RATE_IN_3XXX
},
2567 static const struct clksel_rate sgx_192m_rates
[] = {
2568 { .div
= 1, .val
= 4, .flags
= RATE_IN_36XX
},
2572 static const struct clksel_rate sgx_corex2_rates
[] = {
2573 { .div
= 3, .val
= 6, .flags
= RATE_IN_36XX
},
2574 { .div
= 5, .val
= 7, .flags
= RATE_IN_36XX
},
2578 static const struct clksel sgx_clksel
[] = {
2579 { .parent
= &core_ck
, .rates
= sgx_core_rates
},
2580 { .parent
= &cm_96m_fck
, .rates
= sgx_96m_rates
},
2581 { .parent
= &omap_192m_alwon_fck
, .rates
= sgx_192m_rates
},
2582 { .parent
= &corex2_fck
, .rates
= sgx_corex2_rates
},
2586 static const char *sgx_fck_parent_names
[] = {
2587 "core_ck", "cm_96m_fck", "omap_192m_alwon_fck", "corex2_fck",
2590 static struct clk sgx_fck
;
2592 static const struct clk_ops sgx_fck_ops
= {
2593 .init
= &omap2_init_clk_clkdm
,
2594 .enable
= &omap2_dflt_clk_enable
,
2595 .disable
= &omap2_dflt_clk_disable
,
2596 .is_enabled
= &omap2_dflt_clk_is_enabled
,
2597 .recalc_rate
= &omap2_clksel_recalc
,
2598 .set_rate
= &omap2_clksel_set_rate
,
2599 .round_rate
= &omap2_clksel_round_rate
,
2600 .get_parent
= &omap2_clksel_find_parent_index
,
2601 .set_parent
= &omap2_clksel_set_parent
,
2604 DEFINE_CLK_OMAP_MUX_GATE(sgx_fck
, "sgx_clkdm", sgx_clksel
,
2605 OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD
, CM_CLKSEL
),
2606 OMAP3430ES2_CLKSEL_SGX_MASK
,
2607 OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD
, CM_FCLKEN
),
2608 OMAP3430ES2_CM_FCLKEN_SGX_EN_SGX_SHIFT
,
2609 &clkhwops_wait
, sgx_fck_parent_names
, sgx_fck_ops
);
2611 static struct clk sgx_ick
;
2613 static struct clk_hw_omap sgx_ick_hw
= {
2617 .ops
= &clkhwops_wait
,
2618 .enable_reg
= OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD
, CM_ICLKEN
),
2619 .enable_bit
= OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT
,
2620 .clkdm_name
= "sgx_clkdm",
2623 DEFINE_STRUCT_CLK(sgx_ick
, core_l3_ick_parent_names
, aes2_ick_ops
);
2625 static struct clk sha11_ick
;
2627 static struct clk_hw_omap sha11_ick_hw
= {
2631 .ops
= &clkhwops_iclk_wait
,
2632 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN2
),
2633 .enable_bit
= OMAP3430_EN_SHA11_SHIFT
,
2636 DEFINE_STRUCT_CLK(sha11_ick
, aes1_ick_parent_names
, aes1_ick_ops
);
2638 static struct clk sha12_ick
;
2640 static struct clk_hw_omap sha12_ick_hw
= {
2644 .ops
= &clkhwops_iclk_wait
,
2645 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2646 .enable_bit
= OMAP3430_EN_SHA12_SHIFT
,
2647 .clkdm_name
= "core_l4_clkdm",
2650 DEFINE_STRUCT_CLK(sha12_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2652 static struct clk sr1_fck
;
2654 static struct clk_hw_omap sr1_fck_hw
= {
2658 .ops
= &clkhwops_wait
,
2659 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_FCLKEN
),
2660 .enable_bit
= OMAP3430_EN_SR1_SHIFT
,
2661 .clkdm_name
= "wkup_clkdm",
2664 DEFINE_STRUCT_CLK(sr1_fck
, dpll3_ck_parent_names
, aes2_ick_ops
);
2666 static struct clk sr2_fck
;
2668 static struct clk_hw_omap sr2_fck_hw
= {
2672 .ops
= &clkhwops_wait
,
2673 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_FCLKEN
),
2674 .enable_bit
= OMAP3430_EN_SR2_SHIFT
,
2675 .clkdm_name
= "wkup_clkdm",
2678 DEFINE_STRUCT_CLK(sr2_fck
, dpll3_ck_parent_names
, aes2_ick_ops
);
2680 static struct clk sr_l4_ick
;
2682 DEFINE_STRUCT_CLK_HW_OMAP(sr_l4_ick
, "core_l4_clkdm");
2683 DEFINE_STRUCT_CLK(sr_l4_ick
, security_l4_ick2_parent_names
, core_l4_ick_ops
);
2685 static struct clk ssi_l4_ick
;
2687 DEFINE_STRUCT_CLK_HW_OMAP(ssi_l4_ick
, "core_l4_clkdm");
2688 DEFINE_STRUCT_CLK(ssi_l4_ick
, security_l4_ick2_parent_names
, core_l4_ick_ops
);
2690 static struct clk ssi_ick_3430es1
;
2692 static const char *ssi_ick_3430es1_parent_names
[] = {
2696 static struct clk_hw_omap ssi_ick_3430es1_hw
= {
2698 .clk
= &ssi_ick_3430es1
,
2700 .ops
= &clkhwops_iclk
,
2701 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2702 .enable_bit
= OMAP3430_EN_SSI_SHIFT
,
2703 .clkdm_name
= "core_l4_clkdm",
2706 DEFINE_STRUCT_CLK(ssi_ick_3430es1
, ssi_ick_3430es1_parent_names
, aes2_ick_ops
);
2708 static struct clk ssi_ick_3430es2
;
2710 static struct clk_hw_omap ssi_ick_3430es2_hw
= {
2712 .clk
= &ssi_ick_3430es2
,
2714 .ops
= &clkhwops_omap3430es2_iclk_ssi_wait
,
2715 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2716 .enable_bit
= OMAP3430_EN_SSI_SHIFT
,
2717 .clkdm_name
= "core_l4_clkdm",
2720 DEFINE_STRUCT_CLK(ssi_ick_3430es2
, ssi_ick_3430es1_parent_names
, aes2_ick_ops
);
2722 static const struct clksel_rate ssi_ssr_corex2_rates
[] = {
2723 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
2724 { .div
= 2, .val
= 2, .flags
= RATE_IN_3XXX
},
2725 { .div
= 3, .val
= 3, .flags
= RATE_IN_3XXX
},
2726 { .div
= 4, .val
= 4, .flags
= RATE_IN_3XXX
},
2727 { .div
= 6, .val
= 6, .flags
= RATE_IN_3XXX
},
2728 { .div
= 8, .val
= 8, .flags
= RATE_IN_3XXX
},
2732 static const struct clksel ssi_ssr_clksel
[] = {
2733 { .parent
= &corex2_fck
, .rates
= ssi_ssr_corex2_rates
},
2737 static const char *ssi_ssr_fck_3430es1_parent_names
[] = {
2741 static const struct clk_ops ssi_ssr_fck_3430es1_ops
= {
2742 .init
= &omap2_init_clk_clkdm
,
2743 .enable
= &omap2_dflt_clk_enable
,
2744 .disable
= &omap2_dflt_clk_disable
,
2745 .is_enabled
= &omap2_dflt_clk_is_enabled
,
2746 .recalc_rate
= &omap2_clksel_recalc
,
2747 .set_rate
= &omap2_clksel_set_rate
,
2748 .round_rate
= &omap2_clksel_round_rate
,
2751 DEFINE_CLK_OMAP_MUX_GATE(ssi_ssr_fck_3430es1
, "core_l4_clkdm",
2752 ssi_ssr_clksel
, OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
2753 OMAP3430_CLKSEL_SSI_MASK
,
2754 OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2755 OMAP3430_EN_SSI_SHIFT
,
2756 NULL
, ssi_ssr_fck_3430es1_parent_names
,
2757 ssi_ssr_fck_3430es1_ops
);
2759 DEFINE_CLK_OMAP_MUX_GATE(ssi_ssr_fck_3430es2
, "core_l4_clkdm",
2760 ssi_ssr_clksel
, OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
2761 OMAP3430_CLKSEL_SSI_MASK
,
2762 OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2763 OMAP3430_EN_SSI_SHIFT
,
2764 NULL
, ssi_ssr_fck_3430es1_parent_names
,
2765 ssi_ssr_fck_3430es1_ops
);
2767 DEFINE_CLK_FIXED_FACTOR(ssi_sst_fck_3430es1
, "ssi_ssr_fck_3430es1",
2768 &ssi_ssr_fck_3430es1
, 0x0, 1, 2);
2770 DEFINE_CLK_FIXED_FACTOR(ssi_sst_fck_3430es2
, "ssi_ssr_fck_3430es2",
2771 &ssi_ssr_fck_3430es2
, 0x0, 1, 2);
2773 static struct clk sys_clkout1
;
2775 static const char *sys_clkout1_parent_names
[] = {
2779 static struct clk_hw_omap sys_clkout1_hw
= {
2781 .clk
= &sys_clkout1
,
2783 .enable_reg
= OMAP3430_PRM_CLKOUT_CTRL
,
2784 .enable_bit
= OMAP3430_CLKOUT_EN_SHIFT
,
2787 DEFINE_STRUCT_CLK(sys_clkout1
, sys_clkout1_parent_names
, aes1_ick_ops
);
2789 DEFINE_CLK_DIVIDER(sys_clkout2
, "clkout2_src_ck", &clkout2_src_ck
, 0x0,
2790 OMAP3430_CM_CLKOUT_CTRL
, OMAP3430_CLKOUT2_DIV_SHIFT
,
2791 OMAP3430_CLKOUT2_DIV_WIDTH
, CLK_DIVIDER_POWER_OF_TWO
, NULL
);
2793 DEFINE_CLK_MUX(traceclk_src_fck
, emu_src_ck_parent_names
, NULL
, 0x0,
2794 OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
2795 OMAP3430_TRACE_MUX_CTRL_SHIFT
, OMAP3430_TRACE_MUX_CTRL_WIDTH
,
2798 DEFINE_CLK_DIVIDER(traceclk_fck
, "traceclk_src_fck", &traceclk_src_fck
, 0x0,
2799 OMAP_CM_REGADDR(OMAP3430_EMU_MOD
, CM_CLKSEL1
),
2800 OMAP3430_CLKSEL_TRACECLK_SHIFT
,
2801 OMAP3430_CLKSEL_TRACECLK_WIDTH
, CLK_DIVIDER_ONE_BASED
, NULL
);
2803 static struct clk ts_fck
;
2805 static struct clk_hw_omap ts_fck_hw
= {
2809 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, OMAP3430ES2_CM_FCLKEN3
),
2810 .enable_bit
= OMAP3430ES2_EN_TS_SHIFT
,
2811 .clkdm_name
= "core_l4_clkdm",
2814 DEFINE_STRUCT_CLK(ts_fck
, wkup_32k_fck_parent_names
, aes2_ick_ops
);
2816 static struct clk uart1_fck
;
2818 static struct clk_hw_omap uart1_fck_hw
= {
2822 .ops
= &clkhwops_wait
,
2823 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2824 .enable_bit
= OMAP3430_EN_UART1_SHIFT
,
2825 .clkdm_name
= "core_l4_clkdm",
2828 DEFINE_STRUCT_CLK(uart1_fck
, fshostusb_fck_parent_names
, aes2_ick_ops
);
2830 static struct clk uart1_ick
;
2832 static struct clk_hw_omap uart1_ick_hw
= {
2836 .ops
= &clkhwops_iclk_wait
,
2837 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2838 .enable_bit
= OMAP3430_EN_UART1_SHIFT
,
2839 .clkdm_name
= "core_l4_clkdm",
2842 DEFINE_STRUCT_CLK(uart1_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2844 static struct clk uart2_fck
;
2846 static struct clk_hw_omap uart2_fck_hw
= {
2850 .ops
= &clkhwops_wait
,
2851 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2852 .enable_bit
= OMAP3430_EN_UART2_SHIFT
,
2853 .clkdm_name
= "core_l4_clkdm",
2856 DEFINE_STRUCT_CLK(uart2_fck
, fshostusb_fck_parent_names
, aes2_ick_ops
);
2858 static struct clk uart2_ick
;
2860 static struct clk_hw_omap uart2_ick_hw
= {
2864 .ops
= &clkhwops_iclk_wait
,
2865 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2866 .enable_bit
= OMAP3430_EN_UART2_SHIFT
,
2867 .clkdm_name
= "core_l4_clkdm",
2870 DEFINE_STRUCT_CLK(uart2_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
2872 static struct clk uart3_fck
;
2874 static const char *uart3_fck_parent_names
[] = {
2878 static struct clk_hw_omap uart3_fck_hw
= {
2882 .ops
= &clkhwops_wait
,
2883 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2884 .enable_bit
= OMAP3430_EN_UART3_SHIFT
,
2885 .clkdm_name
= "per_clkdm",
2888 DEFINE_STRUCT_CLK(uart3_fck
, uart3_fck_parent_names
, aes2_ick_ops
);
2890 static struct clk uart3_ick
;
2892 static struct clk_hw_omap uart3_ick_hw
= {
2896 .ops
= &clkhwops_iclk_wait
,
2897 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2898 .enable_bit
= OMAP3430_EN_UART3_SHIFT
,
2899 .clkdm_name
= "per_clkdm",
2902 DEFINE_STRUCT_CLK(uart3_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
2904 static struct clk uart4_fck
;
2906 static struct clk_hw_omap uart4_fck_hw
= {
2910 .ops
= &clkhwops_wait
,
2911 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
2912 .enable_bit
= OMAP3630_EN_UART4_SHIFT
,
2913 .clkdm_name
= "per_clkdm",
2916 DEFINE_STRUCT_CLK(uart4_fck
, uart3_fck_parent_names
, aes2_ick_ops
);
2918 static struct clk uart4_fck_am35xx
;
2920 static struct clk_hw_omap uart4_fck_am35xx_hw
= {
2922 .clk
= &uart4_fck_am35xx
,
2924 .ops
= &clkhwops_wait
,
2925 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_FCLKEN1
),
2926 .enable_bit
= AM35XX_EN_UART4_SHIFT
,
2927 .clkdm_name
= "core_l4_clkdm",
2930 DEFINE_STRUCT_CLK(uart4_fck_am35xx
, fshostusb_fck_parent_names
, aes2_ick_ops
);
2932 static struct clk uart4_ick
;
2934 static struct clk_hw_omap uart4_ick_hw
= {
2938 .ops
= &clkhwops_iclk_wait
,
2939 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
2940 .enable_bit
= OMAP3630_EN_UART4_SHIFT
,
2941 .clkdm_name
= "per_clkdm",
2944 DEFINE_STRUCT_CLK(uart4_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
2946 static struct clk uart4_ick_am35xx
;
2948 static struct clk_hw_omap uart4_ick_am35xx_hw
= {
2950 .clk
= &uart4_ick_am35xx
,
2952 .ops
= &clkhwops_iclk_wait
,
2953 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2954 .enable_bit
= AM35XX_EN_UART4_SHIFT
,
2955 .clkdm_name
= "core_l4_clkdm",
2958 DEFINE_STRUCT_CLK(uart4_ick_am35xx
, aes2_ick_parent_names
, aes2_ick_ops
);
2960 static const struct clksel_rate div2_rates
[] = {
2961 { .div
= 1, .val
= 1, .flags
= RATE_IN_3XXX
},
2962 { .div
= 2, .val
= 2, .flags
= RATE_IN_3XXX
},
2966 static const struct clksel usb_l4_clksel
[] = {
2967 { .parent
= &l4_ick
, .rates
= div2_rates
},
2971 static const char *usb_l4_ick_parent_names
[] = {
2975 DEFINE_CLK_OMAP_MUX_GATE(usb_l4_ick
, "core_l4_clkdm", usb_l4_clksel
,
2976 OMAP_CM_REGADDR(CORE_MOD
, CM_CLKSEL
),
2977 OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK
,
2978 OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN1
),
2979 OMAP3430ES1_EN_FSHOSTUSB_SHIFT
,
2980 &clkhwops_iclk_wait
, usb_l4_ick_parent_names
,
2981 ssi_ssr_fck_3430es1_ops
);
2983 static struct clk usbhost_120m_fck
;
2985 static const char *usbhost_120m_fck_parent_names
[] = {
2989 static struct clk_hw_omap usbhost_120m_fck_hw
= {
2991 .clk
= &usbhost_120m_fck
,
2993 .enable_reg
= OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD
, CM_FCLKEN
),
2994 .enable_bit
= OMAP3430ES2_EN_USBHOST2_SHIFT
,
2995 .clkdm_name
= "usbhost_clkdm",
2998 DEFINE_STRUCT_CLK(usbhost_120m_fck
, usbhost_120m_fck_parent_names
,
3001 static struct clk usbhost_48m_fck
;
3003 static struct clk_hw_omap usbhost_48m_fck_hw
= {
3005 .clk
= &usbhost_48m_fck
,
3007 .ops
= &clkhwops_omap3430es2_dss_usbhost_wait
,
3008 .enable_reg
= OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD
, CM_FCLKEN
),
3009 .enable_bit
= OMAP3430ES2_EN_USBHOST1_SHIFT
,
3010 .clkdm_name
= "usbhost_clkdm",
3013 DEFINE_STRUCT_CLK(usbhost_48m_fck
, core_48m_fck_parent_names
, aes2_ick_ops
);
3015 static struct clk usbhost_ick
;
3017 static struct clk_hw_omap usbhost_ick_hw
= {
3019 .clk
= &usbhost_ick
,
3021 .ops
= &clkhwops_omap3430es2_iclk_dss_usbhost_wait
,
3022 .enable_reg
= OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD
, CM_ICLKEN
),
3023 .enable_bit
= OMAP3430ES2_EN_USBHOST_SHIFT
,
3024 .clkdm_name
= "usbhost_clkdm",
3027 DEFINE_STRUCT_CLK(usbhost_ick
, security_l4_ick2_parent_names
, aes2_ick_ops
);
3029 static struct clk usbtll_fck
;
3031 static struct clk_hw_omap usbtll_fck_hw
= {
3035 .ops
= &clkhwops_wait
,
3036 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, OMAP3430ES2_CM_FCLKEN3
),
3037 .enable_bit
= OMAP3430ES2_EN_USBTLL_SHIFT
,
3038 .clkdm_name
= "core_l4_clkdm",
3041 DEFINE_STRUCT_CLK(usbtll_fck
, usbhost_120m_fck_parent_names
, aes2_ick_ops
);
3043 static struct clk usbtll_ick
;
3045 static struct clk_hw_omap usbtll_ick_hw
= {
3049 .ops
= &clkhwops_iclk_wait
,
3050 .enable_reg
= OMAP_CM_REGADDR(CORE_MOD
, CM_ICLKEN3
),
3051 .enable_bit
= OMAP3430ES2_EN_USBTLL_SHIFT
,
3052 .clkdm_name
= "core_l4_clkdm",
3055 DEFINE_STRUCT_CLK(usbtll_ick
, aes2_ick_parent_names
, aes2_ick_ops
);
3057 static const struct clksel_rate usim_96m_rates
[] = {
3058 { .div
= 2, .val
= 3, .flags
= RATE_IN_3XXX
},
3059 { .div
= 4, .val
= 4, .flags
= RATE_IN_3XXX
},
3060 { .div
= 8, .val
= 5, .flags
= RATE_IN_3XXX
},
3061 { .div
= 10, .val
= 6, .flags
= RATE_IN_3XXX
},
3065 static const struct clksel_rate usim_120m_rates
[] = {
3066 { .div
= 4, .val
= 7, .flags
= RATE_IN_3XXX
},
3067 { .div
= 8, .val
= 8, .flags
= RATE_IN_3XXX
},
3068 { .div
= 16, .val
= 9, .flags
= RATE_IN_3XXX
},
3069 { .div
= 20, .val
= 10, .flags
= RATE_IN_3XXX
},
3073 static const struct clksel usim_clksel
[] = {
3074 { .parent
= &omap_96m_fck
, .rates
= usim_96m_rates
},
3075 { .parent
= &dpll5_m2_ck
, .rates
= usim_120m_rates
},
3076 { .parent
= &sys_ck
, .rates
= div2_rates
},
3080 static const char *usim_fck_parent_names
[] = {
3081 "omap_96m_fck", "dpll5_m2_ck", "sys_ck",
3084 static struct clk usim_fck
;
3086 static const struct clk_ops usim_fck_ops
= {
3087 .enable
= &omap2_dflt_clk_enable
,
3088 .disable
= &omap2_dflt_clk_disable
,
3089 .is_enabled
= &omap2_dflt_clk_is_enabled
,
3090 .recalc_rate
= &omap2_clksel_recalc
,
3091 .get_parent
= &omap2_clksel_find_parent_index
,
3092 .set_parent
= &omap2_clksel_set_parent
,
3095 DEFINE_CLK_OMAP_MUX_GATE(usim_fck
, NULL
, usim_clksel
,
3096 OMAP_CM_REGADDR(WKUP_MOD
, CM_CLKSEL
),
3097 OMAP3430ES2_CLKSEL_USIMOCP_MASK
,
3098 OMAP_CM_REGADDR(WKUP_MOD
, CM_FCLKEN
),
3099 OMAP3430ES2_EN_USIMOCP_SHIFT
, &clkhwops_wait
,
3100 usim_fck_parent_names
, usim_fck_ops
);
3102 static struct clk usim_ick
;
3104 static struct clk_hw_omap usim_ick_hw
= {
3108 .ops
= &clkhwops_iclk_wait
,
3109 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_ICLKEN
),
3110 .enable_bit
= OMAP3430ES2_EN_USIMOCP_SHIFT
,
3111 .clkdm_name
= "wkup_clkdm",
3114 DEFINE_STRUCT_CLK(usim_ick
, gpio1_ick_parent_names
, aes2_ick_ops
);
3116 static struct clk vpfe_fck
;
3118 static const char *vpfe_fck_parent_names
[] = {
3122 static struct clk_hw_omap vpfe_fck_hw
= {
3126 .enable_reg
= OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL
),
3127 .enable_bit
= AM35XX_VPFE_FCLK_SHIFT
,
3130 DEFINE_STRUCT_CLK(vpfe_fck
, vpfe_fck_parent_names
, aes1_ick_ops
);
3132 static struct clk vpfe_ick
;
3134 static struct clk_hw_omap vpfe_ick_hw
= {
3138 .ops
= &clkhwops_am35xx_ipss_module_wait
,
3139 .enable_reg
= OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL
),
3140 .enable_bit
= AM35XX_VPFE_VBUSP_CLK_SHIFT
,
3141 .clkdm_name
= "core_l3_clkdm",
3144 DEFINE_STRUCT_CLK(vpfe_ick
, emac_ick_parent_names
, aes2_ick_ops
);
3146 static struct clk wdt1_fck
;
3148 DEFINE_STRUCT_CLK_HW_OMAP(wdt1_fck
, "wkup_clkdm");
3149 DEFINE_STRUCT_CLK(wdt1_fck
, gpt12_fck_parent_names
, core_l4_ick_ops
);
3151 static struct clk wdt1_ick
;
3153 static struct clk_hw_omap wdt1_ick_hw
= {
3157 .ops
= &clkhwops_iclk_wait
,
3158 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_ICLKEN
),
3159 .enable_bit
= OMAP3430_EN_WDT1_SHIFT
,
3160 .clkdm_name
= "wkup_clkdm",
3163 DEFINE_STRUCT_CLK(wdt1_ick
, gpio1_ick_parent_names
, aes2_ick_ops
);
3165 static struct clk wdt2_fck
;
3167 static struct clk_hw_omap wdt2_fck_hw
= {
3171 .ops
= &clkhwops_wait
,
3172 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_FCLKEN
),
3173 .enable_bit
= OMAP3430_EN_WDT2_SHIFT
,
3174 .clkdm_name
= "wkup_clkdm",
3177 DEFINE_STRUCT_CLK(wdt2_fck
, gpio1_dbck_parent_names
, aes2_ick_ops
);
3179 static struct clk wdt2_ick
;
3181 static struct clk_hw_omap wdt2_ick_hw
= {
3185 .ops
= &clkhwops_iclk_wait
,
3186 .enable_reg
= OMAP_CM_REGADDR(WKUP_MOD
, CM_ICLKEN
),
3187 .enable_bit
= OMAP3430_EN_WDT2_SHIFT
,
3188 .clkdm_name
= "wkup_clkdm",
3191 DEFINE_STRUCT_CLK(wdt2_ick
, gpio1_ick_parent_names
, aes2_ick_ops
);
3193 static struct clk wdt3_fck
;
3195 static struct clk_hw_omap wdt3_fck_hw
= {
3199 .ops
= &clkhwops_wait
,
3200 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_FCLKEN
),
3201 .enable_bit
= OMAP3430_EN_WDT3_SHIFT
,
3202 .clkdm_name
= "per_clkdm",
3205 DEFINE_STRUCT_CLK(wdt3_fck
, gpio2_dbck_parent_names
, aes2_ick_ops
);
3207 static struct clk wdt3_ick
;
3209 static struct clk_hw_omap wdt3_ick_hw
= {
3213 .ops
= &clkhwops_iclk_wait
,
3214 .enable_reg
= OMAP_CM_REGADDR(OMAP3430_PER_MOD
, CM_ICLKEN
),
3215 .enable_bit
= OMAP3430_EN_WDT3_SHIFT
,
3216 .clkdm_name
= "per_clkdm",
3219 DEFINE_STRUCT_CLK(wdt3_ick
, gpio2_ick_parent_names
, aes2_ick_ops
);
3222 * clocks specific to omap3430es1
3224 static struct omap_clk omap3430es1_clks
[] = {
3225 CLK(NULL
, "gfx_l3_ck", &gfx_l3_ck
),
3226 CLK(NULL
, "gfx_l3_fck", &gfx_l3_fck
),
3227 CLK(NULL
, "gfx_l3_ick", &gfx_l3_ick
),
3228 CLK(NULL
, "gfx_cg1_ck", &gfx_cg1_ck
),
3229 CLK(NULL
, "gfx_cg2_ck", &gfx_cg2_ck
),
3230 CLK(NULL
, "d2d_26m_fck", &d2d_26m_fck
),
3231 CLK(NULL
, "fshostusb_fck", &fshostusb_fck
),
3232 CLK(NULL
, "ssi_ssr_fck", &ssi_ssr_fck_3430es1
),
3233 CLK(NULL
, "ssi_sst_fck", &ssi_sst_fck_3430es1
),
3234 CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es1
),
3235 CLK(NULL
, "hsotgusb_ick", &hsotgusb_ick_3430es1
),
3236 CLK(NULL
, "fac_ick", &fac_ick
),
3237 CLK(NULL
, "ssi_ick", &ssi_ick_3430es1
),
3238 CLK(NULL
, "usb_l4_ick", &usb_l4_ick
),
3239 CLK(NULL
, "dss1_alwon_fck", &dss1_alwon_fck_3430es1
),
3240 CLK("omapdss_dss", "ick", &dss_ick_3430es1
),
3241 CLK(NULL
, "dss_ick", &dss_ick_3430es1
),
3245 * clocks specific to am35xx
3247 static struct omap_clk am35xx_clks
[] = {
3248 CLK(NULL
, "ipss_ick", &ipss_ick
),
3249 CLK(NULL
, "rmii_ck", &rmii_ck
),
3250 CLK(NULL
, "pclk_ck", &pclk_ck
),
3251 CLK(NULL
, "emac_ick", &emac_ick
),
3252 CLK(NULL
, "emac_fck", &emac_fck
),
3253 CLK("davinci_emac.0", NULL
, &emac_ick
),
3254 CLK("davinci_mdio.0", NULL
, &emac_fck
),
3255 CLK("vpfe-capture", "master", &vpfe_ick
),
3256 CLK("vpfe-capture", "slave", &vpfe_fck
),
3257 CLK(NULL
, "hsotgusb_ick", &hsotgusb_ick_am35xx
),
3258 CLK(NULL
, "hsotgusb_fck", &hsotgusb_fck_am35xx
),
3259 CLK(NULL
, "hecc_ck", &hecc_ck
),
3260 CLK(NULL
, "uart4_ick", &uart4_ick_am35xx
),
3261 CLK(NULL
, "uart4_fck", &uart4_fck_am35xx
),
3265 * clocks specific to omap36xx
3267 static struct omap_clk omap36xx_clks
[] = {
3268 CLK(NULL
, "omap_192m_alwon_fck", &omap_192m_alwon_fck
),
3269 CLK(NULL
, "uart4_fck", &uart4_fck
),
3273 * clocks common to omap36xx omap34xx
3275 static struct omap_clk omap34xx_omap36xx_clks
[] = {
3276 CLK(NULL
, "aes1_ick", &aes1_ick
),
3277 CLK("omap_rng", "ick", &rng_ick
),
3278 CLK("omap3-rom-rng", "ick", &rng_ick
),
3279 CLK(NULL
, "sha11_ick", &sha11_ick
),
3280 CLK(NULL
, "des1_ick", &des1_ick
),
3281 CLK(NULL
, "cam_mclk", &cam_mclk
),
3282 CLK(NULL
, "cam_ick", &cam_ick
),
3283 CLK(NULL
, "csi2_96m_fck", &csi2_96m_fck
),
3284 CLK(NULL
, "security_l3_ick", &security_l3_ick
),
3285 CLK(NULL
, "pka_ick", &pka_ick
),
3286 CLK(NULL
, "icr_ick", &icr_ick
),
3287 CLK("omap-aes", "ick", &aes2_ick
),
3288 CLK("omap-sham", "ick", &sha12_ick
),
3289 CLK(NULL
, "des2_ick", &des2_ick
),
3290 CLK(NULL
, "mspro_ick", &mspro_ick
),
3291 CLK(NULL
, "mailboxes_ick", &mailboxes_ick
),
3292 CLK(NULL
, "ssi_l4_ick", &ssi_l4_ick
),
3293 CLK(NULL
, "sr1_fck", &sr1_fck
),
3294 CLK(NULL
, "sr2_fck", &sr2_fck
),
3295 CLK(NULL
, "sr_l4_ick", &sr_l4_ick
),
3296 CLK(NULL
, "security_l4_ick2", &security_l4_ick2
),
3297 CLK(NULL
, "wkup_l4_ick", &wkup_l4_ick
),
3298 CLK(NULL
, "dpll2_fck", &dpll2_fck
),
3299 CLK(NULL
, "iva2_ck", &iva2_ck
),
3300 CLK(NULL
, "modem_fck", &modem_fck
),
3301 CLK(NULL
, "sad2d_ick", &sad2d_ick
),
3302 CLK(NULL
, "mad2d_ick", &mad2d_ick
),
3303 CLK(NULL
, "mspro_fck", &mspro_fck
),
3304 CLK(NULL
, "dpll2_ck", &dpll2_ck
),
3305 CLK(NULL
, "dpll2_m2_ck", &dpll2_m2_ck
),
3309 * clocks common to omap36xx and omap3430es2plus
3311 static struct omap_clk omap36xx_omap3430es2plus_clks
[] = {
3312 CLK(NULL
, "ssi_ssr_fck", &ssi_ssr_fck_3430es2
),
3313 CLK(NULL
, "ssi_sst_fck", &ssi_sst_fck_3430es2
),
3314 CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es2
),
3315 CLK(NULL
, "hsotgusb_ick", &hsotgusb_ick_3430es2
),
3316 CLK(NULL
, "ssi_ick", &ssi_ick_3430es2
),
3317 CLK(NULL
, "usim_fck", &usim_fck
),
3318 CLK(NULL
, "usim_ick", &usim_ick
),
3322 * clocks common to am35xx omap36xx and omap3430es2plus
3324 static struct omap_clk omap36xx_am35xx_omap3430es2plus_clks
[] = {
3325 CLK(NULL
, "virt_16_8m_ck", &virt_16_8m_ck
),
3326 CLK(NULL
, "dpll5_ck", &dpll5_ck
),
3327 CLK(NULL
, "dpll5_m2_ck", &dpll5_m2_ck
),
3328 CLK(NULL
, "sgx_fck", &sgx_fck
),
3329 CLK(NULL
, "sgx_ick", &sgx_ick
),
3330 CLK(NULL
, "cpefuse_fck", &cpefuse_fck
),
3331 CLK(NULL
, "ts_fck", &ts_fck
),
3332 CLK(NULL
, "usbtll_fck", &usbtll_fck
),
3333 CLK(NULL
, "usbtll_ick", &usbtll_ick
),
3334 CLK("omap_hsmmc.2", "ick", &mmchs3_ick
),
3335 CLK(NULL
, "mmchs3_ick", &mmchs3_ick
),
3336 CLK(NULL
, "mmchs3_fck", &mmchs3_fck
),
3337 CLK(NULL
, "dss1_alwon_fck", &dss1_alwon_fck_3430es2
),
3338 CLK("omapdss_dss", "ick", &dss_ick_3430es2
),
3339 CLK(NULL
, "dss_ick", &dss_ick_3430es2
),
3340 CLK(NULL
, "usbhost_120m_fck", &usbhost_120m_fck
),
3341 CLK(NULL
, "usbhost_48m_fck", &usbhost_48m_fck
),
3342 CLK(NULL
, "usbhost_ick", &usbhost_ick
),
3348 static struct omap_clk omap3xxx_clks
[] = {
3349 CLK(NULL
, "apb_pclk", &dummy_apb_pclk
),
3350 CLK(NULL
, "omap_32k_fck", &omap_32k_fck
),
3351 CLK(NULL
, "virt_12m_ck", &virt_12m_ck
),
3352 CLK(NULL
, "virt_13m_ck", &virt_13m_ck
),
3353 CLK(NULL
, "virt_19200000_ck", &virt_19200000_ck
),
3354 CLK(NULL
, "virt_26000000_ck", &virt_26000000_ck
),
3355 CLK(NULL
, "virt_38_4m_ck", &virt_38_4m_ck
),
3356 CLK(NULL
, "osc_sys_ck", &osc_sys_ck
),
3357 CLK("twl", "fck", &osc_sys_ck
),
3358 CLK(NULL
, "sys_ck", &sys_ck
),
3359 CLK(NULL
, "omap_96m_alwon_fck", &omap_96m_alwon_fck
),
3360 CLK("etb", "emu_core_alwon_ck", &emu_core_alwon_ck
),
3361 CLK(NULL
, "sys_altclk", &sys_altclk
),
3362 CLK(NULL
, "mcbsp_clks", &mcbsp_clks
),
3363 CLK(NULL
, "sys_clkout1", &sys_clkout1
),
3364 CLK(NULL
, "dpll1_ck", &dpll1_ck
),
3365 CLK(NULL
, "dpll1_x2_ck", &dpll1_x2_ck
),
3366 CLK(NULL
, "dpll1_x2m2_ck", &dpll1_x2m2_ck
),
3367 CLK(NULL
, "dpll3_ck", &dpll3_ck
),
3368 CLK(NULL
, "core_ck", &core_ck
),
3369 CLK(NULL
, "dpll3_x2_ck", &dpll3_x2_ck
),
3370 CLK(NULL
, "dpll3_m2_ck", &dpll3_m2_ck
),
3371 CLK(NULL
, "dpll3_m2x2_ck", &dpll3_m2x2_ck
),
3372 CLK(NULL
, "dpll3_m3_ck", &dpll3_m3_ck
),
3373 CLK(NULL
, "dpll3_m3x2_ck", &dpll3_m3x2_ck
),
3374 CLK(NULL
, "dpll4_ck", &dpll4_ck
),
3375 CLK(NULL
, "dpll4_x2_ck", &dpll4_x2_ck
),
3376 CLK(NULL
, "omap_96m_fck", &omap_96m_fck
),
3377 CLK(NULL
, "cm_96m_fck", &cm_96m_fck
),
3378 CLK(NULL
, "omap_54m_fck", &omap_54m_fck
),
3379 CLK(NULL
, "omap_48m_fck", &omap_48m_fck
),
3380 CLK(NULL
, "omap_12m_fck", &omap_12m_fck
),
3381 CLK(NULL
, "dpll4_m2_ck", &dpll4_m2_ck
),
3382 CLK(NULL
, "dpll4_m2x2_ck", &dpll4_m2x2_ck
),
3383 CLK(NULL
, "dpll4_m3_ck", &dpll4_m3_ck
),
3384 CLK(NULL
, "dpll4_m3x2_ck", &dpll4_m3x2_ck
),
3385 CLK(NULL
, "dpll4_m4_ck", &dpll4_m4_ck
),
3386 CLK(NULL
, "dpll4_m4x2_ck", &dpll4_m4x2_ck
),
3387 CLK(NULL
, "dpll4_m5_ck", &dpll4_m5_ck
),
3388 CLK(NULL
, "dpll4_m5x2_ck", &dpll4_m5x2_ck
),
3389 CLK(NULL
, "dpll4_m6_ck", &dpll4_m6_ck
),
3390 CLK(NULL
, "dpll4_m6x2_ck", &dpll4_m6x2_ck
),
3391 CLK("etb", "emu_per_alwon_ck", &emu_per_alwon_ck
),
3392 CLK(NULL
, "clkout2_src_ck", &clkout2_src_ck
),
3393 CLK(NULL
, "sys_clkout2", &sys_clkout2
),
3394 CLK(NULL
, "corex2_fck", &corex2_fck
),
3395 CLK(NULL
, "dpll1_fck", &dpll1_fck
),
3396 CLK(NULL
, "mpu_ck", &mpu_ck
),
3397 CLK(NULL
, "arm_fck", &arm_fck
),
3398 CLK("etb", "emu_mpu_alwon_ck", &emu_mpu_alwon_ck
),
3399 CLK(NULL
, "l3_ick", &l3_ick
),
3400 CLK(NULL
, "l4_ick", &l4_ick
),
3401 CLK(NULL
, "rm_ick", &rm_ick
),
3402 CLK(NULL
, "gpt10_fck", &gpt10_fck
),
3403 CLK(NULL
, "gpt11_fck", &gpt11_fck
),
3404 CLK(NULL
, "core_96m_fck", &core_96m_fck
),
3405 CLK(NULL
, "mmchs2_fck", &mmchs2_fck
),
3406 CLK(NULL
, "mmchs1_fck", &mmchs1_fck
),
3407 CLK(NULL
, "i2c3_fck", &i2c3_fck
),
3408 CLK(NULL
, "i2c2_fck", &i2c2_fck
),
3409 CLK(NULL
, "i2c1_fck", &i2c1_fck
),
3410 CLK(NULL
, "mcbsp5_fck", &mcbsp5_fck
),
3411 CLK(NULL
, "mcbsp1_fck", &mcbsp1_fck
),
3412 CLK(NULL
, "core_48m_fck", &core_48m_fck
),
3413 CLK(NULL
, "mcspi4_fck", &mcspi4_fck
),
3414 CLK(NULL
, "mcspi3_fck", &mcspi3_fck
),
3415 CLK(NULL
, "mcspi2_fck", &mcspi2_fck
),
3416 CLK(NULL
, "mcspi1_fck", &mcspi1_fck
),
3417 CLK(NULL
, "uart2_fck", &uart2_fck
),
3418 CLK(NULL
, "uart1_fck", &uart1_fck
),
3419 CLK(NULL
, "core_12m_fck", &core_12m_fck
),
3420 CLK("omap_hdq.0", "fck", &hdq_fck
),
3421 CLK(NULL
, "hdq_fck", &hdq_fck
),
3422 CLK(NULL
, "core_l3_ick", &core_l3_ick
),
3423 CLK(NULL
, "sdrc_ick", &sdrc_ick
),
3424 CLK(NULL
, "gpmc_fck", &gpmc_fck
),
3425 CLK(NULL
, "core_l4_ick", &core_l4_ick
),
3426 CLK("omap_hsmmc.1", "ick", &mmchs2_ick
),
3427 CLK("omap_hsmmc.0", "ick", &mmchs1_ick
),
3428 CLK(NULL
, "mmchs2_ick", &mmchs2_ick
),
3429 CLK(NULL
, "mmchs1_ick", &mmchs1_ick
),
3430 CLK("omap_hdq.0", "ick", &hdq_ick
),
3431 CLK(NULL
, "hdq_ick", &hdq_ick
),
3432 CLK("omap2_mcspi.4", "ick", &mcspi4_ick
),
3433 CLK("omap2_mcspi.3", "ick", &mcspi3_ick
),
3434 CLK("omap2_mcspi.2", "ick", &mcspi2_ick
),
3435 CLK("omap2_mcspi.1", "ick", &mcspi1_ick
),
3436 CLK(NULL
, "mcspi4_ick", &mcspi4_ick
),
3437 CLK(NULL
, "mcspi3_ick", &mcspi3_ick
),
3438 CLK(NULL
, "mcspi2_ick", &mcspi2_ick
),
3439 CLK(NULL
, "mcspi1_ick", &mcspi1_ick
),
3440 CLK("omap_i2c.3", "ick", &i2c3_ick
),
3441 CLK("omap_i2c.2", "ick", &i2c2_ick
),
3442 CLK("omap_i2c.1", "ick", &i2c1_ick
),
3443 CLK(NULL
, "i2c3_ick", &i2c3_ick
),
3444 CLK(NULL
, "i2c2_ick", &i2c2_ick
),
3445 CLK(NULL
, "i2c1_ick", &i2c1_ick
),
3446 CLK(NULL
, "uart2_ick", &uart2_ick
),
3447 CLK(NULL
, "uart1_ick", &uart1_ick
),
3448 CLK(NULL
, "gpt11_ick", &gpt11_ick
),
3449 CLK(NULL
, "gpt10_ick", &gpt10_ick
),
3450 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick
),
3451 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick
),
3452 CLK(NULL
, "mcbsp5_ick", &mcbsp5_ick
),
3453 CLK(NULL
, "mcbsp1_ick", &mcbsp1_ick
),
3454 CLK(NULL
, "omapctrl_ick", &omapctrl_ick
),
3455 CLK(NULL
, "dss_tv_fck", &dss_tv_fck
),
3456 CLK(NULL
, "dss_96m_fck", &dss_96m_fck
),
3457 CLK(NULL
, "dss2_alwon_fck", &dss2_alwon_fck
),
3458 CLK(NULL
, "utmi_p1_gfclk", &dummy_ck
),
3459 CLK(NULL
, "utmi_p2_gfclk", &dummy_ck
),
3460 CLK(NULL
, "xclk60mhsp1_ck", &dummy_ck
),
3461 CLK(NULL
, "xclk60mhsp2_ck", &dummy_ck
),
3462 CLK(NULL
, "init_60m_fclk", &dummy_ck
),
3463 CLK(NULL
, "gpt1_fck", &gpt1_fck
),
3464 CLK(NULL
, "aes2_ick", &aes2_ick
),
3465 CLK(NULL
, "wkup_32k_fck", &wkup_32k_fck
),
3466 CLK(NULL
, "gpio1_dbck", &gpio1_dbck
),
3467 CLK(NULL
, "sha12_ick", &sha12_ick
),
3468 CLK(NULL
, "wdt2_fck", &wdt2_fck
),
3469 CLK("omap_wdt", "ick", &wdt2_ick
),
3470 CLK(NULL
, "wdt2_ick", &wdt2_ick
),
3471 CLK(NULL
, "wdt1_ick", &wdt1_ick
),
3472 CLK(NULL
, "gpio1_ick", &gpio1_ick
),
3473 CLK(NULL
, "omap_32ksync_ick", &omap_32ksync_ick
),
3474 CLK(NULL
, "gpt12_ick", &gpt12_ick
),
3475 CLK(NULL
, "gpt1_ick", &gpt1_ick
),
3476 CLK(NULL
, "per_96m_fck", &per_96m_fck
),
3477 CLK(NULL
, "per_48m_fck", &per_48m_fck
),
3478 CLK(NULL
, "uart3_fck", &uart3_fck
),
3479 CLK(NULL
, "gpt2_fck", &gpt2_fck
),
3480 CLK(NULL
, "gpt3_fck", &gpt3_fck
),
3481 CLK(NULL
, "gpt4_fck", &gpt4_fck
),
3482 CLK(NULL
, "gpt5_fck", &gpt5_fck
),
3483 CLK(NULL
, "gpt6_fck", &gpt6_fck
),
3484 CLK(NULL
, "gpt7_fck", &gpt7_fck
),
3485 CLK(NULL
, "gpt8_fck", &gpt8_fck
),
3486 CLK(NULL
, "gpt9_fck", &gpt9_fck
),
3487 CLK(NULL
, "per_32k_alwon_fck", &per_32k_alwon_fck
),
3488 CLK(NULL
, "gpio6_dbck", &gpio6_dbck
),
3489 CLK(NULL
, "gpio5_dbck", &gpio5_dbck
),
3490 CLK(NULL
, "gpio4_dbck", &gpio4_dbck
),
3491 CLK(NULL
, "gpio3_dbck", &gpio3_dbck
),
3492 CLK(NULL
, "gpio2_dbck", &gpio2_dbck
),
3493 CLK(NULL
, "wdt3_fck", &wdt3_fck
),
3494 CLK(NULL
, "per_l4_ick", &per_l4_ick
),
3495 CLK(NULL
, "gpio6_ick", &gpio6_ick
),
3496 CLK(NULL
, "gpio5_ick", &gpio5_ick
),
3497 CLK(NULL
, "gpio4_ick", &gpio4_ick
),
3498 CLK(NULL
, "gpio3_ick", &gpio3_ick
),
3499 CLK(NULL
, "gpio2_ick", &gpio2_ick
),
3500 CLK(NULL
, "wdt3_ick", &wdt3_ick
),
3501 CLK(NULL
, "uart3_ick", &uart3_ick
),
3502 CLK(NULL
, "uart4_ick", &uart4_ick
),
3503 CLK(NULL
, "gpt9_ick", &gpt9_ick
),
3504 CLK(NULL
, "gpt8_ick", &gpt8_ick
),
3505 CLK(NULL
, "gpt7_ick", &gpt7_ick
),
3506 CLK(NULL
, "gpt6_ick", &gpt6_ick
),
3507 CLK(NULL
, "gpt5_ick", &gpt5_ick
),
3508 CLK(NULL
, "gpt4_ick", &gpt4_ick
),
3509 CLK(NULL
, "gpt3_ick", &gpt3_ick
),
3510 CLK(NULL
, "gpt2_ick", &gpt2_ick
),
3511 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick
),
3512 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick
),
3513 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick
),
3514 CLK(NULL
, "mcbsp4_ick", &mcbsp2_ick
),
3515 CLK(NULL
, "mcbsp3_ick", &mcbsp3_ick
),
3516 CLK(NULL
, "mcbsp2_ick", &mcbsp4_ick
),
3517 CLK(NULL
, "mcbsp2_fck", &mcbsp2_fck
),
3518 CLK(NULL
, "mcbsp3_fck", &mcbsp3_fck
),
3519 CLK(NULL
, "mcbsp4_fck", &mcbsp4_fck
),
3520 CLK("etb", "emu_src_ck", &emu_src_ck
),
3521 CLK(NULL
, "emu_src_ck", &emu_src_ck
),
3522 CLK(NULL
, "pclk_fck", &pclk_fck
),
3523 CLK(NULL
, "pclkx2_fck", &pclkx2_fck
),
3524 CLK(NULL
, "atclk_fck", &atclk_fck
),
3525 CLK(NULL
, "traceclk_src_fck", &traceclk_src_fck
),
3526 CLK(NULL
, "traceclk_fck", &traceclk_fck
),
3527 CLK(NULL
, "secure_32k_fck", &secure_32k_fck
),
3528 CLK(NULL
, "gpt12_fck", &gpt12_fck
),
3529 CLK(NULL
, "wdt1_fck", &wdt1_fck
),
3530 CLK(NULL
, "timer_32k_ck", &omap_32k_fck
),
3531 CLK(NULL
, "timer_sys_ck", &sys_ck
),
3532 CLK(NULL
, "cpufreq_ck", &dpll1_ck
),
3535 static const char *enable_init_clks
[] = {
3541 int __init
omap3xxx_clk_init(void)
3543 if (omap3_has_192mhz_clk())
3544 omap_96m_alwon_fck
= omap_96m_alwon_fck_3630
;
3546 if (cpu_is_omap3630()) {
3547 dpll3_m3x2_ck
= dpll3_m3x2_ck_3630
;
3548 dpll4_m2x2_ck
= dpll4_m2x2_ck_3630
;
3549 dpll4_m3x2_ck
= dpll4_m3x2_ck_3630
;
3550 dpll4_m4x2_ck
= dpll4_m4x2_ck_3630
;
3551 dpll4_m5x2_ck
= dpll4_m5x2_ck_3630
;
3552 dpll4_m6x2_ck
= dpll4_m6x2_ck_3630
;
3556 * XXX This type of dynamic rewriting of the clock tree is
3557 * deprecated and should be revised soon.
3559 if (cpu_is_omap3630())
3560 dpll4_dd
= dpll4_dd_3630
;
3562 dpll4_dd
= dpll4_dd_34xx
;
3566 * 3505 must be tested before 3517, since 3517 returns true
3567 * for both AM3517 chips and AM3517 family chips, which
3568 * includes 3505. Unfortunately there's no obvious family
3569 * test for 3517/3505 :-(
3571 if (soc_is_am35xx()) {
3572 cpu_mask
= RATE_IN_34XX
;
3573 omap_clocks_register(am35xx_clks
, ARRAY_SIZE(am35xx_clks
));
3574 omap_clocks_register(omap36xx_am35xx_omap3430es2plus_clks
,
3575 ARRAY_SIZE(omap36xx_am35xx_omap3430es2plus_clks
));
3576 omap_clocks_register(omap3xxx_clks
, ARRAY_SIZE(omap3xxx_clks
));
3577 } else if (cpu_is_omap3630()) {
3578 cpu_mask
= (RATE_IN_34XX
| RATE_IN_36XX
);
3579 omap_clocks_register(omap36xx_clks
, ARRAY_SIZE(omap36xx_clks
));
3580 omap_clocks_register(omap36xx_omap3430es2plus_clks
,
3581 ARRAY_SIZE(omap36xx_omap3430es2plus_clks
));
3582 omap_clocks_register(omap34xx_omap36xx_clks
,
3583 ARRAY_SIZE(omap34xx_omap36xx_clks
));
3584 omap_clocks_register(omap36xx_am35xx_omap3430es2plus_clks
,
3585 ARRAY_SIZE(omap36xx_am35xx_omap3430es2plus_clks
));
3586 omap_clocks_register(omap3xxx_clks
, ARRAY_SIZE(omap3xxx_clks
));
3587 } else if (soc_is_am33xx()) {
3588 cpu_mask
= RATE_IN_AM33XX
;
3589 } else if (cpu_is_ti814x()) {
3590 cpu_mask
= RATE_IN_TI814X
;
3591 } else if (cpu_is_omap34xx()) {
3592 if (omap_rev() == OMAP3430_REV_ES1_0
) {
3593 cpu_mask
= RATE_IN_3430ES1
;
3594 omap_clocks_register(omap3430es1_clks
,
3595 ARRAY_SIZE(omap3430es1_clks
));
3596 omap_clocks_register(omap34xx_omap36xx_clks
,
3597 ARRAY_SIZE(omap34xx_omap36xx_clks
));
3598 omap_clocks_register(omap3xxx_clks
,
3599 ARRAY_SIZE(omap3xxx_clks
));
3602 * Assume that anything that we haven't matched yet
3603 * has 3430ES2-type clocks.
3605 cpu_mask
= RATE_IN_3430ES2PLUS
;
3606 omap_clocks_register(omap34xx_omap36xx_clks
,
3607 ARRAY_SIZE(omap34xx_omap36xx_clks
));
3608 omap_clocks_register(omap36xx_omap3430es2plus_clks
,
3609 ARRAY_SIZE(omap36xx_omap3430es2plus_clks
));
3610 omap_clocks_register(omap36xx_am35xx_omap3430es2plus_clks
,
3611 ARRAY_SIZE(omap36xx_am35xx_omap3430es2plus_clks
));
3612 omap_clocks_register(omap3xxx_clks
,
3613 ARRAY_SIZE(omap3xxx_clks
));
3616 WARN(1, "clock: could not identify OMAP3 variant\n");
3619 omap2_clk_disable_autoidle_all();
3621 omap2_clk_enable_init_clocks(enable_init_clks
,
3622 ARRAY_SIZE(enable_init_clks
));
3624 pr_info("Clocking rate (Crystal/Core/MPU): %ld.%01ld/%ld/%ld MHz\n",
3625 (clk_get_rate(&osc_sys_ck
) / 1000000),
3626 (clk_get_rate(&osc_sys_ck
) / 100000) % 10,
3627 (clk_get_rate(&core_ck
) / 1000000),
3628 (clk_get_rate(&arm_fck
) / 1000000));
3631 * Lock DPLL5 -- here only until other device init code can
3634 if (!cpu_is_ti81xx() && (omap_rev() >= OMAP3430_REV_ES2_0
))
3635 omap3_clk_lock_dpll5();
3637 /* Avoid sleeping during omap3_core_dpll_m2_set_rate() */
3638 sdrc_ick_p
= clk_get(NULL
, "sdrc_ick");
3639 arm_fck_p
= clk_get(NULL
, "arm_fck");