diff options
Diffstat (limited to 'arch/arm/mach-omap2/clock34xx.h')
-rw-r--r-- | arch/arm/mach-omap2/clock34xx.h | 147 |
1 files changed, 113 insertions, 34 deletions
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h index c9c5972a2e25..05757eb032bc 100644 --- a/arch/arm/mach-omap2/clock34xx.h +++ b/arch/arm/mach-omap2/clock34xx.h | |||
@@ -1,14 +1,19 @@ | |||
1 | /* | 1 | /* |
2 | * OMAP3 clock framework | 2 | * OMAP3 clock framework |
3 | * | 3 | * |
4 | * Virtual clocks are introduced as a convenient tools. | ||
5 | * They are sources for other clocks and not supposed | ||
6 | * to be requested from drivers directly. | ||
7 | * | ||
8 | * Copyright (C) 2007-2008 Texas Instruments, Inc. | 4 | * Copyright (C) 2007-2008 Texas Instruments, Inc. |
9 | * Copyright (C) 2007-2008 Nokia Corporation | 5 | * Copyright (C) 2007-2008 Nokia Corporation |
10 | * | 6 | * |
11 | * Written by Paul Walmsley | 7 | * Written by Paul Walmsley |
8 | * With many device clock fixes by Kevin Hilman and Jouni Högander | ||
9 | * DPLL bypass clock support added by Roman Tereshonkov | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | /* | ||
14 | * Virtual clocks are introduced as convenient tools. | ||
15 | * They are sources for other clocks and not supposed | ||
16 | * to be requested from drivers directly. | ||
12 | */ | 17 | */ |
13 | 18 | ||
14 | #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H | 19 | #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK34XX_H |
@@ -24,6 +29,15 @@ | |||
24 | 29 | ||
25 | static void omap3_dpll_recalc(struct clk *clk); | 30 | static void omap3_dpll_recalc(struct clk *clk); |
26 | static void omap3_clkoutx2_recalc(struct clk *clk); | 31 | static void omap3_clkoutx2_recalc(struct clk *clk); |
32 | static void omap3_dpll_allow_idle(struct clk *clk); | ||
33 | static void omap3_dpll_deny_idle(struct clk *clk); | ||
34 | static u32 omap3_dpll_autoidle_read(struct clk *clk); | ||
35 | static int omap3_noncore_dpll_enable(struct clk *clk); | ||
36 | static void omap3_noncore_dpll_disable(struct clk *clk); | ||
37 | |||
38 | /* Maximum DPLL multiplier, divider values for OMAP3 */ | ||
39 | #define OMAP3_MAX_DPLL_MULT 2048 | ||
40 | #define OMAP3_MAX_DPLL_DIV 128 | ||
27 | 41 | ||
28 | /* | 42 | /* |
29 | * DPLL1 supplies clock to the MPU. | 43 | * DPLL1 supplies clock to the MPU. |
@@ -33,6 +47,11 @@ static void omap3_clkoutx2_recalc(struct clk *clk); | |||
33 | * DPLL5 supplies other peripheral clocks (USBHOST, USIM). | 47 | * DPLL5 supplies other peripheral clocks (USBHOST, USIM). |
34 | */ | 48 | */ |
35 | 49 | ||
50 | /* CM_CLKEN_PLL*.EN* bit values - not all are available for every DPLL */ | ||
51 | #define DPLL_LOW_POWER_STOP 0x1 | ||
52 | #define DPLL_LOW_POWER_BYPASS 0x5 | ||
53 | #define DPLL_LOCKED 0x7 | ||
54 | |||
36 | /* PRM CLOCKS */ | 55 | /* PRM CLOCKS */ |
37 | 56 | ||
38 | /* According to timer32k.c, this is a 32768Hz clock, not a 32000Hz clock. */ | 57 | /* According to timer32k.c, this is a 32768Hz clock, not a 32000Hz clock. */ |
@@ -240,15 +259,23 @@ static const struct clksel_rate div16_dpll_rates[] = { | |||
240 | /* DPLL1 */ | 259 | /* DPLL1 */ |
241 | /* MPU clock source */ | 260 | /* MPU clock source */ |
242 | /* Type: DPLL */ | 261 | /* Type: DPLL */ |
243 | static const struct dpll_data dpll1_dd = { | 262 | static struct dpll_data dpll1_dd = { |
244 | .mult_div1_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL), | 263 | .mult_div1_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKSEL1_PLL), |
245 | .mult_mask = OMAP3430_MPU_DPLL_MULT_MASK, | 264 | .mult_mask = OMAP3430_MPU_DPLL_MULT_MASK, |
246 | .div1_mask = OMAP3430_MPU_DPLL_DIV_MASK, | 265 | .div1_mask = OMAP3430_MPU_DPLL_DIV_MASK, |
247 | .control_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKEN_PLL), | 266 | .control_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_CLKEN_PLL), |
248 | .enable_mask = OMAP3430_EN_MPU_DPLL_MASK, | 267 | .enable_mask = OMAP3430_EN_MPU_DPLL_MASK, |
268 | .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED), | ||
249 | .auto_recal_bit = OMAP3430_EN_MPU_DPLL_DRIFTGUARD_SHIFT, | 269 | .auto_recal_bit = OMAP3430_EN_MPU_DPLL_DRIFTGUARD_SHIFT, |
250 | .recal_en_bit = OMAP3430_MPU_DPLL_RECAL_EN_SHIFT, | 270 | .recal_en_bit = OMAP3430_MPU_DPLL_RECAL_EN_SHIFT, |
251 | .recal_st_bit = OMAP3430_MPU_DPLL_ST_SHIFT, | 271 | .recal_st_bit = OMAP3430_MPU_DPLL_ST_SHIFT, |
272 | .autoidle_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_AUTOIDLE_PLL), | ||
273 | .autoidle_mask = OMAP3430_AUTO_MPU_DPLL_MASK, | ||
274 | .idlest_reg = OMAP_CM_REGADDR(MPU_MOD, OMAP3430_CM_IDLEST_PLL), | ||
275 | .idlest_bit = OMAP3430_ST_MPU_CLK_SHIFT, | ||
276 | .max_multiplier = OMAP3_MAX_DPLL_MULT, | ||
277 | .max_divider = OMAP3_MAX_DPLL_DIV, | ||
278 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE | ||
252 | }; | 279 | }; |
253 | 280 | ||
254 | static struct clk dpll1_ck = { | 281 | static struct clk dpll1_ck = { |
@@ -256,6 +283,7 @@ static struct clk dpll1_ck = { | |||
256 | .parent = &sys_ck, | 283 | .parent = &sys_ck, |
257 | .dpll_data = &dpll1_dd, | 284 | .dpll_data = &dpll1_dd, |
258 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED, | 285 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED, |
286 | .round_rate = &omap2_dpll_round_rate, | ||
259 | .recalc = &omap3_dpll_recalc, | 287 | .recalc = &omap3_dpll_recalc, |
260 | }; | 288 | }; |
261 | 289 | ||
@@ -297,22 +325,34 @@ static struct clk dpll1_x2m2_ck = { | |||
297 | /* IVA2 clock source */ | 325 | /* IVA2 clock source */ |
298 | /* Type: DPLL */ | 326 | /* Type: DPLL */ |
299 | 327 | ||
300 | static const struct dpll_data dpll2_dd = { | 328 | static struct dpll_data dpll2_dd = { |
301 | .mult_div1_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL), | 329 | .mult_div1_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKSEL1_PLL), |
302 | .mult_mask = OMAP3430_IVA2_DPLL_MULT_MASK, | 330 | .mult_mask = OMAP3430_IVA2_DPLL_MULT_MASK, |
303 | .div1_mask = OMAP3430_IVA2_DPLL_DIV_MASK, | 331 | .div1_mask = OMAP3430_IVA2_DPLL_DIV_MASK, |
304 | .control_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKEN_PLL), | 332 | .control_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_CLKEN_PLL), |
305 | .enable_mask = OMAP3430_EN_IVA2_DPLL_MASK, | 333 | .enable_mask = OMAP3430_EN_IVA2_DPLL_MASK, |
334 | .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED) | | ||
335 | (1 << DPLL_LOW_POWER_BYPASS), | ||
306 | .auto_recal_bit = OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT, | 336 | .auto_recal_bit = OMAP3430_EN_IVA2_DPLL_DRIFTGUARD_SHIFT, |
307 | .recal_en_bit = OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_SHIFT, | 337 | .recal_en_bit = OMAP3430_PRM_IRQENABLE_MPU_IVA2_DPLL_RECAL_EN_SHIFT, |
308 | .recal_st_bit = OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_SHIFT, | 338 | .recal_st_bit = OMAP3430_PRM_IRQSTATUS_MPU_IVA2_DPLL_ST_SHIFT, |
339 | .autoidle_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_AUTOIDLE_PLL), | ||
340 | .autoidle_mask = OMAP3430_AUTO_IVA2_DPLL_MASK, | ||
341 | .idlest_reg = OMAP_CM_REGADDR(OMAP3430_IVA2_MOD, OMAP3430_CM_IDLEST_PLL), | ||
342 | .idlest_bit = OMAP3430_ST_IVA2_CLK_SHIFT, | ||
343 | .max_multiplier = OMAP3_MAX_DPLL_MULT, | ||
344 | .max_divider = OMAP3_MAX_DPLL_DIV, | ||
345 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE | ||
309 | }; | 346 | }; |
310 | 347 | ||
311 | static struct clk dpll2_ck = { | 348 | static struct clk dpll2_ck = { |
312 | .name = "dpll2_ck", | 349 | .name = "dpll2_ck", |
313 | .parent = &sys_ck, | 350 | .parent = &sys_ck, |
314 | .dpll_data = &dpll2_dd, | 351 | .dpll_data = &dpll2_dd, |
315 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED, | 352 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES, |
353 | .enable = &omap3_noncore_dpll_enable, | ||
354 | .disable = &omap3_noncore_dpll_disable, | ||
355 | .round_rate = &omap2_dpll_round_rate, | ||
316 | .recalc = &omap3_dpll_recalc, | 356 | .recalc = &omap3_dpll_recalc, |
317 | }; | 357 | }; |
318 | 358 | ||
@@ -338,10 +378,12 @@ static struct clk dpll2_m2_ck = { | |||
338 | .recalc = &omap2_clksel_recalc, | 378 | .recalc = &omap2_clksel_recalc, |
339 | }; | 379 | }; |
340 | 380 | ||
341 | /* DPLL3 */ | 381 | /* |
342 | /* Source clock for all interfaces and for some device fclks */ | 382 | * DPLL3 |
343 | /* Type: DPLL */ | 383 | * Source clock for all interfaces and for some device fclks |
344 | static const struct dpll_data dpll3_dd = { | 384 | * REVISIT: Also supports fast relock bypass - not included below |
385 | */ | ||
386 | static struct dpll_data dpll3_dd = { | ||
345 | .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), | 387 | .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL1), |
346 | .mult_mask = OMAP3430_CORE_DPLL_MULT_MASK, | 388 | .mult_mask = OMAP3430_CORE_DPLL_MULT_MASK, |
347 | .div1_mask = OMAP3430_CORE_DPLL_DIV_MASK, | 389 | .div1_mask = OMAP3430_CORE_DPLL_DIV_MASK, |
@@ -350,6 +392,11 @@ static const struct dpll_data dpll3_dd = { | |||
350 | .auto_recal_bit = OMAP3430_EN_CORE_DPLL_DRIFTGUARD_SHIFT, | 392 | .auto_recal_bit = OMAP3430_EN_CORE_DPLL_DRIFTGUARD_SHIFT, |
351 | .recal_en_bit = OMAP3430_CORE_DPLL_RECAL_EN_SHIFT, | 393 | .recal_en_bit = OMAP3430_CORE_DPLL_RECAL_EN_SHIFT, |
352 | .recal_st_bit = OMAP3430_CORE_DPLL_ST_SHIFT, | 394 | .recal_st_bit = OMAP3430_CORE_DPLL_ST_SHIFT, |
395 | .autoidle_reg = OMAP_CM_REGADDR(PLL_MOD, CM_AUTOIDLE), | ||
396 | .autoidle_mask = OMAP3430_AUTO_CORE_DPLL_MASK, | ||
397 | .max_multiplier = OMAP3_MAX_DPLL_MULT, | ||
398 | .max_divider = OMAP3_MAX_DPLL_DIV, | ||
399 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE | ||
353 | }; | 400 | }; |
354 | 401 | ||
355 | static struct clk dpll3_ck = { | 402 | static struct clk dpll3_ck = { |
@@ -357,6 +404,7 @@ static struct clk dpll3_ck = { | |||
357 | .parent = &sys_ck, | 404 | .parent = &sys_ck, |
358 | .dpll_data = &dpll3_dd, | 405 | .dpll_data = &dpll3_dd, |
359 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED, | 406 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED, |
407 | .round_rate = &omap2_dpll_round_rate, | ||
360 | .recalc = &omap3_dpll_recalc, | 408 | .recalc = &omap3_dpll_recalc, |
361 | }; | 409 | }; |
362 | 410 | ||
@@ -439,7 +487,7 @@ static struct clk core_ck = { | |||
439 | .name = "core_ck", | 487 | .name = "core_ck", |
440 | .init = &omap2_init_clksel_parent, | 488 | .init = &omap2_init_clksel_parent, |
441 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), | 489 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), |
442 | .clksel_mask = OMAP3430_ST_CORE_CLK, | 490 | .clksel_mask = OMAP3430_ST_CORE_CLK_MASK, |
443 | .clksel = core_ck_clksel, | 491 | .clksel = core_ck_clksel, |
444 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | | 492 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | |
445 | PARENT_CONTROLS_CLOCK, | 493 | PARENT_CONTROLS_CLOCK, |
@@ -456,7 +504,7 @@ static struct clk dpll3_m2x2_ck = { | |||
456 | .name = "dpll3_m2x2_ck", | 504 | .name = "dpll3_m2x2_ck", |
457 | .init = &omap2_init_clksel_parent, | 505 | .init = &omap2_init_clksel_parent, |
458 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), | 506 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), |
459 | .clksel_mask = OMAP3430_ST_CORE_CLK, | 507 | .clksel_mask = OMAP3430_ST_CORE_CLK_MASK, |
460 | .clksel = dpll3_m2x2_ck_clksel, | 508 | .clksel = dpll3_m2x2_ck_clksel, |
461 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | | 509 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | |
462 | PARENT_CONTROLS_CLOCK, | 510 | PARENT_CONTROLS_CLOCK, |
@@ -503,7 +551,7 @@ static struct clk emu_core_alwon_ck = { | |||
503 | .parent = &dpll3_m3x2_ck, | 551 | .parent = &dpll3_m3x2_ck, |
504 | .init = &omap2_init_clksel_parent, | 552 | .init = &omap2_init_clksel_parent, |
505 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), | 553 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), |
506 | .clksel_mask = OMAP3430_ST_CORE_CLK, | 554 | .clksel_mask = OMAP3430_ST_CORE_CLK_MASK, |
507 | .clksel = emu_core_alwon_ck_clksel, | 555 | .clksel = emu_core_alwon_ck_clksel, |
508 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | | 556 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | |
509 | PARENT_CONTROLS_CLOCK, | 557 | PARENT_CONTROLS_CLOCK, |
@@ -513,22 +561,33 @@ static struct clk emu_core_alwon_ck = { | |||
513 | /* DPLL4 */ | 561 | /* DPLL4 */ |
514 | /* Supplies 96MHz, 54Mhz TV DAC, DSS fclk, CAM sensor clock, emul trace clk */ | 562 | /* Supplies 96MHz, 54Mhz TV DAC, DSS fclk, CAM sensor clock, emul trace clk */ |
515 | /* Type: DPLL */ | 563 | /* Type: DPLL */ |
516 | static const struct dpll_data dpll4_dd = { | 564 | static struct dpll_data dpll4_dd = { |
517 | .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL2), | 565 | .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL2), |
518 | .mult_mask = OMAP3430_PERIPH_DPLL_MULT_MASK, | 566 | .mult_mask = OMAP3430_PERIPH_DPLL_MULT_MASK, |
519 | .div1_mask = OMAP3430_PERIPH_DPLL_DIV_MASK, | 567 | .div1_mask = OMAP3430_PERIPH_DPLL_DIV_MASK, |
520 | .control_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), | 568 | .control_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), |
521 | .enable_mask = OMAP3430_EN_PERIPH_DPLL_MASK, | 569 | .enable_mask = OMAP3430_EN_PERIPH_DPLL_MASK, |
570 | .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED), | ||
522 | .auto_recal_bit = OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT, | 571 | .auto_recal_bit = OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT, |
523 | .recal_en_bit = OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT, | 572 | .recal_en_bit = OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT, |
524 | .recal_st_bit = OMAP3430_PERIPH_DPLL_ST_SHIFT, | 573 | .recal_st_bit = OMAP3430_PERIPH_DPLL_ST_SHIFT, |
574 | .autoidle_reg = OMAP_CM_REGADDR(PLL_MOD, CM_AUTOIDLE), | ||
575 | .autoidle_mask = OMAP3430_AUTO_PERIPH_DPLL_MASK, | ||
576 | .idlest_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), | ||
577 | .idlest_bit = OMAP3430_ST_PERIPH_CLK_SHIFT, | ||
578 | .max_multiplier = OMAP3_MAX_DPLL_MULT, | ||
579 | .max_divider = OMAP3_MAX_DPLL_DIV, | ||
580 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE | ||
525 | }; | 581 | }; |
526 | 582 | ||
527 | static struct clk dpll4_ck = { | 583 | static struct clk dpll4_ck = { |
528 | .name = "dpll4_ck", | 584 | .name = "dpll4_ck", |
529 | .parent = &sys_ck, | 585 | .parent = &sys_ck, |
530 | .dpll_data = &dpll4_dd, | 586 | .dpll_data = &dpll4_dd, |
531 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | ALWAYS_ENABLED, | 587 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES, |
588 | .enable = &omap3_noncore_dpll_enable, | ||
589 | .disable = &omap3_noncore_dpll_disable, | ||
590 | .round_rate = &omap2_dpll_round_rate, | ||
532 | .recalc = &omap3_dpll_recalc, | 591 | .recalc = &omap3_dpll_recalc, |
533 | }; | 592 | }; |
534 | 593 | ||
@@ -584,7 +643,7 @@ static struct clk omap_96m_alwon_fck = { | |||
584 | .parent = &dpll4_m2x2_ck, | 643 | .parent = &dpll4_m2x2_ck, |
585 | .init = &omap2_init_clksel_parent, | 644 | .init = &omap2_init_clksel_parent, |
586 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), | 645 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), |
587 | .clksel_mask = OMAP3430_ST_PERIPH_CLK, | 646 | .clksel_mask = OMAP3430_ST_PERIPH_CLK_MASK, |
588 | .clksel = omap_96m_alwon_fck_clksel, | 647 | .clksel = omap_96m_alwon_fck_clksel, |
589 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | | 648 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | |
590 | PARENT_CONTROLS_CLOCK, | 649 | PARENT_CONTROLS_CLOCK, |
@@ -610,7 +669,7 @@ static struct clk cm_96m_fck = { | |||
610 | .parent = &dpll4_m2x2_ck, | 669 | .parent = &dpll4_m2x2_ck, |
611 | .init = &omap2_init_clksel_parent, | 670 | .init = &omap2_init_clksel_parent, |
612 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), | 671 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), |
613 | .clksel_mask = OMAP3430_ST_PERIPH_CLK, | 672 | .clksel_mask = OMAP3430_ST_PERIPH_CLK_MASK, |
614 | .clksel = cm_96m_fck_clksel, | 673 | .clksel = cm_96m_fck_clksel, |
615 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | | 674 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | |
616 | PARENT_CONTROLS_CLOCK, | 675 | PARENT_CONTROLS_CLOCK, |
@@ -652,7 +711,7 @@ static struct clk virt_omap_54m_fck = { | |||
652 | .parent = &dpll4_m3x2_ck, | 711 | .parent = &dpll4_m3x2_ck, |
653 | .init = &omap2_init_clksel_parent, | 712 | .init = &omap2_init_clksel_parent, |
654 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), | 713 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), |
655 | .clksel_mask = OMAP3430_ST_PERIPH_CLK, | 714 | .clksel_mask = OMAP3430_ST_PERIPH_CLK_MASK, |
656 | .clksel = virt_omap_54m_fck_clksel, | 715 | .clksel = virt_omap_54m_fck_clksel, |
657 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | | 716 | .flags = CLOCK_IN_OMAP343X | RATE_PROPAGATES | |
658 | PARENT_CONTROLS_CLOCK, | 717 | PARENT_CONTROLS_CLOCK, |
@@ -804,23 +863,33 @@ static struct clk emu_per_alwon_ck = { | |||
804 | /* Supplies 120MHz clock, USIM source clock */ | 863 | /* Supplies 120MHz clock, USIM source clock */ |
805 | /* Type: DPLL */ | 864 | /* Type: DPLL */ |
806 | /* 3430ES2 only */ | 865 | /* 3430ES2 only */ |
807 | static const struct dpll_data dpll5_dd = { | 866 | static struct dpll_data dpll5_dd = { |
808 | .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL4), | 867 | .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKSEL4), |
809 | .mult_mask = OMAP3430ES2_PERIPH2_DPLL_MULT_MASK, | 868 | .mult_mask = OMAP3430ES2_PERIPH2_DPLL_MULT_MASK, |
810 | .div1_mask = OMAP3430ES2_PERIPH2_DPLL_DIV_MASK, | 869 | .div1_mask = OMAP3430ES2_PERIPH2_DPLL_DIV_MASK, |
811 | .control_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKEN2), | 870 | .control_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_CLKEN2), |
812 | .enable_mask = OMAP3430ES2_EN_PERIPH2_DPLL_MASK, | 871 | .enable_mask = OMAP3430ES2_EN_PERIPH2_DPLL_MASK, |
872 | .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED), | ||
813 | .auto_recal_bit = OMAP3430ES2_EN_PERIPH2_DPLL_DRIFTGUARD_SHIFT, | 873 | .auto_recal_bit = OMAP3430ES2_EN_PERIPH2_DPLL_DRIFTGUARD_SHIFT, |
814 | .recal_en_bit = OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT, | 874 | .recal_en_bit = OMAP3430ES2_SND_PERIPH_DPLL_RECAL_EN_SHIFT, |
815 | .recal_st_bit = OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT, | 875 | .recal_st_bit = OMAP3430ES2_SND_PERIPH_DPLL_ST_SHIFT, |
876 | .autoidle_reg = OMAP_CM_REGADDR(PLL_MOD, OMAP3430ES2_CM_AUTOIDLE2_PLL), | ||
877 | .autoidle_mask = OMAP3430ES2_AUTO_PERIPH2_DPLL_MASK, | ||
878 | .idlest_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST2), | ||
879 | .idlest_bit = OMAP3430ES2_ST_PERIPH2_CLK_SHIFT, | ||
880 | .max_multiplier = OMAP3_MAX_DPLL_MULT, | ||
881 | .max_divider = OMAP3_MAX_DPLL_DIV, | ||
882 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE | ||
816 | }; | 883 | }; |
817 | 884 | ||
818 | static struct clk dpll5_ck = { | 885 | static struct clk dpll5_ck = { |
819 | .name = "dpll5_ck", | 886 | .name = "dpll5_ck", |
820 | .parent = &sys_ck, | 887 | .parent = &sys_ck, |
821 | .dpll_data = &dpll5_dd, | 888 | .dpll_data = &dpll5_dd, |
822 | .flags = CLOCK_IN_OMAP3430ES2 | RATE_PROPAGATES | | 889 | .flags = CLOCK_IN_OMAP3430ES2 | RATE_PROPAGATES, |
823 | ALWAYS_ENABLED, | 890 | .enable = &omap3_noncore_dpll_enable, |
891 | .disable = &omap3_noncore_dpll_disable, | ||
892 | .round_rate = &omap2_dpll_round_rate, | ||
824 | .recalc = &omap3_dpll_recalc, | 893 | .recalc = &omap3_dpll_recalc, |
825 | }; | 894 | }; |
826 | 895 | ||
@@ -1365,7 +1434,8 @@ static const struct clksel mcbsp_15_clksel[] = { | |||
1365 | }; | 1434 | }; |
1366 | 1435 | ||
1367 | static struct clk mcbsp5_fck = { | 1436 | static struct clk mcbsp5_fck = { |
1368 | .name = "mcbsp5_fck", | 1437 | .name = "mcbsp_fck", |
1438 | .id = 5, | ||
1369 | .init = &omap2_init_clksel_parent, | 1439 | .init = &omap2_init_clksel_parent, |
1370 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1440 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1371 | .enable_bit = OMAP3430_EN_MCBSP5_SHIFT, | 1441 | .enable_bit = OMAP3430_EN_MCBSP5_SHIFT, |
@@ -1377,7 +1447,8 @@ static struct clk mcbsp5_fck = { | |||
1377 | }; | 1447 | }; |
1378 | 1448 | ||
1379 | static struct clk mcbsp1_fck = { | 1449 | static struct clk mcbsp1_fck = { |
1380 | .name = "mcbsp1_fck", | 1450 | .name = "mcbsp_fck", |
1451 | .id = 1, | ||
1381 | .init = &omap2_init_clksel_parent, | 1452 | .init = &omap2_init_clksel_parent, |
1382 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | 1453 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), |
1383 | .enable_bit = OMAP3430_EN_MCBSP1_SHIFT, | 1454 | .enable_bit = OMAP3430_EN_MCBSP1_SHIFT, |
@@ -1789,7 +1860,8 @@ static struct clk gpt10_ick = { | |||
1789 | }; | 1860 | }; |
1790 | 1861 | ||
1791 | static struct clk mcbsp5_ick = { | 1862 | static struct clk mcbsp5_ick = { |
1792 | .name = "mcbsp5_ick", | 1863 | .name = "mcbsp_ick", |
1864 | .id = 5, | ||
1793 | .parent = &core_l4_ick, | 1865 | .parent = &core_l4_ick, |
1794 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1866 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
1795 | .enable_bit = OMAP3430_EN_MCBSP5_SHIFT, | 1867 | .enable_bit = OMAP3430_EN_MCBSP5_SHIFT, |
@@ -1798,7 +1870,8 @@ static struct clk mcbsp5_ick = { | |||
1798 | }; | 1870 | }; |
1799 | 1871 | ||
1800 | static struct clk mcbsp1_ick = { | 1872 | static struct clk mcbsp1_ick = { |
1801 | .name = "mcbsp1_ick", | 1873 | .name = "mcbsp_ick", |
1874 | .id = 1, | ||
1802 | .parent = &core_l4_ick, | 1875 | .parent = &core_l4_ick, |
1803 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), | 1876 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1), |
1804 | .enable_bit = OMAP3430_EN_MCBSP1_SHIFT, | 1877 | .enable_bit = OMAP3430_EN_MCBSP1_SHIFT, |
@@ -1935,7 +2008,7 @@ static struct clk dss1_alwon_fck = { | |||
1935 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN), | 2008 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_DSS_MOD, CM_FCLKEN), |
1936 | .enable_bit = OMAP3430_EN_DSS1_SHIFT, | 2009 | .enable_bit = OMAP3430_EN_DSS1_SHIFT, |
1937 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), | 2010 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), |
1938 | .clksel_mask = OMAP3430_ST_PERIPH_CLK, | 2011 | .clksel_mask = OMAP3430_ST_PERIPH_CLK_MASK, |
1939 | .clksel = dss1_alwon_fck_clksel, | 2012 | .clksel = dss1_alwon_fck_clksel, |
1940 | .flags = CLOCK_IN_OMAP343X, | 2013 | .flags = CLOCK_IN_OMAP343X, |
1941 | .recalc = &omap2_clksel_recalc, | 2014 | .recalc = &omap2_clksel_recalc, |
@@ -1991,7 +2064,7 @@ static struct clk cam_mclk = { | |||
1991 | .parent = &dpll4_m5x2_ck, | 2064 | .parent = &dpll4_m5x2_ck, |
1992 | .init = &omap2_init_clksel_parent, | 2065 | .init = &omap2_init_clksel_parent, |
1993 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), | 2066 | .clksel_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), |
1994 | .clksel_mask = OMAP3430_ST_PERIPH_CLK, | 2067 | .clksel_mask = OMAP3430_ST_PERIPH_CLK_MASK, |
1995 | .clksel = cam_mclk_clksel, | 2068 | .clksel = cam_mclk_clksel, |
1996 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN), | 2069 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_CAM_MOD, CM_FCLKEN), |
1997 | .enable_bit = OMAP3430_EN_CAM_SHIFT, | 2070 | .enable_bit = OMAP3430_EN_CAM_SHIFT, |
@@ -2541,7 +2614,8 @@ static struct clk gpt2_ick = { | |||
2541 | }; | 2614 | }; |
2542 | 2615 | ||
2543 | static struct clk mcbsp2_ick = { | 2616 | static struct clk mcbsp2_ick = { |
2544 | .name = "mcbsp2_ick", | 2617 | .name = "mcbsp_ick", |
2618 | .id = 2, | ||
2545 | .parent = &per_l4_ick, | 2619 | .parent = &per_l4_ick, |
2546 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2620 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
2547 | .enable_bit = OMAP3430_EN_MCBSP2_SHIFT, | 2621 | .enable_bit = OMAP3430_EN_MCBSP2_SHIFT, |
@@ -2550,7 +2624,8 @@ static struct clk mcbsp2_ick = { | |||
2550 | }; | 2624 | }; |
2551 | 2625 | ||
2552 | static struct clk mcbsp3_ick = { | 2626 | static struct clk mcbsp3_ick = { |
2553 | .name = "mcbsp3_ick", | 2627 | .name = "mcbsp_ick", |
2628 | .id = 3, | ||
2554 | .parent = &per_l4_ick, | 2629 | .parent = &per_l4_ick, |
2555 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2630 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
2556 | .enable_bit = OMAP3430_EN_MCBSP3_SHIFT, | 2631 | .enable_bit = OMAP3430_EN_MCBSP3_SHIFT, |
@@ -2559,7 +2634,8 @@ static struct clk mcbsp3_ick = { | |||
2559 | }; | 2634 | }; |
2560 | 2635 | ||
2561 | static struct clk mcbsp4_ick = { | 2636 | static struct clk mcbsp4_ick = { |
2562 | .name = "mcbsp4_ick", | 2637 | .name = "mcbsp_ick", |
2638 | .id = 4, | ||
2563 | .parent = &per_l4_ick, | 2639 | .parent = &per_l4_ick, |
2564 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), | 2640 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN), |
2565 | .enable_bit = OMAP3430_EN_MCBSP4_SHIFT, | 2641 | .enable_bit = OMAP3430_EN_MCBSP4_SHIFT, |
@@ -2574,7 +2650,8 @@ static const struct clksel mcbsp_234_clksel[] = { | |||
2574 | }; | 2650 | }; |
2575 | 2651 | ||
2576 | static struct clk mcbsp2_fck = { | 2652 | static struct clk mcbsp2_fck = { |
2577 | .name = "mcbsp2_fck", | 2653 | .name = "mcbsp_fck", |
2654 | .id = 2, | ||
2578 | .init = &omap2_init_clksel_parent, | 2655 | .init = &omap2_init_clksel_parent, |
2579 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), | 2656 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), |
2580 | .enable_bit = OMAP3430_EN_MCBSP2_SHIFT, | 2657 | .enable_bit = OMAP3430_EN_MCBSP2_SHIFT, |
@@ -2586,7 +2663,8 @@ static struct clk mcbsp2_fck = { | |||
2586 | }; | 2663 | }; |
2587 | 2664 | ||
2588 | static struct clk mcbsp3_fck = { | 2665 | static struct clk mcbsp3_fck = { |
2589 | .name = "mcbsp3_fck", | 2666 | .name = "mcbsp_fck", |
2667 | .id = 3, | ||
2590 | .init = &omap2_init_clksel_parent, | 2668 | .init = &omap2_init_clksel_parent, |
2591 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), | 2669 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), |
2592 | .enable_bit = OMAP3430_EN_MCBSP3_SHIFT, | 2670 | .enable_bit = OMAP3430_EN_MCBSP3_SHIFT, |
@@ -2598,7 +2676,8 @@ static struct clk mcbsp3_fck = { | |||
2598 | }; | 2676 | }; |
2599 | 2677 | ||
2600 | static struct clk mcbsp4_fck = { | 2678 | static struct clk mcbsp4_fck = { |
2601 | .name = "mcbsp4_fck", | 2679 | .name = "mcbsp_fck", |
2680 | .id = 4, | ||
2602 | .init = &omap2_init_clksel_parent, | 2681 | .init = &omap2_init_clksel_parent, |
2603 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), | 2682 | .enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN), |
2604 | .enable_bit = OMAP3430_EN_MCBSP4_SHIFT, | 2683 | .enable_bit = OMAP3430_EN_MCBSP4_SHIFT, |