diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-03-01 22:43:00 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1997-03-01 22:43:00 +0000 |
commit | 0d7e7e791f8519f6f1796ebbf983fb9fc148e3dc (patch) | |
tree | 55eb4f7839b517c42b0df8285453607c0e571624 /sys/dev/isa | |
parent | 610eb1c7f44940e4216929754047de049ad3fe06 (diff) |
Corrected ISA memory mapping errors that caused PCMCIA to be broken.
Thanks to Angelos who helped my debug this.
Diffstat (limited to 'sys/dev/isa')
-rw-r--r-- | sys/dev/isa/pcmcia_isa.c | 8 | ||||
-rw-r--r-- | sys/dev/isa/pcmcia_pcic.c | 12 |
2 files changed, 9 insertions, 11 deletions
diff --git a/sys/dev/isa/pcmcia_isa.c b/sys/dev/isa/pcmcia_isa.c index 746cd52bcf2..6c6592d910e 100644 --- a/sys/dev/isa/pcmcia_isa.c +++ b/sys/dev/isa/pcmcia_isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcmcia_isa.c,v 1.9 1996/11/29 22:55:05 niklas Exp $ */ +/* $OpenBSD: pcmcia_isa.c,v 1.10 1997/03/01 22:42:57 niklas Exp $ */ /* * Copyright (c) 1995,1996 John T. Kohl. All rights reserved. * Copyright (c) 1994 Stefan Grefen. All rights reserved. @@ -86,18 +86,14 @@ pcmcia_isa_init(parent, cf, aux, pca, flag) int flag; { struct pcmciabus_attach_args *pa = aux; - bus_space_handle_t memh; #ifdef PCMCIA_ISA_DEBUG if (parent != NULL) printf("PARENT %s\n", parent->dv_xname); #endif if (flag == 0) { /* match */ - if (bus_space_map(pa->pba_memt, pa->pba_maddr, pa->pba_msize, - 0, &memh)) - return 0; pca->scratch_memsiz = pa->pba_msize; - pca->scratch_memh = memh; + pca->scratch_memh = pa->pba_memh; pca->pa_memt = pa->pba_memt; #ifdef PCMCIA_ISA_DEBUG printf("pbaaddr %p maddr %x msize %x\n", diff --git a/sys/dev/isa/pcmcia_pcic.c b/sys/dev/isa/pcmcia_pcic.c index 48fedcf166a..ae2361468b7 100644 --- a/sys/dev/isa/pcmcia_pcic.c +++ b/sys/dev/isa/pcmcia_pcic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcmcia_pcic.c,v 1.13 1997/01/26 11:00:07 niklas Exp $ */ +/* $OpenBSD: pcmcia_pcic.c,v 1.14 1997/03/01 22:42:58 niklas Exp $ */ /* * Copyright (c) 1995, 1996 John T. Kohl @@ -246,7 +246,7 @@ pcic_probe(parent, self, aux) void *aux; { struct pcic_softc *pcic = self; - struct pcicmaster_softc *pcicm = (struct pcicmaster_softc *) parent; + struct pcicmaster_softc *pcicm = (struct pcicmaster_softc *)parent; struct pcic_attach_args *pia = aux; u_int chip_inf = 0, ochip_inf = 0; int first = 1; @@ -279,7 +279,7 @@ pcic_probe(parent, self, aux) */ pcic->sc_ioh = pia->pia_ioh; pcic->sc_iot = pia->pia_iot; - pcic->sc_iot = pia->pia_memt; + pcic->sc_memt = pia->pia_memt; pcic->sc_adapter.nslots = 0; maxslot = 2; for (i = j = 0; i < maxslot; i++) { @@ -335,8 +335,9 @@ ok: } } if (pcic->sc_adapter.nslots != 0) { - if (bus_space_map(pia->pia_memt, pia->pia_maddr, - pia->pia_msize, 0, &pcic->sc_memh)) + if (bus_space_map(pia->pia_memt, + pcic->sc_dev.dv_cfdata->cf_loc[1], + pcic->sc_dev.dv_cfdata->cf_loc[2], 0, &pcic->sc_memh)) return 0; return 1; } @@ -438,6 +439,7 @@ pcic_attach(parent, self, aux) */ pba.pba_iot = pia->pia_iot; pba.pba_memt = pia->pia_memt; + pba.pba_memh = pcic->sc_memh; pba.pba_maddr = pia->pia_maddr; pba.pba_msize = pia->pia_msize; pba.pba_aux = &pcic->sc_adapter; |