summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc/io.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-04-29 21:13:14 +0000
committer <ralf@linux-mips.org>1997-04-29 21:13:14 +0000
commit19c9bba94152148523ba0f7ef7cffe3d45656b11 (patch)
tree40b1cb534496a7f1ca0f5c314a523c69f1fee464 /include/asm-sparc/io.h
parent7206675c40394c78a90e74812bbdbf8cf3cca1be (diff)
Import of Linux/MIPS 2.1.36
Diffstat (limited to 'include/asm-sparc/io.h')
-rw-r--r--include/asm-sparc/io.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h
index 88adf1621..b1fb5b30e 100644
--- a/include/asm-sparc/io.h
+++ b/include/asm-sparc/io.h
@@ -1,8 +1,9 @@
-/* $Id: io.h,v 1.10 1996/08/29 09:48:14 davem Exp $ */
+/* $Id: io.h,v 1.14 1997/04/10 05:13:22 davem Exp $ */
#ifndef __SPARC_IO_H
#define __SPARC_IO_H
#include <linux/kernel.h>
+#include <linux/types.h>
#include <asm/page.h> /* IO address mapping routines need this */
#include <asm/system.h>
@@ -135,8 +136,21 @@ extern __inline__ void unmapioaddr(unsigned long virt_addr)
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 *);
+extern void *sparc_alloc_io (u32 pa, void *va, int sz, char *name, u32 io, int rdonly);
+extern void sparc_free_io (void *vaddr, int sz);
+extern void *_sparc_dvma_malloc (int sz, char *name);
+
+/* Returns CPU visible address, dvmaaddr_p is a pointer to where
+ * the DVMA visible (ie. SBUS/PSYCO+PCI) address should be stored.
+ */
+static __inline__ void *sparc_dvma_malloc(int size, char *name, __u32 *dvmaaddr_p)
+{
+ void *cpuaddr = _sparc_dvma_malloc(size, name);
+ *dvmaaddr_p = (__u32) cpuaddr;
+ return cpuaddr;
+}
+
+#define virt_to_phys(x) __pa((unsigned long)(x))
+#define phys_to_virt(x) __va((unsigned long)(x))
#endif /* !(__SPARC_IO_H) */