Resolve 3max IOASIC disguise; round #2.
This commit is contained in:
parent
1e396f9b0b
commit
e810ae49c6
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: files.pmax,v 1.70 1999/11/15 09:50:48 nisimura Exp $
|
||||
# $NetBSD: files.pmax,v 1.71 1999/11/16 06:00:11 nisimura Exp $
|
||||
# DECstation-specific configuration info
|
||||
|
||||
# maxpartitions must be first item in files.${ARCH}.
|
||||
|
@ -143,10 +143,8 @@ file arch/pmax/dev/rz.c rz needs-count
|
|||
# For the 3MAX (aka kn02 aka 5k/200) pretend that it's on an ASIC.
|
||||
device dc: tty
|
||||
file arch/pmax/dev/dc.c dc
|
||||
attach dc at ioasic with dc_ioasic
|
||||
file arch/pmax/dev/dc_ioasic.c dc_ioasic needs-flag
|
||||
attach dc at ibus with dc_ds
|
||||
file arch/pmax/dev/dc_ds.c dc_ds needs-flag
|
||||
file arch/pmax/dev/dc_ds.c dc needs-flag
|
||||
|
||||
|
||||
# The "desktop bus" on the MAXINE (5k/25). What is it, anyway? ADB?
|
||||
|
|
|
@ -1,105 +0,0 @@
|
|||
/* $NetBSD: dc_ioasic.c,v 1.7 1998/03/06 00:21:40 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1996 The Board of Trustees of The Leland Stanford
|
||||
* Junior University. All Rights Reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this
|
||||
* software and its documentation for any purpose and without
|
||||
* fee is hereby granted, provided that the above copyright
|
||||
* notice appear in all copies. Stanford University
|
||||
* makes no representations about the suitability of this
|
||||
* software for any purpose. It is provided "as is" without
|
||||
* express or implied warranty.
|
||||
*
|
||||
* this driver contributed by Jonathan Stone
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/device.h>
|
||||
#include <sys/tty.h>
|
||||
|
||||
#include <machine/autoconf.h>
|
||||
#include <machine/dc7085cons.h>
|
||||
|
||||
#include <dev/tc/tcvar.h>
|
||||
#include <dev/tc/ioasicvar.h>
|
||||
|
||||
#include <pmax/dev/dcvar.h>
|
||||
#include <pmax/dev/dc_ioasic_cons.h>
|
||||
#include <pmax/pmax/kn02.h>
|
||||
|
||||
int dc_ioasic_match __P((struct device *, struct cfdata *, void *));
|
||||
void dc_ioasic_attach __P((struct device *, struct device *, void *));
|
||||
|
||||
struct cfattach dc_ioasic_ca = {
|
||||
sizeof(struct dc_softc), dc_ioasic_match, dc_ioasic_attach
|
||||
};
|
||||
|
||||
/*
|
||||
* Initialize a line for (polled) console I/O
|
||||
*/
|
||||
int
|
||||
dc_ioasic_consinit(dev)
|
||||
dev_t dev;
|
||||
{
|
||||
|
||||
#if defined(DEBUG) && 0
|
||||
printf("dc_ioasic(%d,%d): serial console at 0x%x\n",
|
||||
minor(dev) >> 2, minor(dev) & 03,
|
||||
MIPS_PHYS_TO_KSEG1(KN02_SYS_DZ));
|
||||
DELAY(100000);
|
||||
#endif
|
||||
dc_consinit(dev, (void *)MIPS_PHYS_TO_KSEG1(KN02_SYS_DZ));
|
||||
return(1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Match driver on 5000/200
|
||||
* (XXX not a real ioasic, but we configure it as one)
|
||||
*/
|
||||
int
|
||||
dc_ioasic_match(parent, match, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *match;
|
||||
void *aux;
|
||||
{
|
||||
struct ioasicdev_attach_args *d = aux;
|
||||
|
||||
if (strcmp(d->iada_modname, "dc") != 0 &&
|
||||
strcmp(d->iada_modname, "dc7085") != 0)
|
||||
return (0);
|
||||
|
||||
if (badaddr((caddr_t)(d->iada_addr), 2))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
void
|
||||
dc_ioasic_attach(parent, self, aux)
|
||||
struct device *parent;
|
||||
struct device *self;
|
||||
void *aux;
|
||||
{
|
||||
struct dc_softc *sc = (void*) self;
|
||||
struct ioasicdev_attach_args *d = aux;
|
||||
caddr_t dcaddr;
|
||||
|
||||
printf("\n");
|
||||
|
||||
dcaddr = (caddr_t)d->iada_addr;
|
||||
(void) dcattach(sc, (void*)MIPS_PHYS_TO_KSEG1(dcaddr),
|
||||
/* dtr/dsr mask */ (1<< DCPRINTER_PORT) + (1 << DCCOMM_PORT),
|
||||
#ifdef HW_FLOW_CONTROL
|
||||
/* rts/cts mask */ (1<< DCPRINTER_PORT) + (1 << DCCOMM_PORT),
|
||||
#else
|
||||
0,
|
||||
#endif
|
||||
1, 3);
|
||||
|
||||
ioasic_intr_establish(parent, d->iada_cookie, TC_IPL_TTY,
|
||||
dcintr, self);
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
/* $NetBSD: dc_ioasic_cons.h,v 1.1 1996/09/25 20:48:56 jonathan Exp $ */
|
||||
|
||||
#ifdef _KERNEL
|
||||
#ifndef _DC_IOASIC_CONS_H
|
||||
#define _DC_IOASIC_CONS_H
|
||||
|
||||
/*
|
||||
* Following declaratios for console code.
|
||||
* XXX should be redesigned to expose less driver internals.
|
||||
*/
|
||||
int dc_ioasic_consinit __P((dev_t dev));
|
||||
|
||||
#endif /* _DCVAR_H */
|
||||
#endif /* _KERNEL */
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fb.c,v 1.28 1999/09/05 11:34:30 simonb Exp $ */
|
||||
/* $NetBSD: fb.c,v 1.29 1999/11/16 06:00:12 nisimura Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -93,8 +93,7 @@
|
|||
|
||||
#include "rasterconsole.h"
|
||||
|
||||
#include "dc_ioasic.h"
|
||||
#include "dc_ds.h"
|
||||
#include "dc.h"
|
||||
#include "scc.h"
|
||||
#include "dtop.h"
|
||||
|
||||
|
@ -115,7 +114,7 @@
|
|||
extern void fbScreenInit __P (( struct fbinfo *fi));
|
||||
|
||||
|
||||
#if (NDC_DS > 0) || (NDC_IOASIC > 0)
|
||||
#if NDC > 0
|
||||
#include <machine/dc7085cons.h>
|
||||
#include <pmax/dev/dcvar.h>
|
||||
#endif
|
||||
|
@ -291,13 +290,13 @@ tb_kbdmouseconfig(fi)
|
|||
|
||||
switch (systype) {
|
||||
|
||||
#if (NDC_DS > 0) || (NDC_IOASIC > 0)
|
||||
#if NDC > 0
|
||||
case DS_PMAX:
|
||||
case DS_3MAX:
|
||||
fi->fi_glasstty->KBDPutc = dcPutc;
|
||||
fi->fi_glasstty->kbddev = makedev(DCDEV, DCKBD_PORT);
|
||||
break;
|
||||
#endif /* NDC_DS || NDC_IOASIC */
|
||||
#endif /* NDC */
|
||||
|
||||
#if NSCC > 0
|
||||
case DS_3MIN:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: findcons.c,v 1.18 1999/11/15 09:54:41 nisimura Exp $ */
|
||||
/* $NetBSD: findcons.c,v 1.19 1999/11/16 06:00:12 nisimura Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Jonathan Stone
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: findcons.c,v 1.18 1999/11/15 09:54:41 nisimura Exp $$");
|
||||
__KERNEL_RCSID(0, "$NetBSD: findcons.c,v 1.19 1999/11/16 06:00:12 nisimura Exp $$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -65,12 +65,11 @@ struct consdev cd;
|
|||
#include "mfb.h"
|
||||
#include "xcfb.h"
|
||||
#include "sfb.h"
|
||||
#include "dc_ds.h"
|
||||
#include "dc_ioasic.h"
|
||||
#include "dc.h"
|
||||
#include "dtop.h"
|
||||
#include "scc.h"
|
||||
#include "tc.h"
|
||||
#include "rasterconsole.h"
|
||||
#include "rasterconsole.h"
|
||||
|
||||
#include <dev/tc/tcvar.h> /* find TC fraembuffer device. */
|
||||
|
||||
|
@ -91,15 +90,14 @@ struct consdev cd;
|
|||
#include <pmax/dev/rconsvar.h>
|
||||
|
||||
/* pmax serial interface */
|
||||
#if (NDC_DS > 0) || (NDC_IOASIC > 0)
|
||||
#if NDC > 0
|
||||
#include <machine/dc7085cons.h>
|
||||
#include <pmax/dev/dc_cons.h>
|
||||
#include <pmax/dev/dc_ds_cons.h>
|
||||
#include <pmax/dev/dc_ioasic_cons.h>
|
||||
#endif
|
||||
|
||||
/* MAXINE desktop bus keyboard */
|
||||
#if NDTOP > 0
|
||||
#if NDTOP > 0
|
||||
#include <pmax/dev/dtopvar.h>
|
||||
#endif
|
||||
|
||||
|
@ -137,7 +135,6 @@ struct consdev cd;
|
|||
* malloc are up.
|
||||
*/
|
||||
integrate int dc_ds_kbd __P((int prom_slot));
|
||||
integrate int dc_ioasic_kbd __P((int prom_slot));
|
||||
integrate int scc_kbd __P((int prom_slot));
|
||||
integrate int dtop_kbd __P((int prom_slot));
|
||||
|
||||
|
@ -146,7 +143,6 @@ integrate int xcfb_screen __P((int prom_slot));
|
|||
extern int tcfb_cnattach __P((int prom_slot));
|
||||
|
||||
integrate int dc_ds_serial __P((int prom_slot));
|
||||
integrate int dc_ioasic_serial __P((int prom_slot));
|
||||
integrate int scc_serial __P((int prom_slot));
|
||||
|
||||
int find_kbd __P((int prom_slot));
|
||||
|
@ -164,25 +160,13 @@ dc_ds_kbd(kbd_slot)
|
|||
int kbd_slot;
|
||||
{
|
||||
|
||||
#if NDC_DS > 0 && NWS > 0
|
||||
#if NDC > 0 && NWS > 0
|
||||
if (systype == DS_PMAX) {
|
||||
cd.cn_getc = LKgetc;
|
||||
lk_divert(dcGetc, makedev(DCDEV, DCKBD_PORT));
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Keyboard supported and present on 5000/200?
|
||||
*/
|
||||
int
|
||||
dc_ioasic_kbd(kbd_slot)
|
||||
int kbd_slot;
|
||||
{
|
||||
#if NDC_IOASIC > 0 && NWS > 0
|
||||
if (kbd_slot == 7) {
|
||||
else if (systype == DS_3MAX && kbd_slot == 7) {
|
||||
cd.cn_dev = makedev(DCDEV, DCKBD_PORT);
|
||||
cd.cn_getc = LKgetc;
|
||||
lk_divert(dcGetc, makedev(DCDEV, DCKBD_PORT));
|
||||
|
@ -192,8 +176,6 @@ dc_ioasic_kbd(kbd_slot)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Keyboard configured and physically presnt on 3min, 3maxplus?
|
||||
*/
|
||||
|
@ -242,14 +224,12 @@ find_kbd(kbd)
|
|||
{
|
||||
switch(systype) {
|
||||
case DS_PMAX:
|
||||
case DS_3MAX:
|
||||
return (dc_ds_kbd(kbd));
|
||||
break;
|
||||
|
||||
case DS_3MAX:
|
||||
return (dc_ioasic_kbd(kbd));
|
||||
break;
|
||||
|
||||
case DS_3MIN: case DS_3MAXPLUS:
|
||||
case DS_3MIN:
|
||||
case DS_3MAXPLUS:
|
||||
/* keyboard on scc? */
|
||||
return (scc_kbd(kbd));
|
||||
break;
|
||||
|
@ -359,7 +339,7 @@ int
|
|||
dc_ds_serial(comslot)
|
||||
int comslot;
|
||||
{
|
||||
#if NDC_DS
|
||||
#if NDC > 0
|
||||
if (comslot == 4)
|
||||
cd.cn_dev = makedev(DCDEV, DCCOMM_PORT);
|
||||
else
|
||||
|
@ -372,20 +352,6 @@ dc_ds_serial(comslot)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
dc_ioasic_serial(comslot)
|
||||
int comslot;
|
||||
{
|
||||
#if NDC_IOASIC
|
||||
cd.cn_dev = makedev(DCDEV, DCPRINTER_PORT);
|
||||
return dc_ioasic_consinit(cd.cn_dev);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
scc_serial(comslot)
|
||||
int comslot;
|
||||
|
@ -437,6 +403,7 @@ find_serial(comslot)
|
|||
{
|
||||
switch(systype) {
|
||||
case DS_PMAX:
|
||||
case DS_3MAX:
|
||||
return (dc_ds_serial(comslot));
|
||||
break;
|
||||
|
||||
|
@ -445,10 +412,6 @@ find_serial(comslot)
|
|||
return (dc_ds_serial(0));
|
||||
break;
|
||||
|
||||
case DS_3MAX:
|
||||
return (dc_ioasic_serial(comslot));
|
||||
break;
|
||||
|
||||
case DS_MAXINE: /* XXX only one serial port */
|
||||
case DS_3MIN:
|
||||
case DS_3MAXPLUS:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pm_ds.c,v 1.10 1999/07/25 22:50:29 ad Exp $ */
|
||||
/* $NetBSD: pm_ds.c,v 1.11 1999/11/16 06:00:12 nisimura Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1996 The Board of Trustees of The Leland Stanford
|
||||
|
@ -37,13 +37,7 @@
|
|||
|
||||
#include "fb.h"
|
||||
#include "pm.h"
|
||||
#include "dc_ds.h"
|
||||
|
||||
#if 0
|
||||
#if NDC_DS == 0
|
||||
pm needs dc device
|
||||
#endif
|
||||
#endif
|
||||
#include "dc.h"
|
||||
|
||||
int ds_pm_init __P ((struct fbinfo *fi, int unti, int cold_console_flag));
|
||||
int pm_ds_match __P((struct device *, struct cfdata *, void *));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: qvss_compat.c,v 1.20 1999/09/05 11:34:30 simonb Exp $ */
|
||||
/* $NetBSD: qvss_compat.c,v 1.21 1999/11/16 06:00:12 nisimura Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -90,8 +90,7 @@
|
|||
#include <pmax/pmax/cons.h>
|
||||
#include <pmax/pmax/pmaxtype.h>
|
||||
|
||||
#include "dc_ds.h"
|
||||
#include "dc_ioasic.h"
|
||||
#include "dc.h"
|
||||
#include "scc.h"
|
||||
#include "dtop.h"
|
||||
|
||||
|
@ -548,21 +547,15 @@ genConfigMouse()
|
|||
|
||||
s = spltty();
|
||||
switch (systype) {
|
||||
#if NDC_IOASIC > 0
|
||||
|
||||
#if NDC > 0
|
||||
case DS_PMAX:
|
||||
case DS_3MAX:
|
||||
dcDivertXInput = genKbdEvent;
|
||||
dcMouseEvent = (void (*) __P((int)))genMouseEvent;
|
||||
dcMouseButtons = (void (*) __P((int)))genMouseButtons;
|
||||
break;
|
||||
#endif /* NDC_IOASIC */
|
||||
|
||||
#if NDC_DS > 0
|
||||
case DS_PMAX:
|
||||
dcDivertXInput = genKbdEvent;
|
||||
dcMouseEvent = (void (*) __P((int)))genMouseEvent;
|
||||
dcMouseButtons = (void (*) __P((int)))genMouseButtons;
|
||||
break;
|
||||
#endif /* NDC_DS */
|
||||
#endif /* NDC */
|
||||
|
||||
#if NSCC > 0
|
||||
case DS_3MIN:
|
||||
|
@ -595,22 +588,15 @@ genDeconfigMouse()
|
|||
|
||||
s = spltty();
|
||||
switch (systype) {
|
||||
#if NDC_IOASIC > 0
|
||||
case DS_3MAX:
|
||||
|
||||
dcDivertXInput = (void (*) __P((int)) )0;
|
||||
dcMouseEvent = (void (*) __P((int)) )0;
|
||||
dcMouseButtons = (void (*) __P((int)) )0;
|
||||
break;
|
||||
#endif /* NDC_IOASIC */
|
||||
|
||||
#if NDC_DS > 0
|
||||
#if NDC > 0
|
||||
case DS_PMAX:
|
||||
case DS_3MAX:
|
||||
dcDivertXInput = (void (*) __P((int)) )0;
|
||||
dcMouseEvent = (void (*) __P((int)) )0;
|
||||
dcMouseButtons = (void (*) __P((int)) )0;
|
||||
break;
|
||||
#endif /* NDC_DS */
|
||||
#endif /* NDC */
|
||||
|
||||
#if NSCC > 0
|
||||
case DS_3MIN:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: conf.c,v 1.35 1999/11/15 22:45:28 simonb Exp $ */
|
||||
/* $NetBSD: conf.c,v 1.36 1999/11/16 06:00:13 nisimura Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -151,8 +151,7 @@ cdev_decl(raid);
|
|||
cdev_decl(bpf);
|
||||
#include "dtop.h"
|
||||
cdev_decl(dtop);
|
||||
#include "dc_ioasic.h"
|
||||
#include "dc_ds.h"
|
||||
#include "dc.h"
|
||||
cdev_decl(dc);
|
||||
#include "scc.h"
|
||||
cdev_decl(scc);
|
||||
|
@ -182,12 +181,6 @@ cdev_decl(vnd);
|
|||
#include "scsibus.h"
|
||||
cdev_decl(scsibus);
|
||||
|
||||
#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 */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_3100.c,v 1.14 1999/11/15 09:50:26 nisimura Exp $ */
|
||||
/* $NetBSD: dec_3100.c,v 1.15 1999/11/16 06:00:12 nisimura Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
|
||||
|
@ -90,7 +90,7 @@
|
|||
|
||||
#include <pmax/ibus/ibusvar.h>
|
||||
|
||||
#include "dc_ds.h"
|
||||
#include "dc.h"
|
||||
#include "le_pmax.h"
|
||||
#include "sii.h"
|
||||
|
||||
|
@ -239,12 +239,12 @@ dec_3100_intr(mask, pc, status, cause)
|
|||
}
|
||||
#endif /* NLE_PMAX */
|
||||
|
||||
#if NDC_DS > 0
|
||||
#if NDC > 0
|
||||
if (mask & MIPS_INT_MASK_2) {
|
||||
(*tc_slot_info[1].intr)(tc_slot_info[1].sc);
|
||||
intrcnt[SERIAL0_INTR]++;
|
||||
}
|
||||
#endif /* NDC_DS */
|
||||
#endif /* NDC */
|
||||
|
||||
if (mask & MIPS_INT_MASK_4) {
|
||||
dec_3100_errintr();
|
||||
|
|
Loading…
Reference in New Issue