diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-04-24 19:51:50 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-04-24 19:51:50 +0000 |
commit | 915c9097dfba70544f63ef9ade9d5057a9309f73 (patch) | |
tree | 6ca709504e608d4dcf774401f54ec8d6d23610c1 /sys/arch/mvme88k/dev/memc.c | |
parent | ec053ecdd6fe18ab575f9b48eeebce50e5d161cf (diff) |
Preliminary switch to an mvme88k bus_space world. Not all drivers have been
converted yet, and they rely upon some linear mappings provided by bus_space.
In order to not impact performance, almost all the bus_space accesses go
through macros and inline functions. This currently restricts us to D16 and
D32 access modes, which are selected at compilation time. Since there are no
plans to support D8 vme devices in the future, this is acceptable for now.
This makes the "len" locator for vme devices go away, and allows to simplify
some code which was using the pcctwo device, and will now directly access
hardware which is known to exist, rather than wait until the device is
attached.
While there, try to enforce more interrupt vector number checks, since these
changes pointed out that dart(4) had been working correctly so far by sheer
luck only.
Diffstat (limited to 'sys/arch/mvme88k/dev/memc.c')
-rw-r--r-- | sys/arch/mvme88k/dev/memc.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/arch/mvme88k/dev/memc.c b/sys/arch/mvme88k/dev/memc.c index 866a6925457..822585dbfa6 100644 --- a/sys/arch/mvme88k/dev/memc.c +++ b/sys/arch/mvme88k/dev/memc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: memc.c,v 1.9 2004/01/14 20:50:48 miod Exp $ */ +/* $OpenBSD: memc.c,v 1.10 2004/04/24 19:51:48 miod Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -52,7 +52,6 @@ struct memcsoftc { struct device sc_dev; - void * sc_vaddr; struct memcreg *sc_memc; struct intrhand sc_ih; }; @@ -68,7 +67,9 @@ struct cfdriver memc_cd = { NULL, "memc", DV_DULL }; -/*int memcintr(struct frame *frame);*/ +#if 0 +int memcintr(struct frame *frame); +#endif int memcmatch(parent, vcf, args) @@ -76,7 +77,7 @@ memcmatch(parent, vcf, args) void *vcf, *args; { struct confargs *ca = args; - struct memcreg *memc = (struct memcreg *)ca->ca_vaddr; + struct memcreg *memc = (struct memcreg *)ca->ca_paddr; if (badvaddr((vaddr_t)memc, 4)) return (0); @@ -93,11 +94,7 @@ memcattach(parent, self, args) struct confargs *ca = args; struct memcsoftc *sc = (struct memcsoftc *)self; - /* - * since we know ourself to land in intiobase land, - * we must adjust our address - */ - sc->sc_memc = (struct memcreg *)ca->ca_vaddr; + sc->sc_memc = (struct memcreg *)ca->ca_paddr; printf(": %s rev %d", (sc->sc_memc->memc_chipid == MEMC_CHIPID) ? "MEMC040" : "MCECC", |