summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-07-23 22:19:10 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-07-23 22:19:10 +0000
commit77c7f8c6621a37fb1ac72643013168aabda238a9 (patch)
tree50dc5f2ac4ebd006197fe6021e46b6eda237331b /sys
parent6801d61f6c11648460fa87829f55c3497bc8fb4a (diff)
Eventually get the MVME188 reset sequence to work, and allow it to return
to the BUG instead of spinning if our reset fails.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mvme88k/dev/vme.c6
-rw-r--r--sys/arch/mvme88k/include/mvme188.h10
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c14
3 files changed, 11 insertions, 19 deletions
diff --git a/sys/arch/mvme88k/dev/vme.c b/sys/arch/mvme88k/dev/vme.c
index 650aacee8ae..5f61cd87caa 100644
--- a/sys/arch/mvme88k/dev/vme.c
+++ b/sys/arch/mvme88k/dev/vme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vme.c,v 1.36 2004/05/07 18:10:28 miod Exp $ */
+/* $OpenBSD: vme.c,v 1.37 2004/07/23 22:19:07 miod Exp $ */
/*
* Copyright (c) 2004, Miodrag Vallat.
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -285,8 +285,8 @@ vmeattach(parent, self, args)
u_int8_t sconc;
vmevecbase = 0x80; /* Hard coded for MVME188 */
- sconc = *(volatile u_int8_t *)GLOBAL1;
- if (!ISSET(sconc, M188_SYSCONNEG))
+ sconc = *(volatile u_int8_t *)GLB1;
+ if (ISSET(sconc, M188_SYSCON))
printf(": system controller");
printf("\n");
diff --git a/sys/arch/mvme88k/include/mvme188.h b/sys/arch/mvme88k/include/mvme188.h
index 646c0ab7eb7..605507923c2 100644
--- a/sys/arch/mvme88k/include/mvme188.h
+++ b/sys/arch/mvme88k/include/mvme188.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mvme188.h,v 1.17 2004/04/26 12:34:05 miod Exp $ */
+/* $OpenBSD: mvme188.h,v 1.18 2004/07/23 22:19:09 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* All rights reserved.
@@ -97,16 +97,12 @@
#define MVME188_GLBRES 0xFFF8700C /* 188 global reset reg */
#define GCSR_BASE 0xfff86000
-#define GLOBAL0 GCSR_BASE + 0x01
-#define GLOBAL1 GCSR_BASE + 0x03
-#define GLOBAL2 GCSR_BASE + 0x05
-#define GLOBAL3 GCSR_BASE + 0x07
#define GLB0 0xfff86001
#define GLB1 0xfff86003
#define GLB2 0xfff86005
#define GLB3 0xfff86007
#define M188_LRST 0x00000080
-#define M188_SYSCONNEG 0x00000040
+#define M188_SYSCON 0x00000040
#define UCSR_REG 0xfff87000
#define GLBRES_REG 0xfff8700C
@@ -371,5 +367,3 @@ extern unsigned int *volatile int_mask_reg[MAX_CPUS];
#define M188_IVEC 0x40 /* vector returned upon MVME188 int */
#endif /* __MACHINE_MVME188_H__ */
-
-
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 1ac6cce9b11..af335572b2a 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.144 2004/06/23 03:58:30 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.145 2004/07/23 22:19:09 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -1082,7 +1082,7 @@ haltsys:
}
#ifdef MVME188
-__dead void
+void
m188_reset()
{
volatile int cnt;
@@ -1092,12 +1092,12 @@ m188_reset()
*(volatile u_int32_t *)IEN2_REG = 0;
*(volatile u_int32_t *)IEN3_REG = 0;
- if ((*(volatile u_int8_t *)GLB1) & M188_SYSCONNEG) {
- /* Force only a local reset */
- *(volatile u_int8_t *)GLB1 |= M188_LRST;
- } else {
+ if ((*(volatile u_int8_t *)GLB1) & M188_SYSCON) {
/* Force a complete VMEbus reset */
*(volatile u_int32_t *)GLBRES_REG = 1;
+ } else {
+ /* Force only a local reset */
+ *(volatile u_int8_t *)GLB1 |= M188_LRST;
}
*(volatile u_int32_t *)UCSR_REG |= 0x2000; /* clear SYSFAIL */
@@ -1106,8 +1106,6 @@ m188_reset()
*(volatile u_int32_t *)UCSR_REG |= 0x2000; /* clear SYSFAIL */
printf("reset failed\n");
- for (;;);
- /* NOTREACHED */
}
#endif /* MVME188 */