1 /* delay.c: Delay loops for sparc64
3 * Copyright (C) 2004 David S. Miller <davem@redhat.com>
5 * Based heavily upon x86 variant which is:
6 * Copyright (C) 1993 Linus Torvalds
7 * Copyright (C) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
10 #include <linux/delay.h>
12 void __delay(unsigned long loops
)
26 /* We used to multiply by HZ after shifting down by 32 bits
27 * but that runs into problems for higher values of HZ and
30 void __const_udelay(unsigned long n
)
34 n
*= (cpu_data(_smp_processor_id()).udelay_val
* (HZ
/4));
40 void __udelay(unsigned long n
)
42 __const_udelay(n
* 0x10c7UL
);
46 void __ndelay(unsigned long n
)
48 __const_udelay(n
* 0x5UL
);