diff options
-rw-r--r-- | sys/dev/isa/isa.c | 6 | ||||
-rw-r--r-- | sys/dev/isa/isapnp.c | 32 | ||||
-rw-r--r-- | sys/dev/isa/isavar.h | 3 |
3 files changed, 38 insertions, 3 deletions
diff --git a/sys/dev/isa/isa.c b/sys/dev/isa/isa.c index f59a66d7952..73dd22b7a8f 100644 --- a/sys/dev/isa/isa.c +++ b/sys/dev/isa/isa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isa.c,v 1.34 1998/06/29 05:51:13 downsj Exp $ */ +/* $OpenBSD: isa.c,v 1.35 1998/07/28 13:26:48 csapuntz Exp $ */ /* $NetBSD: isa.c,v 1.85 1996/05/14 00:31:04 thorpej Exp $ */ /* @@ -123,6 +123,10 @@ isaattach(parent, self, aux) #endif /* NISADMA > 0 */ sc->sc_ic = iba->iba_ic; +#if NISAPNP > 0 + isapnp_isa_attach_hook(sc); +#endif + #if NISADMA > 0 /* * Map the registers used by the ISA DMA controller. diff --git a/sys/dev/isa/isapnp.c b/sys/dev/isa/isapnp.c index bdc7adb2336..ce9811e90ed 100644 --- a/sys/dev/isa/isapnp.c +++ b/sys/dev/isa/isapnp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isapnp.c,v 1.18 1998/06/02 18:23:33 deraadt Exp $ */ +/* $OpenBSD: isapnp.c,v 1.19 1998/07/28 13:26:50 csapuntz Exp $ */ /* $NetBSD: isapnp.c,v 1.9.4.3 1997/10/29 00:40:43 thorpej Exp $ */ /* @@ -792,6 +792,36 @@ isapnp_configure(sc, ipa) } +/* + * Some BIOSes take the liberty of configuring our ISA cards for us. + * + * Disable this so that ISA scan doesn't detect ISAPNP cards + * + */ + +void +isapnp_isa_attach_hook(isa_sc) + struct isa_softc *isa_sc; + +{ + struct isapnp_softc sc; + + sc.sc_iot = isa_sc->sc_iot; + sc.sc_ncards = 0; + + if (isapnp_map(&sc)) + return; + + printf ("isapnp: putting PNP cards to sleep\n"); + + isapnp_init(&sc); + + isapnp_write_reg(&sc, ISAPNP_CONFIG_CONTROL, ISAPNP_CC_RESET_DRV); + DELAY(2000); + + isapnp_unmap(&sc); +} + /* isapnp_match(): * Probe routine */ diff --git a/sys/dev/isa/isavar.h b/sys/dev/isa/isavar.h index 3cbfd104aa4..7e9afcc8afd 100644 --- a/sys/dev/isa/isavar.h +++ b/sys/dev/isa/isavar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: isavar.h,v 1.28 1998/04/26 21:02:48 provos Exp $ */ +/* $OpenBSD: isavar.h,v 1.29 1998/07/28 13:26:51 csapuntz Exp $ */ /* $NetBSD: isavar.h,v 1.26 1997/06/06 23:43:57 thorpej Exp $ */ /*- @@ -443,6 +443,7 @@ int isapnp_config __P((bus_space_tag_t, bus_space_tag_t, void isapnp_unconfig __P((bus_space_tag_t, bus_space_tag_t, struct isa_attach_args *)); +void isapnp_isa_attach_hook __P((struct isa_softc *)); #ifdef DEBUG_ISAPNP void isapnp_print_mem __P((const char *, const struct isapnp_region *)); void isapnp_print_io __P((const char *, const struct isapnp_region *)); |