aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/dmtimer.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/dmtimer.c')
-rw-r--r--arch/arm/plat-omap/dmtimer.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 963c31cd1541..e4f0ce04ba92 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -539,10 +539,6 @@ void omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload,
539 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); 539 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
540 omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load); 540 omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load);
541 541
542 /* REVISIT: hw feature, ttgr overtaking tldr? */
543 while (readl(timer->io_base + (OMAP_TIMER_WRITE_PEND_REG & 0xff)))
544 cpu_relax();
545
546 omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0); 542 omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0);
547} 543}
548 544
@@ -553,14 +549,15 @@ void omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload,
553 u32 l; 549 u32 l;
554 550
555 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); 551 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
556 if (autoreload) 552 if (autoreload) {
557 l |= OMAP_TIMER_CTRL_AR; 553 l |= OMAP_TIMER_CTRL_AR;
558 else 554 omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load);
555 } else {
559 l &= ~OMAP_TIMER_CTRL_AR; 556 l &= ~OMAP_TIMER_CTRL_AR;
557 }
560 l |= OMAP_TIMER_CTRL_ST; 558 l |= OMAP_TIMER_CTRL_ST;
561 559
562 omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, load); 560 omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, load);
563 omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load);
564 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); 561 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
565} 562}
566 563