x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub
[linux/fpc-iii.git] / arch / arm / mach-omap2 / cclock3xxx_data.c
blob9128b2553ca568d742156a5f845b99352ad61d03
1 /*
2 * OMAP3 clock data
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>
24 #include <linux/io.h>
26 #include "soc.h"
27 #include "iomap.h"
28 #include "clock.h"
29 #include "clock3xxx.h"
30 #include "clock34xx.h"
31 #include "clock36xx.h"
32 #include "clock3517.h"
33 #include "cm3xxx.h"
34 #include "cm-regbits-34xx.h"
35 #include "prm3xxx.h"
36 #include "prm-regbits-34xx.h"
37 #include "control.h"
40 * clocks
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,
94 .clk_ref = &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,
106 .min_divider = 1,
107 .max_divider = OMAP3_MAX_DPLL_DIV,
110 static struct clk dpll3_ck;
112 static const char *dpll3_ck_parent_names[] = {
113 "sys_ck",
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 = {
124 .hw = {
125 .clk = &dpll3_ck,
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[] = {
143 "dpll3_m2_ck",
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[] = {
164 "l4_ick",
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[] = {
173 "security_l4_ick2",
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 = {
183 .hw = {
184 .clk = &aes1_ick,
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[] = {
205 "core_l4_ick",
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 = {
216 .hw = {
217 .clk = &aes2_ick,
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,
234 .clk_ref = &sys_ck,
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,
247 .min_divider = 1,
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 = {
264 .hw = {
265 .clk = &dpll1_ck,
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[] = {
285 "dpll1_x2m2_ck",
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,
294 0x0, NULL);
296 static struct clk cam_ick;
298 static struct clk_hw_omap cam_ick_hw = {
299 .hw = {
300 .clk = &cam_ick,
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);
310 /* DPLL4 */
311 /* Supplies 96MHz, 54Mhz TV DAC, DSS fclk, CAM sensor clock, emul trace clk */
312 /* Type: DPLL */
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,
320 .clk_ref = &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,
333 .min_divider = 1,
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,
342 .clk_ref = &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,
356 .min_divider = 1,
357 .max_divider = OMAP3_MAX_DPLL_DIV,
358 .flags = DPLL_J_TYPE
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 = {
374 .hw = {
375 .clk = &dpll4_ck,
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[] = {
392 "dpll4_m5_ck",
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 = {
411 .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_FLAGS(dpll4_m5x2_ck, dpll4_m5x2_ck_parent_names,
422 dpll4_m5x2_ck_ops, CLK_SET_RATE_PARENT);
424 static struct clk dpll4_m5x2_ck_3630 = {
425 .name = "dpll4_m5x2_ck",
426 .hw = &dpll4_m5x2_ck_hw.hw,
427 .parent_names = dpll4_m5x2_ck_parent_names,
428 .num_parents = ARRAY_SIZE(dpll4_m5x2_ck_parent_names),
429 .ops = &dpll4_m5x2_ck_3630_ops,
430 .flags = CLK_SET_RATE_PARENT,
433 static struct clk cam_mclk;
435 static const char *cam_mclk_parent_names[] = {
436 "dpll4_m5x2_ck",
439 static struct clk_hw_omap cam_mclk_hw = {
440 .hw = {
441 .clk = &cam_mclk,
443 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
444 .enable_bit = OMAP3430_EN_CAM_SHIFT,
445 .clkdm_name = "cam_clkdm",
448 static struct clk cam_mclk = {
449 .name = "cam_mclk",
450 .hw = &cam_mclk_hw.hw,
451 .parent_names = cam_mclk_parent_names,
452 .num_parents = ARRAY_SIZE(cam_mclk_parent_names),
453 .ops = &aes2_ick_ops,
454 .flags = CLK_SET_RATE_PARENT,
457 static const struct clksel_rate clkout2_src_core_rates[] = {
458 { .div = 1, .val = 0, .flags = RATE_IN_3XXX },
459 { .div = 0 }
462 static const struct clksel_rate clkout2_src_sys_rates[] = {
463 { .div = 1, .val = 1, .flags = RATE_IN_3XXX },
464 { .div = 0 }
467 static const struct clksel_rate clkout2_src_96m_rates[] = {
468 { .div = 1, .val = 2, .flags = RATE_IN_3XXX },
469 { .div = 0 }
472 DEFINE_CLK_DIVIDER(dpll4_m2_ck, "dpll4_ck", &dpll4_ck, 0x0,
473 OMAP_CM_REGADDR(PLL_MOD, OMAP3430_CM_CLKSEL3),
474 OMAP3430_DIV_96M_SHIFT, OMAP3630_DIV_96M_WIDTH,
475 CLK_DIVIDER_ONE_BASED, NULL);
477 static struct clk dpll4_m2x2_ck;
479 static const char *dpll4_m2x2_ck_parent_names[] = {
480 "dpll4_m2_ck",
483 static struct clk_hw_omap dpll4_m2x2_ck_hw = {
484 .hw = {
485 .clk = &dpll4_m2x2_ck,
487 .ops = &clkhwops_wait,
488 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
489 .enable_bit = OMAP3430_PWRDN_96M_SHIFT,
490 .flags = INVERT_ENABLE,
491 .clkdm_name = "dpll4_clkdm",
494 DEFINE_STRUCT_CLK(dpll4_m2x2_ck, dpll4_m2x2_ck_parent_names, dpll4_m5x2_ck_ops);
496 static struct clk dpll4_m2x2_ck_3630 = {
497 .name = "dpll4_m2x2_ck",
498 .hw = &dpll4_m2x2_ck_hw.hw,
499 .parent_names = dpll4_m2x2_ck_parent_names,
500 .num_parents = ARRAY_SIZE(dpll4_m2x2_ck_parent_names),
501 .ops = &dpll4_m5x2_ck_3630_ops,
504 static struct clk omap_96m_alwon_fck;
506 static const char *omap_96m_alwon_fck_parent_names[] = {
507 "dpll4_m2x2_ck",
510 DEFINE_STRUCT_CLK_HW_OMAP(omap_96m_alwon_fck, NULL);
511 DEFINE_STRUCT_CLK(omap_96m_alwon_fck, omap_96m_alwon_fck_parent_names,
512 core_ck_ops);
514 static struct clk cm_96m_fck;
516 static const char *cm_96m_fck_parent_names[] = {
517 "omap_96m_alwon_fck",
520 DEFINE_STRUCT_CLK_HW_OMAP(cm_96m_fck, NULL);
521 DEFINE_STRUCT_CLK(cm_96m_fck, cm_96m_fck_parent_names, core_ck_ops);
523 static const struct clksel_rate clkout2_src_54m_rates[] = {
524 { .div = 1, .val = 3, .flags = RATE_IN_3XXX },
525 { .div = 0 }
528 DEFINE_CLK_DIVIDER(dpll4_m3_ck, "dpll4_ck", &dpll4_ck, 0x0,
529 OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
530 OMAP3430_CLKSEL_TV_SHIFT, OMAP3630_CLKSEL_TV_WIDTH,
531 CLK_DIVIDER_ONE_BASED, NULL);
533 static struct clk dpll4_m3x2_ck;
535 static const char *dpll4_m3x2_ck_parent_names[] = {
536 "dpll4_m3_ck",
539 static struct clk_hw_omap dpll4_m3x2_ck_hw = {
540 .hw = {
541 .clk = &dpll4_m3x2_ck,
543 .ops = &clkhwops_wait,
544 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
545 .enable_bit = OMAP3430_PWRDN_TV_SHIFT,
546 .flags = INVERT_ENABLE,
547 .clkdm_name = "dpll4_clkdm",
550 DEFINE_STRUCT_CLK(dpll4_m3x2_ck, dpll4_m3x2_ck_parent_names, dpll4_m5x2_ck_ops);
552 static struct clk dpll4_m3x2_ck_3630 = {
553 .name = "dpll4_m3x2_ck",
554 .hw = &dpll4_m3x2_ck_hw.hw,
555 .parent_names = dpll4_m3x2_ck_parent_names,
556 .num_parents = ARRAY_SIZE(dpll4_m3x2_ck_parent_names),
557 .ops = &dpll4_m5x2_ck_3630_ops,
560 static const char *omap_54m_fck_parent_names[] = {
561 "dpll4_m3x2_ck", "sys_altclk",
564 DEFINE_CLK_MUX(omap_54m_fck, omap_54m_fck_parent_names, NULL, 0x0,
565 OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), OMAP3430_SOURCE_54M_SHIFT,
566 OMAP3430_SOURCE_54M_WIDTH, 0x0, NULL);
568 static const struct clksel clkout2_src_clksel[] = {
569 { .parent = &core_ck, .rates = clkout2_src_core_rates },
570 { .parent = &sys_ck, .rates = clkout2_src_sys_rates },
571 { .parent = &cm_96m_fck, .rates = clkout2_src_96m_rates },
572 { .parent = &omap_54m_fck, .rates = clkout2_src_54m_rates },
573 { .parent = NULL },
576 static const char *clkout2_src_ck_parent_names[] = {
577 "core_ck", "sys_ck", "cm_96m_fck", "omap_54m_fck",
580 static const struct clk_ops clkout2_src_ck_ops = {
581 .init = &omap2_init_clk_clkdm,
582 .enable = &omap2_dflt_clk_enable,
583 .disable = &omap2_dflt_clk_disable,
584 .is_enabled = &omap2_dflt_clk_is_enabled,
585 .recalc_rate = &omap2_clksel_recalc,
586 .get_parent = &omap2_clksel_find_parent_index,
587 .set_parent = &omap2_clksel_set_parent,
590 DEFINE_CLK_OMAP_MUX_GATE(clkout2_src_ck, "core_clkdm",
591 clkout2_src_clksel, OMAP3430_CM_CLKOUT_CTRL,
592 OMAP3430_CLKOUT2SOURCE_MASK,
593 OMAP3430_CM_CLKOUT_CTRL, OMAP3430_CLKOUT2_EN_SHIFT,
594 NULL, clkout2_src_ck_parent_names, clkout2_src_ck_ops);
596 static const struct clksel_rate omap_48m_cm96m_rates[] = {
597 { .div = 2, .val = 0, .flags = RATE_IN_3XXX },
598 { .div = 0 }
601 static const struct clksel_rate omap_48m_alt_rates[] = {
602 { .div = 1, .val = 1, .flags = RATE_IN_3XXX },
603 { .div = 0 }
606 static const struct clksel omap_48m_clksel[] = {
607 { .parent = &cm_96m_fck, .rates = omap_48m_cm96m_rates },
608 { .parent = &sys_altclk, .rates = omap_48m_alt_rates },
609 { .parent = NULL },
612 static const char *omap_48m_fck_parent_names[] = {
613 "cm_96m_fck", "sys_altclk",
616 static struct clk omap_48m_fck;
618 static const struct clk_ops omap_48m_fck_ops = {
619 .recalc_rate = &omap2_clksel_recalc,
620 .get_parent = &omap2_clksel_find_parent_index,
621 .set_parent = &omap2_clksel_set_parent,
624 static struct clk_hw_omap omap_48m_fck_hw = {
625 .hw = {
626 .clk = &omap_48m_fck,
628 .clksel = omap_48m_clksel,
629 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
630 .clksel_mask = OMAP3430_SOURCE_48M_MASK,
633 DEFINE_STRUCT_CLK(omap_48m_fck, omap_48m_fck_parent_names, omap_48m_fck_ops);
635 DEFINE_CLK_FIXED_FACTOR(omap_12m_fck, "omap_48m_fck", &omap_48m_fck, 0x0, 1, 4);
637 static struct clk core_12m_fck;
639 static const char *core_12m_fck_parent_names[] = {
640 "omap_12m_fck",
643 DEFINE_STRUCT_CLK_HW_OMAP(core_12m_fck, "core_l4_clkdm");
644 DEFINE_STRUCT_CLK(core_12m_fck, core_12m_fck_parent_names, core_l4_ick_ops);
646 static struct clk core_48m_fck;
648 static const char *core_48m_fck_parent_names[] = {
649 "omap_48m_fck",
652 DEFINE_STRUCT_CLK_HW_OMAP(core_48m_fck, "core_l4_clkdm");
653 DEFINE_STRUCT_CLK(core_48m_fck, core_48m_fck_parent_names, core_l4_ick_ops);
655 static const char *omap_96m_fck_parent_names[] = {
656 "cm_96m_fck", "sys_ck",
659 DEFINE_CLK_MUX(omap_96m_fck, omap_96m_fck_parent_names, NULL, 0x0,
660 OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
661 OMAP3430_SOURCE_96M_SHIFT, OMAP3430_SOURCE_96M_WIDTH, 0x0, NULL);
663 static struct clk core_96m_fck;
665 static const char *core_96m_fck_parent_names[] = {
666 "omap_96m_fck",
669 DEFINE_STRUCT_CLK_HW_OMAP(core_96m_fck, "core_l4_clkdm");
670 DEFINE_STRUCT_CLK(core_96m_fck, core_96m_fck_parent_names, core_l4_ick_ops);
672 static struct clk core_l3_ick;
674 static const char *core_l3_ick_parent_names[] = {
675 "l3_ick",
678 DEFINE_STRUCT_CLK_HW_OMAP(core_l3_ick, "core_l3_clkdm");
679 DEFINE_STRUCT_CLK(core_l3_ick, core_l3_ick_parent_names, core_l4_ick_ops);
681 DEFINE_CLK_FIXED_FACTOR(dpll3_m2x2_ck, "dpll3_m2_ck", &dpll3_m2_ck, 0x0, 2, 1);
683 static struct clk corex2_fck;
685 static const char *corex2_fck_parent_names[] = {
686 "dpll3_m2x2_ck",
689 DEFINE_STRUCT_CLK_HW_OMAP(corex2_fck, NULL);
690 DEFINE_STRUCT_CLK(corex2_fck, corex2_fck_parent_names, core_ck_ops);
692 static struct clk cpefuse_fck;
694 static struct clk_hw_omap cpefuse_fck_hw = {
695 .hw = {
696 .clk = &cpefuse_fck,
698 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
699 .enable_bit = OMAP3430ES2_EN_CPEFUSE_SHIFT,
700 .clkdm_name = "core_l4_clkdm",
703 DEFINE_STRUCT_CLK(cpefuse_fck, dpll3_ck_parent_names, aes2_ick_ops);
705 static struct clk csi2_96m_fck;
707 static const char *csi2_96m_fck_parent_names[] = {
708 "core_96m_fck",
711 static struct clk_hw_omap csi2_96m_fck_hw = {
712 .hw = {
713 .clk = &csi2_96m_fck,
715 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
716 .enable_bit = OMAP3430_EN_CSI2_SHIFT,
717 .clkdm_name = "cam_clkdm",
720 DEFINE_STRUCT_CLK(csi2_96m_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
722 static struct clk d2d_26m_fck;
724 static struct clk_hw_omap d2d_26m_fck_hw = {
725 .hw = {
726 .clk = &d2d_26m_fck,
728 .ops = &clkhwops_wait,
729 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
730 .enable_bit = OMAP3430ES1_EN_D2D_SHIFT,
731 .clkdm_name = "d2d_clkdm",
734 DEFINE_STRUCT_CLK(d2d_26m_fck, dpll3_ck_parent_names, aes2_ick_ops);
736 static struct clk des1_ick;
738 static struct clk_hw_omap des1_ick_hw = {
739 .hw = {
740 .clk = &des1_ick,
742 .ops = &clkhwops_iclk_wait,
743 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
744 .enable_bit = OMAP3430_EN_DES1_SHIFT,
747 DEFINE_STRUCT_CLK(des1_ick, aes1_ick_parent_names, aes1_ick_ops);
749 static struct clk des2_ick;
751 static struct clk_hw_omap des2_ick_hw = {
752 .hw = {
753 .clk = &des2_ick,
755 .ops = &clkhwops_iclk_wait,
756 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
757 .enable_bit = OMAP3430_EN_DES2_SHIFT,
758 .clkdm_name = "core_l4_clkdm",
761 DEFINE_STRUCT_CLK(des2_ick, aes2_ick_parent_names, aes2_ick_ops);
763 DEFINE_CLK_DIVIDER(dpll1_fck, "core_ck", &core_ck, 0x0,
764 OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL),
765 OMAP3430_MPU_CLK_SRC_SHIFT, OMAP3430_MPU_CLK_SRC_WIDTH,
766 CLK_DIVIDER_ONE_BASED, NULL);
768 static struct clk dpll2_fck;
770 static struct dpll_data dpll2_dd = {
771 .mult_div1_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
772 .mult_mask = OMAP3430_IVA2_DPLL_MULT_MASK,
773 .div1_mask = OMAP3430_IVA2_DPLL_DIV_MASK,
774 .clk_bypass = &dpll2_fck,
775 .clk_ref = &sys_ck,
776 .freqsel_mask = OMAP3430_IVA2_DPLL_FREQSEL_MASK,
777 .control_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKEN_PLL),
778 .enable_mask = OMAP3430_EN_IVA2_DPLL_MASK,
779 .modes = ((1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED) |
780 (1 << DPLL_LOW_POWER_BYPASS)),
781 .auto_recal_bit = OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT,
782 .recal_en_bit = OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_SHIFT,
783 .recal_st_bit = OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_SHIFT,
784 .autoidle_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_AUTOIDLE_PLL),
785 .autoidle_mask = OMAP3430_AUTO_IVA2_DPLL_MASK,
786 .idlest_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_IDLEST_PLL),
787 .idlest_mask = OMAP3430_ST_IVA2_CLK_MASK,
788 .max_multiplier = OMAP3_MAX_DPLL_MULT,
789 .min_divider = 1,
790 .max_divider = OMAP3_MAX_DPLL_DIV,
793 static struct clk dpll2_ck;
795 static struct clk_hw_omap dpll2_ck_hw = {
796 .hw = {
797 .clk = &dpll2_ck,
799 .ops = &clkhwops_omap3_dpll,
800 .dpll_data = &dpll2_dd,
801 .clkdm_name = "dpll2_clkdm",
804 DEFINE_STRUCT_CLK(dpll2_ck, dpll3_ck_parent_names, dpll1_ck_ops);
806 DEFINE_CLK_DIVIDER(dpll2_fck, "core_ck", &core_ck, 0x0,
807 OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
808 OMAP3430_IVA2_CLK_SRC_SHIFT, OMAP3430_IVA2_CLK_SRC_WIDTH,
809 CLK_DIVIDER_ONE_BASED, NULL);
811 DEFINE_CLK_DIVIDER(dpll2_m2_ck, "dpll2_ck", &dpll2_ck, 0x0,
812 OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL2_PLL),
813 OMAP3430_IVA2_DPLL_CLKOUT_DIV_SHIFT,
814 OMAP3430_IVA2_DPLL_CLKOUT_DIV_WIDTH,
815 CLK_DIVIDER_ONE_BASED, NULL);
817 DEFINE_CLK_DIVIDER(dpll3_m3_ck, "dpll3_ck", &dpll3_ck, 0x0,
818 OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
819 OMAP3430_DIV_DPLL3_SHIFT, OMAP3430_DIV_DPLL3_WIDTH,
820 CLK_DIVIDER_ONE_BASED, NULL);
822 static struct clk dpll3_m3x2_ck;
824 static const char *dpll3_m3x2_ck_parent_names[] = {
825 "dpll3_m3_ck",
828 static struct clk_hw_omap dpll3_m3x2_ck_hw = {
829 .hw = {
830 .clk = &dpll3_m3x2_ck,
832 .ops = &clkhwops_wait,
833 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
834 .enable_bit = OMAP3430_PWRDN_EMU_CORE_SHIFT,
835 .flags = INVERT_ENABLE,
836 .clkdm_name = "dpll3_clkdm",
839 DEFINE_STRUCT_CLK(dpll3_m3x2_ck, dpll3_m3x2_ck_parent_names, dpll4_m5x2_ck_ops);
841 static struct clk dpll3_m3x2_ck_3630 = {
842 .name = "dpll3_m3x2_ck",
843 .hw = &dpll3_m3x2_ck_hw.hw,
844 .parent_names = dpll3_m3x2_ck_parent_names,
845 .num_parents = ARRAY_SIZE(dpll3_m3x2_ck_parent_names),
846 .ops = &dpll4_m5x2_ck_3630_ops,
849 DEFINE_CLK_FIXED_FACTOR(dpll3_x2_ck, "dpll3_ck", &dpll3_ck, 0x0, 2, 1);
851 DEFINE_CLK_DIVIDER(dpll4_m4_ck, "dpll4_ck", &dpll4_ck, 0x0,
852 OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
853 OMAP3430_CLKSEL_DSS1_SHIFT, OMAP3630_CLKSEL_DSS1_WIDTH,
854 CLK_DIVIDER_ONE_BASED, NULL);
856 static struct clk dpll4_m4x2_ck;
858 static const char *dpll4_m4x2_ck_parent_names[] = {
859 "dpll4_m4_ck",
862 static struct clk_hw_omap dpll4_m4x2_ck_hw = {
863 .hw = {
864 .clk = &dpll4_m4x2_ck,
866 .ops = &clkhwops_wait,
867 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
868 .enable_bit = OMAP3430_PWRDN_DSS1_SHIFT,
869 .flags = INVERT_ENABLE,
870 .clkdm_name = "dpll4_clkdm",
873 DEFINE_STRUCT_CLK(dpll4_m4x2_ck, dpll4_m4x2_ck_parent_names, dpll4_m5x2_ck_ops);
875 static struct clk dpll4_m4x2_ck_3630 = {
876 .name = "dpll4_m4x2_ck",
877 .hw = &dpll4_m4x2_ck_hw.hw,
878 .parent_names = dpll4_m4x2_ck_parent_names,
879 .num_parents = ARRAY_SIZE(dpll4_m4x2_ck_parent_names),
880 .ops = &dpll4_m5x2_ck_3630_ops,
883 DEFINE_CLK_DIVIDER(dpll4_m6_ck, "dpll4_ck", &dpll4_ck, 0x0,
884 OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
885 OMAP3430_DIV_DPLL4_SHIFT, OMAP3630_DIV_DPLL4_WIDTH,
886 CLK_DIVIDER_ONE_BASED, NULL);
888 static struct clk dpll4_m6x2_ck;
890 static const char *dpll4_m6x2_ck_parent_names[] = {
891 "dpll4_m6_ck",
894 static struct clk_hw_omap dpll4_m6x2_ck_hw = {
895 .hw = {
896 .clk = &dpll4_m6x2_ck,
898 .ops = &clkhwops_wait,
899 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
900 .enable_bit = OMAP3430_PWRDN_EMU_PERIPH_SHIFT,
901 .flags = INVERT_ENABLE,
902 .clkdm_name = "dpll4_clkdm",
905 DEFINE_STRUCT_CLK(dpll4_m6x2_ck, dpll4_m6x2_ck_parent_names, dpll4_m5x2_ck_ops);
907 static struct clk dpll4_m6x2_ck_3630 = {
908 .name = "dpll4_m6x2_ck",
909 .hw = &dpll4_m6x2_ck_hw.hw,
910 .parent_names = dpll4_m6x2_ck_parent_names,
911 .num_parents = ARRAY_SIZE(dpll4_m6x2_ck_parent_names),
912 .ops = &dpll4_m5x2_ck_3630_ops,
915 DEFINE_CLK_FIXED_FACTOR(dpll4_x2_ck, "dpll4_ck", &dpll4_ck, 0x0, 2, 1);
917 static struct dpll_data dpll5_dd = {
918 .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL4),
919 .mult_mask = OMAP3430ES2_PERIPH2_DPLL_MULT_MASK,
920 .div1_mask = OMAP3430ES2_PERIPH2_DPLL_DIV_MASK,
921 .clk_bypass = &sys_ck,
922 .clk_ref = &sys_ck,
923 .freqsel_mask = OMAP3430ES2_PERIPH2_DPLL_FREQSEL_MASK,
924 .control_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKEN2),
925 .enable_mask = OMAP3430ES2_EN_PERIPH2_DPLL_MASK,
926 .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED),
927 .auto_recal_bit = OMAP3430ES2_EN_PERIPH2_DPLL_DRIFTGUARD_SHIFT,
928 .recal_en_bit = OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT,
929 .recal_st_bit = OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT,
930 .autoidle_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_AUTOIDLE2_PLL),
931 .autoidle_mask = OMAP3430ES2_AUTO_PERIPH2_DPLL_MASK,
932 .idlest_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST2),
933 .idlest_mask = OMAP3430ES2_ST_PERIPH2_CLK_MASK,
934 .max_multiplier = OMAP3_MAX_DPLL_MULT,
935 .min_divider = 1,
936 .max_divider = OMAP3_MAX_DPLL_DIV,
939 static struct clk dpll5_ck;
941 static struct clk_hw_omap dpll5_ck_hw = {
942 .hw = {
943 .clk = &dpll5_ck,
945 .ops = &clkhwops_omap3_dpll,
946 .dpll_data = &dpll5_dd,
947 .clkdm_name = "dpll5_clkdm",
950 DEFINE_STRUCT_CLK(dpll5_ck, dpll3_ck_parent_names, dpll1_ck_ops);
952 DEFINE_CLK_DIVIDER(dpll5_m2_ck, "dpll5_ck", &dpll5_ck, 0x0,
953 OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL5),
954 OMAP3430ES2_DIV_120M_SHIFT, OMAP3430ES2_DIV_120M_WIDTH,
955 CLK_DIVIDER_ONE_BASED, NULL);
957 static struct clk dss1_alwon_fck_3430es1;
959 static const char *dss1_alwon_fck_3430es1_parent_names[] = {
960 "dpll4_m4x2_ck",
963 static struct clk_hw_omap dss1_alwon_fck_3430es1_hw = {
964 .hw = {
965 .clk = &dss1_alwon_fck_3430es1,
967 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
968 .enable_bit = OMAP3430_EN_DSS1_SHIFT,
969 .clkdm_name = "dss_clkdm",
972 DEFINE_STRUCT_CLK(dss1_alwon_fck_3430es1, dss1_alwon_fck_3430es1_parent_names,
973 aes2_ick_ops);
975 static struct clk dss1_alwon_fck_3430es2;
977 static struct clk_hw_omap dss1_alwon_fck_3430es2_hw = {
978 .hw = {
979 .clk = &dss1_alwon_fck_3430es2,
981 .ops = &clkhwops_omap3430es2_dss_usbhost_wait,
982 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
983 .enable_bit = OMAP3430_EN_DSS1_SHIFT,
984 .clkdm_name = "dss_clkdm",
987 DEFINE_STRUCT_CLK(dss1_alwon_fck_3430es2, dss1_alwon_fck_3430es1_parent_names,
988 aes2_ick_ops);
990 static struct clk dss2_alwon_fck;
992 static struct clk_hw_omap dss2_alwon_fck_hw = {
993 .hw = {
994 .clk = &dss2_alwon_fck,
996 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
997 .enable_bit = OMAP3430_EN_DSS2_SHIFT,
998 .clkdm_name = "dss_clkdm",
1001 DEFINE_STRUCT_CLK(dss2_alwon_fck, dpll3_ck_parent_names, aes2_ick_ops);
1003 static struct clk dss_96m_fck;
1005 static struct clk_hw_omap dss_96m_fck_hw = {
1006 .hw = {
1007 .clk = &dss_96m_fck,
1009 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
1010 .enable_bit = OMAP3430_EN_TV_SHIFT,
1011 .clkdm_name = "dss_clkdm",
1014 DEFINE_STRUCT_CLK(dss_96m_fck, core_96m_fck_parent_names, aes2_ick_ops);
1016 static struct clk dss_ick_3430es1;
1018 static struct clk_hw_omap dss_ick_3430es1_hw = {
1019 .hw = {
1020 .clk = &dss_ick_3430es1,
1022 .ops = &clkhwops_iclk,
1023 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
1024 .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
1025 .clkdm_name = "dss_clkdm",
1028 DEFINE_STRUCT_CLK(dss_ick_3430es1, security_l4_ick2_parent_names, aes2_ick_ops);
1030 static struct clk dss_ick_3430es2;
1032 static struct clk_hw_omap dss_ick_3430es2_hw = {
1033 .hw = {
1034 .clk = &dss_ick_3430es2,
1036 .ops = &clkhwops_omap3430es2_iclk_dss_usbhost_wait,
1037 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
1038 .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
1039 .clkdm_name = "dss_clkdm",
1042 DEFINE_STRUCT_CLK(dss_ick_3430es2, security_l4_ick2_parent_names, aes2_ick_ops);
1044 static struct clk dss_tv_fck;
1046 static const char *dss_tv_fck_parent_names[] = {
1047 "omap_54m_fck",
1050 static struct clk_hw_omap dss_tv_fck_hw = {
1051 .hw = {
1052 .clk = &dss_tv_fck,
1054 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
1055 .enable_bit = OMAP3430_EN_TV_SHIFT,
1056 .clkdm_name = "dss_clkdm",
1059 DEFINE_STRUCT_CLK(dss_tv_fck, dss_tv_fck_parent_names, aes2_ick_ops);
1061 static struct clk emac_fck;
1063 static const char *emac_fck_parent_names[] = {
1064 "rmii_ck",
1067 static struct clk_hw_omap emac_fck_hw = {
1068 .hw = {
1069 .clk = &emac_fck,
1071 .enable_reg = OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL),
1072 .enable_bit = AM35XX_CPGMAC_FCLK_SHIFT,
1075 DEFINE_STRUCT_CLK(emac_fck, emac_fck_parent_names, aes1_ick_ops);
1077 static struct clk ipss_ick;
1079 static const char *ipss_ick_parent_names[] = {
1080 "core_l3_ick",
1083 static struct clk_hw_omap ipss_ick_hw = {
1084 .hw = {
1085 .clk = &ipss_ick,
1087 .ops = &clkhwops_am35xx_ipss_wait,
1088 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1089 .enable_bit = AM35XX_EN_IPSS_SHIFT,
1090 .clkdm_name = "core_l3_clkdm",
1093 DEFINE_STRUCT_CLK(ipss_ick, ipss_ick_parent_names, aes2_ick_ops);
1095 static struct clk emac_ick;
1097 static const char *emac_ick_parent_names[] = {
1098 "ipss_ick",
1101 static struct clk_hw_omap emac_ick_hw = {
1102 .hw = {
1103 .clk = &emac_ick,
1105 .ops = &clkhwops_am35xx_ipss_module_wait,
1106 .enable_reg = OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL),
1107 .enable_bit = AM35XX_CPGMAC_VBUSP_CLK_SHIFT,
1108 .clkdm_name = "core_l3_clkdm",
1111 DEFINE_STRUCT_CLK(emac_ick, emac_ick_parent_names, aes2_ick_ops);
1113 static struct clk emu_core_alwon_ck;
1115 static const char *emu_core_alwon_ck_parent_names[] = {
1116 "dpll3_m3x2_ck",
1119 DEFINE_STRUCT_CLK_HW_OMAP(emu_core_alwon_ck, "dpll3_clkdm");
1120 DEFINE_STRUCT_CLK(emu_core_alwon_ck, emu_core_alwon_ck_parent_names,
1121 core_l4_ick_ops);
1123 static struct clk emu_mpu_alwon_ck;
1125 static const char *emu_mpu_alwon_ck_parent_names[] = {
1126 "mpu_ck",
1129 DEFINE_STRUCT_CLK_HW_OMAP(emu_mpu_alwon_ck, NULL);
1130 DEFINE_STRUCT_CLK(emu_mpu_alwon_ck, emu_mpu_alwon_ck_parent_names, core_ck_ops);
1132 static struct clk emu_per_alwon_ck;
1134 static const char *emu_per_alwon_ck_parent_names[] = {
1135 "dpll4_m6x2_ck",
1138 DEFINE_STRUCT_CLK_HW_OMAP(emu_per_alwon_ck, "dpll4_clkdm");
1139 DEFINE_STRUCT_CLK(emu_per_alwon_ck, emu_per_alwon_ck_parent_names,
1140 core_l4_ick_ops);
1142 static const char *emu_src_ck_parent_names[] = {
1143 "sys_ck", "emu_core_alwon_ck", "emu_per_alwon_ck", "emu_mpu_alwon_ck",
1146 static const struct clksel_rate emu_src_sys_rates[] = {
1147 { .div = 1, .val = 0, .flags = RATE_IN_3XXX },
1148 { .div = 0 },
1151 static const struct clksel_rate emu_src_core_rates[] = {
1152 { .div = 1, .val = 1, .flags = RATE_IN_3XXX },
1153 { .div = 0 },
1156 static const struct clksel_rate emu_src_per_rates[] = {
1157 { .div = 1, .val = 2, .flags = RATE_IN_3XXX },
1158 { .div = 0 },
1161 static const struct clksel_rate emu_src_mpu_rates[] = {
1162 { .div = 1, .val = 3, .flags = RATE_IN_3XXX },
1163 { .div = 0 },
1166 static const struct clksel emu_src_clksel[] = {
1167 { .parent = &sys_ck, .rates = emu_src_sys_rates },
1168 { .parent = &emu_core_alwon_ck, .rates = emu_src_core_rates },
1169 { .parent = &emu_per_alwon_ck, .rates = emu_src_per_rates },
1170 { .parent = &emu_mpu_alwon_ck, .rates = emu_src_mpu_rates },
1171 { .parent = NULL },
1174 static const struct clk_ops emu_src_ck_ops = {
1175 .init = &omap2_init_clk_clkdm,
1176 .recalc_rate = &omap2_clksel_recalc,
1177 .get_parent = &omap2_clksel_find_parent_index,
1178 .set_parent = &omap2_clksel_set_parent,
1179 .enable = &omap2_clkops_enable_clkdm,
1180 .disable = &omap2_clkops_disable_clkdm,
1183 static struct clk emu_src_ck;
1185 static struct clk_hw_omap emu_src_ck_hw = {
1186 .hw = {
1187 .clk = &emu_src_ck,
1189 .clksel = emu_src_clksel,
1190 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
1191 .clksel_mask = OMAP3430_MUX_CTRL_MASK,
1192 .clkdm_name = "emu_clkdm",
1195 DEFINE_STRUCT_CLK(emu_src_ck, emu_src_ck_parent_names, emu_src_ck_ops);
1197 DEFINE_CLK_DIVIDER(atclk_fck, "emu_src_ck", &emu_src_ck, 0x0,
1198 OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
1199 OMAP3430_CLKSEL_ATCLK_SHIFT, OMAP3430_CLKSEL_ATCLK_WIDTH,
1200 CLK_DIVIDER_ONE_BASED, NULL);
1202 static struct clk fac_ick;
1204 static struct clk_hw_omap fac_ick_hw = {
1205 .hw = {
1206 .clk = &fac_ick,
1208 .ops = &clkhwops_iclk_wait,
1209 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1210 .enable_bit = OMAP3430ES1_EN_FAC_SHIFT,
1211 .clkdm_name = "core_l4_clkdm",
1214 DEFINE_STRUCT_CLK(fac_ick, aes2_ick_parent_names, aes2_ick_ops);
1216 static struct clk fshostusb_fck;
1218 static const char *fshostusb_fck_parent_names[] = {
1219 "core_48m_fck",
1222 static struct clk_hw_omap fshostusb_fck_hw = {
1223 .hw = {
1224 .clk = &fshostusb_fck,
1226 .ops = &clkhwops_wait,
1227 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1228 .enable_bit = OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
1229 .clkdm_name = "core_l4_clkdm",
1232 DEFINE_STRUCT_CLK(fshostusb_fck, fshostusb_fck_parent_names, aes2_ick_ops);
1234 static struct clk gfx_l3_ck;
1236 static struct clk_hw_omap gfx_l3_ck_hw = {
1237 .hw = {
1238 .clk = &gfx_l3_ck,
1240 .ops = &clkhwops_wait,
1241 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
1242 .enable_bit = OMAP_EN_GFX_SHIFT,
1243 .clkdm_name = "gfx_3430es1_clkdm",
1246 DEFINE_STRUCT_CLK(gfx_l3_ck, core_l3_ick_parent_names, aes1_ick_ops);
1248 DEFINE_CLK_DIVIDER(gfx_l3_fck, "l3_ick", &l3_ick, 0x0,
1249 OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
1250 OMAP_CLKSEL_GFX_SHIFT, OMAP_CLKSEL_GFX_WIDTH,
1251 CLK_DIVIDER_ONE_BASED, NULL);
1253 static struct clk gfx_cg1_ck;
1255 static const char *gfx_cg1_ck_parent_names[] = {
1256 "gfx_l3_fck",
1259 static struct clk_hw_omap gfx_cg1_ck_hw = {
1260 .hw = {
1261 .clk = &gfx_cg1_ck,
1263 .ops = &clkhwops_wait,
1264 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1265 .enable_bit = OMAP3430ES1_EN_2D_SHIFT,
1266 .clkdm_name = "gfx_3430es1_clkdm",
1269 DEFINE_STRUCT_CLK(gfx_cg1_ck, gfx_cg1_ck_parent_names, aes2_ick_ops);
1271 static struct clk gfx_cg2_ck;
1273 static struct clk_hw_omap gfx_cg2_ck_hw = {
1274 .hw = {
1275 .clk = &gfx_cg2_ck,
1277 .ops = &clkhwops_wait,
1278 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1279 .enable_bit = OMAP3430ES1_EN_3D_SHIFT,
1280 .clkdm_name = "gfx_3430es1_clkdm",
1283 DEFINE_STRUCT_CLK(gfx_cg2_ck, gfx_cg1_ck_parent_names, aes2_ick_ops);
1285 static struct clk gfx_l3_ick;
1287 static const char *gfx_l3_ick_parent_names[] = {
1288 "gfx_l3_ck",
1291 DEFINE_STRUCT_CLK_HW_OMAP(gfx_l3_ick, "gfx_3430es1_clkdm");
1292 DEFINE_STRUCT_CLK(gfx_l3_ick, gfx_l3_ick_parent_names, core_l4_ick_ops);
1294 static struct clk wkup_32k_fck;
1296 static const char *wkup_32k_fck_parent_names[] = {
1297 "omap_32k_fck",
1300 DEFINE_STRUCT_CLK_HW_OMAP(wkup_32k_fck, "wkup_clkdm");
1301 DEFINE_STRUCT_CLK(wkup_32k_fck, wkup_32k_fck_parent_names, core_l4_ick_ops);
1303 static struct clk gpio1_dbck;
1305 static const char *gpio1_dbck_parent_names[] = {
1306 "wkup_32k_fck",
1309 static struct clk_hw_omap gpio1_dbck_hw = {
1310 .hw = {
1311 .clk = &gpio1_dbck,
1313 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
1314 .enable_bit = OMAP3430_EN_GPIO1_SHIFT,
1315 .clkdm_name = "wkup_clkdm",
1318 DEFINE_STRUCT_CLK(gpio1_dbck, gpio1_dbck_parent_names, aes2_ick_ops);
1320 static struct clk wkup_l4_ick;
1322 DEFINE_STRUCT_CLK_HW_OMAP(wkup_l4_ick, "wkup_clkdm");
1323 DEFINE_STRUCT_CLK(wkup_l4_ick, dpll3_ck_parent_names, core_l4_ick_ops);
1325 static struct clk gpio1_ick;
1327 static const char *gpio1_ick_parent_names[] = {
1328 "wkup_l4_ick",
1331 static struct clk_hw_omap gpio1_ick_hw = {
1332 .hw = {
1333 .clk = &gpio1_ick,
1335 .ops = &clkhwops_iclk_wait,
1336 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
1337 .enable_bit = OMAP3430_EN_GPIO1_SHIFT,
1338 .clkdm_name = "wkup_clkdm",
1341 DEFINE_STRUCT_CLK(gpio1_ick, gpio1_ick_parent_names, aes2_ick_ops);
1343 static struct clk per_32k_alwon_fck;
1345 DEFINE_STRUCT_CLK_HW_OMAP(per_32k_alwon_fck, "per_clkdm");
1346 DEFINE_STRUCT_CLK(per_32k_alwon_fck, wkup_32k_fck_parent_names,
1347 core_l4_ick_ops);
1349 static struct clk gpio2_dbck;
1351 static const char *gpio2_dbck_parent_names[] = {
1352 "per_32k_alwon_fck",
1355 static struct clk_hw_omap gpio2_dbck_hw = {
1356 .hw = {
1357 .clk = &gpio2_dbck,
1359 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1360 .enable_bit = OMAP3430_EN_GPIO2_SHIFT,
1361 .clkdm_name = "per_clkdm",
1364 DEFINE_STRUCT_CLK(gpio2_dbck, gpio2_dbck_parent_names, aes2_ick_ops);
1366 static struct clk per_l4_ick;
1368 DEFINE_STRUCT_CLK_HW_OMAP(per_l4_ick, "per_clkdm");
1369 DEFINE_STRUCT_CLK(per_l4_ick, security_l4_ick2_parent_names, core_l4_ick_ops);
1371 static struct clk gpio2_ick;
1373 static const char *gpio2_ick_parent_names[] = {
1374 "per_l4_ick",
1377 static struct clk_hw_omap gpio2_ick_hw = {
1378 .hw = {
1379 .clk = &gpio2_ick,
1381 .ops = &clkhwops_iclk_wait,
1382 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1383 .enable_bit = OMAP3430_EN_GPIO2_SHIFT,
1384 .clkdm_name = "per_clkdm",
1387 DEFINE_STRUCT_CLK(gpio2_ick, gpio2_ick_parent_names, aes2_ick_ops);
1389 static struct clk gpio3_dbck;
1391 static struct clk_hw_omap gpio3_dbck_hw = {
1392 .hw = {
1393 .clk = &gpio3_dbck,
1395 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1396 .enable_bit = OMAP3430_EN_GPIO3_SHIFT,
1397 .clkdm_name = "per_clkdm",
1400 DEFINE_STRUCT_CLK(gpio3_dbck, gpio2_dbck_parent_names, aes2_ick_ops);
1402 static struct clk gpio3_ick;
1404 static struct clk_hw_omap gpio3_ick_hw = {
1405 .hw = {
1406 .clk = &gpio3_ick,
1408 .ops = &clkhwops_iclk_wait,
1409 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1410 .enable_bit = OMAP3430_EN_GPIO3_SHIFT,
1411 .clkdm_name = "per_clkdm",
1414 DEFINE_STRUCT_CLK(gpio3_ick, gpio2_ick_parent_names, aes2_ick_ops);
1416 static struct clk gpio4_dbck;
1418 static struct clk_hw_omap gpio4_dbck_hw = {
1419 .hw = {
1420 .clk = &gpio4_dbck,
1422 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1423 .enable_bit = OMAP3430_EN_GPIO4_SHIFT,
1424 .clkdm_name = "per_clkdm",
1427 DEFINE_STRUCT_CLK(gpio4_dbck, gpio2_dbck_parent_names, aes2_ick_ops);
1429 static struct clk gpio4_ick;
1431 static struct clk_hw_omap gpio4_ick_hw = {
1432 .hw = {
1433 .clk = &gpio4_ick,
1435 .ops = &clkhwops_iclk_wait,
1436 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1437 .enable_bit = OMAP3430_EN_GPIO4_SHIFT,
1438 .clkdm_name = "per_clkdm",
1441 DEFINE_STRUCT_CLK(gpio4_ick, gpio2_ick_parent_names, aes2_ick_ops);
1443 static struct clk gpio5_dbck;
1445 static struct clk_hw_omap gpio5_dbck_hw = {
1446 .hw = {
1447 .clk = &gpio5_dbck,
1449 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1450 .enable_bit = OMAP3430_EN_GPIO5_SHIFT,
1451 .clkdm_name = "per_clkdm",
1454 DEFINE_STRUCT_CLK(gpio5_dbck, gpio2_dbck_parent_names, aes2_ick_ops);
1456 static struct clk gpio5_ick;
1458 static struct clk_hw_omap gpio5_ick_hw = {
1459 .hw = {
1460 .clk = &gpio5_ick,
1462 .ops = &clkhwops_iclk_wait,
1463 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1464 .enable_bit = OMAP3430_EN_GPIO5_SHIFT,
1465 .clkdm_name = "per_clkdm",
1468 DEFINE_STRUCT_CLK(gpio5_ick, gpio2_ick_parent_names, aes2_ick_ops);
1470 static struct clk gpio6_dbck;
1472 static struct clk_hw_omap gpio6_dbck_hw = {
1473 .hw = {
1474 .clk = &gpio6_dbck,
1476 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1477 .enable_bit = OMAP3430_EN_GPIO6_SHIFT,
1478 .clkdm_name = "per_clkdm",
1481 DEFINE_STRUCT_CLK(gpio6_dbck, gpio2_dbck_parent_names, aes2_ick_ops);
1483 static struct clk gpio6_ick;
1485 static struct clk_hw_omap gpio6_ick_hw = {
1486 .hw = {
1487 .clk = &gpio6_ick,
1489 .ops = &clkhwops_iclk_wait,
1490 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1491 .enable_bit = OMAP3430_EN_GPIO6_SHIFT,
1492 .clkdm_name = "per_clkdm",
1495 DEFINE_STRUCT_CLK(gpio6_ick, gpio2_ick_parent_names, aes2_ick_ops);
1497 static struct clk gpmc_fck;
1499 static struct clk_hw_omap gpmc_fck_hw = {
1500 .hw = {
1501 .clk = &gpmc_fck,
1503 .flags = ENABLE_ON_INIT,
1504 .clkdm_name = "core_l3_clkdm",
1507 DEFINE_STRUCT_CLK(gpmc_fck, ipss_ick_parent_names, core_l4_ick_ops);
1509 static const struct clksel omap343x_gpt_clksel[] = {
1510 { .parent = &omap_32k_fck, .rates = gpt_32k_rates },
1511 { .parent = &sys_ck, .rates = gpt_sys_rates },
1512 { .parent = NULL },
1515 static const char *gpt10_fck_parent_names[] = {
1516 "omap_32k_fck", "sys_ck",
1519 DEFINE_CLK_OMAP_MUX_GATE(gpt10_fck, "core_l4_clkdm", omap343x_gpt_clksel,
1520 OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1521 OMAP3430_CLKSEL_GPT10_MASK,
1522 OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1523 OMAP3430_EN_GPT10_SHIFT, &clkhwops_wait,
1524 gpt10_fck_parent_names, clkout2_src_ck_ops);
1526 static struct clk gpt10_ick;
1528 static struct clk_hw_omap gpt10_ick_hw = {
1529 .hw = {
1530 .clk = &gpt10_ick,
1532 .ops = &clkhwops_iclk_wait,
1533 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1534 .enable_bit = OMAP3430_EN_GPT10_SHIFT,
1535 .clkdm_name = "core_l4_clkdm",
1538 DEFINE_STRUCT_CLK(gpt10_ick, aes2_ick_parent_names, aes2_ick_ops);
1540 DEFINE_CLK_OMAP_MUX_GATE(gpt11_fck, "core_l4_clkdm", omap343x_gpt_clksel,
1541 OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1542 OMAP3430_CLKSEL_GPT11_MASK,
1543 OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1544 OMAP3430_EN_GPT11_SHIFT, &clkhwops_wait,
1545 gpt10_fck_parent_names, clkout2_src_ck_ops);
1547 static struct clk gpt11_ick;
1549 static struct clk_hw_omap gpt11_ick_hw = {
1550 .hw = {
1551 .clk = &gpt11_ick,
1553 .ops = &clkhwops_iclk_wait,
1554 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1555 .enable_bit = OMAP3430_EN_GPT11_SHIFT,
1556 .clkdm_name = "core_l4_clkdm",
1559 DEFINE_STRUCT_CLK(gpt11_ick, aes2_ick_parent_names, aes2_ick_ops);
1561 static struct clk gpt12_fck;
1563 static const char *gpt12_fck_parent_names[] = {
1564 "secure_32k_fck",
1567 DEFINE_STRUCT_CLK_HW_OMAP(gpt12_fck, "wkup_clkdm");
1568 DEFINE_STRUCT_CLK(gpt12_fck, gpt12_fck_parent_names, core_l4_ick_ops);
1570 static struct clk gpt12_ick;
1572 static struct clk_hw_omap gpt12_ick_hw = {
1573 .hw = {
1574 .clk = &gpt12_ick,
1576 .ops = &clkhwops_iclk_wait,
1577 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
1578 .enable_bit = OMAP3430_EN_GPT12_SHIFT,
1579 .clkdm_name = "wkup_clkdm",
1582 DEFINE_STRUCT_CLK(gpt12_ick, gpio1_ick_parent_names, aes2_ick_ops);
1584 DEFINE_CLK_OMAP_MUX_GATE(gpt1_fck, "wkup_clkdm", omap343x_gpt_clksel,
1585 OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
1586 OMAP3430_CLKSEL_GPT1_MASK,
1587 OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
1588 OMAP3430_EN_GPT1_SHIFT, &clkhwops_wait,
1589 gpt10_fck_parent_names, clkout2_src_ck_ops);
1591 static struct clk gpt1_ick;
1593 static struct clk_hw_omap gpt1_ick_hw = {
1594 .hw = {
1595 .clk = &gpt1_ick,
1597 .ops = &clkhwops_iclk_wait,
1598 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
1599 .enable_bit = OMAP3430_EN_GPT1_SHIFT,
1600 .clkdm_name = "wkup_clkdm",
1603 DEFINE_STRUCT_CLK(gpt1_ick, gpio1_ick_parent_names, aes2_ick_ops);
1605 DEFINE_CLK_OMAP_MUX_GATE(gpt2_fck, "per_clkdm", omap343x_gpt_clksel,
1606 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1607 OMAP3430_CLKSEL_GPT2_MASK,
1608 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1609 OMAP3430_EN_GPT2_SHIFT, &clkhwops_wait,
1610 gpt10_fck_parent_names, clkout2_src_ck_ops);
1612 static struct clk gpt2_ick;
1614 static struct clk_hw_omap gpt2_ick_hw = {
1615 .hw = {
1616 .clk = &gpt2_ick,
1618 .ops = &clkhwops_iclk_wait,
1619 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1620 .enable_bit = OMAP3430_EN_GPT2_SHIFT,
1621 .clkdm_name = "per_clkdm",
1624 DEFINE_STRUCT_CLK(gpt2_ick, gpio2_ick_parent_names, aes2_ick_ops);
1626 DEFINE_CLK_OMAP_MUX_GATE(gpt3_fck, "per_clkdm", omap343x_gpt_clksel,
1627 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1628 OMAP3430_CLKSEL_GPT3_MASK,
1629 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1630 OMAP3430_EN_GPT3_SHIFT, &clkhwops_wait,
1631 gpt10_fck_parent_names, clkout2_src_ck_ops);
1633 static struct clk gpt3_ick;
1635 static struct clk_hw_omap gpt3_ick_hw = {
1636 .hw = {
1637 .clk = &gpt3_ick,
1639 .ops = &clkhwops_iclk_wait,
1640 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1641 .enable_bit = OMAP3430_EN_GPT3_SHIFT,
1642 .clkdm_name = "per_clkdm",
1645 DEFINE_STRUCT_CLK(gpt3_ick, gpio2_ick_parent_names, aes2_ick_ops);
1647 DEFINE_CLK_OMAP_MUX_GATE(gpt4_fck, "per_clkdm", omap343x_gpt_clksel,
1648 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1649 OMAP3430_CLKSEL_GPT4_MASK,
1650 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1651 OMAP3430_EN_GPT4_SHIFT, &clkhwops_wait,
1652 gpt10_fck_parent_names, clkout2_src_ck_ops);
1654 static struct clk gpt4_ick;
1656 static struct clk_hw_omap gpt4_ick_hw = {
1657 .hw = {
1658 .clk = &gpt4_ick,
1660 .ops = &clkhwops_iclk_wait,
1661 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1662 .enable_bit = OMAP3430_EN_GPT4_SHIFT,
1663 .clkdm_name = "per_clkdm",
1666 DEFINE_STRUCT_CLK(gpt4_ick, gpio2_ick_parent_names, aes2_ick_ops);
1668 DEFINE_CLK_OMAP_MUX_GATE(gpt5_fck, "per_clkdm", omap343x_gpt_clksel,
1669 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1670 OMAP3430_CLKSEL_GPT5_MASK,
1671 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1672 OMAP3430_EN_GPT5_SHIFT, &clkhwops_wait,
1673 gpt10_fck_parent_names, clkout2_src_ck_ops);
1675 static struct clk gpt5_ick;
1677 static struct clk_hw_omap gpt5_ick_hw = {
1678 .hw = {
1679 .clk = &gpt5_ick,
1681 .ops = &clkhwops_iclk_wait,
1682 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1683 .enable_bit = OMAP3430_EN_GPT5_SHIFT,
1684 .clkdm_name = "per_clkdm",
1687 DEFINE_STRUCT_CLK(gpt5_ick, gpio2_ick_parent_names, aes2_ick_ops);
1689 DEFINE_CLK_OMAP_MUX_GATE(gpt6_fck, "per_clkdm", omap343x_gpt_clksel,
1690 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1691 OMAP3430_CLKSEL_GPT6_MASK,
1692 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1693 OMAP3430_EN_GPT6_SHIFT, &clkhwops_wait,
1694 gpt10_fck_parent_names, clkout2_src_ck_ops);
1696 static struct clk gpt6_ick;
1698 static struct clk_hw_omap gpt6_ick_hw = {
1699 .hw = {
1700 .clk = &gpt6_ick,
1702 .ops = &clkhwops_iclk_wait,
1703 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1704 .enable_bit = OMAP3430_EN_GPT6_SHIFT,
1705 .clkdm_name = "per_clkdm",
1708 DEFINE_STRUCT_CLK(gpt6_ick, gpio2_ick_parent_names, aes2_ick_ops);
1710 DEFINE_CLK_OMAP_MUX_GATE(gpt7_fck, "per_clkdm", omap343x_gpt_clksel,
1711 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1712 OMAP3430_CLKSEL_GPT7_MASK,
1713 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1714 OMAP3430_EN_GPT7_SHIFT, &clkhwops_wait,
1715 gpt10_fck_parent_names, clkout2_src_ck_ops);
1717 static struct clk gpt7_ick;
1719 static struct clk_hw_omap gpt7_ick_hw = {
1720 .hw = {
1721 .clk = &gpt7_ick,
1723 .ops = &clkhwops_iclk_wait,
1724 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1725 .enable_bit = OMAP3430_EN_GPT7_SHIFT,
1726 .clkdm_name = "per_clkdm",
1729 DEFINE_STRUCT_CLK(gpt7_ick, gpio2_ick_parent_names, aes2_ick_ops);
1731 DEFINE_CLK_OMAP_MUX_GATE(gpt8_fck, "per_clkdm", omap343x_gpt_clksel,
1732 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1733 OMAP3430_CLKSEL_GPT8_MASK,
1734 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1735 OMAP3430_EN_GPT8_SHIFT, &clkhwops_wait,
1736 gpt10_fck_parent_names, clkout2_src_ck_ops);
1738 static struct clk gpt8_ick;
1740 static struct clk_hw_omap gpt8_ick_hw = {
1741 .hw = {
1742 .clk = &gpt8_ick,
1744 .ops = &clkhwops_iclk_wait,
1745 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1746 .enable_bit = OMAP3430_EN_GPT8_SHIFT,
1747 .clkdm_name = "per_clkdm",
1750 DEFINE_STRUCT_CLK(gpt8_ick, gpio2_ick_parent_names, aes2_ick_ops);
1752 DEFINE_CLK_OMAP_MUX_GATE(gpt9_fck, "per_clkdm", omap343x_gpt_clksel,
1753 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1754 OMAP3430_CLKSEL_GPT9_MASK,
1755 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1756 OMAP3430_EN_GPT9_SHIFT, &clkhwops_wait,
1757 gpt10_fck_parent_names, clkout2_src_ck_ops);
1759 static struct clk gpt9_ick;
1761 static struct clk_hw_omap gpt9_ick_hw = {
1762 .hw = {
1763 .clk = &gpt9_ick,
1765 .ops = &clkhwops_iclk_wait,
1766 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1767 .enable_bit = OMAP3430_EN_GPT9_SHIFT,
1768 .clkdm_name = "per_clkdm",
1771 DEFINE_STRUCT_CLK(gpt9_ick, gpio2_ick_parent_names, aes2_ick_ops);
1773 static struct clk hdq_fck;
1775 static const char *hdq_fck_parent_names[] = {
1776 "core_12m_fck",
1779 static struct clk_hw_omap hdq_fck_hw = {
1780 .hw = {
1781 .clk = &hdq_fck,
1783 .ops = &clkhwops_wait,
1784 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1785 .enable_bit = OMAP3430_EN_HDQ_SHIFT,
1786 .clkdm_name = "core_l4_clkdm",
1789 DEFINE_STRUCT_CLK(hdq_fck, hdq_fck_parent_names, aes2_ick_ops);
1791 static struct clk hdq_ick;
1793 static struct clk_hw_omap hdq_ick_hw = {
1794 .hw = {
1795 .clk = &hdq_ick,
1797 .ops = &clkhwops_iclk_wait,
1798 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1799 .enable_bit = OMAP3430_EN_HDQ_SHIFT,
1800 .clkdm_name = "core_l4_clkdm",
1803 DEFINE_STRUCT_CLK(hdq_ick, aes2_ick_parent_names, aes2_ick_ops);
1805 static struct clk hecc_ck;
1807 static struct clk_hw_omap hecc_ck_hw = {
1808 .hw = {
1809 .clk = &hecc_ck,
1811 .ops = &clkhwops_am35xx_ipss_module_wait,
1812 .enable_reg = OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL),
1813 .enable_bit = AM35XX_HECC_VBUSP_CLK_SHIFT,
1814 .clkdm_name = "core_l3_clkdm",
1817 DEFINE_STRUCT_CLK(hecc_ck, dpll3_ck_parent_names, aes2_ick_ops);
1819 static struct clk hsotgusb_fck_am35xx;
1821 static struct clk_hw_omap hsotgusb_fck_am35xx_hw = {
1822 .hw = {
1823 .clk = &hsotgusb_fck_am35xx,
1825 .enable_reg = OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL),
1826 .enable_bit = AM35XX_USBOTG_FCLK_SHIFT,
1827 .clkdm_name = "core_l3_clkdm",
1830 DEFINE_STRUCT_CLK(hsotgusb_fck_am35xx, dpll3_ck_parent_names, aes2_ick_ops);
1832 static struct clk hsotgusb_ick_3430es1;
1834 static struct clk_hw_omap hsotgusb_ick_3430es1_hw = {
1835 .hw = {
1836 .clk = &hsotgusb_ick_3430es1,
1838 .ops = &clkhwops_iclk,
1839 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1840 .enable_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1841 .clkdm_name = "core_l3_clkdm",
1844 DEFINE_STRUCT_CLK(hsotgusb_ick_3430es1, ipss_ick_parent_names, aes2_ick_ops);
1846 static struct clk hsotgusb_ick_3430es2;
1848 static struct clk_hw_omap hsotgusb_ick_3430es2_hw = {
1849 .hw = {
1850 .clk = &hsotgusb_ick_3430es2,
1852 .ops = &clkhwops_omap3430es2_iclk_hsotgusb_wait,
1853 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1854 .enable_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1855 .clkdm_name = "core_l3_clkdm",
1858 DEFINE_STRUCT_CLK(hsotgusb_ick_3430es2, ipss_ick_parent_names, aes2_ick_ops);
1860 static struct clk hsotgusb_ick_am35xx;
1862 static struct clk_hw_omap hsotgusb_ick_am35xx_hw = {
1863 .hw = {
1864 .clk = &hsotgusb_ick_am35xx,
1866 .ops = &clkhwops_am35xx_ipss_module_wait,
1867 .enable_reg = OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL),
1868 .enable_bit = AM35XX_USBOTG_VBUSP_CLK_SHIFT,
1869 .clkdm_name = "core_l3_clkdm",
1872 DEFINE_STRUCT_CLK(hsotgusb_ick_am35xx, emac_ick_parent_names, aes2_ick_ops);
1874 static struct clk i2c1_fck;
1876 static struct clk_hw_omap i2c1_fck_hw = {
1877 .hw = {
1878 .clk = &i2c1_fck,
1880 .ops = &clkhwops_wait,
1881 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1882 .enable_bit = OMAP3430_EN_I2C1_SHIFT,
1883 .clkdm_name = "core_l4_clkdm",
1886 DEFINE_STRUCT_CLK(i2c1_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
1888 static struct clk i2c1_ick;
1890 static struct clk_hw_omap i2c1_ick_hw = {
1891 .hw = {
1892 .clk = &i2c1_ick,
1894 .ops = &clkhwops_iclk_wait,
1895 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1896 .enable_bit = OMAP3430_EN_I2C1_SHIFT,
1897 .clkdm_name = "core_l4_clkdm",
1900 DEFINE_STRUCT_CLK(i2c1_ick, aes2_ick_parent_names, aes2_ick_ops);
1902 static struct clk i2c2_fck;
1904 static struct clk_hw_omap i2c2_fck_hw = {
1905 .hw = {
1906 .clk = &i2c2_fck,
1908 .ops = &clkhwops_wait,
1909 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1910 .enable_bit = OMAP3430_EN_I2C2_SHIFT,
1911 .clkdm_name = "core_l4_clkdm",
1914 DEFINE_STRUCT_CLK(i2c2_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
1916 static struct clk i2c2_ick;
1918 static struct clk_hw_omap i2c2_ick_hw = {
1919 .hw = {
1920 .clk = &i2c2_ick,
1922 .ops = &clkhwops_iclk_wait,
1923 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1924 .enable_bit = OMAP3430_EN_I2C2_SHIFT,
1925 .clkdm_name = "core_l4_clkdm",
1928 DEFINE_STRUCT_CLK(i2c2_ick, aes2_ick_parent_names, aes2_ick_ops);
1930 static struct clk i2c3_fck;
1932 static struct clk_hw_omap i2c3_fck_hw = {
1933 .hw = {
1934 .clk = &i2c3_fck,
1936 .ops = &clkhwops_wait,
1937 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1938 .enable_bit = OMAP3430_EN_I2C3_SHIFT,
1939 .clkdm_name = "core_l4_clkdm",
1942 DEFINE_STRUCT_CLK(i2c3_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
1944 static struct clk i2c3_ick;
1946 static struct clk_hw_omap i2c3_ick_hw = {
1947 .hw = {
1948 .clk = &i2c3_ick,
1950 .ops = &clkhwops_iclk_wait,
1951 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1952 .enable_bit = OMAP3430_EN_I2C3_SHIFT,
1953 .clkdm_name = "core_l4_clkdm",
1956 DEFINE_STRUCT_CLK(i2c3_ick, aes2_ick_parent_names, aes2_ick_ops);
1958 static struct clk icr_ick;
1960 static struct clk_hw_omap icr_ick_hw = {
1961 .hw = {
1962 .clk = &icr_ick,
1964 .ops = &clkhwops_iclk_wait,
1965 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1966 .enable_bit = OMAP3430_EN_ICR_SHIFT,
1967 .clkdm_name = "core_l4_clkdm",
1970 DEFINE_STRUCT_CLK(icr_ick, aes2_ick_parent_names, aes2_ick_ops);
1972 static struct clk iva2_ck;
1974 static const char *iva2_ck_parent_names[] = {
1975 "dpll2_m2_ck",
1978 static struct clk_hw_omap iva2_ck_hw = {
1979 .hw = {
1980 .clk = &iva2_ck,
1982 .ops = &clkhwops_wait,
1983 .enable_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, CM_FCLKEN),
1984 .enable_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
1985 .clkdm_name = "iva2_clkdm",
1988 DEFINE_STRUCT_CLK(iva2_ck, iva2_ck_parent_names, aes2_ick_ops);
1990 static struct clk mad2d_ick;
1992 static struct clk_hw_omap mad2d_ick_hw = {
1993 .hw = {
1994 .clk = &mad2d_ick,
1996 .ops = &clkhwops_iclk_wait,
1997 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
1998 .enable_bit = OMAP3430_EN_MAD2D_SHIFT,
1999 .clkdm_name = "d2d_clkdm",
2002 DEFINE_STRUCT_CLK(mad2d_ick, core_l3_ick_parent_names, aes2_ick_ops);
2004 static struct clk mailboxes_ick;
2006 static struct clk_hw_omap mailboxes_ick_hw = {
2007 .hw = {
2008 .clk = &mailboxes_ick,
2010 .ops = &clkhwops_iclk_wait,
2011 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2012 .enable_bit = OMAP3430_EN_MAILBOXES_SHIFT,
2013 .clkdm_name = "core_l4_clkdm",
2016 DEFINE_STRUCT_CLK(mailboxes_ick, aes2_ick_parent_names, aes2_ick_ops);
2018 static const struct clksel_rate common_mcbsp_96m_rates[] = {
2019 { .div = 1, .val = 0, .flags = RATE_IN_3XXX },
2020 { .div = 0 }
2023 static const struct clksel_rate common_mcbsp_mcbsp_rates[] = {
2024 { .div = 1, .val = 1, .flags = RATE_IN_3XXX },
2025 { .div = 0 }
2028 static const struct clksel mcbsp_15_clksel[] = {
2029 { .parent = &core_96m_fck, .rates = common_mcbsp_96m_rates },
2030 { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates },
2031 { .parent = NULL },
2034 static const char *mcbsp1_fck_parent_names[] = {
2035 "core_96m_fck", "mcbsp_clks",
2038 DEFINE_CLK_OMAP_MUX_GATE(mcbsp1_fck, "core_l4_clkdm", mcbsp_15_clksel,
2039 OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
2040 OMAP2_MCBSP1_CLKS_MASK,
2041 OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2042 OMAP3430_EN_MCBSP1_SHIFT, &clkhwops_wait,
2043 mcbsp1_fck_parent_names, clkout2_src_ck_ops);
2045 static struct clk mcbsp1_ick;
2047 static struct clk_hw_omap mcbsp1_ick_hw = {
2048 .hw = {
2049 .clk = &mcbsp1_ick,
2051 .ops = &clkhwops_iclk_wait,
2052 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2053 .enable_bit = OMAP3430_EN_MCBSP1_SHIFT,
2054 .clkdm_name = "core_l4_clkdm",
2057 DEFINE_STRUCT_CLK(mcbsp1_ick, aes2_ick_parent_names, aes2_ick_ops);
2059 static struct clk per_96m_fck;
2061 DEFINE_STRUCT_CLK_HW_OMAP(per_96m_fck, "per_clkdm");
2062 DEFINE_STRUCT_CLK(per_96m_fck, cm_96m_fck_parent_names, core_l4_ick_ops);
2064 static const struct clksel mcbsp_234_clksel[] = {
2065 { .parent = &per_96m_fck, .rates = common_mcbsp_96m_rates },
2066 { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates },
2067 { .parent = NULL },
2070 static const char *mcbsp2_fck_parent_names[] = {
2071 "per_96m_fck", "mcbsp_clks",
2074 DEFINE_CLK_OMAP_MUX_GATE(mcbsp2_fck, "per_clkdm", mcbsp_234_clksel,
2075 OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
2076 OMAP2_MCBSP2_CLKS_MASK,
2077 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2078 OMAP3430_EN_MCBSP2_SHIFT, &clkhwops_wait,
2079 mcbsp2_fck_parent_names, clkout2_src_ck_ops);
2081 static struct clk mcbsp2_ick;
2083 static struct clk_hw_omap mcbsp2_ick_hw = {
2084 .hw = {
2085 .clk = &mcbsp2_ick,
2087 .ops = &clkhwops_iclk_wait,
2088 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2089 .enable_bit = OMAP3430_EN_MCBSP2_SHIFT,
2090 .clkdm_name = "per_clkdm",
2093 DEFINE_STRUCT_CLK(mcbsp2_ick, gpio2_ick_parent_names, aes2_ick_ops);
2095 DEFINE_CLK_OMAP_MUX_GATE(mcbsp3_fck, "per_clkdm", mcbsp_234_clksel,
2096 OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
2097 OMAP2_MCBSP3_CLKS_MASK,
2098 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2099 OMAP3430_EN_MCBSP3_SHIFT, &clkhwops_wait,
2100 mcbsp2_fck_parent_names, clkout2_src_ck_ops);
2102 static struct clk mcbsp3_ick;
2104 static struct clk_hw_omap mcbsp3_ick_hw = {
2105 .hw = {
2106 .clk = &mcbsp3_ick,
2108 .ops = &clkhwops_iclk_wait,
2109 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2110 .enable_bit = OMAP3430_EN_MCBSP3_SHIFT,
2111 .clkdm_name = "per_clkdm",
2114 DEFINE_STRUCT_CLK(mcbsp3_ick, gpio2_ick_parent_names, aes2_ick_ops);
2116 DEFINE_CLK_OMAP_MUX_GATE(mcbsp4_fck, "per_clkdm", mcbsp_234_clksel,
2117 OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
2118 OMAP2_MCBSP4_CLKS_MASK,
2119 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2120 OMAP3430_EN_MCBSP4_SHIFT, &clkhwops_wait,
2121 mcbsp2_fck_parent_names, clkout2_src_ck_ops);
2123 static struct clk mcbsp4_ick;
2125 static struct clk_hw_omap mcbsp4_ick_hw = {
2126 .hw = {
2127 .clk = &mcbsp4_ick,
2129 .ops = &clkhwops_iclk_wait,
2130 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2131 .enable_bit = OMAP3430_EN_MCBSP4_SHIFT,
2132 .clkdm_name = "per_clkdm",
2135 DEFINE_STRUCT_CLK(mcbsp4_ick, gpio2_ick_parent_names, aes2_ick_ops);
2137 DEFINE_CLK_OMAP_MUX_GATE(mcbsp5_fck, "core_l4_clkdm", mcbsp_15_clksel,
2138 OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
2139 OMAP2_MCBSP5_CLKS_MASK,
2140 OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2141 OMAP3430_EN_MCBSP5_SHIFT, &clkhwops_wait,
2142 mcbsp1_fck_parent_names, clkout2_src_ck_ops);
2144 static struct clk mcbsp5_ick;
2146 static struct clk_hw_omap mcbsp5_ick_hw = {
2147 .hw = {
2148 .clk = &mcbsp5_ick,
2150 .ops = &clkhwops_iclk_wait,
2151 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2152 .enable_bit = OMAP3430_EN_MCBSP5_SHIFT,
2153 .clkdm_name = "core_l4_clkdm",
2156 DEFINE_STRUCT_CLK(mcbsp5_ick, aes2_ick_parent_names, aes2_ick_ops);
2158 static struct clk mcspi1_fck;
2160 static struct clk_hw_omap mcspi1_fck_hw = {
2161 .hw = {
2162 .clk = &mcspi1_fck,
2164 .ops = &clkhwops_wait,
2165 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2166 .enable_bit = OMAP3430_EN_MCSPI1_SHIFT,
2167 .clkdm_name = "core_l4_clkdm",
2170 DEFINE_STRUCT_CLK(mcspi1_fck, fshostusb_fck_parent_names, aes2_ick_ops);
2172 static struct clk mcspi1_ick;
2174 static struct clk_hw_omap mcspi1_ick_hw = {
2175 .hw = {
2176 .clk = &mcspi1_ick,
2178 .ops = &clkhwops_iclk_wait,
2179 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2180 .enable_bit = OMAP3430_EN_MCSPI1_SHIFT,
2181 .clkdm_name = "core_l4_clkdm",
2184 DEFINE_STRUCT_CLK(mcspi1_ick, aes2_ick_parent_names, aes2_ick_ops);
2186 static struct clk mcspi2_fck;
2188 static struct clk_hw_omap mcspi2_fck_hw = {
2189 .hw = {
2190 .clk = &mcspi2_fck,
2192 .ops = &clkhwops_wait,
2193 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2194 .enable_bit = OMAP3430_EN_MCSPI2_SHIFT,
2195 .clkdm_name = "core_l4_clkdm",
2198 DEFINE_STRUCT_CLK(mcspi2_fck, fshostusb_fck_parent_names, aes2_ick_ops);
2200 static struct clk mcspi2_ick;
2202 static struct clk_hw_omap mcspi2_ick_hw = {
2203 .hw = {
2204 .clk = &mcspi2_ick,
2206 .ops = &clkhwops_iclk_wait,
2207 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2208 .enable_bit = OMAP3430_EN_MCSPI2_SHIFT,
2209 .clkdm_name = "core_l4_clkdm",
2212 DEFINE_STRUCT_CLK(mcspi2_ick, aes2_ick_parent_names, aes2_ick_ops);
2214 static struct clk mcspi3_fck;
2216 static struct clk_hw_omap mcspi3_fck_hw = {
2217 .hw = {
2218 .clk = &mcspi3_fck,
2220 .ops = &clkhwops_wait,
2221 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2222 .enable_bit = OMAP3430_EN_MCSPI3_SHIFT,
2223 .clkdm_name = "core_l4_clkdm",
2226 DEFINE_STRUCT_CLK(mcspi3_fck, fshostusb_fck_parent_names, aes2_ick_ops);
2228 static struct clk mcspi3_ick;
2230 static struct clk_hw_omap mcspi3_ick_hw = {
2231 .hw = {
2232 .clk = &mcspi3_ick,
2234 .ops = &clkhwops_iclk_wait,
2235 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2236 .enable_bit = OMAP3430_EN_MCSPI3_SHIFT,
2237 .clkdm_name = "core_l4_clkdm",
2240 DEFINE_STRUCT_CLK(mcspi3_ick, aes2_ick_parent_names, aes2_ick_ops);
2242 static struct clk mcspi4_fck;
2244 static struct clk_hw_omap mcspi4_fck_hw = {
2245 .hw = {
2246 .clk = &mcspi4_fck,
2248 .ops = &clkhwops_wait,
2249 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2250 .enable_bit = OMAP3430_EN_MCSPI4_SHIFT,
2251 .clkdm_name = "core_l4_clkdm",
2254 DEFINE_STRUCT_CLK(mcspi4_fck, fshostusb_fck_parent_names, aes2_ick_ops);
2256 static struct clk mcspi4_ick;
2258 static struct clk_hw_omap mcspi4_ick_hw = {
2259 .hw = {
2260 .clk = &mcspi4_ick,
2262 .ops = &clkhwops_iclk_wait,
2263 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2264 .enable_bit = OMAP3430_EN_MCSPI4_SHIFT,
2265 .clkdm_name = "core_l4_clkdm",
2268 DEFINE_STRUCT_CLK(mcspi4_ick, aes2_ick_parent_names, aes2_ick_ops);
2270 static struct clk mmchs1_fck;
2272 static struct clk_hw_omap mmchs1_fck_hw = {
2273 .hw = {
2274 .clk = &mmchs1_fck,
2276 .ops = &clkhwops_wait,
2277 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2278 .enable_bit = OMAP3430_EN_MMC1_SHIFT,
2279 .clkdm_name = "core_l4_clkdm",
2282 DEFINE_STRUCT_CLK(mmchs1_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
2284 static struct clk mmchs1_ick;
2286 static struct clk_hw_omap mmchs1_ick_hw = {
2287 .hw = {
2288 .clk = &mmchs1_ick,
2290 .ops = &clkhwops_iclk_wait,
2291 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2292 .enable_bit = OMAP3430_EN_MMC1_SHIFT,
2293 .clkdm_name = "core_l4_clkdm",
2296 DEFINE_STRUCT_CLK(mmchs1_ick, aes2_ick_parent_names, aes2_ick_ops);
2298 static struct clk mmchs2_fck;
2300 static struct clk_hw_omap mmchs2_fck_hw = {
2301 .hw = {
2302 .clk = &mmchs2_fck,
2304 .ops = &clkhwops_wait,
2305 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2306 .enable_bit = OMAP3430_EN_MMC2_SHIFT,
2307 .clkdm_name = "core_l4_clkdm",
2310 DEFINE_STRUCT_CLK(mmchs2_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
2312 static struct clk mmchs2_ick;
2314 static struct clk_hw_omap mmchs2_ick_hw = {
2315 .hw = {
2316 .clk = &mmchs2_ick,
2318 .ops = &clkhwops_iclk_wait,
2319 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2320 .enable_bit = OMAP3430_EN_MMC2_SHIFT,
2321 .clkdm_name = "core_l4_clkdm",
2324 DEFINE_STRUCT_CLK(mmchs2_ick, aes2_ick_parent_names, aes2_ick_ops);
2326 static struct clk mmchs3_fck;
2328 static struct clk_hw_omap mmchs3_fck_hw = {
2329 .hw = {
2330 .clk = &mmchs3_fck,
2332 .ops = &clkhwops_wait,
2333 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2334 .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT,
2335 .clkdm_name = "core_l4_clkdm",
2338 DEFINE_STRUCT_CLK(mmchs3_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
2340 static struct clk mmchs3_ick;
2342 static struct clk_hw_omap mmchs3_ick_hw = {
2343 .hw = {
2344 .clk = &mmchs3_ick,
2346 .ops = &clkhwops_iclk_wait,
2347 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2348 .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT,
2349 .clkdm_name = "core_l4_clkdm",
2352 DEFINE_STRUCT_CLK(mmchs3_ick, aes2_ick_parent_names, aes2_ick_ops);
2354 static struct clk modem_fck;
2356 static struct clk_hw_omap modem_fck_hw = {
2357 .hw = {
2358 .clk = &modem_fck,
2360 .ops = &clkhwops_iclk_wait,
2361 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2362 .enable_bit = OMAP3430_EN_MODEM_SHIFT,
2363 .clkdm_name = "d2d_clkdm",
2366 DEFINE_STRUCT_CLK(modem_fck, dpll3_ck_parent_names, aes2_ick_ops);
2368 static struct clk mspro_fck;
2370 static struct clk_hw_omap mspro_fck_hw = {
2371 .hw = {
2372 .clk = &mspro_fck,
2374 .ops = &clkhwops_wait,
2375 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2376 .enable_bit = OMAP3430_EN_MSPRO_SHIFT,
2377 .clkdm_name = "core_l4_clkdm",
2380 DEFINE_STRUCT_CLK(mspro_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
2382 static struct clk mspro_ick;
2384 static struct clk_hw_omap mspro_ick_hw = {
2385 .hw = {
2386 .clk = &mspro_ick,
2388 .ops = &clkhwops_iclk_wait,
2389 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2390 .enable_bit = OMAP3430_EN_MSPRO_SHIFT,
2391 .clkdm_name = "core_l4_clkdm",
2394 DEFINE_STRUCT_CLK(mspro_ick, aes2_ick_parent_names, aes2_ick_ops);
2396 static struct clk omap_192m_alwon_fck;
2398 DEFINE_STRUCT_CLK_HW_OMAP(omap_192m_alwon_fck, NULL);
2399 DEFINE_STRUCT_CLK(omap_192m_alwon_fck, omap_96m_alwon_fck_parent_names,
2400 core_ck_ops);
2402 static struct clk omap_32ksync_ick;
2404 static struct clk_hw_omap omap_32ksync_ick_hw = {
2405 .hw = {
2406 .clk = &omap_32ksync_ick,
2408 .ops = &clkhwops_iclk_wait,
2409 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2410 .enable_bit = OMAP3430_EN_32KSYNC_SHIFT,
2411 .clkdm_name = "wkup_clkdm",
2414 DEFINE_STRUCT_CLK(omap_32ksync_ick, gpio1_ick_parent_names, aes2_ick_ops);
2416 static const struct clksel_rate omap_96m_alwon_fck_rates[] = {
2417 { .div = 1, .val = 1, .flags = RATE_IN_36XX },
2418 { .div = 2, .val = 2, .flags = RATE_IN_36XX },
2419 { .div = 0 }
2422 static const struct clksel omap_96m_alwon_fck_clksel[] = {
2423 { .parent = &omap_192m_alwon_fck, .rates = omap_96m_alwon_fck_rates },
2424 { .parent = NULL }
2427 static struct clk omap_96m_alwon_fck_3630;
2429 static const char *omap_96m_alwon_fck_3630_parent_names[] = {
2430 "omap_192m_alwon_fck",
2433 static const struct clk_ops omap_96m_alwon_fck_3630_ops = {
2434 .set_rate = &omap2_clksel_set_rate,
2435 .recalc_rate = &omap2_clksel_recalc,
2436 .round_rate = &omap2_clksel_round_rate,
2439 static struct clk_hw_omap omap_96m_alwon_fck_3630_hw = {
2440 .hw = {
2441 .clk = &omap_96m_alwon_fck_3630,
2443 .clksel = omap_96m_alwon_fck_clksel,
2444 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
2445 .clksel_mask = OMAP3630_CLKSEL_96M_MASK,
2448 static struct clk omap_96m_alwon_fck_3630 = {
2449 .name = "omap_96m_alwon_fck",
2450 .hw = &omap_96m_alwon_fck_3630_hw.hw,
2451 .parent_names = omap_96m_alwon_fck_3630_parent_names,
2452 .num_parents = ARRAY_SIZE(omap_96m_alwon_fck_3630_parent_names),
2453 .ops = &omap_96m_alwon_fck_3630_ops,
2456 static struct clk omapctrl_ick;
2458 static struct clk_hw_omap omapctrl_ick_hw = {
2459 .hw = {
2460 .clk = &omapctrl_ick,
2462 .ops = &clkhwops_iclk_wait,
2463 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2464 .enable_bit = OMAP3430_EN_OMAPCTRL_SHIFT,
2465 .flags = ENABLE_ON_INIT,
2466 .clkdm_name = "core_l4_clkdm",
2469 DEFINE_STRUCT_CLK(omapctrl_ick, aes2_ick_parent_names, aes2_ick_ops);
2471 DEFINE_CLK_DIVIDER(pclk_fck, "emu_src_ck", &emu_src_ck, 0x0,
2472 OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2473 OMAP3430_CLKSEL_PCLK_SHIFT, OMAP3430_CLKSEL_PCLK_WIDTH,
2474 CLK_DIVIDER_ONE_BASED, NULL);
2476 DEFINE_CLK_DIVIDER(pclkx2_fck, "emu_src_ck", &emu_src_ck, 0x0,
2477 OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2478 OMAP3430_CLKSEL_PCLKX2_SHIFT, OMAP3430_CLKSEL_PCLKX2_WIDTH,
2479 CLK_DIVIDER_ONE_BASED, NULL);
2481 static struct clk per_48m_fck;
2483 DEFINE_STRUCT_CLK_HW_OMAP(per_48m_fck, "per_clkdm");
2484 DEFINE_STRUCT_CLK(per_48m_fck, core_48m_fck_parent_names, core_l4_ick_ops);
2486 static struct clk security_l3_ick;
2488 DEFINE_STRUCT_CLK_HW_OMAP(security_l3_ick, NULL);
2489 DEFINE_STRUCT_CLK(security_l3_ick, core_l3_ick_parent_names, core_ck_ops);
2491 static struct clk pka_ick;
2493 static const char *pka_ick_parent_names[] = {
2494 "security_l3_ick",
2497 static struct clk_hw_omap pka_ick_hw = {
2498 .hw = {
2499 .clk = &pka_ick,
2501 .ops = &clkhwops_iclk_wait,
2502 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2503 .enable_bit = OMAP3430_EN_PKA_SHIFT,
2506 DEFINE_STRUCT_CLK(pka_ick, pka_ick_parent_names, aes1_ick_ops);
2508 DEFINE_CLK_DIVIDER(rm_ick, "l4_ick", &l4_ick, 0x0,
2509 OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
2510 OMAP3430_CLKSEL_RM_SHIFT, OMAP3430_CLKSEL_RM_WIDTH,
2511 CLK_DIVIDER_ONE_BASED, NULL);
2513 static struct clk rng_ick;
2515 static struct clk_hw_omap rng_ick_hw = {
2516 .hw = {
2517 .clk = &rng_ick,
2519 .ops = &clkhwops_iclk_wait,
2520 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2521 .enable_bit = OMAP3430_EN_RNG_SHIFT,
2524 DEFINE_STRUCT_CLK(rng_ick, aes1_ick_parent_names, aes1_ick_ops);
2526 static struct clk sad2d_ick;
2528 static struct clk_hw_omap sad2d_ick_hw = {
2529 .hw = {
2530 .clk = &sad2d_ick,
2532 .ops = &clkhwops_iclk_wait,
2533 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2534 .enable_bit = OMAP3430_EN_SAD2D_SHIFT,
2535 .clkdm_name = "d2d_clkdm",
2538 DEFINE_STRUCT_CLK(sad2d_ick, core_l3_ick_parent_names, aes2_ick_ops);
2540 static struct clk sdrc_ick;
2542 static struct clk_hw_omap sdrc_ick_hw = {
2543 .hw = {
2544 .clk = &sdrc_ick,
2546 .ops = &clkhwops_wait,
2547 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2548 .enable_bit = OMAP3430_EN_SDRC_SHIFT,
2549 .flags = ENABLE_ON_INIT,
2550 .clkdm_name = "core_l3_clkdm",
2553 DEFINE_STRUCT_CLK(sdrc_ick, ipss_ick_parent_names, aes2_ick_ops);
2555 static const struct clksel_rate sgx_core_rates[] = {
2556 { .div = 2, .val = 5, .flags = RATE_IN_36XX },
2557 { .div = 3, .val = 0, .flags = RATE_IN_3XXX },
2558 { .div = 4, .val = 1, .flags = RATE_IN_3XXX },
2559 { .div = 6, .val = 2, .flags = RATE_IN_3XXX },
2560 { .div = 0 }
2563 static const struct clksel_rate sgx_96m_rates[] = {
2564 { .div = 1, .val = 3, .flags = RATE_IN_3XXX },
2565 { .div = 0 }
2568 static const struct clksel_rate sgx_192m_rates[] = {
2569 { .div = 1, .val = 4, .flags = RATE_IN_36XX },
2570 { .div = 0 }
2573 static const struct clksel_rate sgx_corex2_rates[] = {
2574 { .div = 3, .val = 6, .flags = RATE_IN_36XX },
2575 { .div = 5, .val = 7, .flags = RATE_IN_36XX },
2576 { .div = 0 }
2579 static const struct clksel sgx_clksel[] = {
2580 { .parent = &core_ck, .rates = sgx_core_rates },
2581 { .parent = &cm_96m_fck, .rates = sgx_96m_rates },
2582 { .parent = &omap_192m_alwon_fck, .rates = sgx_192m_rates },
2583 { .parent = &corex2_fck, .rates = sgx_corex2_rates },
2584 { .parent = NULL },
2587 static const char *sgx_fck_parent_names[] = {
2588 "core_ck", "cm_96m_fck", "omap_192m_alwon_fck", "corex2_fck",
2591 static struct clk sgx_fck;
2593 static const struct clk_ops sgx_fck_ops = {
2594 .init = &omap2_init_clk_clkdm,
2595 .enable = &omap2_dflt_clk_enable,
2596 .disable = &omap2_dflt_clk_disable,
2597 .is_enabled = &omap2_dflt_clk_is_enabled,
2598 .recalc_rate = &omap2_clksel_recalc,
2599 .set_rate = &omap2_clksel_set_rate,
2600 .round_rate = &omap2_clksel_round_rate,
2601 .get_parent = &omap2_clksel_find_parent_index,
2602 .set_parent = &omap2_clksel_set_parent,
2605 DEFINE_CLK_OMAP_MUX_GATE(sgx_fck, "sgx_clkdm", sgx_clksel,
2606 OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_CLKSEL),
2607 OMAP3430ES2_CLKSEL_SGX_MASK,
2608 OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_FCLKEN),
2609 OMAP3430ES2_CM_FCLKEN_SGX_EN_SGX_SHIFT,
2610 &clkhwops_wait, sgx_fck_parent_names, sgx_fck_ops);
2612 static struct clk sgx_ick;
2614 static struct clk_hw_omap sgx_ick_hw = {
2615 .hw = {
2616 .clk = &sgx_ick,
2618 .ops = &clkhwops_wait,
2619 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_ICLKEN),
2620 .enable_bit = OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT,
2621 .clkdm_name = "sgx_clkdm",
2624 DEFINE_STRUCT_CLK(sgx_ick, core_l3_ick_parent_names, aes2_ick_ops);
2626 static struct clk sha11_ick;
2628 static struct clk_hw_omap sha11_ick_hw = {
2629 .hw = {
2630 .clk = &sha11_ick,
2632 .ops = &clkhwops_iclk_wait,
2633 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2634 .enable_bit = OMAP3430_EN_SHA11_SHIFT,
2637 DEFINE_STRUCT_CLK(sha11_ick, aes1_ick_parent_names, aes1_ick_ops);
2639 static struct clk sha12_ick;
2641 static struct clk_hw_omap sha12_ick_hw = {
2642 .hw = {
2643 .clk = &sha12_ick,
2645 .ops = &clkhwops_iclk_wait,
2646 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2647 .enable_bit = OMAP3430_EN_SHA12_SHIFT,
2648 .clkdm_name = "core_l4_clkdm",
2651 DEFINE_STRUCT_CLK(sha12_ick, aes2_ick_parent_names, aes2_ick_ops);
2653 static struct clk sr1_fck;
2655 static struct clk_hw_omap sr1_fck_hw = {
2656 .hw = {
2657 .clk = &sr1_fck,
2659 .ops = &clkhwops_wait,
2660 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2661 .enable_bit = OMAP3430_EN_SR1_SHIFT,
2662 .clkdm_name = "wkup_clkdm",
2665 DEFINE_STRUCT_CLK(sr1_fck, dpll3_ck_parent_names, aes2_ick_ops);
2667 static struct clk sr2_fck;
2669 static struct clk_hw_omap sr2_fck_hw = {
2670 .hw = {
2671 .clk = &sr2_fck,
2673 .ops = &clkhwops_wait,
2674 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2675 .enable_bit = OMAP3430_EN_SR2_SHIFT,
2676 .clkdm_name = "wkup_clkdm",
2679 DEFINE_STRUCT_CLK(sr2_fck, dpll3_ck_parent_names, aes2_ick_ops);
2681 static struct clk sr_l4_ick;
2683 DEFINE_STRUCT_CLK_HW_OMAP(sr_l4_ick, "core_l4_clkdm");
2684 DEFINE_STRUCT_CLK(sr_l4_ick, security_l4_ick2_parent_names, core_l4_ick_ops);
2686 static struct clk ssi_l4_ick;
2688 DEFINE_STRUCT_CLK_HW_OMAP(ssi_l4_ick, "core_l4_clkdm");
2689 DEFINE_STRUCT_CLK(ssi_l4_ick, security_l4_ick2_parent_names, core_l4_ick_ops);
2691 static struct clk ssi_ick_3430es1;
2693 static const char *ssi_ick_3430es1_parent_names[] = {
2694 "ssi_l4_ick",
2697 static struct clk_hw_omap ssi_ick_3430es1_hw = {
2698 .hw = {
2699 .clk = &ssi_ick_3430es1,
2701 .ops = &clkhwops_iclk,
2702 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2703 .enable_bit = OMAP3430_EN_SSI_SHIFT,
2704 .clkdm_name = "core_l4_clkdm",
2707 DEFINE_STRUCT_CLK(ssi_ick_3430es1, ssi_ick_3430es1_parent_names, aes2_ick_ops);
2709 static struct clk ssi_ick_3430es2;
2711 static struct clk_hw_omap ssi_ick_3430es2_hw = {
2712 .hw = {
2713 .clk = &ssi_ick_3430es2,
2715 .ops = &clkhwops_omap3430es2_iclk_ssi_wait,
2716 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2717 .enable_bit = OMAP3430_EN_SSI_SHIFT,
2718 .clkdm_name = "core_l4_clkdm",
2721 DEFINE_STRUCT_CLK(ssi_ick_3430es2, ssi_ick_3430es1_parent_names, aes2_ick_ops);
2723 static const struct clksel_rate ssi_ssr_corex2_rates[] = {
2724 { .div = 1, .val = 1, .flags = RATE_IN_3XXX },
2725 { .div = 2, .val = 2, .flags = RATE_IN_3XXX },
2726 { .div = 3, .val = 3, .flags = RATE_IN_3XXX },
2727 { .div = 4, .val = 4, .flags = RATE_IN_3XXX },
2728 { .div = 6, .val = 6, .flags = RATE_IN_3XXX },
2729 { .div = 8, .val = 8, .flags = RATE_IN_3XXX },
2730 { .div = 0 }
2733 static const struct clksel ssi_ssr_clksel[] = {
2734 { .parent = &corex2_fck, .rates = ssi_ssr_corex2_rates },
2735 { .parent = NULL },
2738 static const char *ssi_ssr_fck_3430es1_parent_names[] = {
2739 "corex2_fck",
2742 static const struct clk_ops ssi_ssr_fck_3430es1_ops = {
2743 .init = &omap2_init_clk_clkdm,
2744 .enable = &omap2_dflt_clk_enable,
2745 .disable = &omap2_dflt_clk_disable,
2746 .is_enabled = &omap2_dflt_clk_is_enabled,
2747 .recalc_rate = &omap2_clksel_recalc,
2748 .set_rate = &omap2_clksel_set_rate,
2749 .round_rate = &omap2_clksel_round_rate,
2752 DEFINE_CLK_OMAP_MUX_GATE(ssi_ssr_fck_3430es1, "core_l4_clkdm",
2753 ssi_ssr_clksel, OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
2754 OMAP3430_CLKSEL_SSI_MASK,
2755 OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2756 OMAP3430_EN_SSI_SHIFT,
2757 NULL, ssi_ssr_fck_3430es1_parent_names,
2758 ssi_ssr_fck_3430es1_ops);
2760 DEFINE_CLK_OMAP_MUX_GATE(ssi_ssr_fck_3430es2, "core_l4_clkdm",
2761 ssi_ssr_clksel, OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
2762 OMAP3430_CLKSEL_SSI_MASK,
2763 OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2764 OMAP3430_EN_SSI_SHIFT,
2765 NULL, ssi_ssr_fck_3430es1_parent_names,
2766 ssi_ssr_fck_3430es1_ops);
2768 DEFINE_CLK_FIXED_FACTOR(ssi_sst_fck_3430es1, "ssi_ssr_fck_3430es1",
2769 &ssi_ssr_fck_3430es1, 0x0, 1, 2);
2771 DEFINE_CLK_FIXED_FACTOR(ssi_sst_fck_3430es2, "ssi_ssr_fck_3430es2",
2772 &ssi_ssr_fck_3430es2, 0x0, 1, 2);
2774 static struct clk sys_clkout1;
2776 static const char *sys_clkout1_parent_names[] = {
2777 "osc_sys_ck",
2780 static struct clk_hw_omap sys_clkout1_hw = {
2781 .hw = {
2782 .clk = &sys_clkout1,
2784 .enable_reg = OMAP3430_PRM_CLKOUT_CTRL,
2785 .enable_bit = OMAP3430_CLKOUT_EN_SHIFT,
2788 DEFINE_STRUCT_CLK(sys_clkout1, sys_clkout1_parent_names, aes1_ick_ops);
2790 DEFINE_CLK_DIVIDER(sys_clkout2, "clkout2_src_ck", &clkout2_src_ck, 0x0,
2791 OMAP3430_CM_CLKOUT_CTRL, OMAP3430_CLKOUT2_DIV_SHIFT,
2792 OMAP3430_CLKOUT2_DIV_WIDTH, CLK_DIVIDER_POWER_OF_TWO, NULL);
2794 DEFINE_CLK_MUX(traceclk_src_fck, emu_src_ck_parent_names, NULL, 0x0,
2795 OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2796 OMAP3430_TRACE_MUX_CTRL_SHIFT, OMAP3430_TRACE_MUX_CTRL_WIDTH,
2797 0x0, NULL);
2799 DEFINE_CLK_DIVIDER(traceclk_fck, "traceclk_src_fck", &traceclk_src_fck, 0x0,
2800 OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2801 OMAP3430_CLKSEL_TRACECLK_SHIFT,
2802 OMAP3430_CLKSEL_TRACECLK_WIDTH, CLK_DIVIDER_ONE_BASED, NULL);
2804 static struct clk ts_fck;
2806 static struct clk_hw_omap ts_fck_hw = {
2807 .hw = {
2808 .clk = &ts_fck,
2810 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
2811 .enable_bit = OMAP3430ES2_EN_TS_SHIFT,
2812 .clkdm_name = "core_l4_clkdm",
2815 DEFINE_STRUCT_CLK(ts_fck, wkup_32k_fck_parent_names, aes2_ick_ops);
2817 static struct clk uart1_fck;
2819 static struct clk_hw_omap uart1_fck_hw = {
2820 .hw = {
2821 .clk = &uart1_fck,
2823 .ops = &clkhwops_wait,
2824 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2825 .enable_bit = OMAP3430_EN_UART1_SHIFT,
2826 .clkdm_name = "core_l4_clkdm",
2829 DEFINE_STRUCT_CLK(uart1_fck, fshostusb_fck_parent_names, aes2_ick_ops);
2831 static struct clk uart1_ick;
2833 static struct clk_hw_omap uart1_ick_hw = {
2834 .hw = {
2835 .clk = &uart1_ick,
2837 .ops = &clkhwops_iclk_wait,
2838 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2839 .enable_bit = OMAP3430_EN_UART1_SHIFT,
2840 .clkdm_name = "core_l4_clkdm",
2843 DEFINE_STRUCT_CLK(uart1_ick, aes2_ick_parent_names, aes2_ick_ops);
2845 static struct clk uart2_fck;
2847 static struct clk_hw_omap uart2_fck_hw = {
2848 .hw = {
2849 .clk = &uart2_fck,
2851 .ops = &clkhwops_wait,
2852 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2853 .enable_bit = OMAP3430_EN_UART2_SHIFT,
2854 .clkdm_name = "core_l4_clkdm",
2857 DEFINE_STRUCT_CLK(uart2_fck, fshostusb_fck_parent_names, aes2_ick_ops);
2859 static struct clk uart2_ick;
2861 static struct clk_hw_omap uart2_ick_hw = {
2862 .hw = {
2863 .clk = &uart2_ick,
2865 .ops = &clkhwops_iclk_wait,
2866 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2867 .enable_bit = OMAP3430_EN_UART2_SHIFT,
2868 .clkdm_name = "core_l4_clkdm",
2871 DEFINE_STRUCT_CLK(uart2_ick, aes2_ick_parent_names, aes2_ick_ops);
2873 static struct clk uart3_fck;
2875 static const char *uart3_fck_parent_names[] = {
2876 "per_48m_fck",
2879 static struct clk_hw_omap uart3_fck_hw = {
2880 .hw = {
2881 .clk = &uart3_fck,
2883 .ops = &clkhwops_wait,
2884 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2885 .enable_bit = OMAP3430_EN_UART3_SHIFT,
2886 .clkdm_name = "per_clkdm",
2889 DEFINE_STRUCT_CLK(uart3_fck, uart3_fck_parent_names, aes2_ick_ops);
2891 static struct clk uart3_ick;
2893 static struct clk_hw_omap uart3_ick_hw = {
2894 .hw = {
2895 .clk = &uart3_ick,
2897 .ops = &clkhwops_iclk_wait,
2898 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2899 .enable_bit = OMAP3430_EN_UART3_SHIFT,
2900 .clkdm_name = "per_clkdm",
2903 DEFINE_STRUCT_CLK(uart3_ick, gpio2_ick_parent_names, aes2_ick_ops);
2905 static struct clk uart4_fck;
2907 static struct clk_hw_omap uart4_fck_hw = {
2908 .hw = {
2909 .clk = &uart4_fck,
2911 .ops = &clkhwops_wait,
2912 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2913 .enable_bit = OMAP3630_EN_UART4_SHIFT,
2914 .clkdm_name = "per_clkdm",
2917 DEFINE_STRUCT_CLK(uart4_fck, uart3_fck_parent_names, aes2_ick_ops);
2919 static struct clk uart4_fck_am35xx;
2921 static struct clk_hw_omap uart4_fck_am35xx_hw = {
2922 .hw = {
2923 .clk = &uart4_fck_am35xx,
2925 .ops = &clkhwops_wait,
2926 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2927 .enable_bit = AM35XX_EN_UART4_SHIFT,
2928 .clkdm_name = "core_l4_clkdm",
2931 DEFINE_STRUCT_CLK(uart4_fck_am35xx, fshostusb_fck_parent_names, aes2_ick_ops);
2933 static struct clk uart4_ick;
2935 static struct clk_hw_omap uart4_ick_hw = {
2936 .hw = {
2937 .clk = &uart4_ick,
2939 .ops = &clkhwops_iclk_wait,
2940 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2941 .enable_bit = OMAP3630_EN_UART4_SHIFT,
2942 .clkdm_name = "per_clkdm",
2945 DEFINE_STRUCT_CLK(uart4_ick, gpio2_ick_parent_names, aes2_ick_ops);
2947 static struct clk uart4_ick_am35xx;
2949 static struct clk_hw_omap uart4_ick_am35xx_hw = {
2950 .hw = {
2951 .clk = &uart4_ick_am35xx,
2953 .ops = &clkhwops_iclk_wait,
2954 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2955 .enable_bit = AM35XX_EN_UART4_SHIFT,
2956 .clkdm_name = "core_l4_clkdm",
2959 DEFINE_STRUCT_CLK(uart4_ick_am35xx, aes2_ick_parent_names, aes2_ick_ops);
2961 static const struct clksel_rate div2_rates[] = {
2962 { .div = 1, .val = 1, .flags = RATE_IN_3XXX },
2963 { .div = 2, .val = 2, .flags = RATE_IN_3XXX },
2964 { .div = 0 }
2967 static const struct clksel usb_l4_clksel[] = {
2968 { .parent = &l4_ick, .rates = div2_rates },
2969 { .parent = NULL },
2972 static const char *usb_l4_ick_parent_names[] = {
2973 "l4_ick",
2976 DEFINE_CLK_OMAP_MUX_GATE(usb_l4_ick, "core_l4_clkdm", usb_l4_clksel,
2977 OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
2978 OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK,
2979 OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2980 OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
2981 &clkhwops_iclk_wait, usb_l4_ick_parent_names,
2982 ssi_ssr_fck_3430es1_ops);
2984 static struct clk usbhost_120m_fck;
2986 static const char *usbhost_120m_fck_parent_names[] = {
2987 "dpll5_m2_ck",
2990 static struct clk_hw_omap usbhost_120m_fck_hw = {
2991 .hw = {
2992 .clk = &usbhost_120m_fck,
2994 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
2995 .enable_bit = OMAP3430ES2_EN_USBHOST2_SHIFT,
2996 .clkdm_name = "usbhost_clkdm",
2999 DEFINE_STRUCT_CLK(usbhost_120m_fck, usbhost_120m_fck_parent_names,
3000 aes2_ick_ops);
3002 static struct clk usbhost_48m_fck;
3004 static struct clk_hw_omap usbhost_48m_fck_hw = {
3005 .hw = {
3006 .clk = &usbhost_48m_fck,
3008 .ops = &clkhwops_omap3430es2_dss_usbhost_wait,
3009 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
3010 .enable_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
3011 .clkdm_name = "usbhost_clkdm",
3014 DEFINE_STRUCT_CLK(usbhost_48m_fck, core_48m_fck_parent_names, aes2_ick_ops);
3016 static struct clk usbhost_ick;
3018 static struct clk_hw_omap usbhost_ick_hw = {
3019 .hw = {
3020 .clk = &usbhost_ick,
3022 .ops = &clkhwops_omap3430es2_iclk_dss_usbhost_wait,
3023 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN),
3024 .enable_bit = OMAP3430ES2_EN_USBHOST_SHIFT,
3025 .clkdm_name = "usbhost_clkdm",
3028 DEFINE_STRUCT_CLK(usbhost_ick, security_l4_ick2_parent_names, aes2_ick_ops);
3030 static struct clk usbtll_fck;
3032 static struct clk_hw_omap usbtll_fck_hw = {
3033 .hw = {
3034 .clk = &usbtll_fck,
3036 .ops = &clkhwops_wait,
3037 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
3038 .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
3039 .clkdm_name = "core_l4_clkdm",
3042 DEFINE_STRUCT_CLK(usbtll_fck, usbhost_120m_fck_parent_names, aes2_ick_ops);
3044 static struct clk usbtll_ick;
3046 static struct clk_hw_omap usbtll_ick_hw = {
3047 .hw = {
3048 .clk = &usbtll_ick,
3050 .ops = &clkhwops_iclk_wait,
3051 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
3052 .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
3053 .clkdm_name = "core_l4_clkdm",
3056 DEFINE_STRUCT_CLK(usbtll_ick, aes2_ick_parent_names, aes2_ick_ops);
3058 static const struct clksel_rate usim_96m_rates[] = {
3059 { .div = 2, .val = 3, .flags = RATE_IN_3XXX },
3060 { .div = 4, .val = 4, .flags = RATE_IN_3XXX },
3061 { .div = 8, .val = 5, .flags = RATE_IN_3XXX },
3062 { .div = 10, .val = 6, .flags = RATE_IN_3XXX },
3063 { .div = 0 }
3066 static const struct clksel_rate usim_120m_rates[] = {
3067 { .div = 4, .val = 7, .flags = RATE_IN_3XXX },
3068 { .div = 8, .val = 8, .flags = RATE_IN_3XXX },
3069 { .div = 16, .val = 9, .flags = RATE_IN_3XXX },
3070 { .div = 20, .val = 10, .flags = RATE_IN_3XXX },
3071 { .div = 0 }
3074 static const struct clksel usim_clksel[] = {
3075 { .parent = &omap_96m_fck, .rates = usim_96m_rates },
3076 { .parent = &dpll5_m2_ck, .rates = usim_120m_rates },
3077 { .parent = &sys_ck, .rates = div2_rates },
3078 { .parent = NULL },
3081 static const char *usim_fck_parent_names[] = {
3082 "omap_96m_fck", "dpll5_m2_ck", "sys_ck",
3085 static struct clk usim_fck;
3087 static const struct clk_ops usim_fck_ops = {
3088 .enable = &omap2_dflt_clk_enable,
3089 .disable = &omap2_dflt_clk_disable,
3090 .is_enabled = &omap2_dflt_clk_is_enabled,
3091 .recalc_rate = &omap2_clksel_recalc,
3092 .get_parent = &omap2_clksel_find_parent_index,
3093 .set_parent = &omap2_clksel_set_parent,
3096 DEFINE_CLK_OMAP_MUX_GATE(usim_fck, NULL, usim_clksel,
3097 OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
3098 OMAP3430ES2_CLKSEL_USIMOCP_MASK,
3099 OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
3100 OMAP3430ES2_EN_USIMOCP_SHIFT, &clkhwops_wait,
3101 usim_fck_parent_names, usim_fck_ops);
3103 static struct clk usim_ick;
3105 static struct clk_hw_omap usim_ick_hw = {
3106 .hw = {
3107 .clk = &usim_ick,
3109 .ops = &clkhwops_iclk_wait,
3110 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
3111 .enable_bit = OMAP3430ES2_EN_USIMOCP_SHIFT,
3112 .clkdm_name = "wkup_clkdm",
3115 DEFINE_STRUCT_CLK(usim_ick, gpio1_ick_parent_names, aes2_ick_ops);
3117 static struct clk vpfe_fck;
3119 static const char *vpfe_fck_parent_names[] = {
3120 "pclk_ck",
3123 static struct clk_hw_omap vpfe_fck_hw = {
3124 .hw = {
3125 .clk = &vpfe_fck,
3127 .enable_reg = OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL),
3128 .enable_bit = AM35XX_VPFE_FCLK_SHIFT,
3131 DEFINE_STRUCT_CLK(vpfe_fck, vpfe_fck_parent_names, aes1_ick_ops);
3133 static struct clk vpfe_ick;
3135 static struct clk_hw_omap vpfe_ick_hw = {
3136 .hw = {
3137 .clk = &vpfe_ick,
3139 .ops = &clkhwops_am35xx_ipss_module_wait,
3140 .enable_reg = OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL),
3141 .enable_bit = AM35XX_VPFE_VBUSP_CLK_SHIFT,
3142 .clkdm_name = "core_l3_clkdm",
3145 DEFINE_STRUCT_CLK(vpfe_ick, emac_ick_parent_names, aes2_ick_ops);
3147 static struct clk wdt1_fck;
3149 DEFINE_STRUCT_CLK_HW_OMAP(wdt1_fck, "wkup_clkdm");
3150 DEFINE_STRUCT_CLK(wdt1_fck, gpt12_fck_parent_names, core_l4_ick_ops);
3152 static struct clk wdt1_ick;
3154 static struct clk_hw_omap wdt1_ick_hw = {
3155 .hw = {
3156 .clk = &wdt1_ick,
3158 .ops = &clkhwops_iclk_wait,
3159 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
3160 .enable_bit = OMAP3430_EN_WDT1_SHIFT,
3161 .clkdm_name = "wkup_clkdm",
3164 DEFINE_STRUCT_CLK(wdt1_ick, gpio1_ick_parent_names, aes2_ick_ops);
3166 static struct clk wdt2_fck;
3168 static struct clk_hw_omap wdt2_fck_hw = {
3169 .hw = {
3170 .clk = &wdt2_fck,
3172 .ops = &clkhwops_wait,
3173 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
3174 .enable_bit = OMAP3430_EN_WDT2_SHIFT,
3175 .clkdm_name = "wkup_clkdm",
3178 DEFINE_STRUCT_CLK(wdt2_fck, gpio1_dbck_parent_names, aes2_ick_ops);
3180 static struct clk wdt2_ick;
3182 static struct clk_hw_omap wdt2_ick_hw = {
3183 .hw = {
3184 .clk = &wdt2_ick,
3186 .ops = &clkhwops_iclk_wait,
3187 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
3188 .enable_bit = OMAP3430_EN_WDT2_SHIFT,
3189 .clkdm_name = "wkup_clkdm",
3192 DEFINE_STRUCT_CLK(wdt2_ick, gpio1_ick_parent_names, aes2_ick_ops);
3194 static struct clk wdt3_fck;
3196 static struct clk_hw_omap wdt3_fck_hw = {
3197 .hw = {
3198 .clk = &wdt3_fck,
3200 .ops = &clkhwops_wait,
3201 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
3202 .enable_bit = OMAP3430_EN_WDT3_SHIFT,
3203 .clkdm_name = "per_clkdm",
3206 DEFINE_STRUCT_CLK(wdt3_fck, gpio2_dbck_parent_names, aes2_ick_ops);
3208 static struct clk wdt3_ick;
3210 static struct clk_hw_omap wdt3_ick_hw = {
3211 .hw = {
3212 .clk = &wdt3_ick,
3214 .ops = &clkhwops_iclk_wait,
3215 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
3216 .enable_bit = OMAP3430_EN_WDT3_SHIFT,
3217 .clkdm_name = "per_clkdm",
3220 DEFINE_STRUCT_CLK(wdt3_ick, gpio2_ick_parent_names, aes2_ick_ops);
3223 * clocks specific to omap3430es1
3225 static struct omap_clk omap3430es1_clks[] = {
3226 CLK(NULL, "gfx_l3_ck", &gfx_l3_ck),
3227 CLK(NULL, "gfx_l3_fck", &gfx_l3_fck),
3228 CLK(NULL, "gfx_l3_ick", &gfx_l3_ick),
3229 CLK(NULL, "gfx_cg1_ck", &gfx_cg1_ck),
3230 CLK(NULL, "gfx_cg2_ck", &gfx_cg2_ck),
3231 CLK(NULL, "d2d_26m_fck", &d2d_26m_fck),
3232 CLK(NULL, "fshostusb_fck", &fshostusb_fck),
3233 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es1),
3234 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1),
3235 CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es1),
3236 CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_3430es1),
3237 CLK(NULL, "fac_ick", &fac_ick),
3238 CLK(NULL, "ssi_ick", &ssi_ick_3430es1),
3239 CLK(NULL, "usb_l4_ick", &usb_l4_ick),
3240 CLK(NULL, "dss1_alwon_fck", &dss1_alwon_fck_3430es1),
3241 CLK("omapdss_dss", "ick", &dss_ick_3430es1),
3242 CLK(NULL, "dss_ick", &dss_ick_3430es1),
3246 * clocks specific to am35xx
3248 static struct omap_clk am35xx_clks[] = {
3249 CLK(NULL, "ipss_ick", &ipss_ick),
3250 CLK(NULL, "rmii_ck", &rmii_ck),
3251 CLK(NULL, "pclk_ck", &pclk_ck),
3252 CLK(NULL, "emac_ick", &emac_ick),
3253 CLK(NULL, "emac_fck", &emac_fck),
3254 CLK("davinci_emac.0", NULL, &emac_ick),
3255 CLK("davinci_mdio.0", NULL, &emac_fck),
3256 CLK("vpfe-capture", "master", &vpfe_ick),
3257 CLK("vpfe-capture", "slave", &vpfe_fck),
3258 CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_am35xx),
3259 CLK(NULL, "hsotgusb_fck", &hsotgusb_fck_am35xx),
3260 CLK(NULL, "hecc_ck", &hecc_ck),
3261 CLK(NULL, "uart4_ick", &uart4_ick_am35xx),
3262 CLK(NULL, "uart4_fck", &uart4_fck_am35xx),
3266 * clocks specific to omap36xx
3268 static struct omap_clk omap36xx_clks[] = {
3269 CLK(NULL, "omap_192m_alwon_fck", &omap_192m_alwon_fck),
3270 CLK(NULL, "uart4_fck", &uart4_fck),
3274 * clocks common to omap36xx omap34xx
3276 static struct omap_clk omap34xx_omap36xx_clks[] = {
3277 CLK(NULL, "aes1_ick", &aes1_ick),
3278 CLK("omap_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),
3346 * common clocks
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[] = {
3536 "sdrc_ick",
3537 "gpmc_fck",
3538 "omapctrl_ick",
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;
3561 else
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));
3600 } else {
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));
3615 } else {
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
3632 * handle this
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");
3641 return 0;