Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/arch/mac68k/obio Pull up revision 1.46 (requested b...
details: https://anonhg.NetBSD.org/src/rev/75bd832606d0
branches: netbsd-1-5
changeset: 490406:75bd832606d0
user: he <he%NetBSD.org@localhost>
date: Fri Dec 15 06:03:51 2000 +0000
description:
Pull up revision 1.46 (requested by scottr):
Map only the register space of the DAFB required to set up the
video hardware. Fixes PR#11000.
diffstat:
sys/arch/mac68k/obio/grf_obio.c | 32 +++++++++++++++++++-------------
1 files changed, 19 insertions(+), 13 deletions(-)
diffs (71 lines):
diff -r 7bd523cd360d -r 75bd832606d0 sys/arch/mac68k/obio/grf_obio.c
--- a/sys/arch/mac68k/obio/grf_obio.c Fri Dec 15 05:57:56 2000 +0000
+++ b/sys/arch/mac68k/obio/grf_obio.c Fri Dec 15 06:03:51 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_obio.c,v 1.44.4.1 2000/08/06 02:08:05 briggs Exp $ */
+/* $NetBSD: grf_obio.c,v 1.44.4.2 2000/12/15 06:03:51 he Exp $ */
/*
* Copyright (C) 1998 Scott Reynolds
@@ -142,27 +142,33 @@
*/
base = DAFB_CONTROL_BASE;
- if (bus_space_map(oa->oa_tag, base, 0x1000, 0, &bsh))
+ if (bus_space_map(oa->oa_tag, base, 0x20, 0, &bsh))
return 0;
if (mac68k_bus_space_probe(oa->oa_tag, bsh, 0x1c, 4) == 0) {
- bus_space_unmap(oa->oa_tag, bsh, 0x1000);
+ bus_space_unmap(oa->oa_tag, bsh, 0x20);
return 0;
}
- /* Set "Turbo SCSI" configuration to default */
- bus_space_write_4(oa->oa_tag, bsh, 0x24, 0x1d1); /* ch0 */
- bus_space_write_4(oa->oa_tag, bsh, 0x28, 0x1d1); /* ch1 */
+ bus_space_unmap(oa->oa_tag, bsh, 0x20);
+
+ if (bus_space_map(oa->oa_tag, base + 0x100, 0x20, 0, &bsh))
+ return 0;
+
+ if (mac68k_bus_space_probe(oa->oa_tag, bsh, 0x04, 4) == 0) {
+ bus_space_unmap(oa->oa_tag, bsh, 0x20);
+ return 0;
+ }
/* Disable interrupts */
- bus_space_write_4(oa->oa_tag, bsh, 0x104, 0);
+ bus_space_write_4(oa->oa_tag, bsh, 0x04, 0);
/* Clear any interrupts */
- bus_space_write_4(oa->oa_tag, bsh, 0x10C, 0);
- bus_space_write_4(oa->oa_tag, bsh, 0x110, 0);
- bus_space_write_4(oa->oa_tag, bsh, 0x114, 0);
+ bus_space_write_4(oa->oa_tag, bsh, 0x0C, 0);
+ bus_space_write_4(oa->oa_tag, bsh, 0x10, 0);
+ bus_space_write_4(oa->oa_tag, bsh, 0x14, 0);
- bus_space_unmap(oa->oa_tag, bsh, 0x1000);
+ bus_space_unmap(oa->oa_tag, bsh, 0x20);
break;
case MACH_CLASSAV:
base = CIVIC_CONTROL_BASE;
@@ -229,7 +235,7 @@
case MACH_CLASSQ:
base = DAFB_CONTROL_BASE;
sc->sc_tag = oa->oa_tag;
- if (bus_space_map(sc->sc_tag, base, 0x1000, 0, &sc->sc_regh)) {
+ if (bus_space_map(sc->sc_tag, base, 0x20, 0, &sc->sc_regh)) {
printf(": failed to map DAFB register space\n");
return;
}
@@ -265,7 +271,7 @@
sc->sc_basepa + sc->sc_fbofs,
(bus_space_read_4(sc->sc_tag, sc->sc_regh, 0x1c) & 0x7));
- bus_space_unmap(sc->sc_tag, sc->sc_regh, 0x1000);
+ bus_space_unmap(sc->sc_tag, sc->sc_regh, 0x20);
break;
case MACH_CLASSAV:
sc->sc_basepa = CIVIC_BASE;
Home |
Main Index |
Thread Index |
Old Index