Add 'needs-flag' to pmax, 3max dc (DZ-11 clone) front-ends (dc_ds, dc_ioasic

respectively), so console setup code can test forconfiguration of the
correct front-end (via NDC_DC and NDC_IOASIC, respectively).

Delete 'needs-flags' from dc.c.  GC obsolete uses of NDC, "dc.h".
This commit is contained in:
jonathan 1997-05-24 08:19:44 +00:00
parent 20e5e29aef
commit 8f17cfaec1
9 changed files with 77 additions and 67 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: files.pmax,v 1.39 1997/05/15 04:42:12 jonathan Exp $
# $NetBSD: files.pmax,v 1.40 1997/05/24 08:19:44 jonathan Exp $
# DECstation-specific configuration info
# maxpartitions must be first item in files.${ARCH}.
@ -104,11 +104,11 @@ file arch/pmax/dev/rz.c rz needs-count
# DC7085 (DZ-like four-port serial device) on mainbus on non-IOASIC machines.
# For the 3MAX (aka kn02 aka 5k/200) pretend that it's on an ASIC.
device dc
file arch/pmax/dev/dc.c dc needs-flag
file arch/pmax/dev/dc.c dc
attach dc at ioasic with dc_ioasic
file arch/pmax/dev/dc_ioasic.c dc_ioasic
file arch/pmax/dev/dc_ioasic.c dc_ioasic needs-flag
attach dc at mainbus with dc_ds
file arch/pmax/dev/dc_ds.c dc_ds
file arch/pmax/dev/dc_ds.c dc_ds needs-flag
# The "desktop bus" on the MAXINE (5k/25). What is it, anyway? ADB?

View File

@ -1,4 +1,4 @@
/* $NetBSD: fb.c,v 1.18 1996/10/14 04:55:26 jonathan Exp $ */
/* $NetBSD: fb.c,v 1.19 1997/05/24 08:19:50 jonathan Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -100,7 +100,8 @@
#include "rasterconsole.h"
#include "dc.h"
#include "dc_ioasic.h"
#include "dc_ds.h"
#include "scc.h"
#include "dtop.h"
@ -122,7 +123,7 @@ extern int pmax_boardtype;
extern void fbScreenInit __P (( struct fbinfo *fi));
#if NDC > 0
#if (NDC_DS > 0) || (NDC_IOASIC > 0)
#include <machine/dc7085cons.h>
#include <pmax/dev/dcvar.h>
#endif
@ -271,13 +272,13 @@ tb_kbdmouseconfig(fi)
switch (pmax_boardtype) {
#if NDC > 0
#if (NDC_DS > 0) || (NDC_IOASIC > 0)
case DS_PMAX:
case DS_3MAX:
fi->fi_glasstty->KBDPutc = dcPutc;
fi->fi_glasstty->kbddev = makedev(DCDEV, DCKBD_PORT);
break;
#endif /* NDC */
#endif /* NDC_DS || NDC_IOASIC */
#if NSCC > 0
case DS_3MIN:

View File

@ -1,4 +1,4 @@
/* $NetBSD: pm_ds.c,v 1.3 1996/10/23 02:34:23 mhitch Exp $ */
/* $NetBSD: pm_ds.c,v 1.4 1997/05/24 08:19:52 jonathan Exp $ */
/*
* Copyright 1996 The Board of Trustees of The Leland Stanford
@ -36,10 +36,10 @@
#include "fb.h"
#include "pm.h"
#include "dc.h"
#include "dc_ds.h"
#if 0
#if NDC == 0
#if NDC_DS == 0
pm needs dc device
#endif
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: promio.c,v 1.16 1997/05/21 19:41:08 jonathan Exp $ */
/* $NetBSD: promio.c,v 1.17 1997/05/24 08:19:48 jonathan Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -80,14 +80,15 @@
#include "mfb.h"
#include "xcfb.h"
#include "sfb.h"
#include "dc.h"
#include "dc_ds.h"
#include "dc_ioasic.h"
#include "dtop.h"
#include "scc.h"
#include "asc.h"
#include "tc.h"
#include "rasterconsole.h"
#if NDC > 0
#if (NDC_DS > 0) || (NDC_IOASIC > 0)
#include <machine/dc7085cons.h>
#include <pmax/dev/dc_cons.h>
#include <pmax/dev/dc_ds_cons.h>
@ -231,7 +232,7 @@ consinit()
if (screen) {
switch (pmax_boardtype) {
case DS_PMAX:
#if NDC > 0 && NPM > 0
#if NDC_DS > 0 && NPM > 0
if (pminit(0, 0, 1)) {
cd.cn_pri = CN_INTERNAL;
cd.cn_dev = makedev(DCDEV, DCKBD_PORT);
@ -240,7 +241,7 @@ consinit()
cd.cn_putc = rcons_vputc; /*XXX*/
return;
}
#endif /* NDC and NPM */
#endif /* NDC_DS and NPM */
goto remcons;
case DS_MAXINE:
@ -261,13 +262,13 @@ consinit()
break;
case DS_3MAX:
#if NDC > 0
#if NDC_IOASIC > 0
if (kbd == 7) {
cd.cn_dev = makedev(DCDEV, DCKBD_PORT);
cd.cn_getc = LKgetc;
lk_divert(dcGetc, makedev(DCDEV, DCKBD_PORT));
} else
#endif /* NDC */
#endif /* NDC_IOASIC */
goto remcons;
break;
@ -316,18 +317,18 @@ remcons:
*/
switch (pmax_boardtype) {
case DS_PMAX:
#if NDC > 0
#if NDC_DS > 0
if (kbd == 4)
cd.cn_dev = makedev(DCDEV, DCCOMM_PORT);
else
cd.cn_dev = makedev(DCDEV, DCPRINTER_PORT);
dc_ds_consinit(cd.cn_dev);
return;
#endif /* NDC */
#endif /* NDC_DS */
break;
case DS_3MAX:
#if NDC > 0
#if (NDC_IOASIC > 0)
cd.cn_dev = makedev(DCDEV, DCPRINTER_PORT);
dc_ioasic_consinit(cd.cn_dev);
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: qvss_compat.c,v 1.6 1996/10/13 03:39:36 christos Exp $ */
/* $NetBSD: qvss_compat.c,v 1.7 1997/05/24 08:19:53 jonathan Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -89,7 +89,8 @@
#include <pmax/pmax/cons.h>
#include <pmax/pmax/pmaxtype.h>
#include "dc.h"
#include "dc_ds.h"
#include "dc_ioasic.h"
#include "scc.h"
#include "dtop.h"
@ -111,7 +112,7 @@ void mouseInput __P((int cc));
#if NDC > 0
#if (NDC_DS > 0) || (NDC_IOASIC > 0)
extern void (*dcDivertXInput)();
extern void (*dcMouseEvent)();
extern void (*dcMouseButtons)();
@ -127,24 +128,6 @@ extern void (*dtopMouseEvent)();
extern void (*dtopMouseButtons)();
#endif
#if 0 /*XXX*/
#if NDC > 0
#include <machine/dc7085cons.h>
extern int dcGetc(), dcparam();
extern void dcPutc();
#endif
#if NDTOP > 0
#include <pmax/dev/dtopreg.h>
extern void dtopKBDPutc();
#endif
#if NSCC > 0
#include <pmax/dev/sccreg.h>
extern int sccGetc(), sccparam();
extern void sccPutc();
#endif
#endif /* 0 */
extern struct fbinfo *firstfi;
@ -566,14 +549,22 @@ genConfigMouse()
s = spltty();
switch (pmax_boardtype) {
#if NDC > 0
#if NDC_IOASIC > 0
case DS_3MAX:
dcDivertXInput = genKbdEvent;
dcMouseEvent = genMouseEvent;
dcMouseButtons = genMouseButtons;
break;
#endif /* NDC_IOASIC */
#if NDC_DS > 0
case DS_PMAX:
dcDivertXInput = genKbdEvent;
dcMouseEvent = genMouseEvent;
dcMouseButtons = genMouseButtons;
break;
#endif
#endif /* NDC_DS */
#if NSCC > 1
case DS_3MIN:
case DS_3MAXPLUS:
@ -605,14 +596,23 @@ genDeconfigMouse()
s = spltty();
switch (pmax_boardtype) {
#if NDC > 0
#if NDC_IOASIC > 0
case DS_3MAX:
dcDivertXInput = (void (*)())0;
dcMouseEvent = (void (*)())0;
dcMouseButtons = (void (*)())0;
break;
#endif /* NDC_IOASIC */
#if NDC_DS > 0
case DS_PMAX:
dcDivertXInput = (void (*)())0;
dcMouseEvent = (void (*)())0;
dcMouseButtons = (void (*)())0;
break;
#endif
#endif /* NDC_DS */
#if NSCC > 1
case DS_3MIN:
case DS_3MAXPLUS:
@ -621,6 +621,7 @@ genDeconfigMouse()
sccMouseButtons = (void (*)())0;
break;
#endif
#if NDTOP > 0
case DS_MAXINE:
dtopDivertXInput = (void (*)())0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: conf.c,v 1.24 1997/05/24 05:28:17 jonathan Exp $ */
/* $NetBSD: conf.c,v 1.25 1997/05/24 08:19:47 jonathan Exp $ */
/*
* Copyright (c) 1992, 1993
@ -143,7 +143,8 @@ cdev_decl(ccd);
cdev_decl(bpf);
#include "dtop.h"
cdev_decl(dtop);
#include "dc.h"
#include "dc_ioasic.h"
#include "dc_ds.h"
cdev_decl(dc);
#include "scc.h"
cdev_decl(scc);
@ -167,6 +168,13 @@ cdev_decl(tun);
cdev_decl(vnd);
#include "ipfilter.h"
#if (NDC_DS > 0) || (NDC_IOASIC > 0)
# define NDC 1
#else
# define NDC 0
#endif
/* a framebuffer with an attached mouse: */
/* open, close, ioctl, poll, mmap */

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu_cons.c,v 1.16 1997/05/21 19:41:08 jonathan Exp $ */
/* $NetBSD: cpu_cons.c,v 1.17 1997/05/24 08:19:48 jonathan Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -80,14 +80,15 @@
#include "mfb.h"
#include "xcfb.h"
#include "sfb.h"
#include "dc.h"
#include "dc_ds.h"
#include "dc_ioasic.h"
#include "dtop.h"
#include "scc.h"
#include "asc.h"
#include "tc.h"
#include "rasterconsole.h"
#if NDC > 0
#if (NDC_DS > 0) || (NDC_IOASIC > 0)
#include <machine/dc7085cons.h>
#include <pmax/dev/dc_cons.h>
#include <pmax/dev/dc_ds_cons.h>
@ -231,7 +232,7 @@ consinit()
if (screen) {
switch (pmax_boardtype) {
case DS_PMAX:
#if NDC > 0 && NPM > 0
#if NDC_DS > 0 && NPM > 0
if (pminit(0, 0, 1)) {
cd.cn_pri = CN_INTERNAL;
cd.cn_dev = makedev(DCDEV, DCKBD_PORT);
@ -240,7 +241,7 @@ consinit()
cd.cn_putc = rcons_vputc; /*XXX*/
return;
}
#endif /* NDC and NPM */
#endif /* NDC_DS and NPM */
goto remcons;
case DS_MAXINE:
@ -261,13 +262,13 @@ consinit()
break;
case DS_3MAX:
#if NDC > 0
#if NDC_IOASIC > 0
if (kbd == 7) {
cd.cn_dev = makedev(DCDEV, DCKBD_PORT);
cd.cn_getc = LKgetc;
lk_divert(dcGetc, makedev(DCDEV, DCKBD_PORT));
} else
#endif /* NDC */
#endif /* NDC_IOASIC */
goto remcons;
break;
@ -316,18 +317,18 @@ remcons:
*/
switch (pmax_boardtype) {
case DS_PMAX:
#if NDC > 0
#if NDC_DS > 0
if (kbd == 4)
cd.cn_dev = makedev(DCDEV, DCCOMM_PORT);
else
cd.cn_dev = makedev(DCDEV, DCPRINTER_PORT);
dc_ds_consinit(cd.cn_dev);
return;
#endif /* NDC */
#endif /* NDC_DS */
break;
case DS_3MAX:
#if NDC > 0
#if (NDC_IOASIC > 0)
cd.cn_dev = makedev(DCDEV, DCPRINTER_PORT);
dc_ioasic_consinit(cd.cn_dev);
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.71 1997/05/19 23:34:40 jonathan Exp $ */
/* $NetBSD: machdep.c,v 1.72 1997/05/24 08:19:46 jonathan Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -82,7 +82,6 @@
#include <machine/reg.h>
#include <machine/psl.h>
#include <machine/pte.h>
#include <machine/dc7085cons.h>
#include <pmax/stand/dec_prom.h>
@ -108,7 +107,6 @@
#include "mfb.h"
#include "xcfb.h"
#include "sfb.h"
#include "dc.h"
#include "dtop.h"
#include "scc.h"
#include "le_ioasic.h"

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmax_trap.c,v 1.42 1997/05/15 05:03:42 jonathan Exp $ */
/* $NetBSD: pmax_trap.c,v 1.43 1997/05/24 08:19:49 jonathan Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -92,7 +92,7 @@ struct ifnet; struct ethercom;
#include "asc.h"
#include "sii.h"
#include "le_pmax.h"
#include "dc.h"
#include "dc_ds.h"
#include <sys/cdefs.h>
#include <sys/syslog.h>
@ -177,7 +177,7 @@ int leintr __P((void *));
#if NSII > 0
int siiintr __P((void *));
#endif
#if NDC > 0
#if NDC_DS > 0
int dcintr __P((void *));
#endif
@ -233,12 +233,12 @@ kn01_intr(mask, pc, statusReg, causeReg)
}
#endif /* NLE_PMAX */
#if NDC > 0
#if NDC_DS > 0
if (mask & MACH_INT_MASK_2) {
dcintr(dc_cd.cd_devs[0]);
intrcnt[SERIAL0_INTR]++;
}
#endif /* NDC */
#endif /* NDC_DS */
if (mask & MACH_INT_MASK_4) {
pmax_errintr();