Re: Exporting calibrate_delay()

From: Erik Mouw (
Date: Thu Aug 24 2000 - 17:57:59 EST

Alan Cox wrote:
> > Is there a specific reason why calibrate_delay() (in init/main.c)
> > needs to be an __init function? I need to recalibrate the delay
> > loop for a CPU that supports multiple clock speeds (the Intel
> > StrongARM SA1100), so I'd rather use this code instead of
> > replicating it.
> Do you actually need to rerun the entire loop, and for that matter if so
> have you checked all the code paths running while you are recalibrating dont
> use udelay ?

The idea is to have a different value for loops_per_sec for all
(read: 12) clock speeds. I want to calculate the values when the
driver loads so I can just plug in a new value for loops_per_sec
at a clock speed change. If I disable all interrupts while
recalibrating it shouldn't hurt udelay, right?

> If you know the CPU clock ratio when power saving you can just do the maths
> directly

How correct is that? More specifically: how sensitive are the other
drivers for slightly incorrect values of loops_per_sec?


J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Aug 31 2000 - 21:00:14 EST