Commit ecf51648 authored by Rajendra Nayak's avatar Rajendra Nayak Committed by Santosh Shilimkar

ARM: OMAP5: clock: No Freqsel on OMAP5 devices too

OMAP5 does not have freqsel either, so checks needs to be extended.

Infact only OMAP343X devices has the freqsel support, so fix the check
accordingly so that future patching can be avoided.
Reported-by: default avatarArchit Taneja <archit@ti.com>
Signed-off-by: default avatarRajendra Nayak <rnayak@ti.com>
Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
parent 1348bbf9
...@@ -307,10 +307,10 @@ static int omap3_noncore_dpll_program(struct clk_hw_omap *clk, u16 freqsel) ...@@ -307,10 +307,10 @@ static int omap3_noncore_dpll_program(struct clk_hw_omap *clk, u16 freqsel)
_omap3_noncore_dpll_bypass(clk); _omap3_noncore_dpll_bypass(clk);
/* /*
* Set jitter correction. No jitter correction for OMAP4 and 3630 * Set jitter correction. Jitter correction applicable for OMAP343X
* since freqsel field is no longer present * only since freqsel field is no longer present on other devices.
*/ */
if (!soc_is_am33xx() && !cpu_is_omap44xx() && !cpu_is_omap3630()) { if (cpu_is_omap343x()) {
v = __raw_readl(dd->control_reg); v = __raw_readl(dd->control_reg);
v &= ~dd->freqsel_mask; v &= ~dd->freqsel_mask;
v |= freqsel << __ffs(dd->freqsel_mask); v |= freqsel << __ffs(dd->freqsel_mask);
...@@ -500,9 +500,8 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate, ...@@ -500,9 +500,8 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
if (dd->last_rounded_rate == 0) if (dd->last_rounded_rate == 0)
return -EINVAL; return -EINVAL;
/* No freqsel on AM335x, OMAP4 and OMAP3630 */ /* Freqsel is available only on OMAP343X devices */
if (!soc_is_am33xx() && !cpu_is_omap44xx() && if (cpu_is_omap343x()) {
!cpu_is_omap3630()) {
freqsel = _omap3_dpll_compute_freqsel(clk, freqsel = _omap3_dpll_compute_freqsel(clk,
dd->last_rounded_n); dd->last_rounded_n);
WARN_ON(!freqsel); WARN_ON(!freqsel);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment