mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] asm-generic: add IO memory accessors
@ 2014-05-13 18:38 Franck Jullien
  2014-05-13 18:38 ` [PATCH 2/3] driver/net: fix bus endianess access in ethoc.c Franck Jullien
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Franck Jullien @ 2014-05-13 18:38 UTC (permalink / raw)
  To: barebox

Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
---
 include/asm-generic/io.h |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 3f0f5a2..8d83d68 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -219,4 +219,16 @@ static inline void writesb(const void __iomem *addr, const void *buf, int len)
 	outsb(addr - PCI_IOBASE, buf, len);
 }
 
+#define ioread8(addr)		readb(addr)
+#define ioread16(addr)		readw(addr)
+#define ioread16be(addr)	__be16_to_cpu(__raw_readw(addr))
+#define ioread32(addr)		readl(addr)
+#define ioread32be(addr)	__be32_to_cpu(__raw_readl(addr))
+
+#define iowrite8(v, addr)	writeb((v), (addr))
+#define iowrite16(v, addr)	writew((v), (addr))
+#define iowrite16be(v, addr)	__raw_writew(__cpu_to_be16(v), addr)
+#define iowrite32(v, addr)	writel((v), (addr))
+#define iowrite32be(v, addr)	__raw_writel(__cpu_to_be32(v), addr)
+
 #endif /* __ASM_GENERIC_IO_H */
-- 
1.7.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-05-14  7:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-13 18:38 [PATCH 1/3] asm-generic: add IO memory accessors Franck Jullien
2014-05-13 18:38 ` [PATCH 2/3] driver/net: fix bus endianess access in ethoc.c Franck Jullien
2014-05-13 18:38 ` [PATCH 3/3] drivers/net/ethoc: add mdio bus support Franck Jullien
2014-05-14  7:10   ` Sascha Hauer
2014-05-14  7:05 ` [PATCH 1/3] asm-generic: add IO memory accessors Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox