x86, efi: Set runtime_version to the EFI spec revision
[linux/fpc-iii.git] / arch / arm / mach-omap2 / cclock3xxx_data.c
blob6ef87580c33f6772a1fed5445b1bb2344fb96a6d
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(dpll4_m5x2_ck, dpll4_m5x2_ck_parent_names, dpll4_m5x2_ck_ops);
423 static struct clk dpll4_m5x2_ck_3630 = {
424 .name = "dpll4_m5x2_ck",
425 .hw = &dpll4_m5x2_ck_hw.hw,
426 .parent_names = dpll4_m5x2_ck_parent_names,
427 .num_parents = ARRAY_SIZE(dpll4_m5x2_ck_parent_names),
428 .ops = &dpll4_m5x2_ck_3630_ops,
431 static struct clk cam_mclk;
433 static const char *cam_mclk_parent_names[] = {
434 "dpll4_m5x2_ck",
437 static struct clk_hw_omap cam_mclk_hw = {
438 .hw = {
439 .clk = &cam_mclk,
441 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
442 .enable_bit = OMAP3430_EN_CAM_SHIFT,
443 .clkdm_name = "cam_clkdm",
446 DEFINE_STRUCT_CLK(cam_mclk, cam_mclk_parent_names, aes2_ick_ops);
448 static const struct clksel_rate clkout2_src_core_rates[] = {
449 { .div = 1, .val = 0, .flags = RATE_IN_3XXX },
450 { .div = 0 }
453 static const struct clksel_rate clkout2_src_sys_rates[] = {
454 { .div = 1, .val = 1, .flags = RATE_IN_3XXX },
455 { .div = 0 }
458 static const struct clksel_rate clkout2_src_96m_rates[] = {
459 { .div = 1, .val = 2, .flags = RATE_IN_3XXX },
460 { .div = 0 }
463 DEFINE_CLK_DIVIDER(dpll4_m2_ck, "dpll4_ck", &dpll4_ck, 0x0,
464 OMAP_CM_REGADDR(PLL_MOD, OMAP3430_CM_CLKSEL3),
465 OMAP3430_DIV_96M_SHIFT, OMAP3630_DIV_96M_WIDTH,
466 CLK_DIVIDER_ONE_BASED, NULL);
468 static struct clk dpll4_m2x2_ck;
470 static const char *dpll4_m2x2_ck_parent_names[] = {
471 "dpll4_m2_ck",
474 static struct clk_hw_omap dpll4_m2x2_ck_hw = {
475 .hw = {
476 .clk = &dpll4_m2x2_ck,
478 .ops = &clkhwops_wait,
479 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
480 .enable_bit = OMAP3430_PWRDN_96M_SHIFT,
481 .flags = INVERT_ENABLE,
482 .clkdm_name = "dpll4_clkdm",
485 DEFINE_STRUCT_CLK(dpll4_m2x2_ck, dpll4_m2x2_ck_parent_names, dpll4_m5x2_ck_ops);
487 static struct clk dpll4_m2x2_ck_3630 = {
488 .name = "dpll4_m2x2_ck",
489 .hw = &dpll4_m2x2_ck_hw.hw,
490 .parent_names = dpll4_m2x2_ck_parent_names,
491 .num_parents = ARRAY_SIZE(dpll4_m2x2_ck_parent_names),
492 .ops = &dpll4_m5x2_ck_3630_ops,
495 static struct clk omap_96m_alwon_fck;
497 static const char *omap_96m_alwon_fck_parent_names[] = {
498 "dpll4_m2x2_ck",
501 DEFINE_STRUCT_CLK_HW_OMAP(omap_96m_alwon_fck, NULL);
502 DEFINE_STRUCT_CLK(omap_96m_alwon_fck, omap_96m_alwon_fck_parent_names,
503 core_ck_ops);
505 static struct clk cm_96m_fck;
507 static const char *cm_96m_fck_parent_names[] = {
508 "omap_96m_alwon_fck",
511 DEFINE_STRUCT_CLK_HW_OMAP(cm_96m_fck, NULL);
512 DEFINE_STRUCT_CLK(cm_96m_fck, cm_96m_fck_parent_names, core_ck_ops);
514 static const struct clksel_rate clkout2_src_54m_rates[] = {
515 { .div = 1, .val = 3, .flags = RATE_IN_3XXX },
516 { .div = 0 }
519 DEFINE_CLK_DIVIDER(dpll4_m3_ck, "dpll4_ck", &dpll4_ck, 0x0,
520 OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
521 OMAP3430_CLKSEL_TV_SHIFT, OMAP3630_CLKSEL_TV_WIDTH,
522 CLK_DIVIDER_ONE_BASED, NULL);
524 static struct clk dpll4_m3x2_ck;
526 static const char *dpll4_m3x2_ck_parent_names[] = {
527 "dpll4_m3_ck",
530 static struct clk_hw_omap dpll4_m3x2_ck_hw = {
531 .hw = {
532 .clk = &dpll4_m3x2_ck,
534 .ops = &clkhwops_wait,
535 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
536 .enable_bit = OMAP3430_PWRDN_TV_SHIFT,
537 .flags = INVERT_ENABLE,
538 .clkdm_name = "dpll4_clkdm",
541 DEFINE_STRUCT_CLK(dpll4_m3x2_ck, dpll4_m3x2_ck_parent_names, dpll4_m5x2_ck_ops);
543 static struct clk dpll4_m3x2_ck_3630 = {
544 .name = "dpll4_m3x2_ck",
545 .hw = &dpll4_m3x2_ck_hw.hw,
546 .parent_names = dpll4_m3x2_ck_parent_names,
547 .num_parents = ARRAY_SIZE(dpll4_m3x2_ck_parent_names),
548 .ops = &dpll4_m5x2_ck_3630_ops,
551 static const char *omap_54m_fck_parent_names[] = {
552 "dpll4_m3x2_ck", "sys_altclk",
555 DEFINE_CLK_MUX(omap_54m_fck, omap_54m_fck_parent_names, NULL, 0x0,
556 OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), OMAP3430_SOURCE_54M_SHIFT,
557 OMAP3430_SOURCE_54M_WIDTH, 0x0, NULL);
559 static const struct clksel clkout2_src_clksel[] = {
560 { .parent = &core_ck, .rates = clkout2_src_core_rates },
561 { .parent = &sys_ck, .rates = clkout2_src_sys_rates },
562 { .parent = &cm_96m_fck, .rates = clkout2_src_96m_rates },
563 { .parent = &omap_54m_fck, .rates = clkout2_src_54m_rates },
564 { .parent = NULL },
567 static const char *clkout2_src_ck_parent_names[] = {
568 "core_ck", "sys_ck", "cm_96m_fck", "omap_54m_fck",
571 static const struct clk_ops clkout2_src_ck_ops = {
572 .init = &omap2_init_clk_clkdm,
573 .enable = &omap2_dflt_clk_enable,
574 .disable = &omap2_dflt_clk_disable,
575 .is_enabled = &omap2_dflt_clk_is_enabled,
576 .recalc_rate = &omap2_clksel_recalc,
577 .get_parent = &omap2_clksel_find_parent_index,
578 .set_parent = &omap2_clksel_set_parent,
581 DEFINE_CLK_OMAP_MUX_GATE(clkout2_src_ck, "core_clkdm",
582 clkout2_src_clksel, OMAP3430_CM_CLKOUT_CTRL,
583 OMAP3430_CLKOUT2SOURCE_MASK,
584 OMAP3430_CM_CLKOUT_CTRL, OMAP3430_CLKOUT2_EN_SHIFT,
585 NULL, clkout2_src_ck_parent_names, clkout2_src_ck_ops);
587 static const struct clksel_rate omap_48m_cm96m_rates[] = {
588 { .div = 2, .val = 0, .flags = RATE_IN_3XXX },
589 { .div = 0 }
592 static const struct clksel_rate omap_48m_alt_rates[] = {
593 { .div = 1, .val = 1, .flags = RATE_IN_3XXX },
594 { .div = 0 }
597 static const struct clksel omap_48m_clksel[] = {
598 { .parent = &cm_96m_fck, .rates = omap_48m_cm96m_rates },
599 { .parent = &sys_altclk, .rates = omap_48m_alt_rates },
600 { .parent = NULL },
603 static const char *omap_48m_fck_parent_names[] = {
604 "cm_96m_fck", "sys_altclk",
607 static struct clk omap_48m_fck;
609 static const struct clk_ops omap_48m_fck_ops = {
610 .recalc_rate = &omap2_clksel_recalc,
611 .get_parent = &omap2_clksel_find_parent_index,
612 .set_parent = &omap2_clksel_set_parent,
615 static struct clk_hw_omap omap_48m_fck_hw = {
616 .hw = {
617 .clk = &omap_48m_fck,
619 .clksel = omap_48m_clksel,
620 .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
621 .clksel_mask = OMAP3430_SOURCE_48M_MASK,
624 DEFINE_STRUCT_CLK(omap_48m_fck, omap_48m_fck_parent_names, omap_48m_fck_ops);
626 DEFINE_CLK_FIXED_FACTOR(omap_12m_fck, "omap_48m_fck", &omap_48m_fck, 0x0, 1, 4);
628 static struct clk core_12m_fck;
630 static const char *core_12m_fck_parent_names[] = {
631 "omap_12m_fck",
634 DEFINE_STRUCT_CLK_HW_OMAP(core_12m_fck, "core_l4_clkdm");
635 DEFINE_STRUCT_CLK(core_12m_fck, core_12m_fck_parent_names, core_l4_ick_ops);
637 static struct clk core_48m_fck;
639 static const char *core_48m_fck_parent_names[] = {
640 "omap_48m_fck",
643 DEFINE_STRUCT_CLK_HW_OMAP(core_48m_fck, "core_l4_clkdm");
644 DEFINE_STRUCT_CLK(core_48m_fck, core_48m_fck_parent_names, core_l4_ick_ops);
646 static const char *omap_96m_fck_parent_names[] = {
647 "cm_96m_fck", "sys_ck",
650 DEFINE_CLK_MUX(omap_96m_fck, omap_96m_fck_parent_names, NULL, 0x0,
651 OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1),
652 OMAP3430_SOURCE_96M_SHIFT, OMAP3430_SOURCE_96M_WIDTH, 0x0, NULL);
654 static struct clk core_96m_fck;
656 static const char *core_96m_fck_parent_names[] = {
657 "omap_96m_fck",
660 DEFINE_STRUCT_CLK_HW_OMAP(core_96m_fck, "core_l4_clkdm");
661 DEFINE_STRUCT_CLK(core_96m_fck, core_96m_fck_parent_names, core_l4_ick_ops);
663 static struct clk core_l3_ick;
665 static const char *core_l3_ick_parent_names[] = {
666 "l3_ick",
669 DEFINE_STRUCT_CLK_HW_OMAP(core_l3_ick, "core_l3_clkdm");
670 DEFINE_STRUCT_CLK(core_l3_ick, core_l3_ick_parent_names, core_l4_ick_ops);
672 DEFINE_CLK_FIXED_FACTOR(dpll3_m2x2_ck, "dpll3_m2_ck", &dpll3_m2_ck, 0x0, 2, 1);
674 static struct clk corex2_fck;
676 static const char *corex2_fck_parent_names[] = {
677 "dpll3_m2x2_ck",
680 DEFINE_STRUCT_CLK_HW_OMAP(corex2_fck, NULL);
681 DEFINE_STRUCT_CLK(corex2_fck, corex2_fck_parent_names, core_ck_ops);
683 static struct clk cpefuse_fck;
685 static struct clk_hw_omap cpefuse_fck_hw = {
686 .hw = {
687 .clk = &cpefuse_fck,
689 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
690 .enable_bit = OMAP3430ES2_EN_CPEFUSE_SHIFT,
691 .clkdm_name = "core_l4_clkdm",
694 DEFINE_STRUCT_CLK(cpefuse_fck, dpll3_ck_parent_names, aes2_ick_ops);
696 static struct clk csi2_96m_fck;
698 static const char *csi2_96m_fck_parent_names[] = {
699 "core_96m_fck",
702 static struct clk_hw_omap csi2_96m_fck_hw = {
703 .hw = {
704 .clk = &csi2_96m_fck,
706 .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN),
707 .enable_bit = OMAP3430_EN_CSI2_SHIFT,
708 .clkdm_name = "cam_clkdm",
711 DEFINE_STRUCT_CLK(csi2_96m_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
713 static struct clk d2d_26m_fck;
715 static struct clk_hw_omap d2d_26m_fck_hw = {
716 .hw = {
717 .clk = &d2d_26m_fck,
719 .ops = &clkhwops_wait,
720 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
721 .enable_bit = OMAP3430ES1_EN_D2D_SHIFT,
722 .clkdm_name = "d2d_clkdm",
725 DEFINE_STRUCT_CLK(d2d_26m_fck, dpll3_ck_parent_names, aes2_ick_ops);
727 static struct clk des1_ick;
729 static struct clk_hw_omap des1_ick_hw = {
730 .hw = {
731 .clk = &des1_ick,
733 .ops = &clkhwops_iclk_wait,
734 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
735 .enable_bit = OMAP3430_EN_DES1_SHIFT,
738 DEFINE_STRUCT_CLK(des1_ick, aes1_ick_parent_names, aes1_ick_ops);
740 static struct clk des2_ick;
742 static struct clk_hw_omap des2_ick_hw = {
743 .hw = {
744 .clk = &des2_ick,
746 .ops = &clkhwops_iclk_wait,
747 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
748 .enable_bit = OMAP3430_EN_DES2_SHIFT,
749 .clkdm_name = "core_l4_clkdm",
752 DEFINE_STRUCT_CLK(des2_ick, aes2_ick_parent_names, aes2_ick_ops);
754 DEFINE_CLK_DIVIDER(dpll1_fck, "core_ck", &core_ck, 0x0,
755 OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL),
756 OMAP3430_MPU_CLK_SRC_SHIFT, OMAP3430_MPU_CLK_SRC_WIDTH,
757 CLK_DIVIDER_ONE_BASED, NULL);
759 static struct clk dpll2_fck;
761 static struct dpll_data dpll2_dd = {
762 .mult_div1_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
763 .mult_mask = OMAP3430_IVA2_DPLL_MULT_MASK,
764 .div1_mask = OMAP3430_IVA2_DPLL_DIV_MASK,
765 .clk_bypass = &dpll2_fck,
766 .clk_ref = &sys_ck,
767 .freqsel_mask = OMAP3430_IVA2_DPLL_FREQSEL_MASK,
768 .control_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKEN_PLL),
769 .enable_mask = OMAP3430_EN_IVA2_DPLL_MASK,
770 .modes = ((1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED) |
771 (1 << DPLL_LOW_POWER_BYPASS)),
772 .auto_recal_bit = OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT,
773 .recal_en_bit = OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_SHIFT,
774 .recal_st_bit = OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_SHIFT,
775 .autoidle_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_AUTOIDLE_PLL),
776 .autoidle_mask = OMAP3430_AUTO_IVA2_DPLL_MASK,
777 .idlest_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_IDLEST_PLL),
778 .idlest_mask = OMAP3430_ST_IVA2_CLK_MASK,
779 .max_multiplier = OMAP3_MAX_DPLL_MULT,
780 .min_divider = 1,
781 .max_divider = OMAP3_MAX_DPLL_DIV,
784 static struct clk dpll2_ck;
786 static struct clk_hw_omap dpll2_ck_hw = {
787 .hw = {
788 .clk = &dpll2_ck,
790 .ops = &clkhwops_omap3_dpll,
791 .dpll_data = &dpll2_dd,
792 .clkdm_name = "dpll2_clkdm",
795 DEFINE_STRUCT_CLK(dpll2_ck, dpll3_ck_parent_names, dpll1_ck_ops);
797 DEFINE_CLK_DIVIDER(dpll2_fck, "core_ck", &core_ck, 0x0,
798 OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL),
799 OMAP3430_IVA2_CLK_SRC_SHIFT, OMAP3430_IVA2_CLK_SRC_WIDTH,
800 CLK_DIVIDER_ONE_BASED, NULL);
802 DEFINE_CLK_DIVIDER(dpll2_m2_ck, "dpll2_ck", &dpll2_ck, 0x0,
803 OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL2_PLL),
804 OMAP3430_IVA2_DPLL_CLKOUT_DIV_SHIFT,
805 OMAP3430_IVA2_DPLL_CLKOUT_DIV_WIDTH,
806 CLK_DIVIDER_ONE_BASED, NULL);
808 DEFINE_CLK_DIVIDER(dpll3_m3_ck, "dpll3_ck", &dpll3_ck, 0x0,
809 OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
810 OMAP3430_DIV_DPLL3_SHIFT, OMAP3430_DIV_DPLL3_WIDTH,
811 CLK_DIVIDER_ONE_BASED, NULL);
813 static struct clk dpll3_m3x2_ck;
815 static const char *dpll3_m3x2_ck_parent_names[] = {
816 "dpll3_m3_ck",
819 static struct clk_hw_omap dpll3_m3x2_ck_hw = {
820 .hw = {
821 .clk = &dpll3_m3x2_ck,
823 .ops = &clkhwops_wait,
824 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
825 .enable_bit = OMAP3430_PWRDN_EMU_CORE_SHIFT,
826 .flags = INVERT_ENABLE,
827 .clkdm_name = "dpll3_clkdm",
830 DEFINE_STRUCT_CLK(dpll3_m3x2_ck, dpll3_m3x2_ck_parent_names, dpll4_m5x2_ck_ops);
832 static struct clk dpll3_m3x2_ck_3630 = {
833 .name = "dpll3_m3x2_ck",
834 .hw = &dpll3_m3x2_ck_hw.hw,
835 .parent_names = dpll3_m3x2_ck_parent_names,
836 .num_parents = ARRAY_SIZE(dpll3_m3x2_ck_parent_names),
837 .ops = &dpll4_m5x2_ck_3630_ops,
840 DEFINE_CLK_FIXED_FACTOR(dpll3_x2_ck, "dpll3_ck", &dpll3_ck, 0x0, 2, 1);
842 DEFINE_CLK_DIVIDER(dpll4_m4_ck, "dpll4_ck", &dpll4_ck, 0x0,
843 OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_CLKSEL),
844 OMAP3430_CLKSEL_DSS1_SHIFT, OMAP3630_CLKSEL_DSS1_WIDTH,
845 CLK_DIVIDER_ONE_BASED, NULL);
847 static struct clk dpll4_m4x2_ck;
849 static const char *dpll4_m4x2_ck_parent_names[] = {
850 "dpll4_m4_ck",
853 static struct clk_hw_omap dpll4_m4x2_ck_hw = {
854 .hw = {
855 .clk = &dpll4_m4x2_ck,
857 .ops = &clkhwops_wait,
858 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
859 .enable_bit = OMAP3430_PWRDN_DSS1_SHIFT,
860 .flags = INVERT_ENABLE,
861 .clkdm_name = "dpll4_clkdm",
864 DEFINE_STRUCT_CLK(dpll4_m4x2_ck, dpll4_m4x2_ck_parent_names, dpll4_m5x2_ck_ops);
866 static struct clk dpll4_m4x2_ck_3630 = {
867 .name = "dpll4_m4x2_ck",
868 .hw = &dpll4_m4x2_ck_hw.hw,
869 .parent_names = dpll4_m4x2_ck_parent_names,
870 .num_parents = ARRAY_SIZE(dpll4_m4x2_ck_parent_names),
871 .ops = &dpll4_m5x2_ck_3630_ops,
874 DEFINE_CLK_DIVIDER(dpll4_m6_ck, "dpll4_ck", &dpll4_ck, 0x0,
875 OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
876 OMAP3430_DIV_DPLL4_SHIFT, OMAP3630_DIV_DPLL4_WIDTH,
877 CLK_DIVIDER_ONE_BASED, NULL);
879 static struct clk dpll4_m6x2_ck;
881 static const char *dpll4_m6x2_ck_parent_names[] = {
882 "dpll4_m6_ck",
885 static struct clk_hw_omap dpll4_m6x2_ck_hw = {
886 .hw = {
887 .clk = &dpll4_m6x2_ck,
889 .ops = &clkhwops_wait,
890 .enable_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN),
891 .enable_bit = OMAP3430_PWRDN_EMU_PERIPH_SHIFT,
892 .flags = INVERT_ENABLE,
893 .clkdm_name = "dpll4_clkdm",
896 DEFINE_STRUCT_CLK(dpll4_m6x2_ck, dpll4_m6x2_ck_parent_names, dpll4_m5x2_ck_ops);
898 static struct clk dpll4_m6x2_ck_3630 = {
899 .name = "dpll4_m6x2_ck",
900 .hw = &dpll4_m6x2_ck_hw.hw,
901 .parent_names = dpll4_m6x2_ck_parent_names,
902 .num_parents = ARRAY_SIZE(dpll4_m6x2_ck_parent_names),
903 .ops = &dpll4_m5x2_ck_3630_ops,
906 DEFINE_CLK_FIXED_FACTOR(dpll4_x2_ck, "dpll4_ck", &dpll4_ck, 0x0, 2, 1);
908 static struct dpll_data dpll5_dd = {
909 .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL4),
910 .mult_mask = OMAP3430ES2_PERIPH2_DPLL_MULT_MASK,
911 .div1_mask = OMAP3430ES2_PERIPH2_DPLL_DIV_MASK,
912 .clk_bypass = &sys_ck,
913 .clk_ref = &sys_ck,
914 .freqsel_mask = OMAP3430ES2_PERIPH2_DPLL_FREQSEL_MASK,
915 .control_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKEN2),
916 .enable_mask = OMAP3430ES2_EN_PERIPH2_DPLL_MASK,
917 .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED),
918 .auto_recal_bit = OMAP3430ES2_EN_PERIPH2_DPLL_DRIFTGUARD_SHIFT,
919 .recal_en_bit = OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT,
920 .recal_st_bit = OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT,
921 .autoidle_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_AUTOIDLE2_PLL),
922 .autoidle_mask = OMAP3430ES2_AUTO_PERIPH2_DPLL_MASK,
923 .idlest_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST2),
924 .idlest_mask = OMAP3430ES2_ST_PERIPH2_CLK_MASK,
925 .max_multiplier = OMAP3_MAX_DPLL_MULT,
926 .min_divider = 1,
927 .max_divider = OMAP3_MAX_DPLL_DIV,
930 static struct clk dpll5_ck;
932 static struct clk_hw_omap dpll5_ck_hw = {
933 .hw = {
934 .clk = &dpll5_ck,
936 .ops = &clkhwops_omap3_dpll,
937 .dpll_data = &dpll5_dd,
938 .clkdm_name = "dpll5_clkdm",
941 DEFINE_STRUCT_CLK(dpll5_ck, dpll3_ck_parent_names, dpll1_ck_ops);
943 DEFINE_CLK_DIVIDER(dpll5_m2_ck, "dpll5_ck", &dpll5_ck, 0x0,
944 OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL5),
945 OMAP3430ES2_DIV_120M_SHIFT, OMAP3430ES2_DIV_120M_WIDTH,
946 CLK_DIVIDER_ONE_BASED, NULL);
948 static struct clk dss1_alwon_fck_3430es1;
950 static const char *dss1_alwon_fck_3430es1_parent_names[] = {
951 "dpll4_m4x2_ck",
954 static struct clk_hw_omap dss1_alwon_fck_3430es1_hw = {
955 .hw = {
956 .clk = &dss1_alwon_fck_3430es1,
958 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
959 .enable_bit = OMAP3430_EN_DSS1_SHIFT,
960 .clkdm_name = "dss_clkdm",
963 DEFINE_STRUCT_CLK(dss1_alwon_fck_3430es1, dss1_alwon_fck_3430es1_parent_names,
964 aes2_ick_ops);
966 static struct clk dss1_alwon_fck_3430es2;
968 static struct clk_hw_omap dss1_alwon_fck_3430es2_hw = {
969 .hw = {
970 .clk = &dss1_alwon_fck_3430es2,
972 .ops = &clkhwops_omap3430es2_dss_usbhost_wait,
973 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
974 .enable_bit = OMAP3430_EN_DSS1_SHIFT,
975 .clkdm_name = "dss_clkdm",
978 DEFINE_STRUCT_CLK(dss1_alwon_fck_3430es2, dss1_alwon_fck_3430es1_parent_names,
979 aes2_ick_ops);
981 static struct clk dss2_alwon_fck;
983 static struct clk_hw_omap dss2_alwon_fck_hw = {
984 .hw = {
985 .clk = &dss2_alwon_fck,
987 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
988 .enable_bit = OMAP3430_EN_DSS2_SHIFT,
989 .clkdm_name = "dss_clkdm",
992 DEFINE_STRUCT_CLK(dss2_alwon_fck, dpll3_ck_parent_names, aes2_ick_ops);
994 static struct clk dss_96m_fck;
996 static struct clk_hw_omap dss_96m_fck_hw = {
997 .hw = {
998 .clk = &dss_96m_fck,
1000 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
1001 .enable_bit = OMAP3430_EN_TV_SHIFT,
1002 .clkdm_name = "dss_clkdm",
1005 DEFINE_STRUCT_CLK(dss_96m_fck, core_96m_fck_parent_names, aes2_ick_ops);
1007 static struct clk dss_ick_3430es1;
1009 static struct clk_hw_omap dss_ick_3430es1_hw = {
1010 .hw = {
1011 .clk = &dss_ick_3430es1,
1013 .ops = &clkhwops_iclk,
1014 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
1015 .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
1016 .clkdm_name = "dss_clkdm",
1019 DEFINE_STRUCT_CLK(dss_ick_3430es1, security_l4_ick2_parent_names, aes2_ick_ops);
1021 static struct clk dss_ick_3430es2;
1023 static struct clk_hw_omap dss_ick_3430es2_hw = {
1024 .hw = {
1025 .clk = &dss_ick_3430es2,
1027 .ops = &clkhwops_omap3430es2_iclk_dss_usbhost_wait,
1028 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_ICLKEN),
1029 .enable_bit = OMAP3430_CM_ICLKEN_DSS_EN_DSS_SHIFT,
1030 .clkdm_name = "dss_clkdm",
1033 DEFINE_STRUCT_CLK(dss_ick_3430es2, security_l4_ick2_parent_names, aes2_ick_ops);
1035 static struct clk dss_tv_fck;
1037 static const char *dss_tv_fck_parent_names[] = {
1038 "omap_54m_fck",
1041 static struct clk_hw_omap dss_tv_fck_hw = {
1042 .hw = {
1043 .clk = &dss_tv_fck,
1045 .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN),
1046 .enable_bit = OMAP3430_EN_TV_SHIFT,
1047 .clkdm_name = "dss_clkdm",
1050 DEFINE_STRUCT_CLK(dss_tv_fck, dss_tv_fck_parent_names, aes2_ick_ops);
1052 static struct clk emac_fck;
1054 static const char *emac_fck_parent_names[] = {
1055 "rmii_ck",
1058 static struct clk_hw_omap emac_fck_hw = {
1059 .hw = {
1060 .clk = &emac_fck,
1062 .enable_reg = OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL),
1063 .enable_bit = AM35XX_CPGMAC_FCLK_SHIFT,
1066 DEFINE_STRUCT_CLK(emac_fck, emac_fck_parent_names, aes1_ick_ops);
1068 static struct clk ipss_ick;
1070 static const char *ipss_ick_parent_names[] = {
1071 "core_l3_ick",
1074 static struct clk_hw_omap ipss_ick_hw = {
1075 .hw = {
1076 .clk = &ipss_ick,
1078 .ops = &clkhwops_am35xx_ipss_wait,
1079 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1080 .enable_bit = AM35XX_EN_IPSS_SHIFT,
1081 .clkdm_name = "core_l3_clkdm",
1084 DEFINE_STRUCT_CLK(ipss_ick, ipss_ick_parent_names, aes2_ick_ops);
1086 static struct clk emac_ick;
1088 static const char *emac_ick_parent_names[] = {
1089 "ipss_ick",
1092 static struct clk_hw_omap emac_ick_hw = {
1093 .hw = {
1094 .clk = &emac_ick,
1096 .ops = &clkhwops_am35xx_ipss_module_wait,
1097 .enable_reg = OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL),
1098 .enable_bit = AM35XX_CPGMAC_VBUSP_CLK_SHIFT,
1099 .clkdm_name = "core_l3_clkdm",
1102 DEFINE_STRUCT_CLK(emac_ick, emac_ick_parent_names, aes2_ick_ops);
1104 static struct clk emu_core_alwon_ck;
1106 static const char *emu_core_alwon_ck_parent_names[] = {
1107 "dpll3_m3x2_ck",
1110 DEFINE_STRUCT_CLK_HW_OMAP(emu_core_alwon_ck, "dpll3_clkdm");
1111 DEFINE_STRUCT_CLK(emu_core_alwon_ck, emu_core_alwon_ck_parent_names,
1112 core_l4_ick_ops);
1114 static struct clk emu_mpu_alwon_ck;
1116 static const char *emu_mpu_alwon_ck_parent_names[] = {
1117 "mpu_ck",
1120 DEFINE_STRUCT_CLK_HW_OMAP(emu_mpu_alwon_ck, NULL);
1121 DEFINE_STRUCT_CLK(emu_mpu_alwon_ck, emu_mpu_alwon_ck_parent_names, core_ck_ops);
1123 static struct clk emu_per_alwon_ck;
1125 static const char *emu_per_alwon_ck_parent_names[] = {
1126 "dpll4_m6x2_ck",
1129 DEFINE_STRUCT_CLK_HW_OMAP(emu_per_alwon_ck, "dpll4_clkdm");
1130 DEFINE_STRUCT_CLK(emu_per_alwon_ck, emu_per_alwon_ck_parent_names,
1131 core_l4_ick_ops);
1133 static const char *emu_src_ck_parent_names[] = {
1134 "sys_ck", "emu_core_alwon_ck", "emu_per_alwon_ck", "emu_mpu_alwon_ck",
1137 static const struct clksel_rate emu_src_sys_rates[] = {
1138 { .div = 1, .val = 0, .flags = RATE_IN_3XXX },
1139 { .div = 0 },
1142 static const struct clksel_rate emu_src_core_rates[] = {
1143 { .div = 1, .val = 1, .flags = RATE_IN_3XXX },
1144 { .div = 0 },
1147 static const struct clksel_rate emu_src_per_rates[] = {
1148 { .div = 1, .val = 2, .flags = RATE_IN_3XXX },
1149 { .div = 0 },
1152 static const struct clksel_rate emu_src_mpu_rates[] = {
1153 { .div = 1, .val = 3, .flags = RATE_IN_3XXX },
1154 { .div = 0 },
1157 static const struct clksel emu_src_clksel[] = {
1158 { .parent = &sys_ck, .rates = emu_src_sys_rates },
1159 { .parent = &emu_core_alwon_ck, .rates = emu_src_core_rates },
1160 { .parent = &emu_per_alwon_ck, .rates = emu_src_per_rates },
1161 { .parent = &emu_mpu_alwon_ck, .rates = emu_src_mpu_rates },
1162 { .parent = NULL },
1165 static const struct clk_ops emu_src_ck_ops = {
1166 .init = &omap2_init_clk_clkdm,
1167 .recalc_rate = &omap2_clksel_recalc,
1168 .get_parent = &omap2_clksel_find_parent_index,
1169 .set_parent = &omap2_clksel_set_parent,
1170 .enable = &omap2_clkops_enable_clkdm,
1171 .disable = &omap2_clkops_disable_clkdm,
1174 static struct clk emu_src_ck;
1176 static struct clk_hw_omap emu_src_ck_hw = {
1177 .hw = {
1178 .clk = &emu_src_ck,
1180 .clksel = emu_src_clksel,
1181 .clksel_reg = OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
1182 .clksel_mask = OMAP3430_MUX_CTRL_MASK,
1183 .clkdm_name = "emu_clkdm",
1186 DEFINE_STRUCT_CLK(emu_src_ck, emu_src_ck_parent_names, emu_src_ck_ops);
1188 DEFINE_CLK_DIVIDER(atclk_fck, "emu_src_ck", &emu_src_ck, 0x0,
1189 OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
1190 OMAP3430_CLKSEL_ATCLK_SHIFT, OMAP3430_CLKSEL_ATCLK_WIDTH,
1191 CLK_DIVIDER_ONE_BASED, NULL);
1193 static struct clk fac_ick;
1195 static struct clk_hw_omap fac_ick_hw = {
1196 .hw = {
1197 .clk = &fac_ick,
1199 .ops = &clkhwops_iclk_wait,
1200 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1201 .enable_bit = OMAP3430ES1_EN_FAC_SHIFT,
1202 .clkdm_name = "core_l4_clkdm",
1205 DEFINE_STRUCT_CLK(fac_ick, aes2_ick_parent_names, aes2_ick_ops);
1207 static struct clk fshostusb_fck;
1209 static const char *fshostusb_fck_parent_names[] = {
1210 "core_48m_fck",
1213 static struct clk_hw_omap fshostusb_fck_hw = {
1214 .hw = {
1215 .clk = &fshostusb_fck,
1217 .ops = &clkhwops_wait,
1218 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1219 .enable_bit = OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
1220 .clkdm_name = "core_l4_clkdm",
1223 DEFINE_STRUCT_CLK(fshostusb_fck, fshostusb_fck_parent_names, aes2_ick_ops);
1225 static struct clk gfx_l3_ck;
1227 static struct clk_hw_omap gfx_l3_ck_hw = {
1228 .hw = {
1229 .clk = &gfx_l3_ck,
1231 .ops = &clkhwops_wait,
1232 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_ICLKEN),
1233 .enable_bit = OMAP_EN_GFX_SHIFT,
1234 .clkdm_name = "gfx_3430es1_clkdm",
1237 DEFINE_STRUCT_CLK(gfx_l3_ck, core_l3_ick_parent_names, aes1_ick_ops);
1239 DEFINE_CLK_DIVIDER(gfx_l3_fck, "l3_ick", &l3_ick, 0x0,
1240 OMAP_CM_REGADDR(GFX_MOD, CM_CLKSEL),
1241 OMAP_CLKSEL_GFX_SHIFT, OMAP_CLKSEL_GFX_WIDTH,
1242 CLK_DIVIDER_ONE_BASED, NULL);
1244 static struct clk gfx_cg1_ck;
1246 static const char *gfx_cg1_ck_parent_names[] = {
1247 "gfx_l3_fck",
1250 static struct clk_hw_omap gfx_cg1_ck_hw = {
1251 .hw = {
1252 .clk = &gfx_cg1_ck,
1254 .ops = &clkhwops_wait,
1255 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1256 .enable_bit = OMAP3430ES1_EN_2D_SHIFT,
1257 .clkdm_name = "gfx_3430es1_clkdm",
1260 DEFINE_STRUCT_CLK(gfx_cg1_ck, gfx_cg1_ck_parent_names, aes2_ick_ops);
1262 static struct clk gfx_cg2_ck;
1264 static struct clk_hw_omap gfx_cg2_ck_hw = {
1265 .hw = {
1266 .clk = &gfx_cg2_ck,
1268 .ops = &clkhwops_wait,
1269 .enable_reg = OMAP_CM_REGADDR(GFX_MOD, CM_FCLKEN),
1270 .enable_bit = OMAP3430ES1_EN_3D_SHIFT,
1271 .clkdm_name = "gfx_3430es1_clkdm",
1274 DEFINE_STRUCT_CLK(gfx_cg2_ck, gfx_cg1_ck_parent_names, aes2_ick_ops);
1276 static struct clk gfx_l3_ick;
1278 static const char *gfx_l3_ick_parent_names[] = {
1279 "gfx_l3_ck",
1282 DEFINE_STRUCT_CLK_HW_OMAP(gfx_l3_ick, "gfx_3430es1_clkdm");
1283 DEFINE_STRUCT_CLK(gfx_l3_ick, gfx_l3_ick_parent_names, core_l4_ick_ops);
1285 static struct clk wkup_32k_fck;
1287 static const char *wkup_32k_fck_parent_names[] = {
1288 "omap_32k_fck",
1291 DEFINE_STRUCT_CLK_HW_OMAP(wkup_32k_fck, "wkup_clkdm");
1292 DEFINE_STRUCT_CLK(wkup_32k_fck, wkup_32k_fck_parent_names, core_l4_ick_ops);
1294 static struct clk gpio1_dbck;
1296 static const char *gpio1_dbck_parent_names[] = {
1297 "wkup_32k_fck",
1300 static struct clk_hw_omap gpio1_dbck_hw = {
1301 .hw = {
1302 .clk = &gpio1_dbck,
1304 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
1305 .enable_bit = OMAP3430_EN_GPIO1_SHIFT,
1306 .clkdm_name = "wkup_clkdm",
1309 DEFINE_STRUCT_CLK(gpio1_dbck, gpio1_dbck_parent_names, aes2_ick_ops);
1311 static struct clk wkup_l4_ick;
1313 DEFINE_STRUCT_CLK_HW_OMAP(wkup_l4_ick, "wkup_clkdm");
1314 DEFINE_STRUCT_CLK(wkup_l4_ick, dpll3_ck_parent_names, core_l4_ick_ops);
1316 static struct clk gpio1_ick;
1318 static const char *gpio1_ick_parent_names[] = {
1319 "wkup_l4_ick",
1322 static struct clk_hw_omap gpio1_ick_hw = {
1323 .hw = {
1324 .clk = &gpio1_ick,
1326 .ops = &clkhwops_iclk_wait,
1327 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
1328 .enable_bit = OMAP3430_EN_GPIO1_SHIFT,
1329 .clkdm_name = "wkup_clkdm",
1332 DEFINE_STRUCT_CLK(gpio1_ick, gpio1_ick_parent_names, aes2_ick_ops);
1334 static struct clk per_32k_alwon_fck;
1336 DEFINE_STRUCT_CLK_HW_OMAP(per_32k_alwon_fck, "per_clkdm");
1337 DEFINE_STRUCT_CLK(per_32k_alwon_fck, wkup_32k_fck_parent_names,
1338 core_l4_ick_ops);
1340 static struct clk gpio2_dbck;
1342 static const char *gpio2_dbck_parent_names[] = {
1343 "per_32k_alwon_fck",
1346 static struct clk_hw_omap gpio2_dbck_hw = {
1347 .hw = {
1348 .clk = &gpio2_dbck,
1350 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1351 .enable_bit = OMAP3430_EN_GPIO2_SHIFT,
1352 .clkdm_name = "per_clkdm",
1355 DEFINE_STRUCT_CLK(gpio2_dbck, gpio2_dbck_parent_names, aes2_ick_ops);
1357 static struct clk per_l4_ick;
1359 DEFINE_STRUCT_CLK_HW_OMAP(per_l4_ick, "per_clkdm");
1360 DEFINE_STRUCT_CLK(per_l4_ick, security_l4_ick2_parent_names, core_l4_ick_ops);
1362 static struct clk gpio2_ick;
1364 static const char *gpio2_ick_parent_names[] = {
1365 "per_l4_ick",
1368 static struct clk_hw_omap gpio2_ick_hw = {
1369 .hw = {
1370 .clk = &gpio2_ick,
1372 .ops = &clkhwops_iclk_wait,
1373 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1374 .enable_bit = OMAP3430_EN_GPIO2_SHIFT,
1375 .clkdm_name = "per_clkdm",
1378 DEFINE_STRUCT_CLK(gpio2_ick, gpio2_ick_parent_names, aes2_ick_ops);
1380 static struct clk gpio3_dbck;
1382 static struct clk_hw_omap gpio3_dbck_hw = {
1383 .hw = {
1384 .clk = &gpio3_dbck,
1386 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1387 .enable_bit = OMAP3430_EN_GPIO3_SHIFT,
1388 .clkdm_name = "per_clkdm",
1391 DEFINE_STRUCT_CLK(gpio3_dbck, gpio2_dbck_parent_names, aes2_ick_ops);
1393 static struct clk gpio3_ick;
1395 static struct clk_hw_omap gpio3_ick_hw = {
1396 .hw = {
1397 .clk = &gpio3_ick,
1399 .ops = &clkhwops_iclk_wait,
1400 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1401 .enable_bit = OMAP3430_EN_GPIO3_SHIFT,
1402 .clkdm_name = "per_clkdm",
1405 DEFINE_STRUCT_CLK(gpio3_ick, gpio2_ick_parent_names, aes2_ick_ops);
1407 static struct clk gpio4_dbck;
1409 static struct clk_hw_omap gpio4_dbck_hw = {
1410 .hw = {
1411 .clk = &gpio4_dbck,
1413 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1414 .enable_bit = OMAP3430_EN_GPIO4_SHIFT,
1415 .clkdm_name = "per_clkdm",
1418 DEFINE_STRUCT_CLK(gpio4_dbck, gpio2_dbck_parent_names, aes2_ick_ops);
1420 static struct clk gpio4_ick;
1422 static struct clk_hw_omap gpio4_ick_hw = {
1423 .hw = {
1424 .clk = &gpio4_ick,
1426 .ops = &clkhwops_iclk_wait,
1427 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1428 .enable_bit = OMAP3430_EN_GPIO4_SHIFT,
1429 .clkdm_name = "per_clkdm",
1432 DEFINE_STRUCT_CLK(gpio4_ick, gpio2_ick_parent_names, aes2_ick_ops);
1434 static struct clk gpio5_dbck;
1436 static struct clk_hw_omap gpio5_dbck_hw = {
1437 .hw = {
1438 .clk = &gpio5_dbck,
1440 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1441 .enable_bit = OMAP3430_EN_GPIO5_SHIFT,
1442 .clkdm_name = "per_clkdm",
1445 DEFINE_STRUCT_CLK(gpio5_dbck, gpio2_dbck_parent_names, aes2_ick_ops);
1447 static struct clk gpio5_ick;
1449 static struct clk_hw_omap gpio5_ick_hw = {
1450 .hw = {
1451 .clk = &gpio5_ick,
1453 .ops = &clkhwops_iclk_wait,
1454 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1455 .enable_bit = OMAP3430_EN_GPIO5_SHIFT,
1456 .clkdm_name = "per_clkdm",
1459 DEFINE_STRUCT_CLK(gpio5_ick, gpio2_ick_parent_names, aes2_ick_ops);
1461 static struct clk gpio6_dbck;
1463 static struct clk_hw_omap gpio6_dbck_hw = {
1464 .hw = {
1465 .clk = &gpio6_dbck,
1467 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1468 .enable_bit = OMAP3430_EN_GPIO6_SHIFT,
1469 .clkdm_name = "per_clkdm",
1472 DEFINE_STRUCT_CLK(gpio6_dbck, gpio2_dbck_parent_names, aes2_ick_ops);
1474 static struct clk gpio6_ick;
1476 static struct clk_hw_omap gpio6_ick_hw = {
1477 .hw = {
1478 .clk = &gpio6_ick,
1480 .ops = &clkhwops_iclk_wait,
1481 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1482 .enable_bit = OMAP3430_EN_GPIO6_SHIFT,
1483 .clkdm_name = "per_clkdm",
1486 DEFINE_STRUCT_CLK(gpio6_ick, gpio2_ick_parent_names, aes2_ick_ops);
1488 static struct clk gpmc_fck;
1490 static struct clk_hw_omap gpmc_fck_hw = {
1491 .hw = {
1492 .clk = &gpmc_fck,
1494 .flags = ENABLE_ON_INIT,
1495 .clkdm_name = "core_l3_clkdm",
1498 DEFINE_STRUCT_CLK(gpmc_fck, ipss_ick_parent_names, core_l4_ick_ops);
1500 static const struct clksel omap343x_gpt_clksel[] = {
1501 { .parent = &omap_32k_fck, .rates = gpt_32k_rates },
1502 { .parent = &sys_ck, .rates = gpt_sys_rates },
1503 { .parent = NULL },
1506 static const char *gpt10_fck_parent_names[] = {
1507 "omap_32k_fck", "sys_ck",
1510 DEFINE_CLK_OMAP_MUX_GATE(gpt10_fck, "core_l4_clkdm", omap343x_gpt_clksel,
1511 OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1512 OMAP3430_CLKSEL_GPT10_MASK,
1513 OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1514 OMAP3430_EN_GPT10_SHIFT, &clkhwops_wait,
1515 gpt10_fck_parent_names, clkout2_src_ck_ops);
1517 static struct clk gpt10_ick;
1519 static struct clk_hw_omap gpt10_ick_hw = {
1520 .hw = {
1521 .clk = &gpt10_ick,
1523 .ops = &clkhwops_iclk_wait,
1524 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1525 .enable_bit = OMAP3430_EN_GPT10_SHIFT,
1526 .clkdm_name = "core_l4_clkdm",
1529 DEFINE_STRUCT_CLK(gpt10_ick, aes2_ick_parent_names, aes2_ick_ops);
1531 DEFINE_CLK_OMAP_MUX_GATE(gpt11_fck, "core_l4_clkdm", omap343x_gpt_clksel,
1532 OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
1533 OMAP3430_CLKSEL_GPT11_MASK,
1534 OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1535 OMAP3430_EN_GPT11_SHIFT, &clkhwops_wait,
1536 gpt10_fck_parent_names, clkout2_src_ck_ops);
1538 static struct clk gpt11_ick;
1540 static struct clk_hw_omap gpt11_ick_hw = {
1541 .hw = {
1542 .clk = &gpt11_ick,
1544 .ops = &clkhwops_iclk_wait,
1545 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1546 .enable_bit = OMAP3430_EN_GPT11_SHIFT,
1547 .clkdm_name = "core_l4_clkdm",
1550 DEFINE_STRUCT_CLK(gpt11_ick, aes2_ick_parent_names, aes2_ick_ops);
1552 static struct clk gpt12_fck;
1554 static const char *gpt12_fck_parent_names[] = {
1555 "secure_32k_fck",
1558 DEFINE_STRUCT_CLK_HW_OMAP(gpt12_fck, "wkup_clkdm");
1559 DEFINE_STRUCT_CLK(gpt12_fck, gpt12_fck_parent_names, core_l4_ick_ops);
1561 static struct clk gpt12_ick;
1563 static struct clk_hw_omap gpt12_ick_hw = {
1564 .hw = {
1565 .clk = &gpt12_ick,
1567 .ops = &clkhwops_iclk_wait,
1568 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
1569 .enable_bit = OMAP3430_EN_GPT12_SHIFT,
1570 .clkdm_name = "wkup_clkdm",
1573 DEFINE_STRUCT_CLK(gpt12_ick, gpio1_ick_parent_names, aes2_ick_ops);
1575 DEFINE_CLK_OMAP_MUX_GATE(gpt1_fck, "wkup_clkdm", omap343x_gpt_clksel,
1576 OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
1577 OMAP3430_CLKSEL_GPT1_MASK,
1578 OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
1579 OMAP3430_EN_GPT1_SHIFT, &clkhwops_wait,
1580 gpt10_fck_parent_names, clkout2_src_ck_ops);
1582 static struct clk gpt1_ick;
1584 static struct clk_hw_omap gpt1_ick_hw = {
1585 .hw = {
1586 .clk = &gpt1_ick,
1588 .ops = &clkhwops_iclk_wait,
1589 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
1590 .enable_bit = OMAP3430_EN_GPT1_SHIFT,
1591 .clkdm_name = "wkup_clkdm",
1594 DEFINE_STRUCT_CLK(gpt1_ick, gpio1_ick_parent_names, aes2_ick_ops);
1596 DEFINE_CLK_OMAP_MUX_GATE(gpt2_fck, "per_clkdm", omap343x_gpt_clksel,
1597 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1598 OMAP3430_CLKSEL_GPT2_MASK,
1599 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1600 OMAP3430_EN_GPT2_SHIFT, &clkhwops_wait,
1601 gpt10_fck_parent_names, clkout2_src_ck_ops);
1603 static struct clk gpt2_ick;
1605 static struct clk_hw_omap gpt2_ick_hw = {
1606 .hw = {
1607 .clk = &gpt2_ick,
1609 .ops = &clkhwops_iclk_wait,
1610 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1611 .enable_bit = OMAP3430_EN_GPT2_SHIFT,
1612 .clkdm_name = "per_clkdm",
1615 DEFINE_STRUCT_CLK(gpt2_ick, gpio2_ick_parent_names, aes2_ick_ops);
1617 DEFINE_CLK_OMAP_MUX_GATE(gpt3_fck, "per_clkdm", omap343x_gpt_clksel,
1618 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1619 OMAP3430_CLKSEL_GPT3_MASK,
1620 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1621 OMAP3430_EN_GPT3_SHIFT, &clkhwops_wait,
1622 gpt10_fck_parent_names, clkout2_src_ck_ops);
1624 static struct clk gpt3_ick;
1626 static struct clk_hw_omap gpt3_ick_hw = {
1627 .hw = {
1628 .clk = &gpt3_ick,
1630 .ops = &clkhwops_iclk_wait,
1631 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1632 .enable_bit = OMAP3430_EN_GPT3_SHIFT,
1633 .clkdm_name = "per_clkdm",
1636 DEFINE_STRUCT_CLK(gpt3_ick, gpio2_ick_parent_names, aes2_ick_ops);
1638 DEFINE_CLK_OMAP_MUX_GATE(gpt4_fck, "per_clkdm", omap343x_gpt_clksel,
1639 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1640 OMAP3430_CLKSEL_GPT4_MASK,
1641 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1642 OMAP3430_EN_GPT4_SHIFT, &clkhwops_wait,
1643 gpt10_fck_parent_names, clkout2_src_ck_ops);
1645 static struct clk gpt4_ick;
1647 static struct clk_hw_omap gpt4_ick_hw = {
1648 .hw = {
1649 .clk = &gpt4_ick,
1651 .ops = &clkhwops_iclk_wait,
1652 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1653 .enable_bit = OMAP3430_EN_GPT4_SHIFT,
1654 .clkdm_name = "per_clkdm",
1657 DEFINE_STRUCT_CLK(gpt4_ick, gpio2_ick_parent_names, aes2_ick_ops);
1659 DEFINE_CLK_OMAP_MUX_GATE(gpt5_fck, "per_clkdm", omap343x_gpt_clksel,
1660 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1661 OMAP3430_CLKSEL_GPT5_MASK,
1662 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1663 OMAP3430_EN_GPT5_SHIFT, &clkhwops_wait,
1664 gpt10_fck_parent_names, clkout2_src_ck_ops);
1666 static struct clk gpt5_ick;
1668 static struct clk_hw_omap gpt5_ick_hw = {
1669 .hw = {
1670 .clk = &gpt5_ick,
1672 .ops = &clkhwops_iclk_wait,
1673 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1674 .enable_bit = OMAP3430_EN_GPT5_SHIFT,
1675 .clkdm_name = "per_clkdm",
1678 DEFINE_STRUCT_CLK(gpt5_ick, gpio2_ick_parent_names, aes2_ick_ops);
1680 DEFINE_CLK_OMAP_MUX_GATE(gpt6_fck, "per_clkdm", omap343x_gpt_clksel,
1681 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1682 OMAP3430_CLKSEL_GPT6_MASK,
1683 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1684 OMAP3430_EN_GPT6_SHIFT, &clkhwops_wait,
1685 gpt10_fck_parent_names, clkout2_src_ck_ops);
1687 static struct clk gpt6_ick;
1689 static struct clk_hw_omap gpt6_ick_hw = {
1690 .hw = {
1691 .clk = &gpt6_ick,
1693 .ops = &clkhwops_iclk_wait,
1694 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1695 .enable_bit = OMAP3430_EN_GPT6_SHIFT,
1696 .clkdm_name = "per_clkdm",
1699 DEFINE_STRUCT_CLK(gpt6_ick, gpio2_ick_parent_names, aes2_ick_ops);
1701 DEFINE_CLK_OMAP_MUX_GATE(gpt7_fck, "per_clkdm", omap343x_gpt_clksel,
1702 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1703 OMAP3430_CLKSEL_GPT7_MASK,
1704 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1705 OMAP3430_EN_GPT7_SHIFT, &clkhwops_wait,
1706 gpt10_fck_parent_names, clkout2_src_ck_ops);
1708 static struct clk gpt7_ick;
1710 static struct clk_hw_omap gpt7_ick_hw = {
1711 .hw = {
1712 .clk = &gpt7_ick,
1714 .ops = &clkhwops_iclk_wait,
1715 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1716 .enable_bit = OMAP3430_EN_GPT7_SHIFT,
1717 .clkdm_name = "per_clkdm",
1720 DEFINE_STRUCT_CLK(gpt7_ick, gpio2_ick_parent_names, aes2_ick_ops);
1722 DEFINE_CLK_OMAP_MUX_GATE(gpt8_fck, "per_clkdm", omap343x_gpt_clksel,
1723 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1724 OMAP3430_CLKSEL_GPT8_MASK,
1725 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1726 OMAP3430_EN_GPT8_SHIFT, &clkhwops_wait,
1727 gpt10_fck_parent_names, clkout2_src_ck_ops);
1729 static struct clk gpt8_ick;
1731 static struct clk_hw_omap gpt8_ick_hw = {
1732 .hw = {
1733 .clk = &gpt8_ick,
1735 .ops = &clkhwops_iclk_wait,
1736 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1737 .enable_bit = OMAP3430_EN_GPT8_SHIFT,
1738 .clkdm_name = "per_clkdm",
1741 DEFINE_STRUCT_CLK(gpt8_ick, gpio2_ick_parent_names, aes2_ick_ops);
1743 DEFINE_CLK_OMAP_MUX_GATE(gpt9_fck, "per_clkdm", omap343x_gpt_clksel,
1744 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_CLKSEL),
1745 OMAP3430_CLKSEL_GPT9_MASK,
1746 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
1747 OMAP3430_EN_GPT9_SHIFT, &clkhwops_wait,
1748 gpt10_fck_parent_names, clkout2_src_ck_ops);
1750 static struct clk gpt9_ick;
1752 static struct clk_hw_omap gpt9_ick_hw = {
1753 .hw = {
1754 .clk = &gpt9_ick,
1756 .ops = &clkhwops_iclk_wait,
1757 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
1758 .enable_bit = OMAP3430_EN_GPT9_SHIFT,
1759 .clkdm_name = "per_clkdm",
1762 DEFINE_STRUCT_CLK(gpt9_ick, gpio2_ick_parent_names, aes2_ick_ops);
1764 static struct clk hdq_fck;
1766 static const char *hdq_fck_parent_names[] = {
1767 "core_12m_fck",
1770 static struct clk_hw_omap hdq_fck_hw = {
1771 .hw = {
1772 .clk = &hdq_fck,
1774 .ops = &clkhwops_wait,
1775 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1776 .enable_bit = OMAP3430_EN_HDQ_SHIFT,
1777 .clkdm_name = "core_l4_clkdm",
1780 DEFINE_STRUCT_CLK(hdq_fck, hdq_fck_parent_names, aes2_ick_ops);
1782 static struct clk hdq_ick;
1784 static struct clk_hw_omap hdq_ick_hw = {
1785 .hw = {
1786 .clk = &hdq_ick,
1788 .ops = &clkhwops_iclk_wait,
1789 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1790 .enable_bit = OMAP3430_EN_HDQ_SHIFT,
1791 .clkdm_name = "core_l4_clkdm",
1794 DEFINE_STRUCT_CLK(hdq_ick, aes2_ick_parent_names, aes2_ick_ops);
1796 static struct clk hecc_ck;
1798 static struct clk_hw_omap hecc_ck_hw = {
1799 .hw = {
1800 .clk = &hecc_ck,
1802 .ops = &clkhwops_am35xx_ipss_module_wait,
1803 .enable_reg = OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL),
1804 .enable_bit = AM35XX_HECC_VBUSP_CLK_SHIFT,
1805 .clkdm_name = "core_l3_clkdm",
1808 DEFINE_STRUCT_CLK(hecc_ck, dpll3_ck_parent_names, aes2_ick_ops);
1810 static struct clk hsotgusb_fck_am35xx;
1812 static struct clk_hw_omap hsotgusb_fck_am35xx_hw = {
1813 .hw = {
1814 .clk = &hsotgusb_fck_am35xx,
1816 .enable_reg = OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL),
1817 .enable_bit = AM35XX_USBOTG_FCLK_SHIFT,
1818 .clkdm_name = "core_l3_clkdm",
1821 DEFINE_STRUCT_CLK(hsotgusb_fck_am35xx, dpll3_ck_parent_names, aes2_ick_ops);
1823 static struct clk hsotgusb_ick_3430es1;
1825 static struct clk_hw_omap hsotgusb_ick_3430es1_hw = {
1826 .hw = {
1827 .clk = &hsotgusb_ick_3430es1,
1829 .ops = &clkhwops_iclk,
1830 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1831 .enable_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1832 .clkdm_name = "core_l3_clkdm",
1835 DEFINE_STRUCT_CLK(hsotgusb_ick_3430es1, ipss_ick_parent_names, aes2_ick_ops);
1837 static struct clk hsotgusb_ick_3430es2;
1839 static struct clk_hw_omap hsotgusb_ick_3430es2_hw = {
1840 .hw = {
1841 .clk = &hsotgusb_ick_3430es2,
1843 .ops = &clkhwops_omap3430es2_iclk_hsotgusb_wait,
1844 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1845 .enable_bit = OMAP3430_EN_HSOTGUSB_SHIFT,
1846 .clkdm_name = "core_l3_clkdm",
1849 DEFINE_STRUCT_CLK(hsotgusb_ick_3430es2, ipss_ick_parent_names, aes2_ick_ops);
1851 static struct clk hsotgusb_ick_am35xx;
1853 static struct clk_hw_omap hsotgusb_ick_am35xx_hw = {
1854 .hw = {
1855 .clk = &hsotgusb_ick_am35xx,
1857 .ops = &clkhwops_am35xx_ipss_module_wait,
1858 .enable_reg = OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL),
1859 .enable_bit = AM35XX_USBOTG_VBUSP_CLK_SHIFT,
1860 .clkdm_name = "core_l3_clkdm",
1863 DEFINE_STRUCT_CLK(hsotgusb_ick_am35xx, emac_ick_parent_names, aes2_ick_ops);
1865 static struct clk i2c1_fck;
1867 static struct clk_hw_omap i2c1_fck_hw = {
1868 .hw = {
1869 .clk = &i2c1_fck,
1871 .ops = &clkhwops_wait,
1872 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1873 .enable_bit = OMAP3430_EN_I2C1_SHIFT,
1874 .clkdm_name = "core_l4_clkdm",
1877 DEFINE_STRUCT_CLK(i2c1_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
1879 static struct clk i2c1_ick;
1881 static struct clk_hw_omap i2c1_ick_hw = {
1882 .hw = {
1883 .clk = &i2c1_ick,
1885 .ops = &clkhwops_iclk_wait,
1886 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1887 .enable_bit = OMAP3430_EN_I2C1_SHIFT,
1888 .clkdm_name = "core_l4_clkdm",
1891 DEFINE_STRUCT_CLK(i2c1_ick, aes2_ick_parent_names, aes2_ick_ops);
1893 static struct clk i2c2_fck;
1895 static struct clk_hw_omap i2c2_fck_hw = {
1896 .hw = {
1897 .clk = &i2c2_fck,
1899 .ops = &clkhwops_wait,
1900 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1901 .enable_bit = OMAP3430_EN_I2C2_SHIFT,
1902 .clkdm_name = "core_l4_clkdm",
1905 DEFINE_STRUCT_CLK(i2c2_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
1907 static struct clk i2c2_ick;
1909 static struct clk_hw_omap i2c2_ick_hw = {
1910 .hw = {
1911 .clk = &i2c2_ick,
1913 .ops = &clkhwops_iclk_wait,
1914 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1915 .enable_bit = OMAP3430_EN_I2C2_SHIFT,
1916 .clkdm_name = "core_l4_clkdm",
1919 DEFINE_STRUCT_CLK(i2c2_ick, aes2_ick_parent_names, aes2_ick_ops);
1921 static struct clk i2c3_fck;
1923 static struct clk_hw_omap i2c3_fck_hw = {
1924 .hw = {
1925 .clk = &i2c3_fck,
1927 .ops = &clkhwops_wait,
1928 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
1929 .enable_bit = OMAP3430_EN_I2C3_SHIFT,
1930 .clkdm_name = "core_l4_clkdm",
1933 DEFINE_STRUCT_CLK(i2c3_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
1935 static struct clk i2c3_ick;
1937 static struct clk_hw_omap i2c3_ick_hw = {
1938 .hw = {
1939 .clk = &i2c3_ick,
1941 .ops = &clkhwops_iclk_wait,
1942 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1943 .enable_bit = OMAP3430_EN_I2C3_SHIFT,
1944 .clkdm_name = "core_l4_clkdm",
1947 DEFINE_STRUCT_CLK(i2c3_ick, aes2_ick_parent_names, aes2_ick_ops);
1949 static struct clk icr_ick;
1951 static struct clk_hw_omap icr_ick_hw = {
1952 .hw = {
1953 .clk = &icr_ick,
1955 .ops = &clkhwops_iclk_wait,
1956 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
1957 .enable_bit = OMAP3430_EN_ICR_SHIFT,
1958 .clkdm_name = "core_l4_clkdm",
1961 DEFINE_STRUCT_CLK(icr_ick, aes2_ick_parent_names, aes2_ick_ops);
1963 static struct clk iva2_ck;
1965 static const char *iva2_ck_parent_names[] = {
1966 "dpll2_m2_ck",
1969 static struct clk_hw_omap iva2_ck_hw = {
1970 .hw = {
1971 .clk = &iva2_ck,
1973 .ops = &clkhwops_wait,
1974 .enable_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, CM_FCLKEN),
1975 .enable_bit = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_SHIFT,
1976 .clkdm_name = "iva2_clkdm",
1979 DEFINE_STRUCT_CLK(iva2_ck, iva2_ck_parent_names, aes2_ick_ops);
1981 static struct clk mad2d_ick;
1983 static struct clk_hw_omap mad2d_ick_hw = {
1984 .hw = {
1985 .clk = &mad2d_ick,
1987 .ops = &clkhwops_iclk_wait,
1988 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
1989 .enable_bit = OMAP3430_EN_MAD2D_SHIFT,
1990 .clkdm_name = "d2d_clkdm",
1993 DEFINE_STRUCT_CLK(mad2d_ick, core_l3_ick_parent_names, aes2_ick_ops);
1995 static struct clk mailboxes_ick;
1997 static struct clk_hw_omap mailboxes_ick_hw = {
1998 .hw = {
1999 .clk = &mailboxes_ick,
2001 .ops = &clkhwops_iclk_wait,
2002 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2003 .enable_bit = OMAP3430_EN_MAILBOXES_SHIFT,
2004 .clkdm_name = "core_l4_clkdm",
2007 DEFINE_STRUCT_CLK(mailboxes_ick, aes2_ick_parent_names, aes2_ick_ops);
2009 static const struct clksel_rate common_mcbsp_96m_rates[] = {
2010 { .div = 1, .val = 0, .flags = RATE_IN_3XXX },
2011 { .div = 0 }
2014 static const struct clksel_rate common_mcbsp_mcbsp_rates[] = {
2015 { .div = 1, .val = 1, .flags = RATE_IN_3XXX },
2016 { .div = 0 }
2019 static const struct clksel mcbsp_15_clksel[] = {
2020 { .parent = &core_96m_fck, .rates = common_mcbsp_96m_rates },
2021 { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates },
2022 { .parent = NULL },
2025 static const char *mcbsp1_fck_parent_names[] = {
2026 "core_96m_fck", "mcbsp_clks",
2029 DEFINE_CLK_OMAP_MUX_GATE(mcbsp1_fck, "core_l4_clkdm", mcbsp_15_clksel,
2030 OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
2031 OMAP2_MCBSP1_CLKS_MASK,
2032 OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2033 OMAP3430_EN_MCBSP1_SHIFT, &clkhwops_wait,
2034 mcbsp1_fck_parent_names, clkout2_src_ck_ops);
2036 static struct clk mcbsp1_ick;
2038 static struct clk_hw_omap mcbsp1_ick_hw = {
2039 .hw = {
2040 .clk = &mcbsp1_ick,
2042 .ops = &clkhwops_iclk_wait,
2043 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2044 .enable_bit = OMAP3430_EN_MCBSP1_SHIFT,
2045 .clkdm_name = "core_l4_clkdm",
2048 DEFINE_STRUCT_CLK(mcbsp1_ick, aes2_ick_parent_names, aes2_ick_ops);
2050 static struct clk per_96m_fck;
2052 DEFINE_STRUCT_CLK_HW_OMAP(per_96m_fck, "per_clkdm");
2053 DEFINE_STRUCT_CLK(per_96m_fck, cm_96m_fck_parent_names, core_l4_ick_ops);
2055 static const struct clksel mcbsp_234_clksel[] = {
2056 { .parent = &per_96m_fck, .rates = common_mcbsp_96m_rates },
2057 { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates },
2058 { .parent = NULL },
2061 static const char *mcbsp2_fck_parent_names[] = {
2062 "per_96m_fck", "mcbsp_clks",
2065 DEFINE_CLK_OMAP_MUX_GATE(mcbsp2_fck, "per_clkdm", mcbsp_234_clksel,
2066 OMAP343X_CTRL_REGADDR(OMAP2_CONTROL_DEVCONF0),
2067 OMAP2_MCBSP2_CLKS_MASK,
2068 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2069 OMAP3430_EN_MCBSP2_SHIFT, &clkhwops_wait,
2070 mcbsp2_fck_parent_names, clkout2_src_ck_ops);
2072 static struct clk mcbsp2_ick;
2074 static struct clk_hw_omap mcbsp2_ick_hw = {
2075 .hw = {
2076 .clk = &mcbsp2_ick,
2078 .ops = &clkhwops_iclk_wait,
2079 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2080 .enable_bit = OMAP3430_EN_MCBSP2_SHIFT,
2081 .clkdm_name = "per_clkdm",
2084 DEFINE_STRUCT_CLK(mcbsp2_ick, gpio2_ick_parent_names, aes2_ick_ops);
2086 DEFINE_CLK_OMAP_MUX_GATE(mcbsp3_fck, "per_clkdm", mcbsp_234_clksel,
2087 OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
2088 OMAP2_MCBSP3_CLKS_MASK,
2089 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2090 OMAP3430_EN_MCBSP3_SHIFT, &clkhwops_wait,
2091 mcbsp2_fck_parent_names, clkout2_src_ck_ops);
2093 static struct clk mcbsp3_ick;
2095 static struct clk_hw_omap mcbsp3_ick_hw = {
2096 .hw = {
2097 .clk = &mcbsp3_ick,
2099 .ops = &clkhwops_iclk_wait,
2100 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2101 .enable_bit = OMAP3430_EN_MCBSP3_SHIFT,
2102 .clkdm_name = "per_clkdm",
2105 DEFINE_STRUCT_CLK(mcbsp3_ick, gpio2_ick_parent_names, aes2_ick_ops);
2107 DEFINE_CLK_OMAP_MUX_GATE(mcbsp4_fck, "per_clkdm", mcbsp_234_clksel,
2108 OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
2109 OMAP2_MCBSP4_CLKS_MASK,
2110 OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2111 OMAP3430_EN_MCBSP4_SHIFT, &clkhwops_wait,
2112 mcbsp2_fck_parent_names, clkout2_src_ck_ops);
2114 static struct clk mcbsp4_ick;
2116 static struct clk_hw_omap mcbsp4_ick_hw = {
2117 .hw = {
2118 .clk = &mcbsp4_ick,
2120 .ops = &clkhwops_iclk_wait,
2121 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2122 .enable_bit = OMAP3430_EN_MCBSP4_SHIFT,
2123 .clkdm_name = "per_clkdm",
2126 DEFINE_STRUCT_CLK(mcbsp4_ick, gpio2_ick_parent_names, aes2_ick_ops);
2128 DEFINE_CLK_OMAP_MUX_GATE(mcbsp5_fck, "core_l4_clkdm", mcbsp_15_clksel,
2129 OMAP343X_CTRL_REGADDR(OMAP343X_CONTROL_DEVCONF1),
2130 OMAP2_MCBSP5_CLKS_MASK,
2131 OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2132 OMAP3430_EN_MCBSP5_SHIFT, &clkhwops_wait,
2133 mcbsp1_fck_parent_names, clkout2_src_ck_ops);
2135 static struct clk mcbsp5_ick;
2137 static struct clk_hw_omap mcbsp5_ick_hw = {
2138 .hw = {
2139 .clk = &mcbsp5_ick,
2141 .ops = &clkhwops_iclk_wait,
2142 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2143 .enable_bit = OMAP3430_EN_MCBSP5_SHIFT,
2144 .clkdm_name = "core_l4_clkdm",
2147 DEFINE_STRUCT_CLK(mcbsp5_ick, aes2_ick_parent_names, aes2_ick_ops);
2149 static struct clk mcspi1_fck;
2151 static struct clk_hw_omap mcspi1_fck_hw = {
2152 .hw = {
2153 .clk = &mcspi1_fck,
2155 .ops = &clkhwops_wait,
2156 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2157 .enable_bit = OMAP3430_EN_MCSPI1_SHIFT,
2158 .clkdm_name = "core_l4_clkdm",
2161 DEFINE_STRUCT_CLK(mcspi1_fck, fshostusb_fck_parent_names, aes2_ick_ops);
2163 static struct clk mcspi1_ick;
2165 static struct clk_hw_omap mcspi1_ick_hw = {
2166 .hw = {
2167 .clk = &mcspi1_ick,
2169 .ops = &clkhwops_iclk_wait,
2170 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2171 .enable_bit = OMAP3430_EN_MCSPI1_SHIFT,
2172 .clkdm_name = "core_l4_clkdm",
2175 DEFINE_STRUCT_CLK(mcspi1_ick, aes2_ick_parent_names, aes2_ick_ops);
2177 static struct clk mcspi2_fck;
2179 static struct clk_hw_omap mcspi2_fck_hw = {
2180 .hw = {
2181 .clk = &mcspi2_fck,
2183 .ops = &clkhwops_wait,
2184 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2185 .enable_bit = OMAP3430_EN_MCSPI2_SHIFT,
2186 .clkdm_name = "core_l4_clkdm",
2189 DEFINE_STRUCT_CLK(mcspi2_fck, fshostusb_fck_parent_names, aes2_ick_ops);
2191 static struct clk mcspi2_ick;
2193 static struct clk_hw_omap mcspi2_ick_hw = {
2194 .hw = {
2195 .clk = &mcspi2_ick,
2197 .ops = &clkhwops_iclk_wait,
2198 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2199 .enable_bit = OMAP3430_EN_MCSPI2_SHIFT,
2200 .clkdm_name = "core_l4_clkdm",
2203 DEFINE_STRUCT_CLK(mcspi2_ick, aes2_ick_parent_names, aes2_ick_ops);
2205 static struct clk mcspi3_fck;
2207 static struct clk_hw_omap mcspi3_fck_hw = {
2208 .hw = {
2209 .clk = &mcspi3_fck,
2211 .ops = &clkhwops_wait,
2212 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2213 .enable_bit = OMAP3430_EN_MCSPI3_SHIFT,
2214 .clkdm_name = "core_l4_clkdm",
2217 DEFINE_STRUCT_CLK(mcspi3_fck, fshostusb_fck_parent_names, aes2_ick_ops);
2219 static struct clk mcspi3_ick;
2221 static struct clk_hw_omap mcspi3_ick_hw = {
2222 .hw = {
2223 .clk = &mcspi3_ick,
2225 .ops = &clkhwops_iclk_wait,
2226 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2227 .enable_bit = OMAP3430_EN_MCSPI3_SHIFT,
2228 .clkdm_name = "core_l4_clkdm",
2231 DEFINE_STRUCT_CLK(mcspi3_ick, aes2_ick_parent_names, aes2_ick_ops);
2233 static struct clk mcspi4_fck;
2235 static struct clk_hw_omap mcspi4_fck_hw = {
2236 .hw = {
2237 .clk = &mcspi4_fck,
2239 .ops = &clkhwops_wait,
2240 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2241 .enable_bit = OMAP3430_EN_MCSPI4_SHIFT,
2242 .clkdm_name = "core_l4_clkdm",
2245 DEFINE_STRUCT_CLK(mcspi4_fck, fshostusb_fck_parent_names, aes2_ick_ops);
2247 static struct clk mcspi4_ick;
2249 static struct clk_hw_omap mcspi4_ick_hw = {
2250 .hw = {
2251 .clk = &mcspi4_ick,
2253 .ops = &clkhwops_iclk_wait,
2254 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2255 .enable_bit = OMAP3430_EN_MCSPI4_SHIFT,
2256 .clkdm_name = "core_l4_clkdm",
2259 DEFINE_STRUCT_CLK(mcspi4_ick, aes2_ick_parent_names, aes2_ick_ops);
2261 static struct clk mmchs1_fck;
2263 static struct clk_hw_omap mmchs1_fck_hw = {
2264 .hw = {
2265 .clk = &mmchs1_fck,
2267 .ops = &clkhwops_wait,
2268 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2269 .enable_bit = OMAP3430_EN_MMC1_SHIFT,
2270 .clkdm_name = "core_l4_clkdm",
2273 DEFINE_STRUCT_CLK(mmchs1_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
2275 static struct clk mmchs1_ick;
2277 static struct clk_hw_omap mmchs1_ick_hw = {
2278 .hw = {
2279 .clk = &mmchs1_ick,
2281 .ops = &clkhwops_iclk_wait,
2282 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2283 .enable_bit = OMAP3430_EN_MMC1_SHIFT,
2284 .clkdm_name = "core_l4_clkdm",
2287 DEFINE_STRUCT_CLK(mmchs1_ick, aes2_ick_parent_names, aes2_ick_ops);
2289 static struct clk mmchs2_fck;
2291 static struct clk_hw_omap mmchs2_fck_hw = {
2292 .hw = {
2293 .clk = &mmchs2_fck,
2295 .ops = &clkhwops_wait,
2296 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2297 .enable_bit = OMAP3430_EN_MMC2_SHIFT,
2298 .clkdm_name = "core_l4_clkdm",
2301 DEFINE_STRUCT_CLK(mmchs2_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
2303 static struct clk mmchs2_ick;
2305 static struct clk_hw_omap mmchs2_ick_hw = {
2306 .hw = {
2307 .clk = &mmchs2_ick,
2309 .ops = &clkhwops_iclk_wait,
2310 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2311 .enable_bit = OMAP3430_EN_MMC2_SHIFT,
2312 .clkdm_name = "core_l4_clkdm",
2315 DEFINE_STRUCT_CLK(mmchs2_ick, aes2_ick_parent_names, aes2_ick_ops);
2317 static struct clk mmchs3_fck;
2319 static struct clk_hw_omap mmchs3_fck_hw = {
2320 .hw = {
2321 .clk = &mmchs3_fck,
2323 .ops = &clkhwops_wait,
2324 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2325 .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT,
2326 .clkdm_name = "core_l4_clkdm",
2329 DEFINE_STRUCT_CLK(mmchs3_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
2331 static struct clk mmchs3_ick;
2333 static struct clk_hw_omap mmchs3_ick_hw = {
2334 .hw = {
2335 .clk = &mmchs3_ick,
2337 .ops = &clkhwops_iclk_wait,
2338 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2339 .enable_bit = OMAP3430ES2_EN_MMC3_SHIFT,
2340 .clkdm_name = "core_l4_clkdm",
2343 DEFINE_STRUCT_CLK(mmchs3_ick, aes2_ick_parent_names, aes2_ick_ops);
2345 static struct clk modem_fck;
2347 static struct clk_hw_omap modem_fck_hw = {
2348 .hw = {
2349 .clk = &modem_fck,
2351 .ops = &clkhwops_iclk_wait,
2352 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2353 .enable_bit = OMAP3430_EN_MODEM_SHIFT,
2354 .clkdm_name = "d2d_clkdm",
2357 DEFINE_STRUCT_CLK(modem_fck, dpll3_ck_parent_names, aes2_ick_ops);
2359 static struct clk mspro_fck;
2361 static struct clk_hw_omap mspro_fck_hw = {
2362 .hw = {
2363 .clk = &mspro_fck,
2365 .ops = &clkhwops_wait,
2366 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2367 .enable_bit = OMAP3430_EN_MSPRO_SHIFT,
2368 .clkdm_name = "core_l4_clkdm",
2371 DEFINE_STRUCT_CLK(mspro_fck, csi2_96m_fck_parent_names, aes2_ick_ops);
2373 static struct clk mspro_ick;
2375 static struct clk_hw_omap mspro_ick_hw = {
2376 .hw = {
2377 .clk = &mspro_ick,
2379 .ops = &clkhwops_iclk_wait,
2380 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2381 .enable_bit = OMAP3430_EN_MSPRO_SHIFT,
2382 .clkdm_name = "core_l4_clkdm",
2385 DEFINE_STRUCT_CLK(mspro_ick, aes2_ick_parent_names, aes2_ick_ops);
2387 static struct clk omap_192m_alwon_fck;
2389 DEFINE_STRUCT_CLK_HW_OMAP(omap_192m_alwon_fck, NULL);
2390 DEFINE_STRUCT_CLK(omap_192m_alwon_fck, omap_96m_alwon_fck_parent_names,
2391 core_ck_ops);
2393 static struct clk omap_32ksync_ick;
2395 static struct clk_hw_omap omap_32ksync_ick_hw = {
2396 .hw = {
2397 .clk = &omap_32ksync_ick,
2399 .ops = &clkhwops_iclk_wait,
2400 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
2401 .enable_bit = OMAP3430_EN_32KSYNC_SHIFT,
2402 .clkdm_name = "wkup_clkdm",
2405 DEFINE_STRUCT_CLK(omap_32ksync_ick, gpio1_ick_parent_names, aes2_ick_ops);
2407 static const struct clksel_rate omap_96m_alwon_fck_rates[] = {
2408 { .div = 1, .val = 1, .flags = RATE_IN_36XX },
2409 { .div = 2, .val = 2, .flags = RATE_IN_36XX },
2410 { .div = 0 }
2413 static const struct clksel omap_96m_alwon_fck_clksel[] = {
2414 { .parent = &omap_192m_alwon_fck, .rates = omap_96m_alwon_fck_rates },
2415 { .parent = NULL }
2418 static struct clk omap_96m_alwon_fck_3630;
2420 static const char *omap_96m_alwon_fck_3630_parent_names[] = {
2421 "omap_192m_alwon_fck",
2424 static const struct clk_ops omap_96m_alwon_fck_3630_ops = {
2425 .set_rate = &omap2_clksel_set_rate,
2426 .recalc_rate = &omap2_clksel_recalc,
2427 .round_rate = &omap2_clksel_round_rate,
2430 static struct clk_hw_omap omap_96m_alwon_fck_3630_hw = {
2431 .hw = {
2432 .clk = &omap_96m_alwon_fck_3630,
2434 .clksel = omap_96m_alwon_fck_clksel,
2435 .clksel_reg = OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
2436 .clksel_mask = OMAP3630_CLKSEL_96M_MASK,
2439 static struct clk omap_96m_alwon_fck_3630 = {
2440 .name = "omap_96m_alwon_fck",
2441 .hw = &omap_96m_alwon_fck_3630_hw.hw,
2442 .parent_names = omap_96m_alwon_fck_3630_parent_names,
2443 .num_parents = ARRAY_SIZE(omap_96m_alwon_fck_3630_parent_names),
2444 .ops = &omap_96m_alwon_fck_3630_ops,
2447 static struct clk omapctrl_ick;
2449 static struct clk_hw_omap omapctrl_ick_hw = {
2450 .hw = {
2451 .clk = &omapctrl_ick,
2453 .ops = &clkhwops_iclk_wait,
2454 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2455 .enable_bit = OMAP3430_EN_OMAPCTRL_SHIFT,
2456 .flags = ENABLE_ON_INIT,
2457 .clkdm_name = "core_l4_clkdm",
2460 DEFINE_STRUCT_CLK(omapctrl_ick, aes2_ick_parent_names, aes2_ick_ops);
2462 DEFINE_CLK_DIVIDER(pclk_fck, "emu_src_ck", &emu_src_ck, 0x0,
2463 OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2464 OMAP3430_CLKSEL_PCLK_SHIFT, OMAP3430_CLKSEL_PCLK_WIDTH,
2465 CLK_DIVIDER_ONE_BASED, NULL);
2467 DEFINE_CLK_DIVIDER(pclkx2_fck, "emu_src_ck", &emu_src_ck, 0x0,
2468 OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2469 OMAP3430_CLKSEL_PCLKX2_SHIFT, OMAP3430_CLKSEL_PCLKX2_WIDTH,
2470 CLK_DIVIDER_ONE_BASED, NULL);
2472 static struct clk per_48m_fck;
2474 DEFINE_STRUCT_CLK_HW_OMAP(per_48m_fck, "per_clkdm");
2475 DEFINE_STRUCT_CLK(per_48m_fck, core_48m_fck_parent_names, core_l4_ick_ops);
2477 static struct clk security_l3_ick;
2479 DEFINE_STRUCT_CLK_HW_OMAP(security_l3_ick, NULL);
2480 DEFINE_STRUCT_CLK(security_l3_ick, core_l3_ick_parent_names, core_ck_ops);
2482 static struct clk pka_ick;
2484 static const char *pka_ick_parent_names[] = {
2485 "security_l3_ick",
2488 static struct clk_hw_omap pka_ick_hw = {
2489 .hw = {
2490 .clk = &pka_ick,
2492 .ops = &clkhwops_iclk_wait,
2493 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2494 .enable_bit = OMAP3430_EN_PKA_SHIFT,
2497 DEFINE_STRUCT_CLK(pka_ick, pka_ick_parent_names, aes1_ick_ops);
2499 DEFINE_CLK_DIVIDER(rm_ick, "l4_ick", &l4_ick, 0x0,
2500 OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
2501 OMAP3430_CLKSEL_RM_SHIFT, OMAP3430_CLKSEL_RM_WIDTH,
2502 CLK_DIVIDER_ONE_BASED, NULL);
2504 static struct clk rng_ick;
2506 static struct clk_hw_omap rng_ick_hw = {
2507 .hw = {
2508 .clk = &rng_ick,
2510 .ops = &clkhwops_iclk_wait,
2511 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2512 .enable_bit = OMAP3430_EN_RNG_SHIFT,
2515 DEFINE_STRUCT_CLK(rng_ick, aes1_ick_parent_names, aes1_ick_ops);
2517 static struct clk sad2d_ick;
2519 static struct clk_hw_omap sad2d_ick_hw = {
2520 .hw = {
2521 .clk = &sad2d_ick,
2523 .ops = &clkhwops_iclk_wait,
2524 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2525 .enable_bit = OMAP3430_EN_SAD2D_SHIFT,
2526 .clkdm_name = "d2d_clkdm",
2529 DEFINE_STRUCT_CLK(sad2d_ick, core_l3_ick_parent_names, aes2_ick_ops);
2531 static struct clk sdrc_ick;
2533 static struct clk_hw_omap sdrc_ick_hw = {
2534 .hw = {
2535 .clk = &sdrc_ick,
2537 .ops = &clkhwops_wait,
2538 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2539 .enable_bit = OMAP3430_EN_SDRC_SHIFT,
2540 .flags = ENABLE_ON_INIT,
2541 .clkdm_name = "core_l3_clkdm",
2544 DEFINE_STRUCT_CLK(sdrc_ick, ipss_ick_parent_names, aes2_ick_ops);
2546 static const struct clksel_rate sgx_core_rates[] = {
2547 { .div = 2, .val = 5, .flags = RATE_IN_36XX },
2548 { .div = 3, .val = 0, .flags = RATE_IN_3XXX },
2549 { .div = 4, .val = 1, .flags = RATE_IN_3XXX },
2550 { .div = 6, .val = 2, .flags = RATE_IN_3XXX },
2551 { .div = 0 }
2554 static const struct clksel_rate sgx_96m_rates[] = {
2555 { .div = 1, .val = 3, .flags = RATE_IN_3XXX },
2556 { .div = 0 }
2559 static const struct clksel_rate sgx_192m_rates[] = {
2560 { .div = 1, .val = 4, .flags = RATE_IN_36XX },
2561 { .div = 0 }
2564 static const struct clksel_rate sgx_corex2_rates[] = {
2565 { .div = 3, .val = 6, .flags = RATE_IN_36XX },
2566 { .div = 5, .val = 7, .flags = RATE_IN_36XX },
2567 { .div = 0 }
2570 static const struct clksel sgx_clksel[] = {
2571 { .parent = &core_ck, .rates = sgx_core_rates },
2572 { .parent = &cm_96m_fck, .rates = sgx_96m_rates },
2573 { .parent = &omap_192m_alwon_fck, .rates = sgx_192m_rates },
2574 { .parent = &corex2_fck, .rates = sgx_corex2_rates },
2575 { .parent = NULL },
2578 static const char *sgx_fck_parent_names[] = {
2579 "core_ck", "cm_96m_fck", "omap_192m_alwon_fck", "corex2_fck",
2582 static struct clk sgx_fck;
2584 static const struct clk_ops sgx_fck_ops = {
2585 .init = &omap2_init_clk_clkdm,
2586 .enable = &omap2_dflt_clk_enable,
2587 .disable = &omap2_dflt_clk_disable,
2588 .is_enabled = &omap2_dflt_clk_is_enabled,
2589 .recalc_rate = &omap2_clksel_recalc,
2590 .set_rate = &omap2_clksel_set_rate,
2591 .round_rate = &omap2_clksel_round_rate,
2592 .get_parent = &omap2_clksel_find_parent_index,
2593 .set_parent = &omap2_clksel_set_parent,
2596 DEFINE_CLK_OMAP_MUX_GATE(sgx_fck, "sgx_clkdm", sgx_clksel,
2597 OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_CLKSEL),
2598 OMAP3430ES2_CLKSEL_SGX_MASK,
2599 OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_FCLKEN),
2600 OMAP3430ES2_CM_FCLKEN_SGX_EN_SGX_SHIFT,
2601 &clkhwops_wait, sgx_fck_parent_names, sgx_fck_ops);
2603 static struct clk sgx_ick;
2605 static struct clk_hw_omap sgx_ick_hw = {
2606 .hw = {
2607 .clk = &sgx_ick,
2609 .ops = &clkhwops_wait,
2610 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_SGX_MOD, CM_ICLKEN),
2611 .enable_bit = OMAP3430ES2_CM_ICLKEN_SGX_EN_SGX_SHIFT,
2612 .clkdm_name = "sgx_clkdm",
2615 DEFINE_STRUCT_CLK(sgx_ick, core_l3_ick_parent_names, aes2_ick_ops);
2617 static struct clk sha11_ick;
2619 static struct clk_hw_omap sha11_ick_hw = {
2620 .hw = {
2621 .clk = &sha11_ick,
2623 .ops = &clkhwops_iclk_wait,
2624 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN2),
2625 .enable_bit = OMAP3430_EN_SHA11_SHIFT,
2628 DEFINE_STRUCT_CLK(sha11_ick, aes1_ick_parent_names, aes1_ick_ops);
2630 static struct clk sha12_ick;
2632 static struct clk_hw_omap sha12_ick_hw = {
2633 .hw = {
2634 .clk = &sha12_ick,
2636 .ops = &clkhwops_iclk_wait,
2637 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2638 .enable_bit = OMAP3430_EN_SHA12_SHIFT,
2639 .clkdm_name = "core_l4_clkdm",
2642 DEFINE_STRUCT_CLK(sha12_ick, aes2_ick_parent_names, aes2_ick_ops);
2644 static struct clk sr1_fck;
2646 static struct clk_hw_omap sr1_fck_hw = {
2647 .hw = {
2648 .clk = &sr1_fck,
2650 .ops = &clkhwops_wait,
2651 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2652 .enable_bit = OMAP3430_EN_SR1_SHIFT,
2653 .clkdm_name = "wkup_clkdm",
2656 DEFINE_STRUCT_CLK(sr1_fck, dpll3_ck_parent_names, aes2_ick_ops);
2658 static struct clk sr2_fck;
2660 static struct clk_hw_omap sr2_fck_hw = {
2661 .hw = {
2662 .clk = &sr2_fck,
2664 .ops = &clkhwops_wait,
2665 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
2666 .enable_bit = OMAP3430_EN_SR2_SHIFT,
2667 .clkdm_name = "wkup_clkdm",
2670 DEFINE_STRUCT_CLK(sr2_fck, dpll3_ck_parent_names, aes2_ick_ops);
2672 static struct clk sr_l4_ick;
2674 DEFINE_STRUCT_CLK_HW_OMAP(sr_l4_ick, "core_l4_clkdm");
2675 DEFINE_STRUCT_CLK(sr_l4_ick, security_l4_ick2_parent_names, core_l4_ick_ops);
2677 static struct clk ssi_l4_ick;
2679 DEFINE_STRUCT_CLK_HW_OMAP(ssi_l4_ick, "core_l4_clkdm");
2680 DEFINE_STRUCT_CLK(ssi_l4_ick, security_l4_ick2_parent_names, core_l4_ick_ops);
2682 static struct clk ssi_ick_3430es1;
2684 static const char *ssi_ick_3430es1_parent_names[] = {
2685 "ssi_l4_ick",
2688 static struct clk_hw_omap ssi_ick_3430es1_hw = {
2689 .hw = {
2690 .clk = &ssi_ick_3430es1,
2692 .ops = &clkhwops_iclk,
2693 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2694 .enable_bit = OMAP3430_EN_SSI_SHIFT,
2695 .clkdm_name = "core_l4_clkdm",
2698 DEFINE_STRUCT_CLK(ssi_ick_3430es1, ssi_ick_3430es1_parent_names, aes2_ick_ops);
2700 static struct clk ssi_ick_3430es2;
2702 static struct clk_hw_omap ssi_ick_3430es2_hw = {
2703 .hw = {
2704 .clk = &ssi_ick_3430es2,
2706 .ops = &clkhwops_omap3430es2_iclk_ssi_wait,
2707 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2708 .enable_bit = OMAP3430_EN_SSI_SHIFT,
2709 .clkdm_name = "core_l4_clkdm",
2712 DEFINE_STRUCT_CLK(ssi_ick_3430es2, ssi_ick_3430es1_parent_names, aes2_ick_ops);
2714 static const struct clksel_rate ssi_ssr_corex2_rates[] = {
2715 { .div = 1, .val = 1, .flags = RATE_IN_3XXX },
2716 { .div = 2, .val = 2, .flags = RATE_IN_3XXX },
2717 { .div = 3, .val = 3, .flags = RATE_IN_3XXX },
2718 { .div = 4, .val = 4, .flags = RATE_IN_3XXX },
2719 { .div = 6, .val = 6, .flags = RATE_IN_3XXX },
2720 { .div = 8, .val = 8, .flags = RATE_IN_3XXX },
2721 { .div = 0 }
2724 static const struct clksel ssi_ssr_clksel[] = {
2725 { .parent = &corex2_fck, .rates = ssi_ssr_corex2_rates },
2726 { .parent = NULL },
2729 static const char *ssi_ssr_fck_3430es1_parent_names[] = {
2730 "corex2_fck",
2733 static const struct clk_ops ssi_ssr_fck_3430es1_ops = {
2734 .init = &omap2_init_clk_clkdm,
2735 .enable = &omap2_dflt_clk_enable,
2736 .disable = &omap2_dflt_clk_disable,
2737 .is_enabled = &omap2_dflt_clk_is_enabled,
2738 .recalc_rate = &omap2_clksel_recalc,
2739 .set_rate = &omap2_clksel_set_rate,
2740 .round_rate = &omap2_clksel_round_rate,
2743 DEFINE_CLK_OMAP_MUX_GATE(ssi_ssr_fck_3430es1, "core_l4_clkdm",
2744 ssi_ssr_clksel, OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
2745 OMAP3430_CLKSEL_SSI_MASK,
2746 OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2747 OMAP3430_EN_SSI_SHIFT,
2748 NULL, ssi_ssr_fck_3430es1_parent_names,
2749 ssi_ssr_fck_3430es1_ops);
2751 DEFINE_CLK_OMAP_MUX_GATE(ssi_ssr_fck_3430es2, "core_l4_clkdm",
2752 ssi_ssr_clksel, OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
2753 OMAP3430_CLKSEL_SSI_MASK,
2754 OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2755 OMAP3430_EN_SSI_SHIFT,
2756 NULL, ssi_ssr_fck_3430es1_parent_names,
2757 ssi_ssr_fck_3430es1_ops);
2759 DEFINE_CLK_FIXED_FACTOR(ssi_sst_fck_3430es1, "ssi_ssr_fck_3430es1",
2760 &ssi_ssr_fck_3430es1, 0x0, 1, 2);
2762 DEFINE_CLK_FIXED_FACTOR(ssi_sst_fck_3430es2, "ssi_ssr_fck_3430es2",
2763 &ssi_ssr_fck_3430es2, 0x0, 1, 2);
2765 static struct clk sys_clkout1;
2767 static const char *sys_clkout1_parent_names[] = {
2768 "osc_sys_ck",
2771 static struct clk_hw_omap sys_clkout1_hw = {
2772 .hw = {
2773 .clk = &sys_clkout1,
2775 .enable_reg = OMAP3430_PRM_CLKOUT_CTRL,
2776 .enable_bit = OMAP3430_CLKOUT_EN_SHIFT,
2779 DEFINE_STRUCT_CLK(sys_clkout1, sys_clkout1_parent_names, aes1_ick_ops);
2781 DEFINE_CLK_DIVIDER(sys_clkout2, "clkout2_src_ck", &clkout2_src_ck, 0x0,
2782 OMAP3430_CM_CLKOUT_CTRL, OMAP3430_CLKOUT2_DIV_SHIFT,
2783 OMAP3430_CLKOUT2_DIV_WIDTH, CLK_DIVIDER_POWER_OF_TWO, NULL);
2785 DEFINE_CLK_MUX(traceclk_src_fck, emu_src_ck_parent_names, NULL, 0x0,
2786 OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2787 OMAP3430_TRACE_MUX_CTRL_SHIFT, OMAP3430_TRACE_MUX_CTRL_WIDTH,
2788 0x0, NULL);
2790 DEFINE_CLK_DIVIDER(traceclk_fck, "traceclk_src_fck", &traceclk_src_fck, 0x0,
2791 OMAP_CM_REGADDR(OMAP3430_EMU_MOD, CM_CLKSEL1),
2792 OMAP3430_CLKSEL_TRACECLK_SHIFT,
2793 OMAP3430_CLKSEL_TRACECLK_WIDTH, CLK_DIVIDER_ONE_BASED, NULL);
2795 static struct clk ts_fck;
2797 static struct clk_hw_omap ts_fck_hw = {
2798 .hw = {
2799 .clk = &ts_fck,
2801 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
2802 .enable_bit = OMAP3430ES2_EN_TS_SHIFT,
2803 .clkdm_name = "core_l4_clkdm",
2806 DEFINE_STRUCT_CLK(ts_fck, wkup_32k_fck_parent_names, aes2_ick_ops);
2808 static struct clk uart1_fck;
2810 static struct clk_hw_omap uart1_fck_hw = {
2811 .hw = {
2812 .clk = &uart1_fck,
2814 .ops = &clkhwops_wait,
2815 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2816 .enable_bit = OMAP3430_EN_UART1_SHIFT,
2817 .clkdm_name = "core_l4_clkdm",
2820 DEFINE_STRUCT_CLK(uart1_fck, fshostusb_fck_parent_names, aes2_ick_ops);
2822 static struct clk uart1_ick;
2824 static struct clk_hw_omap uart1_ick_hw = {
2825 .hw = {
2826 .clk = &uart1_ick,
2828 .ops = &clkhwops_iclk_wait,
2829 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2830 .enable_bit = OMAP3430_EN_UART1_SHIFT,
2831 .clkdm_name = "core_l4_clkdm",
2834 DEFINE_STRUCT_CLK(uart1_ick, aes2_ick_parent_names, aes2_ick_ops);
2836 static struct clk uart2_fck;
2838 static struct clk_hw_omap uart2_fck_hw = {
2839 .hw = {
2840 .clk = &uart2_fck,
2842 .ops = &clkhwops_wait,
2843 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2844 .enable_bit = OMAP3430_EN_UART2_SHIFT,
2845 .clkdm_name = "core_l4_clkdm",
2848 DEFINE_STRUCT_CLK(uart2_fck, fshostusb_fck_parent_names, aes2_ick_ops);
2850 static struct clk uart2_ick;
2852 static struct clk_hw_omap uart2_ick_hw = {
2853 .hw = {
2854 .clk = &uart2_ick,
2856 .ops = &clkhwops_iclk_wait,
2857 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2858 .enable_bit = OMAP3430_EN_UART2_SHIFT,
2859 .clkdm_name = "core_l4_clkdm",
2862 DEFINE_STRUCT_CLK(uart2_ick, aes2_ick_parent_names, aes2_ick_ops);
2864 static struct clk uart3_fck;
2866 static const char *uart3_fck_parent_names[] = {
2867 "per_48m_fck",
2870 static struct clk_hw_omap uart3_fck_hw = {
2871 .hw = {
2872 .clk = &uart3_fck,
2874 .ops = &clkhwops_wait,
2875 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2876 .enable_bit = OMAP3430_EN_UART3_SHIFT,
2877 .clkdm_name = "per_clkdm",
2880 DEFINE_STRUCT_CLK(uart3_fck, uart3_fck_parent_names, aes2_ick_ops);
2882 static struct clk uart3_ick;
2884 static struct clk_hw_omap uart3_ick_hw = {
2885 .hw = {
2886 .clk = &uart3_ick,
2888 .ops = &clkhwops_iclk_wait,
2889 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2890 .enable_bit = OMAP3430_EN_UART3_SHIFT,
2891 .clkdm_name = "per_clkdm",
2894 DEFINE_STRUCT_CLK(uart3_ick, gpio2_ick_parent_names, aes2_ick_ops);
2896 static struct clk uart4_fck;
2898 static struct clk_hw_omap uart4_fck_hw = {
2899 .hw = {
2900 .clk = &uart4_fck,
2902 .ops = &clkhwops_wait,
2903 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
2904 .enable_bit = OMAP3630_EN_UART4_SHIFT,
2905 .clkdm_name = "per_clkdm",
2908 DEFINE_STRUCT_CLK(uart4_fck, uart3_fck_parent_names, aes2_ick_ops);
2910 static struct clk uart4_fck_am35xx;
2912 static struct clk_hw_omap uart4_fck_am35xx_hw = {
2913 .hw = {
2914 .clk = &uart4_fck_am35xx,
2916 .ops = &clkhwops_wait,
2917 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
2918 .enable_bit = AM35XX_EN_UART4_SHIFT,
2919 .clkdm_name = "core_l4_clkdm",
2922 DEFINE_STRUCT_CLK(uart4_fck_am35xx, fshostusb_fck_parent_names, aes2_ick_ops);
2924 static struct clk uart4_ick;
2926 static struct clk_hw_omap uart4_ick_hw = {
2927 .hw = {
2928 .clk = &uart4_ick,
2930 .ops = &clkhwops_iclk_wait,
2931 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
2932 .enable_bit = OMAP3630_EN_UART4_SHIFT,
2933 .clkdm_name = "per_clkdm",
2936 DEFINE_STRUCT_CLK(uart4_ick, gpio2_ick_parent_names, aes2_ick_ops);
2938 static struct clk uart4_ick_am35xx;
2940 static struct clk_hw_omap uart4_ick_am35xx_hw = {
2941 .hw = {
2942 .clk = &uart4_ick_am35xx,
2944 .ops = &clkhwops_iclk_wait,
2945 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2946 .enable_bit = AM35XX_EN_UART4_SHIFT,
2947 .clkdm_name = "core_l4_clkdm",
2950 DEFINE_STRUCT_CLK(uart4_ick_am35xx, aes2_ick_parent_names, aes2_ick_ops);
2952 static const struct clksel_rate div2_rates[] = {
2953 { .div = 1, .val = 1, .flags = RATE_IN_3XXX },
2954 { .div = 2, .val = 2, .flags = RATE_IN_3XXX },
2955 { .div = 0 }
2958 static const struct clksel usb_l4_clksel[] = {
2959 { .parent = &l4_ick, .rates = div2_rates },
2960 { .parent = NULL },
2963 static const char *usb_l4_ick_parent_names[] = {
2964 "l4_ick",
2967 DEFINE_CLK_OMAP_MUX_GATE(usb_l4_ick, "core_l4_clkdm", usb_l4_clksel,
2968 OMAP_CM_REGADDR(CORE_MOD, CM_CLKSEL),
2969 OMAP3430ES1_CLKSEL_FSHOSTUSB_MASK,
2970 OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
2971 OMAP3430ES1_EN_FSHOSTUSB_SHIFT,
2972 &clkhwops_iclk_wait, usb_l4_ick_parent_names,
2973 ssi_ssr_fck_3430es1_ops);
2975 static struct clk usbhost_120m_fck;
2977 static const char *usbhost_120m_fck_parent_names[] = {
2978 "dpll5_m2_ck",
2981 static struct clk_hw_omap usbhost_120m_fck_hw = {
2982 .hw = {
2983 .clk = &usbhost_120m_fck,
2985 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
2986 .enable_bit = OMAP3430ES2_EN_USBHOST2_SHIFT,
2987 .clkdm_name = "usbhost_clkdm",
2990 DEFINE_STRUCT_CLK(usbhost_120m_fck, usbhost_120m_fck_parent_names,
2991 aes2_ick_ops);
2993 static struct clk usbhost_48m_fck;
2995 static struct clk_hw_omap usbhost_48m_fck_hw = {
2996 .hw = {
2997 .clk = &usbhost_48m_fck,
2999 .ops = &clkhwops_omap3430es2_dss_usbhost_wait,
3000 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_FCLKEN),
3001 .enable_bit = OMAP3430ES2_EN_USBHOST1_SHIFT,
3002 .clkdm_name = "usbhost_clkdm",
3005 DEFINE_STRUCT_CLK(usbhost_48m_fck, core_48m_fck_parent_names, aes2_ick_ops);
3007 static struct clk usbhost_ick;
3009 static struct clk_hw_omap usbhost_ick_hw = {
3010 .hw = {
3011 .clk = &usbhost_ick,
3013 .ops = &clkhwops_omap3430es2_iclk_dss_usbhost_wait,
3014 .enable_reg = OMAP_CM_REGADDR(OMAP3430ES2_USBHOST_MOD, CM_ICLKEN),
3015 .enable_bit = OMAP3430ES2_EN_USBHOST_SHIFT,
3016 .clkdm_name = "usbhost_clkdm",
3019 DEFINE_STRUCT_CLK(usbhost_ick, security_l4_ick2_parent_names, aes2_ick_ops);
3021 static struct clk usbtll_fck;
3023 static struct clk_hw_omap usbtll_fck_hw = {
3024 .hw = {
3025 .clk = &usbtll_fck,
3027 .ops = &clkhwops_wait,
3028 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, OMAP3430ES2_CM_FCLKEN3),
3029 .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
3030 .clkdm_name = "core_l4_clkdm",
3033 DEFINE_STRUCT_CLK(usbtll_fck, usbhost_120m_fck_parent_names, aes2_ick_ops);
3035 static struct clk usbtll_ick;
3037 static struct clk_hw_omap usbtll_ick_hw = {
3038 .hw = {
3039 .clk = &usbtll_ick,
3041 .ops = &clkhwops_iclk_wait,
3042 .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN3),
3043 .enable_bit = OMAP3430ES2_EN_USBTLL_SHIFT,
3044 .clkdm_name = "core_l4_clkdm",
3047 DEFINE_STRUCT_CLK(usbtll_ick, aes2_ick_parent_names, aes2_ick_ops);
3049 static const struct clksel_rate usim_96m_rates[] = {
3050 { .div = 2, .val = 3, .flags = RATE_IN_3XXX },
3051 { .div = 4, .val = 4, .flags = RATE_IN_3XXX },
3052 { .div = 8, .val = 5, .flags = RATE_IN_3XXX },
3053 { .div = 10, .val = 6, .flags = RATE_IN_3XXX },
3054 { .div = 0 }
3057 static const struct clksel_rate usim_120m_rates[] = {
3058 { .div = 4, .val = 7, .flags = RATE_IN_3XXX },
3059 { .div = 8, .val = 8, .flags = RATE_IN_3XXX },
3060 { .div = 16, .val = 9, .flags = RATE_IN_3XXX },
3061 { .div = 20, .val = 10, .flags = RATE_IN_3XXX },
3062 { .div = 0 }
3065 static const struct clksel usim_clksel[] = {
3066 { .parent = &omap_96m_fck, .rates = usim_96m_rates },
3067 { .parent = &dpll5_m2_ck, .rates = usim_120m_rates },
3068 { .parent = &sys_ck, .rates = div2_rates },
3069 { .parent = NULL },
3072 static const char *usim_fck_parent_names[] = {
3073 "omap_96m_fck", "dpll5_m2_ck", "sys_ck",
3076 static struct clk usim_fck;
3078 static const struct clk_ops usim_fck_ops = {
3079 .enable = &omap2_dflt_clk_enable,
3080 .disable = &omap2_dflt_clk_disable,
3081 .is_enabled = &omap2_dflt_clk_is_enabled,
3082 .recalc_rate = &omap2_clksel_recalc,
3083 .get_parent = &omap2_clksel_find_parent_index,
3084 .set_parent = &omap2_clksel_set_parent,
3087 DEFINE_CLK_OMAP_MUX_GATE(usim_fck, NULL, usim_clksel,
3088 OMAP_CM_REGADDR(WKUP_MOD, CM_CLKSEL),
3089 OMAP3430ES2_CLKSEL_USIMOCP_MASK,
3090 OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
3091 OMAP3430ES2_EN_USIMOCP_SHIFT, &clkhwops_wait,
3092 usim_fck_parent_names, usim_fck_ops);
3094 static struct clk usim_ick;
3096 static struct clk_hw_omap usim_ick_hw = {
3097 .hw = {
3098 .clk = &usim_ick,
3100 .ops = &clkhwops_iclk_wait,
3101 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
3102 .enable_bit = OMAP3430ES2_EN_USIMOCP_SHIFT,
3103 .clkdm_name = "wkup_clkdm",
3106 DEFINE_STRUCT_CLK(usim_ick, gpio1_ick_parent_names, aes2_ick_ops);
3108 static struct clk vpfe_fck;
3110 static const char *vpfe_fck_parent_names[] = {
3111 "pclk_ck",
3114 static struct clk_hw_omap vpfe_fck_hw = {
3115 .hw = {
3116 .clk = &vpfe_fck,
3118 .enable_reg = OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL),
3119 .enable_bit = AM35XX_VPFE_FCLK_SHIFT,
3122 DEFINE_STRUCT_CLK(vpfe_fck, vpfe_fck_parent_names, aes1_ick_ops);
3124 static struct clk vpfe_ick;
3126 static struct clk_hw_omap vpfe_ick_hw = {
3127 .hw = {
3128 .clk = &vpfe_ick,
3130 .ops = &clkhwops_am35xx_ipss_module_wait,
3131 .enable_reg = OMAP343X_CTRL_REGADDR(AM35XX_CONTROL_IPSS_CLK_CTRL),
3132 .enable_bit = AM35XX_VPFE_VBUSP_CLK_SHIFT,
3133 .clkdm_name = "core_l3_clkdm",
3136 DEFINE_STRUCT_CLK(vpfe_ick, emac_ick_parent_names, aes2_ick_ops);
3138 static struct clk wdt1_fck;
3140 DEFINE_STRUCT_CLK_HW_OMAP(wdt1_fck, "wkup_clkdm");
3141 DEFINE_STRUCT_CLK(wdt1_fck, gpt12_fck_parent_names, core_l4_ick_ops);
3143 static struct clk wdt1_ick;
3145 static struct clk_hw_omap wdt1_ick_hw = {
3146 .hw = {
3147 .clk = &wdt1_ick,
3149 .ops = &clkhwops_iclk_wait,
3150 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
3151 .enable_bit = OMAP3430_EN_WDT1_SHIFT,
3152 .clkdm_name = "wkup_clkdm",
3155 DEFINE_STRUCT_CLK(wdt1_ick, gpio1_ick_parent_names, aes2_ick_ops);
3157 static struct clk wdt2_fck;
3159 static struct clk_hw_omap wdt2_fck_hw = {
3160 .hw = {
3161 .clk = &wdt2_fck,
3163 .ops = &clkhwops_wait,
3164 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_FCLKEN),
3165 .enable_bit = OMAP3430_EN_WDT2_SHIFT,
3166 .clkdm_name = "wkup_clkdm",
3169 DEFINE_STRUCT_CLK(wdt2_fck, gpio1_dbck_parent_names, aes2_ick_ops);
3171 static struct clk wdt2_ick;
3173 static struct clk_hw_omap wdt2_ick_hw = {
3174 .hw = {
3175 .clk = &wdt2_ick,
3177 .ops = &clkhwops_iclk_wait,
3178 .enable_reg = OMAP_CM_REGADDR(WKUP_MOD, CM_ICLKEN),
3179 .enable_bit = OMAP3430_EN_WDT2_SHIFT,
3180 .clkdm_name = "wkup_clkdm",
3183 DEFINE_STRUCT_CLK(wdt2_ick, gpio1_ick_parent_names, aes2_ick_ops);
3185 static struct clk wdt3_fck;
3187 static struct clk_hw_omap wdt3_fck_hw = {
3188 .hw = {
3189 .clk = &wdt3_fck,
3191 .ops = &clkhwops_wait,
3192 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
3193 .enable_bit = OMAP3430_EN_WDT3_SHIFT,
3194 .clkdm_name = "per_clkdm",
3197 DEFINE_STRUCT_CLK(wdt3_fck, gpio2_dbck_parent_names, aes2_ick_ops);
3199 static struct clk wdt3_ick;
3201 static struct clk_hw_omap wdt3_ick_hw = {
3202 .hw = {
3203 .clk = &wdt3_ick,
3205 .ops = &clkhwops_iclk_wait,
3206 .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
3207 .enable_bit = OMAP3430_EN_WDT3_SHIFT,
3208 .clkdm_name = "per_clkdm",
3211 DEFINE_STRUCT_CLK(wdt3_ick, gpio2_ick_parent_names, aes2_ick_ops);
3214 * clkdev
3216 static struct omap_clk omap3xxx_clks[] = {
3217 CLK(NULL, "apb_pclk", &dummy_apb_pclk, CK_3XXX),
3218 CLK(NULL, "omap_32k_fck", &omap_32k_fck, CK_3XXX),
3219 CLK(NULL, "virt_12m_ck", &virt_12m_ck, CK_3XXX),
3220 CLK(NULL, "virt_13m_ck", &virt_13m_ck, CK_3XXX),
3221 CLK(NULL, "virt_16_8m_ck", &virt_16_8m_ck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3222 CLK(NULL, "virt_19200000_ck", &virt_19200000_ck, CK_3XXX),
3223 CLK(NULL, "virt_26000000_ck", &virt_26000000_ck, CK_3XXX),
3224 CLK(NULL, "virt_38_4m_ck", &virt_38_4m_ck, CK_3XXX),
3225 CLK(NULL, "osc_sys_ck", &osc_sys_ck, CK_3XXX),
3226 CLK("twl", "fck", &osc_sys_ck, CK_3XXX),
3227 CLK(NULL, "sys_ck", &sys_ck, CK_3XXX),
3228 CLK(NULL, "sys_altclk", &sys_altclk, CK_3XXX),
3229 CLK(NULL, "mcbsp_clks", &mcbsp_clks, CK_3XXX),
3230 CLK(NULL, "sys_clkout1", &sys_clkout1, CK_3XXX),
3231 CLK(NULL, "dpll1_ck", &dpll1_ck, CK_3XXX),
3232 CLK(NULL, "dpll1_x2_ck", &dpll1_x2_ck, CK_3XXX),
3233 CLK(NULL, "dpll1_x2m2_ck", &dpll1_x2m2_ck, CK_3XXX),
3234 CLK(NULL, "dpll2_ck", &dpll2_ck, CK_34XX | CK_36XX),
3235 CLK(NULL, "dpll2_m2_ck", &dpll2_m2_ck, CK_34XX | CK_36XX),
3236 CLK(NULL, "dpll3_ck", &dpll3_ck, CK_3XXX),
3237 CLK(NULL, "core_ck", &core_ck, CK_3XXX),
3238 CLK(NULL, "dpll3_x2_ck", &dpll3_x2_ck, CK_3XXX),
3239 CLK(NULL, "dpll3_m2_ck", &dpll3_m2_ck, CK_3XXX),
3240 CLK(NULL, "dpll3_m2x2_ck", &dpll3_m2x2_ck, CK_3XXX),
3241 CLK(NULL, "dpll3_m3_ck", &dpll3_m3_ck, CK_3XXX),
3242 CLK(NULL, "dpll3_m3x2_ck", &dpll3_m3x2_ck, CK_3XXX),
3243 CLK("etb", "emu_core_alwon_ck", &emu_core_alwon_ck, CK_3XXX),
3244 CLK(NULL, "dpll4_ck", &dpll4_ck, CK_3XXX),
3245 CLK(NULL, "dpll4_x2_ck", &dpll4_x2_ck, CK_3XXX),
3246 CLK(NULL, "omap_192m_alwon_fck", &omap_192m_alwon_fck, CK_36XX),
3247 CLK(NULL, "omap_96m_alwon_fck", &omap_96m_alwon_fck, CK_3XXX),
3248 CLK(NULL, "omap_96m_fck", &omap_96m_fck, CK_3XXX),
3249 CLK(NULL, "cm_96m_fck", &cm_96m_fck, CK_3XXX),
3250 CLK(NULL, "omap_54m_fck", &omap_54m_fck, CK_3XXX),
3251 CLK(NULL, "omap_48m_fck", &omap_48m_fck, CK_3XXX),
3252 CLK(NULL, "omap_12m_fck", &omap_12m_fck, CK_3XXX),
3253 CLK(NULL, "dpll4_m2_ck", &dpll4_m2_ck, CK_3XXX),
3254 CLK(NULL, "dpll4_m2x2_ck", &dpll4_m2x2_ck, CK_3XXX),
3255 CLK(NULL, "dpll4_m3_ck", &dpll4_m3_ck, CK_3XXX),
3256 CLK(NULL, "dpll4_m3x2_ck", &dpll4_m3x2_ck, CK_3XXX),
3257 CLK(NULL, "dpll4_m4_ck", &dpll4_m4_ck, CK_3XXX),
3258 CLK(NULL, "dpll4_m4x2_ck", &dpll4_m4x2_ck, CK_3XXX),
3259 CLK(NULL, "dpll4_m5_ck", &dpll4_m5_ck, CK_3XXX),
3260 CLK(NULL, "dpll4_m5x2_ck", &dpll4_m5x2_ck, CK_3XXX),
3261 CLK(NULL, "dpll4_m6_ck", &dpll4_m6_ck, CK_3XXX),
3262 CLK(NULL, "dpll4_m6x2_ck", &dpll4_m6x2_ck, CK_3XXX),
3263 CLK("etb", "emu_per_alwon_ck", &emu_per_alwon_ck, CK_3XXX),
3264 CLK(NULL, "dpll5_ck", &dpll5_ck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3265 CLK(NULL, "dpll5_m2_ck", &dpll5_m2_ck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3266 CLK(NULL, "clkout2_src_ck", &clkout2_src_ck, CK_3XXX),
3267 CLK(NULL, "sys_clkout2", &sys_clkout2, CK_3XXX),
3268 CLK(NULL, "corex2_fck", &corex2_fck, CK_3XXX),
3269 CLK(NULL, "dpll1_fck", &dpll1_fck, CK_3XXX),
3270 CLK(NULL, "mpu_ck", &mpu_ck, CK_3XXX),
3271 CLK(NULL, "arm_fck", &arm_fck, CK_3XXX),
3272 CLK("etb", "emu_mpu_alwon_ck", &emu_mpu_alwon_ck, CK_3XXX),
3273 CLK(NULL, "dpll2_fck", &dpll2_fck, CK_34XX | CK_36XX),
3274 CLK(NULL, "iva2_ck", &iva2_ck, CK_34XX | CK_36XX),
3275 CLK(NULL, "l3_ick", &l3_ick, CK_3XXX),
3276 CLK(NULL, "l4_ick", &l4_ick, CK_3XXX),
3277 CLK(NULL, "rm_ick", &rm_ick, CK_3XXX),
3278 CLK(NULL, "gfx_l3_ck", &gfx_l3_ck, CK_3430ES1),
3279 CLK(NULL, "gfx_l3_fck", &gfx_l3_fck, CK_3430ES1),
3280 CLK(NULL, "gfx_l3_ick", &gfx_l3_ick, CK_3430ES1),
3281 CLK(NULL, "gfx_cg1_ck", &gfx_cg1_ck, CK_3430ES1),
3282 CLK(NULL, "gfx_cg2_ck", &gfx_cg2_ck, CK_3430ES1),
3283 CLK(NULL, "sgx_fck", &sgx_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3284 CLK(NULL, "sgx_ick", &sgx_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3285 CLK(NULL, "d2d_26m_fck", &d2d_26m_fck, CK_3430ES1),
3286 CLK(NULL, "modem_fck", &modem_fck, CK_34XX | CK_36XX),
3287 CLK(NULL, "sad2d_ick", &sad2d_ick, CK_34XX | CK_36XX),
3288 CLK(NULL, "mad2d_ick", &mad2d_ick, CK_34XX | CK_36XX),
3289 CLK(NULL, "gpt10_fck", &gpt10_fck, CK_3XXX),
3290 CLK(NULL, "gpt11_fck", &gpt11_fck, CK_3XXX),
3291 CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3292 CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3293 CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3294 CLK("usbhs_omap", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3295 CLK("usbhs_tll", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3296 CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX),
3297 CLK(NULL, "mmchs3_fck", &mmchs3_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3298 CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_3XXX),
3299 CLK(NULL, "mspro_fck", &mspro_fck, CK_34XX | CK_36XX),
3300 CLK(NULL, "mmchs1_fck", &mmchs1_fck, CK_3XXX),
3301 CLK(NULL, "i2c3_fck", &i2c3_fck, CK_3XXX),
3302 CLK(NULL, "i2c2_fck", &i2c2_fck, CK_3XXX),
3303 CLK(NULL, "i2c1_fck", &i2c1_fck, CK_3XXX),
3304 CLK(NULL, "mcbsp5_fck", &mcbsp5_fck, CK_3XXX),
3305 CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_3XXX),
3306 CLK(NULL, "core_48m_fck", &core_48m_fck, CK_3XXX),
3307 CLK(NULL, "mcspi4_fck", &mcspi4_fck, CK_3XXX),
3308 CLK(NULL, "mcspi3_fck", &mcspi3_fck, CK_3XXX),
3309 CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_3XXX),
3310 CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_3XXX),
3311 CLK(NULL, "uart2_fck", &uart2_fck, CK_3XXX),
3312 CLK(NULL, "uart1_fck", &uart1_fck, CK_3XXX),
3313 CLK(NULL, "fshostusb_fck", &fshostusb_fck, CK_3430ES1),
3314 CLK(NULL, "core_12m_fck", &core_12m_fck, CK_3XXX),
3315 CLK("omap_hdq.0", "fck", &hdq_fck, CK_3XXX),
3316 CLK(NULL, "hdq_fck", &hdq_fck, CK_3XXX),
3317 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es1, CK_3430ES1),
3318 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es2, CK_3430ES2PLUS | CK_36XX),
3319 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1, CK_3430ES1),
3320 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es2, CK_3430ES2PLUS | CK_36XX),
3321 CLK(NULL, "core_l3_ick", &core_l3_ick, CK_3XXX),
3322 CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es1, CK_3430ES1),
3323 CLK("musb-omap2430", "ick", &hsotgusb_ick_3430es2, CK_3430ES2PLUS | CK_36XX),
3324 CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_3430es1, CK_3430ES1),
3325 CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_3430es2, CK_3430ES2PLUS | CK_36XX),
3326 CLK(NULL, "sdrc_ick", &sdrc_ick, CK_3XXX),
3327 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_3XXX),
3328 CLK(NULL, "security_l3_ick", &security_l3_ick, CK_34XX | CK_36XX),
3329 CLK(NULL, "pka_ick", &pka_ick, CK_34XX | CK_36XX),
3330 CLK(NULL, "core_l4_ick", &core_l4_ick, CK_3XXX),
3331 CLK(NULL, "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3332 CLK("usbhs_omap", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3333 CLK("usbhs_tll", "usbtll_ick", &usbtll_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3334 CLK("omap_hsmmc.2", "ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3335 CLK(NULL, "mmchs3_ick", &mmchs3_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3336 CLK(NULL, "icr_ick", &icr_ick, CK_34XX | CK_36XX),
3337 CLK("omap-aes", "ick", &aes2_ick, CK_34XX | CK_36XX),
3338 CLK("omap-sham", "ick", &sha12_ick, CK_34XX | CK_36XX),
3339 CLK(NULL, "des2_ick", &des2_ick, CK_34XX | CK_36XX),
3340 CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_3XXX),
3341 CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_3XXX),
3342 CLK(NULL, "mmchs2_ick", &mmchs2_ick, CK_3XXX),
3343 CLK(NULL, "mmchs1_ick", &mmchs1_ick, CK_3XXX),
3344 CLK(NULL, "mspro_ick", &mspro_ick, CK_34XX | CK_36XX),
3345 CLK("omap_hdq.0", "ick", &hdq_ick, CK_3XXX),
3346 CLK(NULL, "hdq_ick", &hdq_ick, CK_3XXX),
3347 CLK("omap2_mcspi.4", "ick", &mcspi4_ick, CK_3XXX),
3348 CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_3XXX),
3349 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_3XXX),
3350 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_3XXX),
3351 CLK(NULL, "mcspi4_ick", &mcspi4_ick, CK_3XXX),
3352 CLK(NULL, "mcspi3_ick", &mcspi3_ick, CK_3XXX),
3353 CLK(NULL, "mcspi2_ick", &mcspi2_ick, CK_3XXX),
3354 CLK(NULL, "mcspi1_ick", &mcspi1_ick, CK_3XXX),
3355 CLK("omap_i2c.3", "ick", &i2c3_ick, CK_3XXX),
3356 CLK("omap_i2c.2", "ick", &i2c2_ick, CK_3XXX),
3357 CLK("omap_i2c.1", "ick", &i2c1_ick, CK_3XXX),
3358 CLK(NULL, "i2c3_ick", &i2c3_ick, CK_3XXX),
3359 CLK(NULL, "i2c2_ick", &i2c2_ick, CK_3XXX),
3360 CLK(NULL, "i2c1_ick", &i2c1_ick, CK_3XXX),
3361 CLK(NULL, "uart2_ick", &uart2_ick, CK_3XXX),
3362 CLK(NULL, "uart1_ick", &uart1_ick, CK_3XXX),
3363 CLK(NULL, "gpt11_ick", &gpt11_ick, CK_3XXX),
3364 CLK(NULL, "gpt10_ick", &gpt10_ick, CK_3XXX),
3365 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_3XXX),
3366 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_3XXX),
3367 CLK(NULL, "mcbsp5_ick", &mcbsp5_ick, CK_3XXX),
3368 CLK(NULL, "mcbsp1_ick", &mcbsp1_ick, CK_3XXX),
3369 CLK(NULL, "fac_ick", &fac_ick, CK_3430ES1),
3370 CLK(NULL, "mailboxes_ick", &mailboxes_ick, CK_34XX | CK_36XX),
3371 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_3XXX),
3372 CLK(NULL, "ssi_l4_ick", &ssi_l4_ick, CK_34XX | CK_36XX),
3373 CLK(NULL, "ssi_ick", &ssi_ick_3430es1, CK_3430ES1),
3374 CLK(NULL, "ssi_ick", &ssi_ick_3430es2, CK_3430ES2PLUS | CK_36XX),
3375 CLK(NULL, "usb_l4_ick", &usb_l4_ick, CK_3430ES1),
3376 CLK(NULL, "security_l4_ick2", &security_l4_ick2, CK_34XX | CK_36XX),
3377 CLK(NULL, "aes1_ick", &aes1_ick, CK_34XX | CK_36XX),
3378 CLK("omap_rng", "ick", &rng_ick, CK_34XX | CK_36XX),
3379 CLK(NULL, "sha11_ick", &sha11_ick, CK_34XX | CK_36XX),
3380 CLK(NULL, "des1_ick", &des1_ick, CK_34XX | CK_36XX),
3381 CLK(NULL, "dss1_alwon_fck", &dss1_alwon_fck_3430es1, CK_3430ES1),
3382 CLK(NULL, "dss1_alwon_fck", &dss1_alwon_fck_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3383 CLK(NULL, "dss_tv_fck", &dss_tv_fck, CK_3XXX),
3384 CLK(NULL, "dss_96m_fck", &dss_96m_fck, CK_3XXX),
3385 CLK(NULL, "dss2_alwon_fck", &dss2_alwon_fck, CK_3XXX),
3386 CLK("omapdss_dss", "ick", &dss_ick_3430es1, CK_3430ES1),
3387 CLK(NULL, "dss_ick", &dss_ick_3430es1, CK_3430ES1),
3388 CLK("omapdss_dss", "ick", &dss_ick_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3389 CLK(NULL, "dss_ick", &dss_ick_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3390 CLK(NULL, "cam_mclk", &cam_mclk, CK_34XX | CK_36XX),
3391 CLK(NULL, "cam_ick", &cam_ick, CK_34XX | CK_36XX),
3392 CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_34XX | CK_36XX),
3393 CLK(NULL, "usbhost_120m_fck", &usbhost_120m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3394 CLK(NULL, "usbhost_48m_fck", &usbhost_48m_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3395 CLK(NULL, "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3396 CLK("usbhs_omap", "usbhost_ick", &usbhost_ick, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3397 CLK(NULL, "utmi_p1_gfclk", &dummy_ck, CK_3XXX),
3398 CLK(NULL, "utmi_p2_gfclk", &dummy_ck, CK_3XXX),
3399 CLK(NULL, "xclk60mhsp1_ck", &dummy_ck, CK_3XXX),
3400 CLK(NULL, "xclk60mhsp2_ck", &dummy_ck, CK_3XXX),
3401 CLK(NULL, "usb_host_hs_utmi_p1_clk", &dummy_ck, CK_3XXX),
3402 CLK(NULL, "usb_host_hs_utmi_p2_clk", &dummy_ck, CK_3XXX),
3403 CLK("usbhs_omap", "usb_tll_hs_usb_ch0_clk", &dummy_ck, CK_3XXX),
3404 CLK("usbhs_omap", "usb_tll_hs_usb_ch1_clk", &dummy_ck, CK_3XXX),
3405 CLK("usbhs_tll", "usb_tll_hs_usb_ch0_clk", &dummy_ck, CK_3XXX),
3406 CLK("usbhs_tll", "usb_tll_hs_usb_ch1_clk", &dummy_ck, CK_3XXX),
3407 CLK(NULL, "init_60m_fclk", &dummy_ck, CK_3XXX),
3408 CLK(NULL, "usim_fck", &usim_fck, CK_3430ES2PLUS | CK_36XX),
3409 CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX),
3410 CLK(NULL, "wkup_32k_fck", &wkup_32k_fck, CK_3XXX),
3411 CLK(NULL, "gpio1_dbck", &gpio1_dbck, CK_3XXX),
3412 CLK(NULL, "wdt2_fck", &wdt2_fck, CK_3XXX),
3413 CLK(NULL, "wkup_l4_ick", &wkup_l4_ick, CK_34XX | CK_36XX),
3414 CLK(NULL, "usim_ick", &usim_ick, CK_3430ES2PLUS | CK_36XX),
3415 CLK("omap_wdt", "ick", &wdt2_ick, CK_3XXX),
3416 CLK(NULL, "wdt2_ick", &wdt2_ick, CK_3XXX),
3417 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_3XXX),
3418 CLK(NULL, "gpio1_ick", &gpio1_ick, CK_3XXX),
3419 CLK(NULL, "omap_32ksync_ick", &omap_32ksync_ick, CK_3XXX),
3420 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_3XXX),
3421 CLK(NULL, "gpt1_ick", &gpt1_ick, CK_3XXX),
3422 CLK(NULL, "per_96m_fck", &per_96m_fck, CK_3XXX),
3423 CLK(NULL, "per_48m_fck", &per_48m_fck, CK_3XXX),
3424 CLK(NULL, "uart3_fck", &uart3_fck, CK_3XXX),
3425 CLK(NULL, "uart4_fck", &uart4_fck, CK_36XX),
3426 CLK(NULL, "uart4_fck", &uart4_fck_am35xx, CK_AM35XX),
3427 CLK(NULL, "gpt2_fck", &gpt2_fck, CK_3XXX),
3428 CLK(NULL, "gpt3_fck", &gpt3_fck, CK_3XXX),
3429 CLK(NULL, "gpt4_fck", &gpt4_fck, CK_3XXX),
3430 CLK(NULL, "gpt5_fck", &gpt5_fck, CK_3XXX),
3431 CLK(NULL, "gpt6_fck", &gpt6_fck, CK_3XXX),
3432 CLK(NULL, "gpt7_fck", &gpt7_fck, CK_3XXX),
3433 CLK(NULL, "gpt8_fck", &gpt8_fck, CK_3XXX),
3434 CLK(NULL, "gpt9_fck", &gpt9_fck, CK_3XXX),
3435 CLK(NULL, "per_32k_alwon_fck", &per_32k_alwon_fck, CK_3XXX),
3436 CLK(NULL, "gpio6_dbck", &gpio6_dbck, CK_3XXX),
3437 CLK(NULL, "gpio5_dbck", &gpio5_dbck, CK_3XXX),
3438 CLK(NULL, "gpio4_dbck", &gpio4_dbck, CK_3XXX),
3439 CLK(NULL, "gpio3_dbck", &gpio3_dbck, CK_3XXX),
3440 CLK(NULL, "gpio2_dbck", &gpio2_dbck, CK_3XXX),
3441 CLK(NULL, "wdt3_fck", &wdt3_fck, CK_3XXX),
3442 CLK(NULL, "per_l4_ick", &per_l4_ick, CK_3XXX),
3443 CLK(NULL, "gpio6_ick", &gpio6_ick, CK_3XXX),
3444 CLK(NULL, "gpio5_ick", &gpio5_ick, CK_3XXX),
3445 CLK(NULL, "gpio4_ick", &gpio4_ick, CK_3XXX),
3446 CLK(NULL, "gpio3_ick", &gpio3_ick, CK_3XXX),
3447 CLK(NULL, "gpio2_ick", &gpio2_ick, CK_3XXX),
3448 CLK(NULL, "wdt3_ick", &wdt3_ick, CK_3XXX),
3449 CLK(NULL, "uart3_ick", &uart3_ick, CK_3XXX),
3450 CLK(NULL, "uart4_ick", &uart4_ick, CK_36XX),
3451 CLK(NULL, "gpt9_ick", &gpt9_ick, CK_3XXX),
3452 CLK(NULL, "gpt8_ick", &gpt8_ick, CK_3XXX),
3453 CLK(NULL, "gpt7_ick", &gpt7_ick, CK_3XXX),
3454 CLK(NULL, "gpt6_ick", &gpt6_ick, CK_3XXX),
3455 CLK(NULL, "gpt5_ick", &gpt5_ick, CK_3XXX),
3456 CLK(NULL, "gpt4_ick", &gpt4_ick, CK_3XXX),
3457 CLK(NULL, "gpt3_ick", &gpt3_ick, CK_3XXX),
3458 CLK(NULL, "gpt2_ick", &gpt2_ick, CK_3XXX),
3459 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_3XXX),
3460 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_3XXX),
3461 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_3XXX),
3462 CLK(NULL, "mcbsp4_ick", &mcbsp2_ick, CK_3XXX),
3463 CLK(NULL, "mcbsp3_ick", &mcbsp3_ick, CK_3XXX),
3464 CLK(NULL, "mcbsp2_ick", &mcbsp4_ick, CK_3XXX),
3465 CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_3XXX),
3466 CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_3XXX),
3467 CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_3XXX),
3468 CLK("etb", "emu_src_ck", &emu_src_ck, CK_3XXX),
3469 CLK(NULL, "emu_src_ck", &emu_src_ck, CK_3XXX),
3470 CLK(NULL, "pclk_fck", &pclk_fck, CK_3XXX),
3471 CLK(NULL, "pclkx2_fck", &pclkx2_fck, CK_3XXX),
3472 CLK(NULL, "atclk_fck", &atclk_fck, CK_3XXX),
3473 CLK(NULL, "traceclk_src_fck", &traceclk_src_fck, CK_3XXX),
3474 CLK(NULL, "traceclk_fck", &traceclk_fck, CK_3XXX),
3475 CLK(NULL, "sr1_fck", &sr1_fck, CK_34XX | CK_36XX),
3476 CLK(NULL, "sr2_fck", &sr2_fck, CK_34XX | CK_36XX),
3477 CLK(NULL, "sr_l4_ick", &sr_l4_ick, CK_34XX | CK_36XX),
3478 CLK(NULL, "secure_32k_fck", &secure_32k_fck, CK_3XXX),
3479 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_3XXX),
3480 CLK(NULL, "wdt1_fck", &wdt1_fck, CK_3XXX),
3481 CLK(NULL, "ipss_ick", &ipss_ick, CK_AM35XX),
3482 CLK(NULL, "rmii_ck", &rmii_ck, CK_AM35XX),
3483 CLK(NULL, "pclk_ck", &pclk_ck, CK_AM35XX),
3484 CLK(NULL, "emac_ick", &emac_ick, CK_AM35XX),
3485 CLK(NULL, "emac_fck", &emac_fck, CK_AM35XX),
3486 CLK("davinci_emac.0", NULL, &emac_ick, CK_AM35XX),
3487 CLK("davinci_mdio.0", NULL, &emac_fck, CK_AM35XX),
3488 CLK("vpfe-capture", "master", &vpfe_ick, CK_AM35XX),
3489 CLK("vpfe-capture", "slave", &vpfe_fck, CK_AM35XX),
3490 CLK(NULL, "hsotgusb_ick", &hsotgusb_ick_am35xx, CK_AM35XX),
3491 CLK(NULL, "hsotgusb_fck", &hsotgusb_fck_am35xx, CK_AM35XX),
3492 CLK(NULL, "hecc_ck", &hecc_ck, CK_AM35XX),
3493 CLK(NULL, "uart4_ick", &uart4_ick_am35xx, CK_AM35XX),
3494 CLK(NULL, "timer_32k_ck", &omap_32k_fck, CK_3XXX),
3495 CLK(NULL, "timer_sys_ck", &sys_ck, CK_3XXX),
3496 CLK(NULL, "cpufreq_ck", &dpll1_ck, CK_3XXX),
3499 static const char *enable_init_clks[] = {
3500 "sdrc_ick",
3501 "gpmc_fck",
3502 "omapctrl_ick",
3505 int __init omap3xxx_clk_init(void)
3507 struct omap_clk *c;
3508 u32 cpu_clkflg = 0;
3511 * 3505 must be tested before 3517, since 3517 returns true
3512 * for both AM3517 chips and AM3517 family chips, which
3513 * includes 3505. Unfortunately there's no obvious family
3514 * test for 3517/3505 :-(
3516 if (soc_is_am35xx()) {
3517 cpu_mask = RATE_IN_34XX;
3518 cpu_clkflg = CK_AM35XX;
3519 } else if (cpu_is_omap3630()) {
3520 cpu_mask = (RATE_IN_34XX | RATE_IN_36XX);
3521 cpu_clkflg = CK_36XX;
3522 } else if (cpu_is_ti816x()) {
3523 cpu_mask = RATE_IN_TI816X;
3524 cpu_clkflg = CK_TI816X;
3525 } else if (soc_is_am33xx()) {
3526 cpu_mask = RATE_IN_AM33XX;
3527 } else if (cpu_is_ti814x()) {
3528 cpu_mask = RATE_IN_TI814X;
3529 } else if (cpu_is_omap34xx()) {
3530 if (omap_rev() == OMAP3430_REV_ES1_0) {
3531 cpu_mask = RATE_IN_3430ES1;
3532 cpu_clkflg = CK_3430ES1;
3533 } else {
3535 * Assume that anything that we haven't matched yet
3536 * has 3430ES2-type clocks.
3538 cpu_mask = RATE_IN_3430ES2PLUS;
3539 cpu_clkflg = CK_3430ES2PLUS;
3541 } else {
3542 WARN(1, "clock: could not identify OMAP3 variant\n");
3545 if (omap3_has_192mhz_clk())
3546 omap_96m_alwon_fck = omap_96m_alwon_fck_3630;
3548 if (cpu_is_omap3630()) {
3549 dpll3_m3x2_ck = dpll3_m3x2_ck_3630;
3550 dpll4_m2x2_ck = dpll4_m2x2_ck_3630;
3551 dpll4_m3x2_ck = dpll4_m3x2_ck_3630;
3552 dpll4_m4x2_ck = dpll4_m4x2_ck_3630;
3553 dpll4_m5x2_ck = dpll4_m5x2_ck_3630;
3554 dpll4_m6x2_ck = dpll4_m6x2_ck_3630;
3558 * XXX This type of dynamic rewriting of the clock tree is
3559 * deprecated and should be revised soon.
3561 if (cpu_is_omap3630())
3562 dpll4_dd = dpll4_dd_3630;
3563 else
3564 dpll4_dd = dpll4_dd_34xx;
3566 for (c = omap3xxx_clks; c < omap3xxx_clks + ARRAY_SIZE(omap3xxx_clks);
3567 c++)
3568 if (c->cpu & cpu_clkflg) {
3569 clkdev_add(&c->lk);
3570 if (!__clk_init(NULL, c->lk.clk))
3571 omap2_init_clk_hw_omap_clocks(c->lk.clk);
3574 omap2_clk_disable_autoidle_all();
3576 omap2_clk_enable_init_clocks(enable_init_clks,
3577 ARRAY_SIZE(enable_init_clks));
3579 pr_info("Clocking rate (Crystal/Core/MPU): %ld.%01ld/%ld/%ld MHz\n",
3580 (clk_get_rate(&osc_sys_ck) / 1000000),
3581 (clk_get_rate(&osc_sys_ck) / 100000) % 10,
3582 (clk_get_rate(&core_ck) / 1000000),
3583 (clk_get_rate(&arm_fck) / 1000000));
3586 * Lock DPLL5 -- here only until other device init code can
3587 * handle this
3589 if (!cpu_is_ti81xx() && (omap_rev() >= OMAP3430_REV_ES2_0))
3590 omap3_clk_lock_dpll5();
3592 /* Avoid sleeping during omap3_core_dpll_m2_set_rate() */
3593 sdrc_ick_p = clk_get(NULL, "sdrc_ick");
3594 arm_fck_p = clk_get(NULL, "arm_fck");
3596 return 0;