Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
99432700
Commit
99432700
authored
Nov 20, 2007
by
Paul Mundt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sh: Tidy up lib64 udelay impl.
Signed-off-by:
Paul Mundt
<
lethal@linux-sh.org
>
parent
600ee240
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
arch/sh/lib64/udelay.c
arch/sh/lib64/udelay.c
+2
-5
include/asm-sh/delay.h
include/asm-sh/delay.h
+6
-2
No files found.
arch/sh/lib64/udelay.c
View file @
99432700
...
...
@@ -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).
*
...
...
@@ -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
);
}
include/asm-sh/delay.h
View file @
99432700
...
...
@@ -6,7 +6,7 @@
*
* Delay routines calling functions in arch/sh/lib/delay.c
*/
extern
void
__bad_udelay
(
void
);
extern
void
__bad_ndelay
(
void
);
...
...
@@ -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 */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment