diff options
Diffstat (limited to 'arch/arm/mach-omap1/clock.c')
-rw-r--r-- | arch/arm/mach-omap1/clock.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c index 84ef70476b51..0c50df05d135 100644 --- a/arch/arm/mach-omap1/clock.c +++ b/arch/arm/mach-omap1/clock.c | |||
@@ -197,11 +197,10 @@ int omap1_select_table_rate(struct clk *clk, unsigned long rate) | |||
197 | ref_rate = ck_ref_p->rate; | 197 | ref_rate = ck_ref_p->rate; |
198 | 198 | ||
199 | for (ptr = omap1_rate_table; ptr->rate; ptr++) { | 199 | for (ptr = omap1_rate_table; ptr->rate; ptr++) { |
200 | if (ptr->xtal != ref_rate) | 200 | if (!(ptr->flags & cpu_mask)) |
201 | continue; | 201 | continue; |
202 | 202 | ||
203 | /* DPLL1 cannot be reprogrammed without risking system crash */ | 203 | if (ptr->xtal != ref_rate) |
204 | if (likely(dpll1_rate != 0) && ptr->pll_rate != dpll1_rate) | ||
205 | continue; | 204 | continue; |
206 | 205 | ||
207 | /* Can check only after xtal frequency check */ | 206 | /* Can check only after xtal frequency check */ |
@@ -215,12 +214,8 @@ int omap1_select_table_rate(struct clk *clk, unsigned long rate) | |||
215 | /* | 214 | /* |
216 | * In most cases we should not need to reprogram DPLL. | 215 | * In most cases we should not need to reprogram DPLL. |
217 | * Reprogramming the DPLL is tricky, it must be done from SRAM. | 216 | * Reprogramming the DPLL is tricky, it must be done from SRAM. |
218 | * (on 730, bit 13 must always be 1) | ||
219 | */ | 217 | */ |
220 | if (cpu_is_omap7xx()) | 218 | omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val); |
221 | omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val | 0x2000); | ||
222 | else | ||
223 | omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val); | ||
224 | 219 | ||
225 | /* XXX Do we need to recalculate the tree below DPLL1 at this point? */ | 220 | /* XXX Do we need to recalculate the tree below DPLL1 at this point? */ |
226 | ck_dpll1_p->rate = ptr->pll_rate; | 221 | ck_dpll1_p->rate = ptr->pll_rate; |
@@ -290,6 +285,9 @@ long omap1_round_to_table_rate(struct clk *clk, unsigned long rate) | |||
290 | highest_rate = -EINVAL; | 285 | highest_rate = -EINVAL; |
291 | 286 | ||
292 | for (ptr = omap1_rate_table; ptr->rate; ptr++) { | 287 | for (ptr = omap1_rate_table; ptr->rate; ptr++) { |
288 | if (!(ptr->flags & cpu_mask)) | ||
289 | continue; | ||
290 | |||
293 | if (ptr->xtal != ref_rate) | 291 | if (ptr->xtal != ref_rate) |
294 | continue; | 292 | continue; |
295 | 293 | ||