patch-2.2.18 linux/include/asm-arm/io.h

Next file: linux/include/asm-arm/ioc.h
Previous file: linux/include/asm-arm/hardware.h
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/include/asm-arm/io.h linux/include/asm-arm/io.h
@@ -16,22 +16,14 @@
 
 #ifdef __KERNEL__
 
+#include <linux/types.h>
+
 #ifndef NULL
 #define NULL	((void *) 0)
 #endif
 
-extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
-
-/*
- * String version of IO memory access ops:
- */
-extern void _memcpy_fromio(void *, unsigned long, unsigned long);
-extern void _memcpy_toio(unsigned long, const void *, unsigned long);
-extern void _memset_io(unsigned long, int, unsigned long);
-
-#define memcpy_fromio(to,from,len)	_memcpy_fromio((to),(unsigned long)(from),(len))
-#define memcpy_toio(to,from,len)	_memcpy_toio((unsigned long)(to),(from),(len))
-#define memset_io(addr,c,len)		_memset_io((unsigned long)(addr),(c),(len))
+extern void * __ioremap(unsigned long offset, size_t size, unsigned long flags);
+extern void __iounmap(void *addr);
 
 #endif
 
@@ -191,18 +183,44 @@
 
 #endif
 
-#ifndef ARCH_READWRITE
-
 /* for panic */
 #include <linux/kernel.h>
 
+#ifndef readb
 #define readb(p)	(panic("readb called, but not implemented"),0)
+#endif
+#ifndef readw
 #define readw(p)	(panic("readw called, but not implemented"),0)
+#endif
+#ifndef readl
 #define readl(p)	(panic("readl called, but not implemented"),0)
+#endif
+#ifndef writeb
 #define writeb(v,p)	panic("writeb called, but not implemented")
+#endif
+#ifndef writew
 #define writew(v,p)	panic("writew called, but not implemented")
+#endif
+#ifndef writel
 #define writel(v,p)	panic("writel called, but not implemented")
+#endif
+
+/*
+ * String version of IO memory access ops:
+ */
+#ifndef memcpy_fromio
+extern void _memcpy_fromio(void *, unsigned long, unsigned long);
+#define memcpy_fromio(to,from,len)	_memcpy_fromio((to),(unsigned long)(from),(len))
+#endif
+
+#ifndef memcpy_toio
+extern void _memcpy_toio(unsigned long, const void *, unsigned long);
+#define memcpy_toio(to,from,len)	_memcpy_toio((unsigned long)(to),(from),(len))
+#endif
 
+#ifndef memset_io
+extern void _memset_io(unsigned long, int, unsigned long);
+#define memset_io(addr,c,len)		_memset_io((unsigned long)(addr),(c),(len))
 #endif
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)