summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/dev/nvram.c
diff options
context:
space:
mode:
authorSteve Murphree <smurph@cvs.openbsd.org>2001-12-19 07:04:43 +0000
committerSteve Murphree <smurph@cvs.openbsd.org>2001-12-19 07:04:43 +0000
commit8130d56a7bb2e09e2c8b782f3f4a54133a0bb161 (patch)
tree1dd36d374c7d72391551b03ca96630523b33efe7 /sys/arch/mvme88k/dev/nvram.c
parent0941b7f1f3dcc38dc20d2613943aa615d5b3c25b (diff)
Introduce brdtyp and change what cputyp means.
Diffstat (limited to 'sys/arch/mvme88k/dev/nvram.c')
-rw-r--r--sys/arch/mvme88k/dev/nvram.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/sys/arch/mvme88k/dev/nvram.c b/sys/arch/mvme88k/dev/nvram.c
index 814c635c214..f537cfbc9c4 100644
--- a/sys/arch/mvme88k/dev/nvram.c
+++ b/sys/arch/mvme88k/dev/nvram.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nvram.c,v 1.15 2001/12/16 23:49:46 miod Exp $ */
+/* $OpenBSD: nvram.c,v 1.16 2001/12/19 07:04:41 smurph Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -102,13 +102,7 @@ nvrammatch(parent, vcf, args)
#if 0
bugrtcrd(&rtc);
- ret = badvaddr(IIOV(ca->ca_vaddr), 1);
- if (ret != 0)
- ret = badvaddr(IIOV(ca->ca_vaddr), 2);
- if (ret != 0)
- ret = badvaddr(IIOV(ca->ca_vaddr), 4);
-
- if (ret != 0) {
+ if (badvaddr(IIOV(ca->ca_vaddr), 1)) {
printf("==> nvram: address 0x%x failed check\n", ca->ca_vaddr);
return (0);
} else
@@ -130,7 +124,7 @@ nvramattach(parent, self, args)
sc->sc_paddr = ca->ca_paddr;
sc->sc_vaddr = ca->ca_vaddr;
- if (cputyp == CPU_188) {
+ if (brdtyp == BRD_188) {
sc->sc_len = MK48T02_SIZE;
} else {
sc->sc_len = MK48T08_SIZE;
@@ -142,7 +136,7 @@ nvramattach(parent, self, args)
/*X*/ if (sc->sc_vaddr == NULL)
/*X*/ panic("failed to map!");
- if (cputyp != CPU_188) {
+ if (brdtyp != BRD_188) {
sc->sc_regs = (void *)(sc->sc_vaddr + sc->sc_len -
sizeof(struct clockreg));
} else {
@@ -322,7 +316,7 @@ inittodr(base)
base = 21*SECYR + 186*SECDAY + SECDAY/2;
badbase = 1;
}
- if (cputyp != CPU_188) {
+ if (brdtyp != BRD_188) {
register struct clockreg *cl = (struct clockreg *)sc->sc_regs;
cl->cl_csr |= CLK_READ; /* enable read (stop time) */
sec = cl->cl_sec;
@@ -378,7 +372,7 @@ void resettodr()
{
struct nvramsoftc *sc = (struct nvramsoftc *) nvram_cd.cd_devs[0];
struct chiptime c;
- if (cputyp != CPU_188) {
+ if (brdtyp != BRD_188) {
register struct clockreg *cl = (struct clockreg *)sc->sc_regs;
if (!time.tv_sec || cl == NULL)