Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amiga/dev Register a shutdown handler that switches...
details: https://anonhg.NetBSD.org/src/rev/e14069d84398
branches: trunk
changeset: 521281:e14069d84398
user: is <is%NetBSD.org@localhost>
date: Sun Jan 27 14:39:28 2002 +0000
description:
Register a shutdown handler that switches off interupts.
diffstat:
sys/arch/amiga/dev/ioblix_zbus.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diffs (42 lines):
diff -r ba9d9952f61d -r e14069d84398 sys/arch/amiga/dev/ioblix_zbus.c
--- a/sys/arch/amiga/dev/ioblix_zbus.c Sun Jan 27 14:32:21 2002 +0000
+++ b/sys/arch/amiga/dev/ioblix_zbus.c Sun Jan 27 14:39:28 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ioblix_zbus.c,v 1.4 2002/01/26 13:40:57 aymeric Exp $ */
+/* $NetBSD: ioblix_zbus.c,v 1.5 2002/01/27 14:39:28 is Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -66,6 +66,7 @@
int iobzmatch(struct device *, struct cfdata *, void *);
void iobzattach(struct device *, struct device *, void *);
int iobzprint(void *auxp, const char *);
+void iobz_shutdown(void *);
struct cfattach iobl_zbus_ca = {
sizeof(struct iobz_softc), iobzmatch, iobzattach
@@ -141,6 +142,7 @@
}
p = (volatile u_int8_t *)zap->va + 2;
+ (void)shutdownhook_establish(iobz_shutdown, (void *)p);
*p = ((*p) & 0x1F) | 0x80;
}
@@ -158,3 +160,16 @@
return(UNCONF);
}
+
+/*
+ * Disable board interupts at shutdown time.
+ */
+
+void
+iobz_shutdown(void *p) {
+ volatile int8_t *q;
+
+ q = p;
+
+ *q &= 0x1F;
+}
Home |
Main Index |
Thread Index |
Old Index