diff --git a/sys/arch/mac68k/dev/grf.c b/sys/arch/mac68k/dev/grf.c index 500beb5f0fbf..56be14706ff1 100644 --- a/sys/arch/mac68k/dev/grf.c +++ b/sys/arch/mac68k/dev/grf.c @@ -1,4 +1,4 @@ -/* $NetBSD: grf.c,v 1.34 1996/08/04 06:03:47 scottr Exp $ */ +/* $NetBSD: grf.c,v 1.35 1996/08/05 01:26:31 scottr Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -128,14 +128,12 @@ grfattach(parent, self, aux) sc->sc_flags = GF_ALIVE; /* XXX bogus */ -#ifdef notyet /* * Attach ite semantics to the grf. Change the name, forward * everything else. */ ga->ga_name = "ite"; (void)config_found(self, ga, grfbusprint); -#endif } /*ARGSUSED*/ diff --git a/sys/arch/mac68k/dev/ite.c b/sys/arch/mac68k/dev/ite.c index 58490fc3df96..f4c85318dfc4 100644 --- a/sys/arch/mac68k/dev/ite.c +++ b/sys/arch/mac68k/dev/ite.c @@ -1,4 +1,4 @@ -/* $NetBSD: ite.c,v 1.23 1996/06/01 00:13:39 scottr Exp $ */ +/* $NetBSD: ite.c,v 1.24 1996/08/05 01:26:35 scottr Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -55,14 +55,14 @@ */ #include -#include -#include -#include -#include #include -#include -#include #include +#include +#include +#include +#include +#include +#include #include #include @@ -72,11 +72,17 @@ #include #include #include +#include + +#include +#include #include "../mac68k/macrom.h" -#include "ascvar.h" +#include "nubus.h" #include "itevar.h" +#include "grfvar.h" +#include "ascvar.h" #include "6x10.h" #define CHARWIDTH 6 @@ -154,6 +160,8 @@ static int scrreg_bottom; static int polledkey; extern int adb_polling; +extern u_long conspa; + struct tty *ite_tty; /* Our tty */ static void (*putpixel) __P((int x, int y, int *c, int num)); @@ -797,16 +805,24 @@ struct cfdriver ite_cd = { }; static int -itematch(pdp, match, auxp) - struct device *pdp; - void *match, *auxp; +itematch(parent, match, aux) + struct device *parent; + void *match, *aux; { - return 1; + struct grfbus_attach_args *ga = aux; + struct grfmode *gm = ga->ga_grfmode; + vm_offset_t pa; + + if (strcmp(ga->ga_name, "ite")) + return 0; + pa = pmap_extract(pmap_kernel(), (vm_offset_t) gm->fbbase); + + return (pa == (vm_offset_t) conspa); } static void -iteattach(parent, dev, aux) - struct device *parent, *dev; +iteattach(parent, self, aux) + struct device *parent, *self; void *aux; { printf(" (minimal console)\n"); @@ -1091,12 +1107,10 @@ itecninit(struct consdev * cp) scrrows = height / CHARHEIGHT; scrcols = width / CHARWIDTH; - vt100_reset(); - switch (videobitdepth) { default: case 1: - putpixel = putpixel2; + putpixel = putpixel1; reversepixel = reversepixel1; screenrowbytes = (width + 7) >> 3; break; @@ -1117,6 +1131,8 @@ itecninit(struct consdev * cp) break; } + vt100_reset(); + return iteon(cp->cn_dev, 0); }