提交 6560ee07 编写于 作者: J Janusz Krzysztofik 提交者: Tony Lindgren

ARM: OMAP1: recalculate loops per jiffy after dpll1 reprogram

Otherwise timing is inaccurate, resulting in devices which depend on it,
like omap-keypad, broken.

Tested on Amstrad Delta.
Signed-off-by: NJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
[tony@atomide.com: removed comment referencing a development branch]
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 c2cb2111
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/cpufreq.h>
#include <linux/delay.h>
#include <linux/io.h> #include <linux/io.h>
#include <asm/mach-types.h> /* for machine_is_* */ #include <asm/mach-types.h> /* for machine_is_* */
...@@ -927,7 +929,9 @@ int __init omap1_clk_init(void) ...@@ -927,7 +929,9 @@ int __init omap1_clk_init(void)
void __init omap1_clk_late_init(void) void __init omap1_clk_late_init(void)
{ {
if (ck_dpll1.rate >= OMAP1_DPLL1_SANE_VALUE) unsigned long rate = ck_dpll1.rate;
if (rate >= OMAP1_DPLL1_SANE_VALUE)
return; return;
/* System booting at unusable rate, force reprogramming of DPLL1 */ /* System booting at unusable rate, force reprogramming of DPLL1 */
...@@ -942,4 +946,5 @@ void __init omap1_clk_late_init(void) ...@@ -942,4 +946,5 @@ void __init omap1_clk_late_init(void)
} }
propagate_rate(&ck_dpll1); propagate_rate(&ck_dpll1);
omap1_show_rates(); omap1_show_rates();
loops_per_jiffy = cpufreq_scale(loops_per_jiffy, rate, ck_dpll1.rate);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册