[parisc-linux] ndelay() ?

Joel Soete jsoe0708@tiscali.be
Tue, 11 Mar 2003 17:27:58 +0100


Hi all,

In the new 2.4.21-pre5 we need a ndelay() function (ide support for b2k at
least).

Some sparc[64], ppc supply this ndelay as a modified udelay (parameter time
1000);
we could also do it for our parisc as follow:
(see include/asm-parisc/delay.h)
...
static __inline__ void __ndelay(unsigned long usecs) {
	__cr16_delay(usecs * ((unsigned long)boot_cpu_data.cpu_hz / 1000UL));
}

#define ndelay(n) __ndelay(n)
...

OTC 2.5 proposed another solution:

(see include/linux/delay.h)

#ifndef ndelay
#define ndelay(x)    udelay(((x)+999)/1000)
#endif

What is the best?

Thanks for advise,
    Joel


---------------------------------
Vous surfez avec une ligne classique ?
Faites des economies avec Tiscali Complete
... Plus d'info sur http://complete.tiscali.be