summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-spear/time.c
diff options
context:
space:
mode:
authorArnd Bergmann2012-03-19 21:46:32 +0100
committerArnd Bergmann2012-03-20 10:41:43 +0100
commitb2f1df8d2fc14bf7e6d9d967043d4b60c2efd8dc (patch)
tree065282434bde6ef9b4357c042705c5fcef3782ea /arch/arm/plat-spear/time.c
parentMerge branch 'local_timers-for-arm-soc' of git://git.kernel.org/pub/scm/linux... (diff)
parentMerge branch 'renesas/fixes' into renesas/soc (diff)
downloadkernel-qcow2-linux-b2f1df8d2fc14bf7e6d9d967043d4b60c2efd8dc.tar.gz
kernel-qcow2-linux-b2f1df8d2fc14bf7e6d9d967043d4b60c2efd8dc.tar.xz
kernel-qcow2-linux-b2f1df8d2fc14bf7e6d9d967043d4b60c2efd8dc.zip
Merge branch 'renesas/timer' into next/timer
Conflicts: arch/arm/mach-shmobile/timer.c This resolves a nonobvious merge conflict between renesas timer changes in the global timer changes with those from the renesas soc branch and last minute bug fixes that went into v3.3. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/plat-spear/time.c')
-rw-r--r--arch/arm/plat-spear/time.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/plat-spear/time.c b/arch/arm/plat-spear/time.c
index 0c77e4298675..abb5bdecd509 100644
--- a/arch/arm/plat-spear/time.c
+++ b/arch/arm/plat-spear/time.c
@@ -145,11 +145,13 @@ static void clockevent_set_mode(enum clock_event_mode mode,
static int clockevent_next_event(unsigned long cycles,
struct clock_event_device *clk_event_dev)
{
- u16 val;
+ u16 val = readw(gpt_base + CR(CLKEVT));
+
+ if (val & CTRL_ENABLE)
+ writew(val & ~CTRL_ENABLE, gpt_base + CR(CLKEVT));
writew(cycles, gpt_base + LOAD(CLKEVT));
- val = readw(gpt_base + CR(CLKEVT));
val |= CTRL_ENABLE | CTRL_INT_ENABLE;
writew(val, gpt_base + CR(CLKEVT));