summaryrefslogtreecommitdiffstats
path: root/include/asm-alpha/io.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-02-15 02:15:32 +0000
commit86464aed71025541805e7b1515541aee89879e33 (patch)
treee01a457a4912a8553bc65524aa3125d51f29f810 /include/asm-alpha/io.h
parent88f99939ecc6a95a79614574cb7d95ffccfc3466 (diff)
Merge with Linux 2.2.1.
Diffstat (limited to 'include/asm-alpha/io.h')
-rw-r--r--include/asm-alpha/io.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/include/asm-alpha/io.h b/include/asm-alpha/io.h
index 51d2af596..3074ba8fb 100644
--- a/include/asm-alpha/io.h
+++ b/include/asm-alpha/io.h
@@ -3,7 +3,6 @@
#include <linux/config.h>
#include <asm/system.h>
-#include <asm/machvec.h>
/* We don't use IO slowdowns on the Alpha, but.. */
#define __SLOW_DOWN_IO do { } while (0)
@@ -19,6 +18,7 @@
#endif
#ifdef __KERNEL__
+#include <asm/machvec.h>
/*
* We try to avoid hae updates (thus the cache), but when we
@@ -78,6 +78,7 @@ extern void _sethae (unsigned long addr); /* cached version */
* There are different chipsets to interface the Alpha CPUs to the world.
*/
+#ifdef __KERNEL__
#ifdef CONFIG_ALPHA_GENERIC
/* In a generic kernel, we always go through the machine vector. */
@@ -140,6 +141,8 @@ extern void _sethae (unsigned long addr); /* cached version */
# include <asm/core_tsunami.h>
#elif defined(CONFIG_ALPHA_JENSEN)
# include <asm/jensen.h>
+#elif defined(CONFIG_ALPHA_RX164)
+# include <asm/core_polaris.h>
#else
#error "What system is this?"
#endif
@@ -147,6 +150,7 @@ extern void _sethae (unsigned long addr); /* cached version */
#undef __WANT_IO_DEF
#endif /* GENERIC */
+#endif /* __KERNEL__ */
/*
* The convention used for inb/outb etc. is that names starting with
@@ -172,6 +176,7 @@ extern void _writew(unsigned short b, unsigned long addr);
extern void _writel(unsigned int b, unsigned long addr);
extern void _writeq(unsigned long b, unsigned long addr);
+#ifdef __KERNEL__
/*
* The platform header files may define some of these macros to use
* the inlined versions where appropriate. These macros may also be
@@ -216,6 +221,27 @@ extern void _writeq(unsigned long b, unsigned long addr);
# define outl_p outl
#endif
+#else
+
+/* Userspace declarations. */
+
+extern unsigned int inb (unsigned long port);
+extern unsigned int inw (unsigned long port);
+extern unsigned int inl (unsigned long port);
+extern void outb (unsigned char b,unsigned long port);
+extern void outw (unsigned short w,unsigned long port);
+extern void outl (unsigned int l,unsigned long port);
+extern unsigned long readb(unsigned long addr);
+extern unsigned long readw(unsigned long addr);
+extern unsigned long readl(unsigned long addr);
+extern void writeb(unsigned char b, unsigned long addr);
+extern void writew(unsigned short b, unsigned long addr);
+extern void writel(unsigned int b, unsigned long addr);
+
+#endif /* __KERNEL__ */
+
+#ifdef __KERNEL__
+
/*
* The "address" in IO memory space is not clearly either an integer or a
* pointer. We will accept both, thus the casts.
@@ -257,8 +283,6 @@ static inline void iounmap(void *addr)
# define writeq(v,a) _writeq((v),(unsigned long)(a))
#endif
-#ifdef __KERNEL__
-
/*
* String version of IO memory access ops:
*/