summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-04-14 23:06:58 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-04-14 23:06:58 +0000
commitbbd4ab335233392f9aa44698987914cbca58b209 (patch)
treefa77c94aba6f4b9917caf8384a80c4857e518901
parentaefbfbb71a98f6b004b674c56c023bcd8866bc97 (diff)
If resetting a MVME188 which is not system controller, only trigger a local
reset.
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 228e1c0de1c..7015e83ac35 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.137 2004/04/14 13:43:48 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.138 2004/04/14 23:06:57 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -1054,12 +1054,12 @@ haltsys:
doboot();
}
- for (;;); /* to keep compiler happy, and me from going crazy */
+ for (;;);
/*NOTREACHED*/
}
#ifdef MVME188
-void
+__dead void
m188_reset()
{
volatile int cnt;
@@ -1068,11 +1068,23 @@ m188_reset()
*sys_syscon->ien1 = 0;
*sys_syscon->ien2 = 0;
*sys_syscon->ien3 = 0;
- *sys_syscon->glbres = 1; /* system reset */
+
+ if (*sys_syscon->global1 & M188_SYSCONNEG) {
+ /* Force only a local reset */
+ *sys_syscon->global1 |= M188_LRST;
+ } else {
+ /* Force a complete VMEbus reset */
+ *sys_syscon->glbres = 1;
+ }
+
*sys_syscon->ucsr |= 0x2000; /* clear SYSFAIL* */
for (cnt = 0; cnt < 5*1024*1024; cnt++)
;
*sys_syscon->ucsr |= 0x2000; /* clear SYSFAIL* */
+
+ printf("reset failed\n");
+ for (;;); /* just in case we survived... */
+ /* NOTREACHED */
}
#endif /* MVME188 */