summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorJon Hunter <jon-hunter@ti.com>2012-10-04 18:17:42 -0500
committerJon Hunter <jon-hunter@ti.com>2012-11-12 16:23:55 -0600
commit991ad16a927c721b301f27aa9b61a13a24b54dda (patch)
tree8718ae1317d73851b644cdf7d228dc173d16e597 /arch/arm/plat-omap
parent1eaff71017d97ce2bc8e22b9a5cf11e5c6dd6c78 (diff)
downloadblackbird-op-linux-991ad16a927c721b301f27aa9b61a13a24b54dda.tar.gz
blackbird-op-linux-991ad16a927c721b301f27aa9b61a13a24b54dda.zip
ARM: OMAP: Fix spurious interrupts when using timer match feature
The OMAP DMTIMERs can generate an interrupt when the timer counter value matches the value stored in the timer's match register. When using this feature spurious interrupts were seen, because the compare logic is being enabled before the match value is loaded and according to the documentation the match value must be loaded before the compare logic is enable. The reset value for the timer counter and match registers is 0 and hence, by enabling the compare logic before the actual match value is loaded a spurious interrupt can be generated as the reset values match. Signed-off-by: Jon Hunter <jon-hunter@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/dmtimer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index f0a3c4c72a42..a38e8964c820 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -584,8 +584,8 @@ int omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable,
l |= OMAP_TIMER_CTRL_CE;
else
l &= ~OMAP_TIMER_CTRL_CE;
- omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
omap_dm_timer_write_reg(timer, OMAP_TIMER_MATCH_REG, match);
+ omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
/* Save the context */
timer->context.tclr = l;
OpenPOWER on IntegriCloud