diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-12-08 00:21:01 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-12-08 00:21:01 +0000 |
commit | a92da5c62c369c891657c866ae655e835e619b1b (patch) | |
tree | dc969867b8b6715fb4be99f7ce144cfaec2f5d7c /sys/arch/alpha/isa/mcclock_isa.c | |
parent | a67276bead2aa835bc93c17180c2109635ba693c (diff) |
Merge to NetBSD 961107, i.e. mostly new bus.h
Diffstat (limited to 'sys/arch/alpha/isa/mcclock_isa.c')
-rw-r--r-- | sys/arch/alpha/isa/mcclock_isa.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/sys/arch/alpha/isa/mcclock_isa.c b/sys/arch/alpha/isa/mcclock_isa.c index 69ec713f3e4..ef6b8acc696 100644 --- a/sys/arch/alpha/isa/mcclock_isa.c +++ b/sys/arch/alpha/isa/mcclock_isa.c @@ -1,5 +1,5 @@ -/* $OpenBSD: mcclock_isa.c,v 1.4 1996/11/12 20:29:31 niklas Exp $ */ -/* $NetBSD: mcclock_isa.c,v 1.2 1996/04/17 22:22:46 cgd Exp $ */ +/* $OpenBSD: mcclock_isa.c,v 1.5 1996/12/08 00:20:27 niklas Exp $ */ +/* $NetBSD: mcclock_isa.c,v 1.3 1996/10/23 04:12:19 cgd Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -33,7 +33,7 @@ #include <sys/systm.h> #include <sys/device.h> -#include <machine/bus.old.h> +#include <machine/bus.h> #include <alpha/alpha/clockvar.h> #include <alpha/alpha/mcclockvar.h> @@ -43,8 +43,8 @@ struct mcclock_isa_softc { struct mcclock_softc sc_mcclock; - bus_chipset_tag_t sc_bc; - bus_io_handle_t sc_ioh; + bus_space_tag_t sc_iot; + bus_space_handle_t sc_ioh; }; int mcclock_isa_match __P((struct device *, void *, void *)); @@ -87,8 +87,9 @@ mcclock_isa_attach(parent, self, aux) struct isa_attach_args *ia = aux; struct mcclock_isa_softc *sc = (struct mcclock_isa_softc *)self; - sc->sc_bc = ia->ia_bc; - if (bus_io_map(sc->sc_bc, ia->ia_iobase, ia->ia_iosize, &sc->sc_ioh)) + sc->sc_iot = ia->ia_iot; + if (bus_space_map(sc->sc_iot, ia->ia_iobase, ia->ia_iosize, 0, + &sc->sc_ioh)) panic("mcclock_isa_attach: couldn't map clock I/O space"); mcclock_attach(&sc->sc_mcclock, &mcclock_isa_busfns); @@ -100,11 +101,11 @@ mcclock_isa_write(mcsc, reg, datum) u_int reg, datum; { struct mcclock_isa_softc *sc = (struct mcclock_isa_softc *)mcsc; - bus_chipset_tag_t bc = sc->sc_bc; - bus_io_handle_t ioh = sc->sc_ioh; + bus_space_tag_t iot = sc->sc_iot; + bus_space_handle_t ioh = sc->sc_ioh; - bus_io_write_1(bc, ioh, 0, reg); - bus_io_write_1(bc, ioh, 1, datum); + bus_space_write_1(iot, ioh, 0, reg); + bus_space_write_1(iot, ioh, 1, datum); } u_int @@ -113,9 +114,9 @@ mcclock_isa_read(mcsc, reg) u_int reg; { struct mcclock_isa_softc *sc = (struct mcclock_isa_softc *)mcsc; - bus_chipset_tag_t bc = sc->sc_bc; - bus_io_handle_t ioh = sc->sc_ioh; + bus_space_tag_t iot = sc->sc_iot; + bus_space_handle_t ioh = sc->sc_ioh; - bus_io_write_1(bc, ioh, 0, reg); - return bus_io_read_1(bc, ioh, 1); + bus_space_write_1(iot, ioh, 0, reg); + return bus_space_read_1(iot, ioh, 1); } |