Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279711
b: refs/heads/master
c: 1f2aab0
h: refs/heads/master
i:
  279709: a731caa
  279707: ca4c9e7
  279703: d20c832
  279695: 30c9c55
  279679: 5cbd587
v: v3
  • Loading branch information
Greg Ungerer committed Dec 24, 2011
1 parent e29429e commit 8f40cef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: ec84118795fa687192de04e0dcb63178e4bf63e5
refs/heads/master: 1f2aab01ba2f6c591dee93daf4b57fd9785f3b41
9 changes: 6 additions & 3 deletions trunk/arch/m68k/platform/coldfire/sltimers.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,19 @@ static struct irqaction mcfslt_timer_irq = {
static cycle_t mcfslt_read_clk(struct clocksource *cs)
{
unsigned long flags;
u32 cycles;
u16 scnt;
u32 cycles, scnt;

local_irq_save(flags);
scnt = __raw_readl(TA(MCFSLT_SCNT));
cycles = mcfslt_cnt;
if (__raw_readl(TA(MCFSLT_SSR)) & MCFSLT_SSR_TE) {
cycles += mcfslt_cycles_per_jiffy;
scnt = __raw_readl(TA(MCFSLT_SCNT));
}
local_irq_restore(flags);

/* subtract because slice timers count down */
return cycles - scnt;
return cycles + ((mcfslt_cycles_per_jiffy - 1) - scnt);
}

static struct clocksource mcfslt_clk = {
Expand Down

0 comments on commit 8f40cef

Please sign in to comment.