diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-17 01:09:29 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-17 01:09:29 -0500 |
commit | 2bb4646fce8d09916b351d1a62f98db7cec6fc41 (patch) | |
tree | c1f0d002e69868606eca9d1b919835f422892063 /arch/arm/plat-omap/dmtimer.c | |
parent | 6836b9bdd98e3b500cd49512484df68f46e14659 (diff) | |
parent | b0483e78e5c4c9871fc5541875b3bc006846d46b (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'arch/arm/plat-omap/dmtimer.c')
-rw-r--r-- | arch/arm/plat-omap/dmtimer.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 64f407ee0f4e..08ccf8922520 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -551,6 +551,19 @@ void omap_dm_timer_stop(struct omap_dm_timer *timer) | |||
551 | if (l & OMAP_TIMER_CTRL_ST) { | 551 | if (l & OMAP_TIMER_CTRL_ST) { |
552 | l &= ~0x1; | 552 | l &= ~0x1; |
553 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); | 553 | omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); |
554 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) || \ | ||
555 | defined(CONFIG_ARCH_OMAP4) | ||
556 | /* Readback to make sure write has completed */ | ||
557 | omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); | ||
558 | /* | ||
559 | * Wait for functional clock period x 3.5 to make sure that | ||
560 | * timer is stopped | ||
561 | */ | ||
562 | udelay(3500000 / clk_get_rate(timer->fclk) + 1); | ||
563 | /* Ack possibly pending interrupt */ | ||
564 | omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, | ||
565 | OMAP_TIMER_INT_OVERFLOW); | ||
566 | #endif | ||
554 | } | 567 | } |
555 | } | 568 | } |
556 | EXPORT_SYMBOL_GPL(omap_dm_timer_stop); | 569 | EXPORT_SYMBOL_GPL(omap_dm_timer_stop); |