Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
2be9da90
Commit
2be9da90
authored
Dec 20, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC64]: Add sbus_{read,write}q.
parent
6e6410cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
include/asm-sparc64/io.h
include/asm-sparc64/io.h
+20
-0
No files found.
include/asm-sparc64/io.h
View file @
2be9da90
...
...
@@ -304,6 +304,17 @@ static __inline__ u32 _sbus_readl(unsigned long addr)
return
ret
;
}
static
__inline__
u64
_sbus_readq
(
unsigned
long
addr
)
{
u64
ret
;
__asm__
__volatile__
(
"ldxa
\t
[%1] %2, %0
\t
/* sbus_readq */"
:
"=r"
(
ret
)
:
"r"
(
addr
),
"i"
(
ASI_PHYS_BYPASS_EC_E
));
return
ret
;
}
static
__inline__
void
_sbus_writeb
(
u8
b
,
unsigned
long
addr
)
{
__asm__
__volatile__
(
"stba
\t
%r0, [%1] %2
\t
/* sbus_writeb */"
...
...
@@ -325,12 +336,21 @@ static __inline__ void _sbus_writel(u32 l, unsigned long addr)
:
"Jr"
(
l
),
"r"
(
addr
),
"i"
(
ASI_PHYS_BYPASS_EC_E
));
}
static
__inline__
void
_sbus_writeq
(
u64
l
,
unsigned
long
addr
)
{
__asm__
__volatile__
(
"stxa
\t
%r0, [%1] %2
\t
/* sbus_writeq */"
:
/* no outputs */
:
"Jr"
(
l
),
"r"
(
addr
),
"i"
(
ASI_PHYS_BYPASS_EC_E
));
}
#define sbus_readb(__addr) (_sbus_readb((unsigned long)(__addr)))
#define sbus_readw(__addr) (_sbus_readw((unsigned long)(__addr)))
#define sbus_readl(__addr) (_sbus_readl((unsigned long)(__addr)))
#define sbus_readq(__addr) (_sbus_readq((unsigned long)(__addr)))
#define sbus_writeb(__b, __addr) (_sbus_writeb((__b), (unsigned long)(__addr)))
#define sbus_writew(__w, __addr) (_sbus_writew((__w), (unsigned long)(__addr)))
#define sbus_writel(__l, __addr) (_sbus_writel((__l), (unsigned long)(__addr)))
#define sbus_writeq(__l, __addr) (_sbus_writeq((__l), (unsigned long)(__addr)))
static
inline
void
*
_sbus_memset_io
(
unsigned
long
dst
,
int
c
,
__kernel_size_t
n
)
{
...
...
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