diff options
author | nyan <nyan@FreeBSD.org> | 2000-01-17 12:38:51 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2000-01-17 12:38:51 +0000 |
commit | 311a0979c91fe59ae360829ef2c29b5ded394fcf (patch) | |
tree | 0f00f31a0bbf6788256c2e76a0d5e2fca9dc24d6 | |
parent | f8387c55613c8419ee3055f12819471ee098b38b (diff) | |
download | FreeBSD-src-311a0979c91fe59ae360829ef2c29b5ded394fcf.zip FreeBSD-src-311a0979c91fe59ae360829ef2c29b5ded394fcf.tar.gz |
Use rman_get_bustag and rman_get_bushandle to initialize bus tag and
bus handle.
-rw-r--r-- | sys/dev/ahb/ahb.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ahb/ahb.c b/sys/dev/ahb/ahb.c index 4b432a9..2b8efcb 100644 --- a/sys/dev/ahb/ahb.c +++ b/sys/dev/ahb/ahb.c @@ -75,7 +75,7 @@ bus_space_write_4((ahb)->tag, (ahb)->bsh, port, value) static const char *ahbmatch(eisa_id_t type); -static struct ahb_softc *ahballoc(u_long unit, u_int iobase); +static struct ahb_softc *ahballoc(u_long unit, struct resource *res); static void ahbfree(struct ahb_softc *ahb); static int ahbreset(struct ahb_softc *ahb); static void ahbmapecbs(void *arg, bus_dma_segment_t *segs, @@ -277,7 +277,7 @@ ahbattach(device_t dev) return ENOMEM; } - if ((ahb = ahballoc(device_get_unit(dev), rman_get_start(io))) == NULL) { + if ((ahb = ahballoc(device_get_unit(dev), io)) == NULL) { goto error_exit2; } @@ -391,7 +391,7 @@ error_exit2: } static struct ahb_softc * -ahballoc(u_long unit, u_int iobase) +ahballoc(u_long unit, struct resource *res) { struct ahb_softc *ahb; @@ -407,8 +407,8 @@ ahballoc(u_long unit, u_int iobase) SLIST_INIT(&ahb->free_ecbs); LIST_INIT(&ahb->pending_ccbs); ahb->unit = unit; - ahb->tag = I386_BUS_SPACE_IO; - ahb->bsh = iobase; + ahb->tag = rman_get_bustag(res); + ahb->bsh = rman_get_bushandle(res); ahb->disc_permitted = ~0; ahb->tags_permitted = ~0; |