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
2d40292b
Commit
2d40292b
authored
Nov 30, 2009
by
Mike Frysinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Blackfin: io.h: fix random busted whitespace
Signed-off-by:
Mike Frysinger
<
vapier@gentoo.org
>
parent
dd3b0e3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
44 deletions
+51
-44
arch/blackfin/include/asm/io.h
arch/blackfin/include/asm/io.h
+51
-44
No files found.
arch/blackfin/include/asm/io.h
View file @
2d40292b
...
@@ -31,12 +31,14 @@ static inline unsigned char readb(const volatile void __iomem *addr)
...
@@ -31,12 +31,14 @@ static inline unsigned char readb(const volatile void __iomem *addr)
unsigned
int
val
;
unsigned
int
val
;
int
tmp
;
int
tmp
;
__asm__
__volatile__
(
"cli %1;
\n\t
"
__asm__
__volatile__
(
"NOP; NOP; SSYNC;
\n\t
"
"cli %1;"
"%0 = b [%2] (z);
\n\t
"
"NOP; NOP; SSYNC;"
"sti %1;
\n\t
"
"%0 = b [%2] (z);"
:
"=d"
(
val
),
"=d"
(
tmp
)
:
"a"
(
addr
)
"sti %1;"
);
:
"=d"
(
val
),
"=d"
(
tmp
)
:
"a"
(
addr
)
);
return
(
unsigned
char
)
val
;
return
(
unsigned
char
)
val
;
}
}
...
@@ -46,12 +48,14 @@ static inline unsigned short readw(const volatile void __iomem *addr)
...
@@ -46,12 +48,14 @@ static inline unsigned short readw(const volatile void __iomem *addr)
unsigned
int
val
;
unsigned
int
val
;
int
tmp
;
int
tmp
;
__asm__
__volatile__
(
"cli %1;
\n\t
"
__asm__
__volatile__
(
"NOP; NOP; SSYNC;
\n\t
"
"cli %1;"
"%0 = w [%2] (z);
\n\t
"
"NOP; NOP; SSYNC;"
"sti %1;
\n\t
"
"%0 = w [%2] (z);"
:
"=d"
(
val
),
"=d"
(
tmp
)
:
"a"
(
addr
)
"sti %1;"
);
:
"=d"
(
val
),
"=d"
(
tmp
)
:
"a"
(
addr
)
);
return
(
unsigned
short
)
val
;
return
(
unsigned
short
)
val
;
}
}
...
@@ -61,20 +65,23 @@ static inline unsigned int readl(const volatile void __iomem *addr)
...
@@ -61,20 +65,23 @@ static inline unsigned int readl(const volatile void __iomem *addr)
unsigned
int
val
;
unsigned
int
val
;
int
tmp
;
int
tmp
;
__asm__
__volatile__
(
"cli %1;
\n\t
"
__asm__
__volatile__
(
"NOP; NOP; SSYNC;
\n\t
"
"cli %1;"
"%0 = [%2];
\n\t
"
"NOP; NOP; SSYNC;"
"sti %1;
\n\t
"
"%0 = [%2];"
:
"=d"
(
val
),
"=d"
(
tmp
)
:
"a"
(
addr
)
"sti %1;"
);
:
"=d"
(
val
),
"=d"
(
tmp
)
:
"a"
(
addr
)
);
return
val
;
return
val
;
}
}
#endif
/* __ASSEMBLY__ */
#endif
/* __ASSEMBLY__ */
#define writeb(b,addr) (void)((*(volatile unsigned char *) (addr)) = (b))
#define writeb(b,
addr) (void)((*(volatile unsigned char *) (addr)) = (b))
#define writew(b,addr) (void)((*(volatile unsigned short *) (addr)) = (b))
#define writew(b,
addr) (void)((*(volatile unsigned short *) (addr)) = (b))
#define writel(b,addr) (void)((*(volatile unsigned int *) (addr)) = (b))
#define writel(b,
addr) (void)((*(volatile unsigned int *) (addr)) = (b))
#define __raw_readb readb
#define __raw_readb readb
#define __raw_readw readw
#define __raw_readw readw
...
@@ -82,9 +89,9 @@ static inline unsigned int readl(const volatile void __iomem *addr)
...
@@ -82,9 +89,9 @@ static inline unsigned int readl(const volatile void __iomem *addr)
#define __raw_writeb writeb
#define __raw_writeb writeb
#define __raw_writew writew
#define __raw_writew writew
#define __raw_writel writel
#define __raw_writel writel
#define memset_io(a,
b,c) memset((void *)(a),(b),
(c))
#define memset_io(a,
b, c) memset((void *)(a), (b),
(c))
#define memcpy_fromio(a,
b,c) memcpy((a),(void *)(b),
(c))
#define memcpy_fromio(a,
b, c) memcpy((a), (void *)(b),
(c))
#define memcpy_toio(a,
b,c) memcpy((void *)(a),(b),
(c))
#define memcpy_toio(a,
b, c) memcpy((void *)(a), (b),
(c))
/* Convert "I/O port addresses" to actual addresses. i.e. ugly casts. */
/* Convert "I/O port addresses" to actual addresses. i.e. ugly casts. */
#define __io(port) ((void *)(unsigned long)(port))
#define __io(port) ((void *)(unsigned long)(port))
...
@@ -92,30 +99,30 @@ static inline unsigned int readl(const volatile void __iomem *addr)
...
@@ -92,30 +99,30 @@ static inline unsigned int readl(const volatile void __iomem *addr)
#define inb(port) readb(__io(port))
#define inb(port) readb(__io(port))
#define inw(port) readw(__io(port))
#define inw(port) readw(__io(port))
#define inl(port) readl(__io(port))
#define inl(port) readl(__io(port))
#define outb(x,
port) writeb(x,
__io(port))
#define outb(x,
port) writeb(x,
__io(port))
#define outw(x,
port) writew(x,
__io(port))
#define outw(x,
port) writew(x,
__io(port))
#define outl(x,
port) writel(x,
__io(port))
#define outl(x,
port) writel(x,
__io(port))
#define inb_p(port) inb(__io(port))
#define inb_p(port) inb(__io(port))
#define inw_p(port) inw(__io(port))
#define inw_p(port) inw(__io(port))
#define inl_p(port) inl(__io(port))
#define inl_p(port) inl(__io(port))
#define outb_p(x,
port) outb(x,
__io(port))
#define outb_p(x,
port) outb(x,
__io(port))
#define outw_p(x,
port) outw(x,
__io(port))
#define outw_p(x,
port) outw(x,
__io(port))
#define outl_p(x,
port) outl(x,
__io(port))
#define outl_p(x,
port) outl(x,
__io(port))
#define ioread8_rep(a,
d,c) readsb(a,d,
c)
#define ioread8_rep(a,
d, c) readsb(a, d,
c)
#define ioread16_rep(a,
d,c) readsw(a,d,
c)
#define ioread16_rep(a,
d, c) readsw(a, d,
c)
#define ioread32_rep(a,
d,c) readsl(a,d,
c)
#define ioread32_rep(a,
d, c) readsl(a, d,
c)
#define iowrite8_rep(a,
s,c) writesb(a,s,
c)
#define iowrite8_rep(a,
s, c) writesb(a, s,
c)
#define iowrite16_rep(a,
s,c) writesw(a,s,
c)
#define iowrite16_rep(a,
s, c) writesw(a, s,
c)
#define iowrite32_rep(a,
s,c) writesl(a,s,
c)
#define iowrite32_rep(a,
s, c) writesl(a, s,
c)
#define ioread8(
X) readb(X
)
#define ioread8(
x) readb(x
)
#define ioread16(
X) readw(X
)
#define ioread16(
x) readw(x
)
#define ioread32(
X) readl(X
)
#define ioread32(
x) readl(x
)
#define iowrite8(val,
X) writeb(val,X
)
#define iowrite8(val,
x) writeb(val, x
)
#define iowrite16(val,
X) writew(val,X
)
#define iowrite16(val,
x) writew(val, x
)
#define iowrite32(val,
X) writel(val,X
)
#define iowrite32(val,
x) writel(val, x
)
#define mmiowb() wmb()
#define mmiowb() wmb()
...
...
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