Oops, revert previous; it included some other changes there weren't

meant to be checked in.
This commit is contained in:
thorpej 2001-12-16 22:32:07 +00:00
parent b45e326520
commit 87e8f0c761
1 changed files with 20 additions and 46 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: pcdisplay.c,v 1.13 2001/12/16 22:30:26 thorpej Exp $ */
/* $NetBSD: pcdisplay.c,v 1.14 2001/12/16 22:32:07 thorpej Exp $ */
/*
* Copyright (c) 1998
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pcdisplay.c,v 1.13 2001/12/16 22:30:26 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: pcdisplay.c,v 1.14 2001/12/16 22:32:07 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -235,57 +235,33 @@ pcdisplay_match(parent, match, aux)
struct isa_attach_args *ia = aux;
int mono;
if (ISA_DIRECT_CONFIG(ia))
return (0);
/* If values are hardwired to something that they can't be, punt. */
if (ia->ia_nio < 1 ||
(ia->ia_io[0].ir_addr != ISACF_PORT_DEFAULT &&
ia->ia_io[0].ir_addr != 0x3d0 &&
ia->ia_io[0].ir_addr != 0x3b0))
return (0);
if (ia->ia_niomem < 1 ||
(ia->ia_iomem[0].ir_addr != ISACF_IOMEM_DEFAULT &&
ia->ia_iomem[0].ir_addr != 0xb8000 &&
ia->ia_iomem[0].ir_addr != 0xb0000))
return (0);
if (ia->ia_iomem[0].ir_size != 0 &&
ia->ia_iomem[0].ir_size != 0x8000)
return (0);
if (ia->ia_nirq > 0 &&
ia->ia_irq[0].ir_irq != ISACF_IRQ_DEFAULT)
return (0);
if (ia->ia_ndrq > 0 &&
ia->ia_drq[0].ir_drq != ISACF_DRQ_DEFAULT)
if ((ia->ia_iobase != IOBASEUNK &&
ia->ia_iobase != 0x3d0 &&
ia->ia_iobase != 0x3b0) ||
/* ia->ia_iosize != 0 || XXX isa.c */
(ia->ia_maddr != MADDRUNK &&
ia->ia_maddr != 0xb8000 &&
ia->ia_maddr != 0xb0000) ||
(ia->ia_msize != 0 && ia->ia_msize != 0x8000) ||
ia->ia_irq != IRQUNK || ia->ia_drq != DRQUNK)
return (0);
if (pcdisplay_is_console(ia->ia_iot))
mono = pcdisplay_console_dc.mono;
else if (ia->ia_io[0].ir_addr != 0x3b0 &&
ia->ia_iomem[0].ir_addr != 0xb0000 &&
else if (ia->ia_iobase != 0x3b0 && ia->ia_maddr != 0xb0000 &&
pcdisplay_probe_col(ia->ia_iot, ia->ia_memt))
mono = 0;
else if (ia->ia_io[0].ir_addr != 0x3d0 &&
ia->ia_iomem[0].ir_addr != 0xb8000 &&
else if (ia->ia_iobase != 0x3d0 && ia->ia_maddr != 0xb8000 &&
pcdisplay_probe_mono(ia->ia_iot, ia->ia_memt))
mono = 1;
else
return (0);
ia->ia_nio = 1;
ia->ia_io[0].ir_addr = mono ? 0x3b0 : 0x3d0;
ia->ia_io[0].ir_size = 0x10;
ia->ia_niomem = 1;
ia->ia_iomem[0].ir_size = mono ? 0xb0000 : 0xb8000;
ia->ia_iomem[0].ir_size = 0x8000;
ia->ia_nirq = 0;
ia->ia_ndrq = 0;
ia->ia_iobase = mono ? 0x3b0 : 0x3d0;
ia->ia_iosize = 0x10;
ia->ia_maddr = mono ? 0xb0000 : 0xb8000;
ia->ia_msize = 0x8000;
return (1);
}
@ -311,12 +287,10 @@ pcdisplay_attach(parent, self, aux)
} else {
dc = malloc(sizeof(struct pcdisplay_config),
M_DEVBUF, M_WAITOK);
if (ia->ia_io[0].ir_addr != 0x3b0 &&
ia->ia_iomem[0].ir_addr != 0xb0000 &&
if (ia->ia_iobase != 0x3b0 && ia->ia_maddr != 0xb0000 &&
pcdisplay_probe_col(ia->ia_iot, ia->ia_memt))
pcdisplay_init(dc, ia->ia_iot, ia->ia_memt, 0);
else if (ia->ia_io[0].ir_addr != 0x3d0 &&
ia->ia_iomem[0].ir_addr != 0xb8000 &&
else if (ia->ia_iobase != 0x3d0 && ia->ia_maddr != 0xb8000 &&
pcdisplay_probe_mono(ia->ia_iot, ia->ia_memt))
pcdisplay_init(dc, ia->ia_iot, ia->ia_memt, 1);
else
@ -333,7 +307,7 @@ pcdisplay_attach(parent, self, aux)
sc->sc_weasel.wh_st = dc->dc_ph.ph_memt;
sc->sc_weasel.wh_sh = dc->dc_ph.ph_memh;
sc->sc_weasel.wh_parent = &sc->sc_dev;
weasel_isa_init(&sc->sc_weasel);
weasel_init(&sc->sc_weasel);
}
#endif /* NPCWEASEL > 0 */