patch-2.1.29 linux/include/asm-sparc64/io.h

Next file: linux/include/asm-sparc64/openprom.h
Previous file: linux/include/asm-sparc64/head.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.28/linux/include/asm-sparc64/io.h linux/include/asm-sparc64/io.h
@@ -1,4 +1,4 @@
-/* $Id: io.h,v 1.1 1996/12/26 13:25:21 davem Exp $ */
+/* $Id: io.h,v 1.3 1997/03/03 16:51:53 jj Exp $ */
 #ifndef __SPARC64_IO_H
 #define __SPARC64_IO_H
 
@@ -7,48 +7,18 @@
 #include <asm/page.h>      /* IO address mapping routines need this */
 #include <asm/system.h>
 
-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 void sparc_ultra_mapioaddr   (unsigned long physaddr, unsigned long virt_addr, int bus, int rdonly);
+extern void sparc_ultra_unmapioaddr (unsigned long virt_addr);
 
-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:
-		sun4c_mapioaddr(physaddr, virt_addr, bus, rdonly);
-		break;
-	case sun4m:
-	case sun4d:
-	case sun4e:
-		srmmu_mapioaddr(physaddr, virt_addr, bus, rdonly);
-		break;
-	default:
-		printk("mapioaddr: Trying to map IO space for unsupported machine.\n");
-		printk("mapioaddr: sparc_cpu_model = %d\n", sparc_cpu_model);
-		printk("mapioaddr: Halting...\n");
-		halt();
-	};
+	sparc_ultra_mapioaddr (physaddr, virt_addr, bus, rdonly);
 	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();
-	};
+	sparc_ultra_unmapioaddr (virt_addr);
 	return;
 }
 

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