Changed pci_config_read() to pci_map_port(). Pointed out by Doug Rabson.

This commit is contained in:
n_hibma 1999-04-11 14:24:20 +00:00
parent d209accdca
commit 60e587adbf
2 changed files with 10 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* FreeBSD $Id: uhci_pci.c,v 1.3 1999/03/27 23:08:43 n_hibma Exp $ */
/* FreeBSD $Id: uhci_pci.c,v 1.4 1999/04/06 23:09:58 n_hibma Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -141,7 +141,10 @@ uhci_pci_attach(pcici_t config_id, int unit)
}
memset(sc, 0, sizeof(uhci_softc_t));
sc->sc_iobase = pci_conf_read(config_id, PCI_UHCI_BASE_REG) & 0xffe0;
if ( !pci_map_port(config_id, PCI_UHCI_BASE_REG, &sc->sc_iobase) ) {
printf("uhci%d: could not map port\n", unit);
return;
}
if ( !pci_map_int(config_id, (pci_inthand_t *)uhci_intr,
(void *) sc, &bio_imask)) {

View File

@ -1,4 +1,4 @@
/* FreeBSD $Id: uhci_pci.c,v 1.3 1999/03/27 23:08:43 n_hibma Exp $ */
/* FreeBSD $Id: uhci_pci.c,v 1.4 1999/04/06 23:09:58 n_hibma Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -141,7 +141,10 @@ uhci_pci_attach(pcici_t config_id, int unit)
}
memset(sc, 0, sizeof(uhci_softc_t));
sc->sc_iobase = pci_conf_read(config_id, PCI_UHCI_BASE_REG) & 0xffe0;
if ( !pci_map_port(config_id, PCI_UHCI_BASE_REG, &sc->sc_iobase) ) {
printf("uhci%d: could not map port\n", unit);
return;
}
if ( !pci_map_int(config_id, (pci_inthand_t *)uhci_intr,
(void *) sc, &bio_imask)) {