Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77740
b: refs/heads/master
c: 9943270
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Jan 28, 2008
1 parent 359932e commit 482e9f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 600ee240d15e535d51e6c2b2f8475f0aa42885ea
refs/heads/master: 99432700cf2f28976191ab546deffc0007ef4eb7
7 changes: 2 additions & 5 deletions trunk/arch/sh/lib64/udelay.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#include <linux/sched.h>
#include <asm/param.h>

extern unsigned long loops_per_jiffy;

/*
* Use only for very small delays (< 1 msec).
*
Expand Down Expand Up @@ -49,11 +47,10 @@ void __ndelay(unsigned long long nsecs, unsigned long lpj)

void udelay(unsigned long usecs)
{
__udelay(usecs, loops_per_jiffy);
__udelay(usecs, cpu_data[raw_smp_processor_id()].loops_per_jiffy);
}

void ndelay(unsigned long nsecs)
{
__ndelay(nsecs, loops_per_jiffy);
__ndelay(nsecs, cpu_data[raw_smp_processor_id()].loops_per_jiffy);
}

8 changes: 6 additions & 2 deletions trunk/include/asm-sh/delay.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Delay routines calling functions in arch/sh/lib/delay.c
*/

extern void __bad_udelay(void);
extern void __bad_ndelay(void);

Expand All @@ -15,13 +15,17 @@ extern void __ndelay(unsigned long nsecs);
extern void __const_udelay(unsigned long usecs);
extern void __delay(unsigned long loops);

#ifdef CONFIG_SUPERH32
#define udelay(n) (__builtin_constant_p(n) ? \
((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c6ul)) : \
__udelay(n))


#define ndelay(n) (__builtin_constant_p(n) ? \
((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \
__ndelay(n))
#else
extern void udelay(unsigned long usecs);
extern void ndelay(unsigned long nsecs);
#endif

#endif /* __ASM_SH_DELAY_H */

0 comments on commit 482e9f6

Please sign in to comment.