diff options
Diffstat (limited to 'arch/arm/mach-omap2/clock34xx.c')
-rw-r--r-- | arch/arm/mach-omap2/clock34xx.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c index cf41ab55fa97..045da923e75b 100644 --- a/arch/arm/mach-omap2/clock34xx.c +++ b/arch/arm/mach-omap2/clock34xx.c | |||
@@ -739,9 +739,9 @@ static int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate) | |||
739 | 739 | ||
740 | sdrcrate = sdrc_ick.rate; | 740 | sdrcrate = sdrc_ick.rate; |
741 | if (rate > clk->rate) | 741 | if (rate > clk->rate) |
742 | sdrcrate <<= ((rate / clk->rate) - 1); | 742 | sdrcrate <<= ((rate / clk->rate) >> 1); |
743 | else | 743 | else |
744 | sdrcrate >>= ((clk->rate / rate) - 1); | 744 | sdrcrate >>= ((clk->rate / rate) >> 1); |
745 | 745 | ||
746 | sp = omap2_sdrc_get_params(sdrcrate); | 746 | sp = omap2_sdrc_get_params(sdrcrate); |
747 | if (!sp) | 747 | if (!sp) |
@@ -768,12 +768,9 @@ static int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate) | |||
768 | pr_debug("clock: SDRC timing params used: %08x %08x %08x\n", | 768 | pr_debug("clock: SDRC timing params used: %08x %08x %08x\n", |
769 | sp->rfr_ctrl, sp->actim_ctrla, sp->actim_ctrlb); | 769 | sp->rfr_ctrl, sp->actim_ctrla, sp->actim_ctrlb); |
770 | 770 | ||
771 | /* REVISIT: SRAM code doesn't support other M2 divisors yet */ | ||
772 | WARN_ON(new_div != 1 && new_div != 2); | ||
773 | |||
774 | omap3_configure_core_dpll(sp->rfr_ctrl, sp->actim_ctrla, | 771 | omap3_configure_core_dpll(sp->rfr_ctrl, sp->actim_ctrla, |
775 | sp->actim_ctrlb, new_div, unlock_dll, c, | 772 | sp->actim_ctrlb, new_div, unlock_dll, c, |
776 | sp->mr); | 773 | sp->mr, rate > clk->rate); |
777 | 774 | ||
778 | return 0; | 775 | return 0; |
779 | } | 776 | } |