aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2013-09-03 14:15:42 -0400
committerWill Deacon <will.deacon@arm.com>2014-10-20 13:49:18 -0400
commit88a9192e216fef5f198f860d14e84f7e3c840ace (patch)
tree1ace513acb6670d63e45b8fa876ad32a34006f75 /arch/m68k/include
parentcb147c0f0b33f5ba37dfd07014f2973a53bc5d62 (diff)
m68k: io: implement dummy relaxed accessor macros for writes
write{b,w,l}_relaxed are implemented by some architectures in order to permit memory-mapped I/O accesses with weaker barrier semantics than the non-relaxed variants. This patch adds dummy macros for the write accessors to m68k, in the same vein as the dummy definitions for the relaxed read accessors. Additionally, the existing relaxed read accessors are moved into asm/io.h, so that they can be used by m68k targets with an MMU. Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/m68k/include')
-rw-r--r--arch/m68k/include/asm/io.h8
-rw-r--r--arch/m68k/include/asm/io_no.h4
2 files changed, 8 insertions, 4 deletions
diff --git a/arch/m68k/include/asm/io.h b/arch/m68k/include/asm/io.h
index c70cc9155003..bccd5a914eb6 100644
--- a/arch/m68k/include/asm/io.h
+++ b/arch/m68k/include/asm/io.h
@@ -3,3 +3,11 @@
3#else 3#else
4#include <asm/io_mm.h> 4#include <asm/io_mm.h>
5#endif 5#endif
6
7#define readb_relaxed(addr) readb(addr)
8#define readw_relaxed(addr) readw(addr)
9#define readl_relaxed(addr) readl(addr)
10
11#define writeb_relaxed(b, addr) writeb(b, addr)
12#define writew_relaxed(b, addr) writew(b, addr)
13#define writel_relaxed(b, addr) writel(b, addr)
diff --git a/arch/m68k/include/asm/io_no.h b/arch/m68k/include/asm/io_no.h
index be4b5a813ad4..a93c8cde4d38 100644
--- a/arch/m68k/include/asm/io_no.h
+++ b/arch/m68k/include/asm/io_no.h
@@ -40,10 +40,6 @@ static inline unsigned int _swapl(volatile unsigned long v)
40#define readl(addr) \ 40#define readl(addr) \
41 ({ unsigned int __v = (*(volatile unsigned int *) (addr)); __v; }) 41 ({ unsigned int __v = (*(volatile unsigned int *) (addr)); __v; })
42 42
43#define readb_relaxed(addr) readb(addr)
44#define readw_relaxed(addr) readw(addr)
45#define readl_relaxed(addr) readl(addr)
46
47#define writeb(b,addr) (void)((*(volatile unsigned char *) (addr)) = (b)) 43#define writeb(b,addr) (void)((*(volatile unsigned char *) (addr)) = (b))
48#define writew(b,addr) (void)((*(volatile unsigned short *) (addr)) = (b)) 44#define writew(b,addr) (void)((*(volatile unsigned short *) (addr)) = (b))
49#define writel(b,addr) (void)((*(volatile unsigned int *) (addr)) = (b)) 45#define writel(b,addr) (void)((*(volatile unsigned int *) (addr)) = (b))