Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36621
b: refs/heads/master
c: df51a84
h: refs/heads/master
i:
  36619: da94661
v: v3
  • Loading branch information
Imre Deak authored and Tony Lindgren committed Sep 25, 2006
1 parent 7ffc746 commit 5ea04a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae78dcf79aefa98a1ed245898467eb6d3bfc11e6
refs/heads/master: df51a84d93e776b7481d937ccd60be1b27d320c5
12 changes: 11 additions & 1 deletion trunk/arch/arm/plat-omap/timer32k.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ static inline unsigned long omap_32k_timer_read(int reg)

static inline void omap_32k_timer_start(unsigned long load_val)
{
if (!load_val)
load_val = 1;
omap_32k_timer_write(load_val, OMAP1_32K_TIMER_TVR);
omap_32k_timer_write(0x0f, OMAP1_32K_TIMER_CR);
}
Expand Down Expand Up @@ -230,7 +232,15 @@ static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id,
*/
void omap_32k_timer_reprogram(unsigned long next_tick)
{
omap_32k_timer_start(JIFFIES_TO_HW_TICKS(next_tick, 32768) + 1);
unsigned long ticks = JIFFIES_TO_HW_TICKS(next_tick, 32768) + 1;
unsigned long now = omap_32k_sync_timer_read();
unsigned long idled = now - omap_32k_last_tick;

if (idled + 1 < ticks)
ticks -= idled;
else
ticks = 1;
omap_32k_timer_start(ticks);
}

static struct irqaction omap_32k_timer_irq;
Expand Down

0 comments on commit 5ea04a8

Please sign in to comment.