Force the probe to find the internal video for the 63x/575 models.

This commit is contained in:
briggs 1997-11-08 04:12:52 +00:00
parent e968859def
commit 527e5cbc44
2 changed files with 32 additions and 18 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_iv.c,v 1.25 1997/10/08 19:54:04 briggs Exp $ */ /* $NetBSD: grf_iv.c,v 1.26 1997/11/08 04:12:52 briggs Exp $ */
/* /*
* Copyright (c) 1995 Allen Briggs. All rights reserved. * Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -84,19 +84,19 @@ grfiv_match(parent, cf, aux)
struct obio_attach_args *oa = (struct obio_attach_args *)aux; struct obio_attach_args *oa = (struct obio_attach_args *)aux;
bus_space_handle_t bsh; bus_space_handle_t bsh;
int found, sense; int found, sense;
u_int base;
found = 1; found = 1;
switch (current_mac_model->class) { switch (current_mac_model->class) {
case MACH_CLASSQ: case MACH_CLASSQ:
case MACH_CLASSQ2:
/* /*
* Assume DAFB for all of these, unless we can't * Assume DAFB for all of these, unless we can't
* access the memory. * access the memory.
*/ */
base = QUADRA_DAFB_BASE;
if (bus_space_map(oa->oa_tag, QUADRA_DAFB_BASE, 0x1000, if (bus_space_map(oa->oa_tag, base, 0x1000, 0, &bsh)) {
0, &bsh)) {
panic("failed to map space for DAFB regs.\n"); panic("failed to map space for DAFB regs.\n");
} }
@ -127,15 +127,20 @@ grfiv_match(parent, cf, aux)
break; break;
case MACH_CLASSAV: case MACH_CLASSAV:
if (bus_space_map(oa->oa_tag, CIVIC_CONTROL_BASE, 0x1000, base = CIVIC_CONTROL_BASE;
0, &bsh)) {
if (bus_space_map(oa->oa_tag, base, 0x1000, 0, &bsh)) {
panic("failed to map space for CIVIC control regs.\n"); panic("failed to map space for CIVIC control regs.\n");
} }
/* Disable interrupts */ /* Disable interrupts */
bus_space_write_1(oa->oa_tag, bsh, 0x120, 0); bus_space_write_1(oa->oa_tag, bsh, 0x120, 0);
bus_space_unmap(oa->oa_tag, bsh, 0x1000); bus_space_unmap(oa->oa_tag, bsh, 0x1000);
break; break;
case MACH_CLASSQ2:
break;
default: default:
nodafb: nodafb:
if (mac68k_vidlog == 0) { if (mac68k_vidlog == 0) {
@ -157,6 +162,7 @@ grfiv_attach(parent, self, aux)
struct obio_attach_args *oa = (struct obio_attach_args *)aux; struct obio_attach_args *oa = (struct obio_attach_args *)aux;
struct grfbus_softc *sc; struct grfbus_softc *sc;
struct grfmode *gm; struct grfmode *gm;
u_int base;
sc = (struct grfbus_softc *)self; sc = (struct grfbus_softc *)self;
@ -164,15 +170,16 @@ grfiv_attach(parent, self, aux)
switch (current_mac_model->class) { switch (current_mac_model->class) {
case MACH_CLASSQ: case MACH_CLASSQ:
case MACH_CLASSQ2: base=QUADRA_DAFB_BASE;
sc->sc_tag = oa->oa_tag; sc->sc_tag = oa->oa_tag;
if (bus_space_map(sc->sc_tag, QUADRA_DAFB_BASE, 0x1000, if (bus_space_map(sc->sc_tag, base, 0x1000, 0, &sc->sc_regh)) {
0, &sc->sc_regh)) {
panic("failed to map space for DAFB regs.\n"); panic("failed to map space for DAFB regs.\n");
} }
printf(": DAFB: Monitor sense %x.\n", R4(sc,0x1C)&7); printf(": DAFB: Monitor sense %x.\n", R4(sc,0x1C)&7);
bus_space_unmap(sc->sc_tag, sc->sc_regh, 0x1000); bus_space_unmap(sc->sc_tag, sc->sc_regh, 0x1000);
break; break;
case MACH_CLASSQ2:
case MACH_CLASSAV:
default: default:
printf(": Internal Video\n"); printf(": Internal Video\n");
break; break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_obio.c,v 1.25 1997/10/08 19:54:04 briggs Exp $ */ /* $NetBSD: grf_obio.c,v 1.26 1997/11/08 04:12:52 briggs Exp $ */
/* /*
* Copyright (c) 1995 Allen Briggs. All rights reserved. * Copyright (c) 1995 Allen Briggs. All rights reserved.
@ -84,19 +84,19 @@ grfiv_match(parent, cf, aux)
struct obio_attach_args *oa = (struct obio_attach_args *)aux; struct obio_attach_args *oa = (struct obio_attach_args *)aux;
bus_space_handle_t bsh; bus_space_handle_t bsh;
int found, sense; int found, sense;
u_int base;
found = 1; found = 1;
switch (current_mac_model->class) { switch (current_mac_model->class) {
case MACH_CLASSQ: case MACH_CLASSQ:
case MACH_CLASSQ2:
/* /*
* Assume DAFB for all of these, unless we can't * Assume DAFB for all of these, unless we can't
* access the memory. * access the memory.
*/ */
base = QUADRA_DAFB_BASE;
if (bus_space_map(oa->oa_tag, QUADRA_DAFB_BASE, 0x1000, if (bus_space_map(oa->oa_tag, base, 0x1000, 0, &bsh)) {
0, &bsh)) {
panic("failed to map space for DAFB regs.\n"); panic("failed to map space for DAFB regs.\n");
} }
@ -127,15 +127,20 @@ grfiv_match(parent, cf, aux)
break; break;
case MACH_CLASSAV: case MACH_CLASSAV:
if (bus_space_map(oa->oa_tag, CIVIC_CONTROL_BASE, 0x1000, base = CIVIC_CONTROL_BASE;
0, &bsh)) {
if (bus_space_map(oa->oa_tag, base, 0x1000, 0, &bsh)) {
panic("failed to map space for CIVIC control regs.\n"); panic("failed to map space for CIVIC control regs.\n");
} }
/* Disable interrupts */ /* Disable interrupts */
bus_space_write_1(oa->oa_tag, bsh, 0x120, 0); bus_space_write_1(oa->oa_tag, bsh, 0x120, 0);
bus_space_unmap(oa->oa_tag, bsh, 0x1000); bus_space_unmap(oa->oa_tag, bsh, 0x1000);
break; break;
case MACH_CLASSQ2:
break;
default: default:
nodafb: nodafb:
if (mac68k_vidlog == 0) { if (mac68k_vidlog == 0) {
@ -157,6 +162,7 @@ grfiv_attach(parent, self, aux)
struct obio_attach_args *oa = (struct obio_attach_args *)aux; struct obio_attach_args *oa = (struct obio_attach_args *)aux;
struct grfbus_softc *sc; struct grfbus_softc *sc;
struct grfmode *gm; struct grfmode *gm;
u_int base;
sc = (struct grfbus_softc *)self; sc = (struct grfbus_softc *)self;
@ -164,15 +170,16 @@ grfiv_attach(parent, self, aux)
switch (current_mac_model->class) { switch (current_mac_model->class) {
case MACH_CLASSQ: case MACH_CLASSQ:
case MACH_CLASSQ2: base=QUADRA_DAFB_BASE;
sc->sc_tag = oa->oa_tag; sc->sc_tag = oa->oa_tag;
if (bus_space_map(sc->sc_tag, QUADRA_DAFB_BASE, 0x1000, if (bus_space_map(sc->sc_tag, base, 0x1000, 0, &sc->sc_regh)) {
0, &sc->sc_regh)) {
panic("failed to map space for DAFB regs.\n"); panic("failed to map space for DAFB regs.\n");
} }
printf(": DAFB: Monitor sense %x.\n", R4(sc,0x1C)&7); printf(": DAFB: Monitor sense %x.\n", R4(sc,0x1C)&7);
bus_space_unmap(sc->sc_tag, sc->sc_regh, 0x1000); bus_space_unmap(sc->sc_tag, sc->sc_regh, 0x1000);
break; break;
case MACH_CLASSQ2:
case MACH_CLASSAV:
default: default:
printf(": Internal Video\n"); printf(": Internal Video\n");
break; break;