diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-09-28 22:14:36 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-09-28 22:14:36 +0000 |
commit | ac8974a8de51edc4a7838f60167f279ffe4da0b9 (patch) | |
tree | 95026edc8f122d449b80e72d52fb684b9f5506c3 /sys/arch/mvme88k/dev/vme.c | |
parent | 71b6b72592a47df0b36c753bb3aaa6ecf29d2cd6 (diff) |
Clean various MVME188 related routines, fixing typos and removing unnecessary
diagnostic code in the process.
Diffstat (limited to 'sys/arch/mvme88k/dev/vme.c')
-rw-r--r-- | sys/arch/mvme88k/dev/vme.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/sys/arch/mvme88k/dev/vme.c b/sys/arch/mvme88k/dev/vme.c index 952ad59f815..c404f19efe5 100644 --- a/sys/arch/mvme88k/dev/vme.c +++ b/sys/arch/mvme88k/dev/vme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vme.c,v 1.20 2003/06/04 04:11:37 deraadt Exp $ */ +/* $OpenBSD: vme.c,v 1.21 2003/09/28 22:14:33 miod Exp $ */ /* * Copyright (c) 1999 Steve Murphree, Jr. * Copyright (c) 1995 Theo de Raadt @@ -290,11 +290,9 @@ vmeattach(parent, self, args) struct vmesoftc *sc = (struct vmesoftc *)self; struct confargs *ca = args; - /* XXX any initialization to do? */ - sc->sc_vaddr = ca->ca_vaddr; - vmebustype = ca->ca_bustype; + switch (ca->ca_bustype) { #if NPCCTWO > 0 case BUS_PCCTWO: @@ -309,9 +307,12 @@ vmeattach(parent, self, args) } vmevecbase = VME2_GET_VBR1(vme2) + 0x10; scon = (vme2->vme2_tctl & VME2_TCTL_SCON); - printf(": vector base 0x%x, %ssystem controller\n", vmevecbase, scon ? "" : "not "); + printf(": vector base 0x%x", vmevecbase); + if (scon != 0) + printf(", system controller"); if (scon) sys_vme2 = vme2; + printf("\n"); vme2chip_init(sc); } break; @@ -319,17 +320,19 @@ vmeattach(parent, self, args) #if NSYSCON > 0 case BUS_SYSCON: { - char sconc; + u_int8_t sconc; vmevecbase = 0x80; /* Hard coded for MVME188 */ - sconc = *(char *)GLOBAL1; - sconc &= M188_SYSCON; - printf(": %ssystem controller\n", sconc ? "" : "not "); + sconc = *(volatile u_int8_t *)GLOBAL1; + if (ISSET(sconc, M188_SYSCON)) + printf(": system controller"); + printf("\n"); vmesyscon_init(sc); } break; #endif } + while (config_found(self, NULL, NULL)) ; } |