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
)
25 __asm__("dmulu.l %0, %2\n\t"
29 "r" (cpu_data
[raw_smp_processor_id()].loops_per_jiffy
* (HZ
/4))
34 void __udelay(unsigned long usecs
)
36 __const_udelay(usecs
* 0x000010c6); /* 2**32 / 1000000 */
39 void __ndelay(unsigned long nsecs
)
41 __const_udelay(nsecs
* 0x00000005);