summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>2011-12-01 21:13:02 +0100
committerTony Lindgren <tony@atomide.com>2011-12-05 09:28:32 -0800
commit6560ee07dc946e94f7cc2cd8e3b5a5f5ee7340c1 (patch)
tree841f39266d251748f097ce753ee1b0da647b9d06 /arch
parentc2cb211116192690605eaa70d39deb04241003e2 (diff)
downloadblackbird-op-linux-6560ee07dc946e94f7cc2cd8e3b5a5f5ee7340c1.tar.gz
blackbird-op-linux-6560ee07dc946e94f7cc2cd8e3b5a5f5ee7340c1.zip
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')
-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 @@
#include <linux/kernel.h>
#include <linux/clk.h>
+#include <linux/cpufreq.h>
+#include <linux/delay.h>
#include <linux/io.h>
#include <asm/mach-types.h> /* for machine_is_* */
@@ -927,7 +929,9 @@ int __init omap1_clk_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;
/* System booting at unusable rate, force reprogramming of DPLL1 */
@@ -942,4 +946,5 @@ void __init omap1_clk_late_init(void)
}
propagate_rate(&ck_dpll1);
omap1_show_rates();
+ loops_per_jiffy = cpufreq_scale(loops_per_jiffy, rate, ck_dpll1.rate);
}
OpenPOWER on IntegriCloud