Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132371
b: refs/heads/master
c: 80ea3ba
h: refs/heads/master
i:
  132369: 84d4c75
  132367: 49dd115
v: v3
  • Loading branch information
Aaro Koskinen authored and Tony Lindgren committed Mar 4, 2009
1 parent 04c2a84 commit 6a92582
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 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: 87d99d6f7ee3ec73b2b0212427b173502ec9d6cb
refs/heads/master: 80ea3bac3a47bc73efa334d0dd57099d0ff14216
14 changes: 5 additions & 9 deletions trunk/arch/arm/plat-omap/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,21 +199,17 @@ static struct clocksource clocksource_32k = {
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};

/*
* Rounds down to nearest nsec.
*/
unsigned long long omap_32k_ticks_to_nsecs(unsigned long ticks_32k)
{
return cyc2ns(&clocksource_32k, ticks_32k);
}

/*
* Returns current time from boot in nsecs. It's OK for this to wrap
* around for now, as it's just a relative time stamp.
*/
unsigned long long sched_clock(void)
{
return omap_32k_ticks_to_nsecs(omap_32k_read());
unsigned long long ret;

ret = (unsigned long long)omap_32k_read();
ret = (ret * clocksource_32k.mult_orig) >> clocksource_32k.shift;
return ret;
}

static int __init omap_init_clocksource_32k(void)
Expand Down

0 comments on commit 6a92582

Please sign in to comment.