aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/arm/mach-omap2/dpll3xxx.c
diff options
context:
space:
mode:
authorMike Turquette <mturquette@linaro.org>2014-06-10 16:53:25 -0700
committerMike Turquette <mturquette@linaro.org>2014-06-10 16:53:25 -0700
commit3f6eec9969d24f91a3909d51e86e007ca5efd4c4 (patch)
treebff0f51bab78b18d52cfd57ad7cd8b78ac6a882c /arch/arm/mach-omap2/dpll3xxx.c
parentMerge tag 'for-linus-3.16-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs (diff)
parentARM: dts: OMAP5/DRA7: use omap5-mpu-dpll-clock capable of dealing with higher frequencies (diff)
downloadwireguard-linux-3f6eec9969d24f91a3909d51e86e007ca5efd4c4.tar.xz
wireguard-linux-3f6eec9969d24f91a3909d51e86e007ca5efd4c4.zip
Merge branch 'for-v3.16/ti-clk-drv' of github.com:t-kristo/linux-pm into clk-next
Diffstat (limited to 'arch/arm/mach-omap2/dpll3xxx.c')
-rw-r--r--arch/arm/mach-omap2/dpll3xxx.c9
1 files changed, 9 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)
/* Set DPLL multiplier, divider */
v = omap2_clk_readl(clk, dd->mult_div1_reg);
+
+ /* Handle Duty Cycle Correction */
+ if (dd->dcc_mask) {
+ if (dd->last_rounded_rate >= dd->dcc_rate)
+ v |= dd->dcc_mask; /* Enable DCC */
+ else
+ v &= ~dd->dcc_mask; /* Disable DCC */
+ }
+
v &= ~(dd->mult_mask | dd->div1_mask);
v |= dd->last_rounded_m << __ffs(dd->mult_mask);
v |= (dd->last_rounded_n - 1) << __ffs(dd->div1_mask);