diff options
author | briggs <briggs@cvs.openbsd.org> | 1997-04-21 00:58:15 +0000 |
---|---|---|
committer | briggs <briggs@cvs.openbsd.org> | 1997-04-21 00:58:15 +0000 |
commit | eff1611021761f8ebc37c1258da5104ba58b3ea7 (patch) | |
tree | 72e90a6d3e5d64fdcee5823fb3575d30cb40fc3e /sys | |
parent | be3bb329b26489f2c9aa7be22132c24c5a7c3f4b (diff) |
Take care when accessing DAFB--some quadra-class machines use other video
controllers.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mac68k/dev/grf_iv.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/arch/mac68k/dev/grf_iv.c b/sys/arch/mac68k/dev/grf_iv.c index 07a3d2943f6..8082cf0113c 100644 --- a/sys/arch/mac68k/dev/grf_iv.c +++ b/sys/arch/mac68k/dev/grf_iv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: grf_iv.c,v 1.14 1997/03/30 22:44:03 briggs Exp $ */ +/* $OpenBSD: grf_iv.c,v 1.15 1997/04/21 00:58:14 briggs Exp $ */ /* $NetBSD: grf_iv.c,v 1.17 1997/02/20 00:23:27 scottr Exp $ */ /* @@ -89,16 +89,25 @@ grfiv_match(parent, vcf, aux) found = 1; switch (current_mac_model->class) { - case MACH_CLASSQ: - case MACH_CLASSQ2: + case MACH_CLASSQ: + case MACH_CLASSQ2: - /* Assume DAFB for all of these */ + /* + * Assume DAFB for all of these, unless we can't + * access the memory. + */ if (bus_space_map(oa->oa_tag, QUADRA_DAFB_BASE, 0x1000, 0, &bsh)) { panic("failed to map space for DAFB regs.\n"); } + if (bus_probe(oa->oa_tag, bsh, 0x1C, 4) == 0) { + bus_space_unmap(oa->oa_tag, bsh, 0x1000); + found = 0; + goto nodafb; + } + sense = (bus_space_read_4(oa->oa_tag, bsh, 0x1C) & 7); if (sense == 0) @@ -121,6 +130,7 @@ grfiv_match(parent, vcf, aux) break; default: +nodafb: if (mac68k_vidlog == 0) { found = 0; } |