-/* $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.
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",
-/* $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
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;
*/
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++) {
}
}
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;
}
*/
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;
-/* $Id: pcmciavar.h,v 1.3 1996/11/28 23:28:17 niklas Exp $ */
+/* $Id: pcmciavar.h,v 1.4 1997/03/01 22:42:59 niklas Exp $ */
/*
* Copyright (c) 1995,1996 John T. Kohl. All rights reserved.
* Copyright (c) 1993, 1994 Stefan Grefen. All rights reserved.
struct pcmciabus_attach_args {
bus_space_tag_t pba_iot;
bus_space_tag_t pba_memt;
+ bus_space_tag_t pba_memh;
int pba_maddr;
int pba_msize;
void *pba_aux; /* driver specific */