2 * Precise Delay Loops for SuperH
4 * Copyright (C) 1999 Niibe Yutaka & Kaz Kojima
7 #include <linux/sched.h>
8 #include <linux/delay.h>
10 void __delay(unsigned long loops
)
22 inline void __const_udelay(unsigned long xloops
)
24 __asm__("dmulu.l %0, %2\n\t"
28 "r" (HZ
* cpu_data
[raw_smp_processor_id()].loops_per_jiffy
)
33 void __udelay(unsigned long usecs
)
35 __const_udelay(usecs
* 0x000010c6); /* 2**32 / 1000000 */
38 void __ndelay(unsigned long nsecs
)
40 __const_udelay(nsecs
* 0x00000005);