diff mbox

sh: Provide in/out{b,w,l}

Message ID 1296630315-21264-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com (mailing list archive)
State Rejected
Headers show

Commit Message

Nobuhiro Iwamatsu Feb. 2, 2011, 7:05 a.m. UTC
None
diff mbox

Patch

diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
index 28c5aa5..408d3ed 100644
--- a/arch/sh/include/asm/io.h
+++ b/arch/sh/include/asm/io.h
@@ -69,6 +69,43 @@ 
 #define writesw(p,d,l)		__raw_writesw(p,d,l)
 #define writesl(p,d,l)		__raw_writesl(p,d,l)
 
+static inline u8 inb(unsigned long addr)
+{
+	return __raw_readb(addr);
+}
+
+static inline u16 inw(unsigned long addr)
+{
+	return __raw_readw(addr);
+}
+
+static inline u32 inl(unsigned long addr)
+{
+	return __raw_readl(addr);
+}
+
+static inline void outb(u8 b, unsigned long addr)
+{
+	__raw_writeb(b, addr);
+}
+
+static inline void outw(u16 b, unsigned long addr)
+{
+	__raw_writew(b, addr);
+}
+
+static inline void outl(u32 b, unsigned long addr)
+{
+	__raw_writel(b, addr);
+}
+
+#define inb_p(addr)		readb_relaxed(addr)
+#define inw_p(addr)		readw_relaxed(addr)
+#define inl_p(addr)		readl_relaxed(addr)
+#define outb_p(x, addr)	writeb_relaxed((x), (addr))
+#define outw_p(x, addr)	writew_relaxed((x), (addr))
+#define outl_p(x, addr)	writel_relaxed((x), (addr))
+
 #define __BUILD_UNCACHED_IO(bwlq, type)					\
 static inline type read##bwlq##_uncached(unsigned long addr)		\
 {									\