summaryrefslogtreecommitdiff
path: root/sys/arch/mvme68k/stand/libbug/m88k/diskwr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/mvme68k/stand/libbug/m88k/diskwr.c')
-rw-r--r--sys/arch/mvme68k/stand/libbug/m88k/diskwr.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/arch/mvme68k/stand/libbug/m88k/diskwr.c b/sys/arch/mvme68k/stand/libbug/m88k/diskwr.c
new file mode 100644
index 00000000000..681f521b5b0
--- /dev/null
+++ b/sys/arch/mvme68k/stand/libbug/m88k/diskwr.c
@@ -0,0 +1,19 @@
+/*
+ * bug routines -- assumes that the necessary sections of memory
+ * are preserved.
+ */
+#include <sys/types.h>
+#include <machine/prom.h>
+
+/* returns 0: success, nonzero: error */
+int
+mvmeprom_diskwr(arg)
+ struct mvmeprom_dskio *arg;
+{
+ int ret;
+
+ asm volatile ("or r2,r0,%0": : "r" (arg) );
+ MVMEPROM_CALL(MVMEPROM_DSKWR);
+ asm volatile ("or %0,r0,r2" : "=r" (ret));
+ return (!(ret & 0x4));
+}