Messages in this thread |  | | Date | Sat, 26 Aug 2000 15:51:52 +0100 | | From | Philipp Rumpf <> | | Subject | Re: 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/
|  |