Attach ite semantics to the appropriate grf device, instead of obio.

This commit is contained in:
scottr 1996-08-05 01:26:31 +00:00
parent 1d6cd98d6a
commit 91d8e018e2
2 changed files with 34 additions and 20 deletions

View File

@ -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*/

View File

@ -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 <sys/param.h>
#include <sys/conf.h>
#include <sys/proc.h>
#include <sys/ioctl.h>
#include <sys/tty.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/device.h>
#include <dev/cons.h>
#include <sys/conf.h>
#include <sys/device.h>
#include <sys/ioctl.h>
#include <sys/malloc.h>
#include <sys/proc.h>
#include <sys/tty.h>
#include <machine/viareg.h>
#include <machine/cpu.h>
@ -72,11 +72,17 @@
#include <machine/keyboard.h>
#include <machine/adbsys.h>
#include <machine/iteioctl.h>
#include <machine/grfioctl.h>
#include <vm/vm.h>
#include <vm/pmap.h>
#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);
}