summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2011-09-06 08:08:13 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-03 11:40:13 -0700
commit8a19c4e575cae9c1038305b488430eca4642fa22 (patch)
treeee147d94e8b0547c270682e919e6c00ea08f69fe /arch/arm
parenta677ecd3c42c0324df53ef8e811907af2c17c218 (diff)
downloadkernel-mfld-blackbay-8a19c4e575cae9c1038305b488430eca4642fa22.tar.gz
kernel-mfld-blackbay-8a19c4e575cae9c1038305b488430eca4642fa22.tar.bz2
kernel-mfld-blackbay-8a19c4e575cae9c1038305b488430eca4642fa22.zip
ARM: 7081/1: mach-integrator: fix the clocksource
commit bb9ea77846620ed2b37e74c852d72c7a476b248c upstream. I was intrigued by the fact that the clock stood still on the Integrator, but it wasn't strange at all, because the timer was set up all wrong and probably has been for a while. With this patch the clock starts ticking again: make the timer periodic (reload), |= on the divisor bit and load the timer before starting it. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-integrator/integrator_ap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c
index 2fbbdd5eac3..fcf0ae95651 100644
--- a/arch/arm/mach-integrator/integrator_ap.c
+++ b/arch/arm/mach-integrator/integrator_ap.c
@@ -337,15 +337,15 @@ static unsigned long timer_reload;
static void integrator_clocksource_init(u32 khz)
{
void __iomem *base = (void __iomem *)TIMER2_VA_BASE;
- u32 ctrl = TIMER_CTRL_ENABLE;
+ u32 ctrl = TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC;
if (khz >= 1500) {
khz /= 16;
- ctrl = TIMER_CTRL_DIV16;
+ ctrl |= TIMER_CTRL_DIV16;
}
- writel(ctrl, base + TIMER_CTRL);
writel(0xffff, base + TIMER_LOAD);
+ writel(ctrl, base + TIMER_CTRL);
clocksource_mmio_init(base + TIMER_VALUE, "timer2",
khz * 1000, 200, 16, clocksource_mmio_readl_down);