diff options
author | Richard Woodruff <r-woodruff2@ti.com> | 2010-02-23 00:09:08 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2010-02-24 14:15:02 -0500 |
commit | 358965d7bab9c70c11b64931da02667b161cb03a (patch) | |
tree | 884a13c783f9ba43cc5fe063c5fbeecde7804f58 /arch/arm/mach-omap2/clock34xx_data.c | |
parent | 91808a81fe7cc8a786b575ebc2d102c59d83c1a7 (diff) |
OMAP3 clock: introduce DPLL4 Jtype
DPLL4 for 3630 introduces a changed block called j type dpll, requiring
special divisor bits and additional reg fields. To allow for silicons to
use this, this is introduced as a flag and is enabled for 3630 silicon.
OMAP4 also has j type dpll for usb.
Tested with 3630 ZOOM3 and OMAP3430 ZOOM2
Signed-off-by: Richard Woodruff <r-woodruff2@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Vishwanath BS <Vishwanath.bs@ti.com>
[paul@pwsan.com: added some comments; updated copyrights and credits; fixed
some style issues]
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/clock34xx_data.c')
-rw-r--r-- | arch/arm/mach-omap2/clock34xx_data.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/clock34xx_data.c b/arch/arm/mach-omap2/clock34xx_data.c index 8bb8134872ce..60c6140b86af 100644 --- a/arch/arm/mach-omap2/clock34xx_data.c +++ b/arch/arm/mach-omap2/clock34xx_data.c | |||
@@ -38,6 +38,7 @@ | |||
38 | 38 | ||
39 | /* Maximum DPLL multiplier, divider values for OMAP3 */ | 39 | /* Maximum DPLL multiplier, divider values for OMAP3 */ |
40 | #define OMAP3_MAX_DPLL_MULT 2048 | 40 | #define OMAP3_MAX_DPLL_MULT 2048 |
41 | #define OMAP3630_MAX_JTYPE_DPLL_MULT 4095 | ||
41 | #define OMAP3_MAX_DPLL_DIV 128 | 42 | #define OMAP3_MAX_DPLL_DIV 128 |
42 | 43 | ||
43 | /* | 44 | /* |
@@ -529,7 +530,8 @@ static struct clk emu_core_alwon_ck = { | |||
529 | /* DPLL4 */ | 530 | /* DPLL4 */ |
530 | /* Supplies 96MHz, 54Mhz TV DAC, DSS fclk, CAM sensor clock, emul trace clk */ | 531 | /* Supplies 96MHz, 54Mhz TV DAC, DSS fclk, CAM sensor clock, emul trace clk */ |
531 | /* Type: DPLL */ | 532 | /* Type: DPLL */ |
532 | static struct dpll_data dpll4_dd = { | 533 | static struct dpll_data dpll4_dd; |
534 | static struct dpll_data dpll4_dd_34xx __initdata = { | ||
533 | .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL2), | 535 | .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL2), |
534 | .mult_mask = OMAP3430_PERIPH_DPLL_MULT_MASK, | 536 | .mult_mask = OMAP3430_PERIPH_DPLL_MULT_MASK, |
535 | .div1_mask = OMAP3430_PERIPH_DPLL_DIV_MASK, | 537 | .div1_mask = OMAP3430_PERIPH_DPLL_DIV_MASK, |
@@ -552,6 +554,29 @@ static struct dpll_data dpll4_dd = { | |||
552 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE | 554 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE |
553 | }; | 555 | }; |
554 | 556 | ||
557 | static struct dpll_data dpll4_dd_3630 __initdata = { | ||
558 | .mult_div1_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKSEL2), | ||
559 | .mult_mask = OMAP3630_PERIPH_DPLL_MULT_MASK, | ||
560 | .div1_mask = OMAP3430_PERIPH_DPLL_DIV_MASK, | ||
561 | .clk_bypass = &sys_ck, | ||
562 | .clk_ref = &sys_ck, | ||
563 | .control_reg = OMAP_CM_REGADDR(PLL_MOD, CM_CLKEN), | ||
564 | .enable_mask = OMAP3430_EN_PERIPH_DPLL_MASK, | ||
565 | .modes = (1 << DPLL_LOW_POWER_STOP) | (1 << DPLL_LOCKED), | ||
566 | .auto_recal_bit = OMAP3430_EN_PERIPH_DPLL_DRIFTGUARD_SHIFT, | ||
567 | .recal_en_bit = OMAP3430_PERIPH_DPLL_RECAL_EN_SHIFT, | ||
568 | .recal_st_bit = OMAP3430_PERIPH_DPLL_ST_SHIFT, | ||
569 | .autoidle_reg = OMAP_CM_REGADDR(PLL_MOD, CM_AUTOIDLE), | ||
570 | .autoidle_mask = OMAP3430_AUTO_PERIPH_DPLL_MASK, | ||
571 | .idlest_reg = OMAP_CM_REGADDR(PLL_MOD, CM_IDLEST), | ||
572 | .idlest_mask = OMAP3430_ST_PERIPH_CLK_MASK, | ||
573 | .max_multiplier = OMAP3630_MAX_JTYPE_DPLL_MULT, | ||
574 | .min_divider = 1, | ||
575 | .max_divider = OMAP3_MAX_DPLL_DIV, | ||
576 | .rate_tolerance = DEFAULT_DPLL_RATE_TOLERANCE, | ||
577 | .flags = DPLL_J_TYPE | ||
578 | }; | ||
579 | |||
555 | static struct clk dpll4_ck = { | 580 | static struct clk dpll4_ck = { |
556 | .name = "dpll4_ck", | 581 | .name = "dpll4_ck", |
557 | .ops = &omap3_clkops_noncore_dpll_ops, | 582 | .ops = &omap3_clkops_noncore_dpll_ops, |
@@ -3377,6 +3402,11 @@ int __init omap3xxx_clk_init(void) | |||
3377 | &clkops_omap36xx_pwrdn_with_hsdiv_wait_restore; | 3402 | &clkops_omap36xx_pwrdn_with_hsdiv_wait_restore; |
3378 | } | 3403 | } |
3379 | 3404 | ||
3405 | if (cpu_is_omap3630()) | ||
3406 | dpll4_dd = dpll4_dd_3630; | ||
3407 | else | ||
3408 | dpll4_dd = dpll4_dd_34xx; | ||
3409 | |||
3380 | clk_init(&omap2_clk_functions); | 3410 | clk_init(&omap2_clk_functions); |
3381 | 3411 | ||
3382 | for (c = omap3xxx_clks; c < omap3xxx_clks + ARRAY_SIZE(omap3xxx_clks); c++) | 3412 | for (c = omap3xxx_clks; c < omap3xxx_clks + ARRAY_SIZE(omap3xxx_clks); c++) |