summaryrefslogtreecommitdiff
path: root/sys/arch/mvme68k/dev
diff options
context:
space:
mode:
authorSteve Murphree <smurph@cvs.openbsd.org>2000-01-27 03:06:51 +0000
committerSteve Murphree <smurph@cvs.openbsd.org>2000-01-27 03:06:51 +0000
commite0fab236ad2f6d9d848013d5908022305be293cb (patch)
tree57d4703b4782532f3782d0310e18a14964a15363 /sys/arch/mvme68k/dev
parent3b31991164bc68875542c67e354951b47b5ec8b6 (diff)
Fix for boards with only one zs chip.
Diffstat (limited to 'sys/arch/mvme68k/dev')
-rw-r--r--sys/arch/mvme68k/dev/zs.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/sys/arch/mvme68k/dev/zs.c b/sys/arch/mvme68k/dev/zs.c
index 228b0b718c2..764d5e6e023 100644
--- a/sys/arch/mvme68k/dev/zs.c
+++ b/sys/arch/mvme68k/dev/zs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zs.c,v 1.5 1996/06/11 10:17:40 deraadt Exp $ */
+/* $OpenBSD: zs.c,v 1.6 2000/01/27 03:06:50 smurph Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -164,8 +164,23 @@ zsmatch(parent, vcf, args)
{
struct cfdata *cf = vcf;
struct confargs *ca = args;
-
- return (!badvaddr(ca->ca_vaddr, 1));
+ unsigned char *zstest = (unsigned char *)ca->ca_vaddr;
+ /*
+ * If zs1 is in the config, we must test to see if it really exists.
+ * Some 162s only have one scc device, but the memory location for
+ * the second scc still checks valid and every byte contains 0xFF. So
+ * this is what we test with for now. XXX - smurph
+ */
+ if (!badvaddr(ca->ca_vaddr, 1))
+ if (*zstest != 0xFF)
+ return(0);
+ else
+ return(1);
+ else
+ return(0);
+#if 0
+ return (!badvaddr(ca->ca_vaddr, 1));
+#endif
}
void