diff options
Diffstat (limited to 'sys/dev/pci/bha_pci.c')
-rw-r--r-- | sys/dev/pci/bha_pci.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sys/dev/pci/bha_pci.c b/sys/dev/pci/bha_pci.c index c17be5f3985..03a9f859ec1 100644 --- a/sys/dev/pci/bha_pci.c +++ b/sys/dev/pci/bha_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bha_pci.c,v 1.5 2003/02/28 15:14:08 mickey Exp $ */ +/* $OpenBSD: bha_pci.c,v 1.6 2003/02/28 15:26:23 mickey Exp $ */ /* $NetBSD: bha_pci.c,v 1.16 1998/08/15 10:10:53 mycroft Exp $ */ /*- @@ -79,8 +79,6 @@ bha_pci_match(parent, match, aux) void *match, *aux; { struct pci_attach_args *pa = aux; - pci_chipset_tag_t pc = pa->pa_pc; - pcireg_t csr; bus_space_tag_t iot; bus_space_handle_t ioh; bus_size_t iosize; @@ -94,10 +92,6 @@ bha_pci_match(parent, match, aux) NULL, &iosize, 0)) return (0); - csr = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); - pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, - csr | PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_IO_ENABLE); - rv = bha_find(iot, ioh, NULL); bus_space_unmap(iot, ioh, iosize); @@ -136,10 +130,6 @@ bha_pci_attach(parent, self, aux) return; } - csr = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); - pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, - csr | PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_IO_ENABLE); - sc->sc_iot = iot; sc->sc_ioh = ioh; sc->sc_dmat = pa->pa_dmat; @@ -151,6 +141,10 @@ bha_pci_attach(parent, self, aux) sc->sc_dmaflags = 0; + csr = pci_conf_read(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); + pci_conf_write(pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, + csr | PCI_COMMAND_MASTER_ENABLE | PCI_COMMAND_IO_ENABLE); + if (pci_intr_map(pa, &ih)) { printf(": couldn't map interrupt\n"); bus_space_unmap(iot, ioh, iosize); |