Map port 0x84 (which is used to generate a 2.6us delay) in isaattach().
Since this port is needed by at least a few drivers, export its i/o handle via isa_attach_args.
This commit is contained in:
parent
0808320ac1
commit
6fb58044fd
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: isa.c,v 1.81 1996/04/29 20:03:24 christos Exp $ */
|
/* $NetBSD: isa.c,v 1.82 1996/05/05 01:14:07 thorpej Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1993, 1994 Charles Hannum. All rights reserved.
|
* Copyright (c) 1993, 1994 Charles Hannum. All rights reserved.
|
||||||
|
@ -84,6 +84,13 @@ isaattach(parent, self, aux)
|
||||||
sc->sc_bc = iba->iba_bc;
|
sc->sc_bc = iba->iba_bc;
|
||||||
sc->sc_ic = iba->iba_ic;
|
sc->sc_ic = iba->iba_ic;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Map port 0x84, which causes a 2.5us delay when read.
|
||||||
|
* We do this now, since several drivers need it.
|
||||||
|
*/
|
||||||
|
if (bus_io_map(sc->sc_bc, 0x84, 1, &sc->sc_delayioh))
|
||||||
|
panic("isaattach: can't map `delay port'"); /* XXX */
|
||||||
|
|
||||||
TAILQ_INIT(&sc->sc_subdevs);
|
TAILQ_INIT(&sc->sc_subdevs);
|
||||||
config_scan(isascan, self);
|
config_scan(isascan, self);
|
||||||
}
|
}
|
||||||
|
@ -131,6 +138,7 @@ isascan(parent, match)
|
||||||
ia.ia_msize = cf->cf_loc[3];
|
ia.ia_msize = cf->cf_loc[3];
|
||||||
ia.ia_irq = cf->cf_loc[4] == 2 ? 9 : cf->cf_loc[4];
|
ia.ia_irq = cf->cf_loc[4] == 2 ? 9 : cf->cf_loc[4];
|
||||||
ia.ia_drq = cf->cf_loc[5];
|
ia.ia_drq = cf->cf_loc[5];
|
||||||
|
ia.ia_delayioh = sc->sc_delayioh;
|
||||||
|
|
||||||
if ((*cf->cf_attach->ca_match)(parent, dev, &ia) > 0)
|
if ((*cf->cf_attach->ca_match)(parent, dev, &ia) > 0)
|
||||||
config_attach(parent, dev, &ia, isaprint);
|
config_attach(parent, dev, &ia, isaprint);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: isavar.h,v 1.21 1996/04/11 22:20:50 cgd Exp $ */
|
/* $NetBSD: isavar.h,v 1.22 1996/05/05 01:14:14 thorpej Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1995 Chris G. Demetriou
|
* Copyright (c) 1995 Chris G. Demetriou
|
||||||
|
@ -84,6 +84,8 @@ struct isa_attach_args {
|
||||||
int ia_maddr; /* physical i/o mem addr */
|
int ia_maddr; /* physical i/o mem addr */
|
||||||
u_int ia_msize; /* size of i/o memory */
|
u_int ia_msize; /* size of i/o memory */
|
||||||
void *ia_aux; /* driver specific */
|
void *ia_aux; /* driver specific */
|
||||||
|
|
||||||
|
bus_io_handle_t ia_delayioh; /* i/o handle for `delay port' */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define IOBASEUNK -1 /* i/o address is unknown */
|
#define IOBASEUNK -1 /* i/o address is unknown */
|
||||||
|
@ -110,6 +112,14 @@ struct isa_softc {
|
||||||
|
|
||||||
bus_chipset_tag_t sc_bc;
|
bus_chipset_tag_t sc_bc;
|
||||||
isa_chipset_tag_t sc_ic;
|
isa_chipset_tag_t sc_ic;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This i/o handle is used to map port 0x84, which is
|
||||||
|
* read to provide a 2.5us delay. This i/o handle
|
||||||
|
* is mapped in isaattach(), and exported to drivers
|
||||||
|
* via isa_attach_args.
|
||||||
|
*/
|
||||||
|
bus_io_handle_t sc_delayioh;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define cf_iobase cf_loc[0]
|
#define cf_iobase cf_loc[0]
|
||||||
|
|
Loading…
Reference in New Issue