Commit c116abc4 authored by Janusz Krzysztofik's avatar Janusz Krzysztofik Committed by Tony Lindgren

ARM: OMAP1: Always reprogram dpll1 rate at boot

DPLL1 reprogramming to a different rate is actually blocked inside
omap1_select_table_rate(). However, it is already forced at boot, for
boards which boot at unusable clock rates, and this seems to work
correctly.

OTOH, we now have a fine, run time performed clock selection algorithm
implemented, which prevents less powerfull SoCs from being overclocked
unintentionally.

Allow reprogramming of dpll1 by default, and use it for switching to the
higest supported clock rate with all boards, including those already
booting at a usable rate of 60 MHz or above.

Created against linux-omap/master tip as of Thu Dec 1,
commit f83c2a8cbb59981722d1ab610c79adfd034a2667. Requires the just
submitted patch "ARM: OMAP1: Move dpll1 rates selection from config to
runtime" to prevent from unintentional overclocking. Tested on Amstrad
Delta.
Signed-off-by: default avatarJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent f9e5908f
...@@ -203,10 +203,6 @@ int omap1_select_table_rate(struct clk *clk, unsigned long rate) ...@@ -203,10 +203,6 @@ int omap1_select_table_rate(struct clk *clk, unsigned long rate)
if (ptr->xtal != ref_rate) if (ptr->xtal != ref_rate)
continue; continue;
/* DPLL1 cannot be reprogrammed without risking system crash */
if (likely(dpll1_rate != 0) && ptr->pll_rate != dpll1_rate)
continue;
/* Can check only after xtal frequency check */ /* Can check only after xtal frequency check */
if (ptr->rate <= rate) if (ptr->rate <= rate)
break; break;
......
...@@ -936,12 +936,6 @@ void __init omap1_clk_late_init(void) ...@@ -936,12 +936,6 @@ void __init omap1_clk_late_init(void)
{ {
unsigned long rate = ck_dpll1.rate; unsigned long rate = ck_dpll1.rate;
if (rate >= OMAP1_DPLL1_SANE_VALUE)
return;
/* System booting at unusable rate, force reprogramming of DPLL1 */
ck_dpll1_p->rate = 0;
/* Find the highest supported frequency and enable it */ /* Find the highest supported frequency and enable it */
if (omap1_select_table_rate(&virtual_ck_mpu, ~0)) { if (omap1_select_table_rate(&virtual_ck_mpu, ~0)) {
pr_err("System frequencies not set, using default. Check your config.\n"); pr_err("System frequencies not set, using default. Check your config.\n");
......
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