diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-10 18:09:47 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-10 18:09:47 +0000 |
commit | 81a6500772fd6c94184bc3dc23e5e3ea4196f79b (patch) | |
tree | bb2ce01c07bc431be40c31f7e1eabece37fa102b /sys | |
parent | 52c8d97e79ce1a6eb91378e762263239e1c5c915 (diff) |
Use pci_mapreg_map() instead of pci_io_find() and pci_mapreg_map()
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/if_an_pci.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/dev/pci/if_an_pci.c b/sys/dev/pci/if_an_pci.c index 0d41060c631..1b8afa8e77b 100644 --- a/sys/dev/pci/if_an_pci.c +++ b/sys/dev/pci/if_an_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_an_pci.c,v 1.1 2000/04/10 13:55:01 millert Exp $ */ +/* $OpenBSD: if_an_pci.c,v 1.2 2000/04/10 18:09:46 millert Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -111,24 +111,18 @@ an_pci_attach(parent, self, aux) struct an_softc *sc = (struct an_softc *)self; struct pci_attach_args *pa = aux; pci_intr_handle_t ih; - bus_addr_t iobase; - bus_size_t iosize; bus_space_handle_t ioh; bus_space_tag_t iot = pa->pa_iot; pci_chipset_tag_t pc = pa->pa_pc; pcireg_t csr; const char *intrstr; - /* Map the I/O ports (note that non-standard location). */ - if (pci_io_find(pc, pa->pa_tag, AN_PCI_LOIO, &iobase, &iosize)) { - printf(": can't find I/O base\n"); - return; - } - if (bus_space_map(iot, iobase, iosize, 0, &ioh)) { + /* Map the I/O ports. */ + if (pci_mapreg_map(pa, AN_PCI_LOIO, PCI_MAPREG_TYPE_IO, 0, + &iot, &ioh, NULL, NULL) != 0) { printf(": can't map I/O space\n"); return; } - sc->an_btag = iot; sc->an_bhandle = ioh; |