diff options
-rw-r--r-- | arch/arm/mach-omap2/dpll3xxx.c | 9 | ||||
-rw-r--r-- | include/linux/clk/ti.h | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/dpll3xxx.c b/arch/arm/mach-omap2/dpll3xxx.c index fcd8036af910..6d7ba37e2257 100644 --- a/arch/arm/mach-omap2/dpll3xxx.c +++ b/arch/arm/mach-omap2/dpll3xxx.c | |||
@@ -319,6 +319,15 @@ static int omap3_noncore_dpll_program(struct clk_hw_omap *clk, u16 freqsel) | |||
319 | 319 | ||
320 | /* Set DPLL multiplier, divider */ | 320 | /* Set DPLL multiplier, divider */ |
321 | v = omap2_clk_readl(clk, dd->mult_div1_reg); | 321 | v = omap2_clk_readl(clk, dd->mult_div1_reg); |
322 | |||
323 | /* Handle Duty Cycle Correction */ | ||
324 | if (dd->dcc_mask) { | ||
325 | if (dd->last_rounded_rate >= dd->dcc_rate) | ||
326 | v |= dd->dcc_mask; /* Enable DCC */ | ||
327 | else | ||
328 | v &= ~dd->dcc_mask; /* Disable DCC */ | ||
329 | } | ||
330 | |||
322 | v &= ~(dd->mult_mask | dd->div1_mask); | 331 | v &= ~(dd->mult_mask | dd->div1_mask); |
323 | v |= dd->last_rounded_m << __ffs(dd->mult_mask); | 332 | v |= dd->last_rounded_m << __ffs(dd->mult_mask); |
324 | v |= (dd->last_rounded_n - 1) << __ffs(dd->div1_mask); | 333 | v |= (dd->last_rounded_n - 1) << __ffs(dd->div1_mask); |
diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h index 4231c41bed51..e8d8a35034a5 100644 --- a/include/linux/clk/ti.h +++ b/include/linux/clk/ti.h | |||
@@ -41,6 +41,8 @@ | |||
41 | * @idlest_reg: register containing the DPLL idle status bitfield | 41 | * @idlest_reg: register containing the DPLL idle status bitfield |
42 | * @autoidle_mask: mask of the DPLL autoidle mode bitfield in @autoidle_reg | 42 | * @autoidle_mask: mask of the DPLL autoidle mode bitfield in @autoidle_reg |
43 | * @freqsel_mask: mask of the DPLL jitter correction bitfield in @control_reg | 43 | * @freqsel_mask: mask of the DPLL jitter correction bitfield in @control_reg |
44 | * @dcc_mask: mask of the DPLL DCC correction bitfield @mult_div1_reg | ||
45 | * @dcc_rate: rate atleast which DCC @dcc_mask must be set | ||
44 | * @idlest_mask: mask of the DPLL idle status bitfield in @idlest_reg | 46 | * @idlest_mask: mask of the DPLL idle status bitfield in @idlest_reg |
45 | * @lpmode_mask: mask of the DPLL low-power mode bitfield in @control_reg | 47 | * @lpmode_mask: mask of the DPLL low-power mode bitfield in @control_reg |
46 | * @m4xen_mask: mask of the DPLL M4X multiplier bitfield in @control_reg | 48 | * @m4xen_mask: mask of the DPLL M4X multiplier bitfield in @control_reg |
@@ -86,6 +88,8 @@ struct dpll_data { | |||
86 | u32 idlest_mask; | 88 | u32 idlest_mask; |
87 | u32 dco_mask; | 89 | u32 dco_mask; |
88 | u32 sddiv_mask; | 90 | u32 sddiv_mask; |
91 | u32 dcc_mask; | ||
92 | unsigned long dcc_rate; | ||
89 | u32 lpmode_mask; | 93 | u32 lpmode_mask; |
90 | u32 m4xen_mask; | 94 | u32 m4xen_mask; |
91 | u8 auto_recal_bit; | 95 | u8 auto_recal_bit; |