-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARC64]: More sensible udelay implementation.
Take a page from the powerpc folks and just calculate the delay factor directly. Since frequency scaling chips use a system-tick register, the value is going to be the same system-wide. Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
David S. Miller
committed
Jul 16, 2007
1 parent
27a2ef3
commit 8b99cfb
Showing
10 changed files
with
31 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,17 @@ | ||
/* delay.h: Linux delay routines on sparc64. | ||
* | ||
* Copyright (C) 1996, 2004 David S. Miller (davem@davemloft.net). | ||
* | ||
* Based heavily upon x86 variant which is: | ||
* Copyright (C) 1993 Linus Torvalds | ||
* | ||
* Delay routines calling functions in arch/sparc64/lib/delay.c | ||
* Copyright (C) 1996, 2004, 2007 David S. Miller (davem@davemloft.net). | ||
*/ | ||
|
||
#ifndef __SPARC64_DELAY_H | ||
#define __SPARC64_DELAY_H | ||
|
||
#include <linux/param.h> | ||
#include <asm/cpudata.h> | ||
#ifndef _SPARC64_DELAY_H | ||
#define _SPARC64_DELAY_H | ||
|
||
#ifndef __ASSEMBLY__ | ||
|
||
extern void __bad_udelay(void); | ||
extern void __bad_ndelay(void); | ||
|
||
extern void __udelay(unsigned long usecs); | ||
extern void __ndelay(unsigned long nsecs); | ||
extern void __const_udelay(unsigned long usecs); | ||
extern void __delay(unsigned long loops); | ||
|
||
#define udelay(n) (__builtin_constant_p(n) ? \ | ||
((n) > 20000 ? __bad_udelay() : __const_udelay((n) * 0x10c7ul)) : \ | ||
__udelay(n)) | ||
|
||
#define ndelay(n) (__builtin_constant_p(n) ? \ | ||
((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \ | ||
__ndelay(n)) | ||
extern void udelay(unsigned long usecs); | ||
#define mdelay(n) udelay((n) * 1000) | ||
|
||
#endif /* !__ASSEMBLY__ */ | ||
|
||
#endif /* defined(__SPARC64_DELAY_H) */ | ||
#endif /* _SPARC64_DELAY_H */ |