aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/io.h
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-06-03 09:49:28 +0000
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-06-03 09:49:28 +0000
commit9703899a941e2a937dd7db885e324deb607e1c95 (patch)
treed1ececcd935c2fd21782c79b482a0ca3c7e02041 /xen/include/asm-x86/io.h
parent75c3a203651fb38a406d3da5092dcecdf0ad6fb1 (diff)
downloadxen-9703899a941e2a937dd7db885e324deb607e1c95.tar.gz
xen-9703899a941e2a937dd7db885e324deb607e1c95.tar.bz2
xen-9703899a941e2a937dd7db885e324deb607e1c95.zip
bitkeeper revision 1.1660 (42a027a8dd_EUm7b7XhKL_lNM4H_Rg)
Add support for memory-mapped ns16550 uart. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/include/asm-x86/io.h')
-rw-r--r--xen/include/asm-x86/io.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/xen/include/asm-x86/io.h b/xen/include/asm-x86/io.h
index 2d92fc9234..2b733e4e86 100644
--- a/xen/include/asm-x86/io.h
+++ b/xen/include/asm-x86/io.h
@@ -54,6 +54,15 @@ static inline void * phys_to_virt(unsigned long address)
#define page_to_pfn(_page) ((unsigned long)((_page) - frame_table))
#define page_to_virt(_page) phys_to_virt(page_to_phys(_page))
+/* We don't need real ioremap() on Xen/x86. */
+#define ioremap(x,l) (__va(x))
+
+#define readb(x) (*(volatile char *)(x))
+#define readw(x) (*(volatile short *)(x))
+#define readl(x) (*(volatile int *)(x))
+#define writeb(d,x) (*(volatile char *)(x) = (d))
+#define writew(d,x) (*(volatile short *)(x) = (d))
+#define writel(d,x) (*(volatile int *)(x) = (d))
/*
* IO bus memory addresses are also 1:1 with the physical address