diff options
| author | drochner <drochner@NetBSD.org> | 1998-06-12 18:45:48 +0000 |
|---|---|---|
| committer | drochner <drochner@NetBSD.org> | 1998-06-12 18:45:48 +0000 |
| commit | 08f2cdd7c4841e87bde5ee40e5b358b1499c4cb2 (patch) | |
| tree | 4e47470c05a1ad956f01d4185f91f9ee85ed2936 /sys/dev | |
| parent | 96840772f5204fec86e8af3bc2bf077c9621f2f5 (diff) | |
clean up vga_isa_match() - always return "2" on success to make the
driver win over "pcdisplay"
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/isa/vga_isa.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/sys/dev/isa/vga_isa.c b/sys/dev/isa/vga_isa.c index 57976dd7876..42cbd608899 100644 --- a/sys/dev/isa/vga_isa.c +++ b/sys/dev/isa/vga_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: vga_isa.c,v 1.2 1998/05/28 16:48:41 drochner Exp $ */ +/* $NetBSD: vga_isa.c,v 1.3 1998/06/12 18:45:48 drochner Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -65,27 +65,24 @@ vga_isa_match(parent, match, aux) void *aux; { struct isa_attach_args *ia = aux; - int rv; /* If values are hardwired to something that they can't be, punt. */ - if (ia->ia_iobase != IOBASEUNK || /* ia->ia_iosize != 0 || XXX isa.c */ - (ia->ia_maddr != MADDRUNK && ia->ia_maddr != 0xb8000) || - (ia->ia_msize != 0 && ia->ia_msize != 0x8000) || + if ((ia->ia_iobase != IOBASEUNK && ia->ia_iobase != 0x3b0) || + /* ia->ia_iosize != 0 || XXX isa.c */ + (ia->ia_maddr != MADDRUNK && ia->ia_maddr != 0xa0000) || + (ia->ia_msize != 0 && ia->ia_msize != 0x20000) || ia->ia_irq != IRQUNK || ia->ia_drq != DRQUNK) return (0); - if (vga_is_console(ia->ia_iot, WSDISPLAY_TYPE_ISAVGA)) - rv = 2; /* more than generic pcdisplay */ - else - rv = vga_common_probe(ia->ia_iot, ia->ia_memt); - - if (rv) { - ia->ia_iobase = 0x3b0; - ia->ia_iosize = 0x30; - ia->ia_maddr = 0xb8000; - ia->ia_msize = 0x8000; - } - return (rv); + if (!vga_is_console(ia->ia_iot, WSDISPLAY_TYPE_ISAVGA) && + !vga_common_probe(ia->ia_iot, ia->ia_memt)) + return (0); + + ia->ia_iobase = 0x3b0; /* XXX mono 0x3b0 color 0x3c0 */ + ia->ia_iosize = 0x30; /* XXX 0x20 */ + ia->ia_maddr = 0xa0000; + ia->ia_msize = 0x20000; + return (2); /* more than generic pcdisplay */ } void |
