aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/io.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-20 18:44:37 +0100
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-20 18:44:37 +0100
commit09f0551d20ddf6d22c333adcc59f2b1148734273 (patch)
tree321c877843fc24ef6047225569a66479d9d6269b /include/asm-arm/io.h
parent[PATCH] ARM: Remove nmi_tick() from Integrator. (diff)
downloadlinux-dev-09f0551d20ddf6d22c333adcc59f2b1148734273.tar.xz
linux-dev-09f0551d20ddf6d22c333adcc59f2b1148734273.zip
[PATCH] ARM: Add iomap support for ARM
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/io.h')
-rw-r--r--include/asm-arm/io.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h
index 658ffa384fda..08a46302d265 100644
--- a/include/asm-arm/io.h
+++ b/include/asm-arm/io.h
@@ -273,6 +273,33 @@ extern void __iounmap(void __iomem *addr);
#endif
/*
+ * io{read,write}{8,16,32} macros
+ */
+#define ioread8(p) ({ unsigned int __v = __raw_readb(p); __v; })
+#define ioread16(p) ({ unsigned int __v = le16_to_cpu(__raw_readw(p)); __v; })
+#define ioread32(p) ({ unsigned int __v = le32_to_cpu(__raw_readl(p)); __v; })
+
+#define iowrite8(v,p) __raw_writeb(v, p)
+#define iowrite16(v,p) __raw_writew(cpu_to_le16(v), p)
+#define iowrite32(v,p) __raw_writel(cpu_to_le32(v), p)
+
+#define ioread8_rep(p,d,c) __raw_readsb(p,d,c)
+#define ioread16_rep(p,d,c) __raw_readsw(p,d,c)
+#define ioread32_rep(p,d,c) __raw_readsl(p,d,c)
+
+#define iowrite8_rep(p,s,c) __raw_writesb(p,s,c)
+#define iowrite16_rep(p,s,c) __raw_writesw(p,s,c)
+#define iowrite32_rep(p,s,c) __raw_writesl(p,s,c)
+
+extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
+extern void ioport_unmap(void __iomem *addr);
+
+struct pci_dev;
+
+extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen);
+extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr);
+
+/*
* can the hardware map this into one segment or not, given no other
* constraints.
*/