diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-03-06 17:23:15 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-03-06 17:23:15 +0900 |
commit | 7b9726a7a0d8c70ea44a5ed23726748de344f223 (patch) | |
tree | a9c96bf0e1e084981e4bd8e14c6c8505f0780dbb /arch/sh | |
parent | e7d7deca60c01d844a4d8e5644f4aecaf0e3bee4 (diff) | |
download | linux-7b9726a7a0d8c70ea44a5ed23726748de344f223.tar.bz2 |
sh: Fix up the sh64 build.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/lib64/udelay.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/arch/sh/lib64/udelay.c b/arch/sh/lib64/udelay.c index 23c7d17fb9f7..d76bd801194f 100644 --- a/arch/sh/lib64/udelay.c +++ b/arch/sh/lib64/udelay.c @@ -21,7 +21,7 @@ * a 1GHz box, that's about 2 seconds. */ -void __delay(int loops) +void __delay(unsigned long loops) { long long dummy; __asm__ __volatile__("gettr tr0, %1\n\t" @@ -33,24 +33,17 @@ void __delay(int loops) :"0"(loops)); } -void __udelay(unsigned long long usecs, unsigned long lpj) +inline void __const_udelay(unsigned long xloops) { - usecs *= (((unsigned long long) HZ << 32) / 1000000) * lpj; - __delay((long long) usecs >> 32); + __delay(xloops * (HZ * cpu_data[raw_smp_processor_id()].loops_per_jiffy)); } -void __ndelay(unsigned long long nsecs, unsigned long lpj) +void __udelay(unsigned long usecs) { - nsecs *= (((unsigned long long) HZ << 32) / 1000000000) * lpj; - __delay((long long) nsecs >> 32); + __const_udelay(usecs * 0x000010c6); /* 2**32 / 1000000 */ } -void udelay(unsigned long usecs) +void __ndelay(unsigned long nsecs) { - __udelay(usecs, cpu_data[raw_smp_processor_id()].loops_per_jiffy); -} - -void ndelay(unsigned long nsecs) -{ - __ndelay(nsecs, cpu_data[raw_smp_processor_id()].loops_per_jiffy); + __const_udelay(nsecs * 0x00000005); } |