summaryrefslogtreecommitdiff
path: root/arch/arm/plat-spear/time.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-03-09 14:34:20 -0800
committerDavid S. Miller <davem@davemloft.net>2012-03-09 14:34:20 -0800
commitb2d3298e0916fa059712691c85a0e97becc4ab9f (patch)
treec7d5ea46a9dbf9cebdb122df4aaf0beda6e7621e /arch/arm/plat-spear/time.c
parent1a0bdadb4e36abac63b0a9787f372aac30c11a9e (diff)
parenta7f4255f906f60f72e00aad2fb000939449ff32e (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
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));