Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/dev/pci Pull up revision 1.4 (requested by ad):



details:   https://anonhg.NetBSD.org/src/rev/30169b9e7e1d
branches:  netbsd-1-4
changeset: 470089:30169b9e7e1d
user:      he <he%NetBSD.org@localhost>
date:      Tue Jan 18 20:05:21 2000 +0000

description:
Pull up revision 1.4 (requested by ad):
  Fix register offset problem to make EISA boards work correctly.

diffstat:

 sys/dev/pci/dpt_pci.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (44 lines):

diff -r c279aee98290 -r 30169b9e7e1d sys/dev/pci/dpt_pci.c
--- a/sys/dev/pci/dpt_pci.c     Tue Jan 18 20:04:59 2000 +0000
+++ b/sys/dev/pci/dpt_pci.c     Tue Jan 18 20:05:21 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dpt_pci.c,v 1.3.2.2 2000/01/17 18:35:41 he Exp $       */
+/*     $NetBSD: dpt_pci.c,v 1.3.2.3 2000/01/18 20:05:21 he Exp $       */
 
 /*
  * Copyright (c) 1999 Andy Doran <ad%NetBSD.org@localhost>
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dpt_pci.c,v 1.3.2.2 2000/01/17 18:35:41 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dpt_pci.c,v 1.3.2.3 2000/01/18 20:05:21 he Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -89,6 +89,7 @@
        struct dpt_softc *sc;
        pci_chipset_tag_t pc;
        pci_intr_handle_t ih;
+       bus_space_handle_t ioh;
        const char *intrstr;
        pcireg_t csr;
 
@@ -98,10 +99,16 @@
        printf(": ");
 
        if (pci_mapreg_map(pa, PCI_CBIO, PCI_MAPREG_TYPE_IO, 0, &sc->sc_iot, 
-           &sc->sc_ioh, NULL, NULL)) {
+           &ioh, NULL, NULL)) {
                printf("can't map i/o space\n");
                return;
        }
+       
+       /* Need to map in by 16 registers */
+       if (bus_space_subregion(sc->sc_iot, ioh, 16, 16, &sc->sc_ioh)) {
+               printf("can't map i/o subregion\n");
+               return;
+       }
 
        sc->sc_dmat = pa->pa_dmat;
 



Home | Main Index | Thread Index | Old Index