lkml.org 
[lkml]   [2000]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Exporting calibrate_delay()
On Fri, Aug 25, 2000 at 06:25:51PM +0100, Russell King wrote:
> No, I'd prefer to keep the things that can reasonably be kept generic without
> too much pain generic, and for that you can adjust the "loops_per_sec" (or
> a derived variable that udelay can use) to compensate for clock speed
> variations.

Should work fine, except for broken drivers which do:

my_delay = loops_per_sec / 10000000 + 1;

sleep;

__delay(my_delay);


shouldn't be an issue though. If you make sure you're not losing too much
precision (basically round loops_per_sec to a suitable boundary or keep the
original value around), I don't see any real problems.

> After all, if you know you've halved the clock speed, you have to double
> loops_per_sec.

halve loops_per_sec, of course.

Philipp Rumpf
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.047 / U:1.436 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site