patch-2.1.9 linux/include/asm-sparc/io.h

Next file: linux/include/asm-sparc/ioctl.h
Previous file: linux/include/asm-sparc/idprom.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.8/linux/include/asm-sparc/io.h linux/include/asm-sparc/io.h
@@ -1,4 +1,4 @@
-/* $Id: io.h,v 1.8 1995/11/25 02:31:50 davem Exp $ */
+/* $Id: io.h,v 1.10 1996/08/29 09:48:14 davem Exp $ */
 #ifndef __SPARC_IO_H
 #define __SPARC_IO_H
 
@@ -14,42 +14,42 @@
  * space only works on sun4's
  */
 
-extern inline unsigned long inb_local(unsigned long addr)
+extern __inline__ unsigned long inb_local(unsigned long addr)
 {
 	return 0;
 }
 
-extern inline void outb_local(unsigned char b, unsigned long addr)
+extern __inline__ void outb_local(unsigned char b, unsigned long addr)
 {
 	return;
 }
 
-extern inline unsigned long inb(unsigned long addr)
+extern __inline__ unsigned long inb(unsigned long addr)
 {
 	return 0;
 }
 
-extern inline unsigned long inw(unsigned long addr)
+extern __inline__ unsigned long inw(unsigned long addr)
 {
 	return 0;
 }
 
-extern inline unsigned long inl(unsigned long addr)
+extern __inline__ unsigned long inl(unsigned long addr)
 {
 	return 0;
 }
 
-extern inline void outb(unsigned char b, unsigned long addr)
+extern __inline__ void outb(unsigned char b, unsigned long addr)
 {
 	return;
 }
 
-extern inline void outw(unsigned short b, unsigned long addr)
+extern __inline__ void outw(unsigned short b, unsigned long addr)
 {
 	return;
 }
 
-extern inline void outl(unsigned int b, unsigned long addr)
+extern __inline__ void outl(unsigned int b, unsigned long addr)
 {
 	return;
 }
@@ -57,32 +57,32 @@
 /*
  * Memory functions
  */
-extern inline unsigned long readb(unsigned long addr)
+extern __inline__ unsigned long readb(unsigned long addr)
 {
 	return 0;
 }
 
-extern inline unsigned long readw(unsigned long addr)
+extern __inline__ unsigned long readw(unsigned long addr)
 {
 	return 0;
 }
 
-extern inline unsigned long readl(unsigned long addr)
+extern __inline__ unsigned long readl(unsigned long addr)
 {
 	return 0;
 }
 
-extern inline void writeb(unsigned short b, unsigned long addr)
+extern __inline__ void writeb(unsigned short b, unsigned long addr)
 {
 	return;
 }
 
-extern inline void writew(unsigned short b, unsigned long addr)
+extern __inline__ void writew(unsigned short b, unsigned long addr)
 {
 	return;
 }
 
-extern inline void writel(unsigned int b, unsigned long addr)
+extern __inline__ void writel(unsigned int b, unsigned long addr)
 {
 	return;
 }
@@ -93,8 +93,8 @@
 extern void sun4c_mapioaddr(unsigned long, unsigned long, int bus_type, int rdonly);
 extern void srmmu_mapioaddr(unsigned long, unsigned long, int bus_type, int rdonly);
 
-extern inline void mapioaddr(unsigned long physaddr, unsigned long virt_addr,
-			     int bus, int rdonly)
+extern __inline__ void mapioaddr(unsigned long physaddr, unsigned long virt_addr,
+				 int bus, int rdonly)
 {
 	switch(sparc_cpu_model) {
 	case sun4c:
@@ -114,7 +114,29 @@
 	return;
 }
 
+extern void srmmu_unmapioaddr(unsigned long virt);
+extern void sun4c_unmapioaddr(unsigned long virt);
+
+extern __inline__ void unmapioaddr(unsigned long virt_addr)
+{
+	switch(sparc_cpu_model) {
+	case sun4c:
+		sun4c_unmapioaddr(virt_addr);
+		break;
+	case sun4m:
+	case sun4d:
+	case sun4e:
+		srmmu_unmapioaddr(virt_addr);
+		break;
+	default:
+		printk("unmapioaddr: sparc_cpu_model = %d, halt...\n", sparc_cpu_model);
+		halt();
+	};
+	return;
+}
+
 extern void *sparc_alloc_io (void *, void *, int, char *, int, int);
+extern void sparc_free_io (void *, int);
 extern void *sparc_dvma_malloc (int, char *);
 
 #endif /* !(__SPARC_IO_H) */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov