Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
R128
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ermine
R128
Commits
7b9726a7
Commit
7b9726a7
authored
17 years ago
by
Paul Mundt
Browse files
Options
Downloads
Patches
Plain Diff
sh: Fix up the sh64 build.
Signed-off-by:
Paul Mundt
<
lethal@linux-sh.org
>
parent
e7d7deca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arch/sh/lib64/udelay.c
+7
-14
7 additions, 14 deletions
arch/sh/lib64/udelay.c
include/asm-sh/delay.h
+0
-5
0 additions, 5 deletions
include/asm-sh/delay.h
with
7 additions
and
19 deletions
arch/sh/lib64/udelay.c
+
7
−
14
View file @
7b9726a7
...
...
@@ -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
lo
ng
usecs
,
unsigned
long
lpj
)
inline
void
__const
_udelay
(
unsigned
long
x
lo
ops
)
{
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
__
n
delay
(
unsigned
long
long
nsecs
,
unsigned
long
lpj
)
void
__
u
delay
(
unsigned
long
usecs
)
{
nsecs
*=
(((
unsigned
long
long
)
HZ
<<
32
)
/
1000000000
)
*
lpj
;
__delay
((
long
long
)
nsecs
>>
32
);
__const_udelay
(
usecs
*
0x000010c6
);
/* 2**32 / 1000000 */
}
void
u
delay
(
unsigned
long
u
secs
)
void
__n
delay
(
unsigned
long
n
secs
)
{
__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
);
}
This diff is collapsed.
Click to expand it.
include/asm-sh/delay.h
+
0
−
5
View file @
7b9726a7
...
...
@@ -15,7 +15,6 @@ extern void __ndelay(unsigned long nsecs);
extern
void
__const_udelay
(
unsigned
long
xloops
);
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))
...
...
@@ -23,9 +22,5 @@ extern void __delay(unsigned long loops);
#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 */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment