aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1
diff options
context:
space:
mode:
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>2011-12-01 15:13:02 -0500
committerTony Lindgren <tony@atomide.com>2011-12-05 12:28:32 -0500
commit6560ee07dc946e94f7cc2cd8e3b5a5f5ee7340c1 (patch)
tree841f39266d251748f097ce753ee1b0da647b9d06 /arch/arm/mach-omap1
parentc2cb211116192690605eaa70d39deb04241003e2 (diff)
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: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> [tony@atomide.com: removed comment referencing a development branch] Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r--arch/arm/mach-omap1/clock_data.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c
index 86b2dec11788..9ff90a744a21 100644
--- a/arch/arm/mach-omap1/clock_data.c
+++ b/arch/arm/mach-omap1/clock_data.c
@@ -16,6 +16,8 @@
16 16
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/clk.h> 18#include <linux/clk.h>
19#include <linux/cpufreq.h>
20#include <linux/delay.h>
19#include <linux/io.h> 21#include <linux/io.h>
20 22
21#include <asm/mach-types.h> /* for machine_is_* */ 23#include <asm/mach-types.h> /* for machine_is_* */
@@ -927,7 +929,9 @@ int __init omap1_clk_init(void)
927 929
928void __init omap1_clk_late_init(void) 930void __init omap1_clk_late_init(void)
929{ 931{
930 if (ck_dpll1.rate >= OMAP1_DPLL1_SANE_VALUE) 932 unsigned long rate = ck_dpll1.rate;
933
934 if (rate >= OMAP1_DPLL1_SANE_VALUE)
931 return; 935 return;
932 936
933 /* System booting at unusable rate, force reprogramming of DPLL1 */ 937 /* System booting at unusable rate, force reprogramming of DPLL1 */
@@ -942,4 +946,5 @@ void __init omap1_clk_late_init(void)
942 } 946 }
943 propagate_rate(&ck_dpll1); 947 propagate_rate(&ck_dpll1);
944 omap1_show_rates(); 948 omap1_show_rates();
949 loops_per_jiffy = cpufreq_scale(loops_per_jiffy, rate, ck_dpll1.rate);
945} 950}