summaryrefslogtreecommitdiff
path: root/driver/xf86-video-rendition/src/vos.h
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2006-11-26 20:10:27 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2006-11-26 20:10:27 +0000
commit40975f985debf42d3a04b105ff6316ee6546c619 (patch)
tree1d448c982171b33e84aed4418ab23288346b856f /driver/xf86-video-rendition/src/vos.h
parent2d353c9727ea483a971f991347bc3fe47f26a14d (diff)
Importing xf86-video-rendition 4.1.2
Diffstat (limited to 'driver/xf86-video-rendition/src/vos.h')
-rw-r--r--driver/xf86-video-rendition/src/vos.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/driver/xf86-video-rendition/src/vos.h b/driver/xf86-video-rendition/src/vos.h
new file mode 100644
index 000000000..e2ec54fcf
--- /dev/null
+++ b/driver/xf86-video-rendition/src/vos.h
@@ -0,0 +1,58 @@
+/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/vos.h,v 1.9 2002/01/25 21:56:07 tsi Exp $ */
+/*
+ * file vos.h
+ *
+ * layer to map operating system dependent system calls
+ */
+
+#ifndef __VOS_H__
+#define __VOS_H__
+
+
+/* Define IODEBUG if you need to debug out/in functions. <DI> */
+/* IODEBUG define is used in compiler.h. DON'T MOVE DOWN! */
+
+/* #define IODEBUG */
+
+/*
+ * includes
+ */
+
+#include "compiler.h"
+#include "vtypes.h"
+
+/*
+ * function prototypes
+ */
+#define /*void*/ verite_out8(/*IOADDRESS*/ port, /*vu8*/ data) \
+ outb(port, data)
+
+#define /*void*/ verite_out16(/*IOADDRESS*/ port, /*vu16*/ data) \
+ outw(port, data)
+
+#define /*void*/ verite_out32(/*IOADDRESS*/ port, /*vu32*/ data) \
+ outl(port, data)
+
+#define /*vu8*/ verite_in8(/*IOADDRESS*/ io_base) ((vu8)inb(io_base))
+#define /*vu16*/ verite_in16(/*IOADDRESS*/ io_base) ((vu16)inw(io_base))
+#define /*vu32*/ verite_in32(/*IOADDRESS*/ io_base) ((vu32)inl(io_base))
+
+/* memory accesses */
+#define verite_read_memory32(base, offset) MMIO_IN32(base, offset)
+#define verite_read_memory16(base, offset) MMIO_IN16(base, offset)
+#define verite_read_memory8(base, offset) MMIO_IN8(base, offset)
+#define verite_write_memory32(base, offset, data) MMIO_OUT32(base, offset, data)
+#define verite_write_memory16(base, offset, data) MMIO_OUT16(base, offset, data)
+#define verite_write_memory8(base, offset, data) MMIO_OUT8(base, offset, data)
+
+/* the rest of it */
+void verite_enableio(void);
+void verite_disableio(void);
+vu8 *verite_mapmemory(vu8 *membase, vu32 size);
+void verite_unmapmemory(vu8 *vmembase, vu32 size);
+
+#endif /* #ifndef _VOS_H_ */
+
+/*
+ * end of file vos.h
+ */