Garbage-collect all old-style autoconfiguration support; it is no

longer supported.  The hp300 port uses new config now.
This commit is contained in:
thorpej 1997-01-30 09:18:33 +00:00
parent ec450f3940
commit cb63bb9de5
26 changed files with 26 additions and 750 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.1 1996/12/17 08:40:59 thorpej Exp $
# $NetBSD: Makefile,v 1.2 1997/01/30 09:18:33 thorpej Exp $
AWK= awk

View File

@ -1,4 +1,4 @@
/* $NetBSD: dca.c,v 1.31 1996/12/17 08:41:00 thorpej Exp $ */
/* $NetBSD: dca.c,v 1.32 1997/01/30 09:18:34 thorpej Exp $ */
/*
* Copyright (c) 1995, 1996 Jason R. Thorpe. All rights reserved.
@ -65,10 +65,6 @@
#include <dev/cons.h>
#ifndef NEWCONFIG
#include <hp300/dev/device.h>
#endif
#include <hp300/dev/dioreg.h>
#include <hp300/dev/diovar.h>
#include <hp300/dev/diodevs.h>
@ -77,9 +73,6 @@
struct dca_softc {
struct device sc_dev; /* generic device glue */
#ifndef NEWCONFIG
struct hp_device *sc_hd; /* device info */
#endif
struct dcadevice *sc_dca; /* pointer to hardware */
struct tty *sc_tty; /* our tty instance */
int sc_oflows; /* overflow counter */
@ -95,7 +88,6 @@ struct dca_softc {
};
#ifdef NEWCONFIG
int dcamatch __P((struct device *, struct cfdata *, void *));
void dcaattach __P((struct device *, struct device *, void *));
@ -106,16 +98,6 @@ struct cfattach dca_ca = {
struct cfdriver dca_cd = {
NULL, "dca", DV_TTY
};
#else /* ! NEWCONFIG */
int dcamatch();
void dcaattach();
struct driver dcadriver = {
dcamatch, dcaattach, "dca",
};
#include "dca.h"
struct dca_softc dca_softc[NDCA];
#endif /* NEWCONFIG */
void dcastart();
int dcaparam();
@ -168,7 +150,6 @@ long dcamintcount[16];
void dcainit __P((struct dcadevice *, int));
#ifdef NEWCONFIG
int
dcamatch(parent, match, aux)
struct device *parent;
@ -187,28 +168,7 @@ dcamatch(parent, match, aux)
return (0);
}
#else /* ! NEWCONFIG */
int
dcamatch(hd)
register struct hp_device *hd;
{
struct dcadevice *dca = (struct dcadevice *)hd->hp_addr;
struct dca_softc *sc = &dca_softc[hd->hp_unit];
if (dca->dca_id != DCAID0 &&
dca->dca_id != DCAREMID0 &&
dca->dca_id != DCAID1 &&
dca->dca_id != DCAREMID1)
return (0);
hd->hp_ipl = DCAIPL(dca->dca_ic);
sc->sc_hd = hd;
return (1);
}
#endif /* NEWCONFIG */
#ifdef NEWCONFIG
void
dcaattach(parent, self, aux)
struct device *parent, *self;
@ -220,17 +180,6 @@ dcaattach(parent, self, aux)
int unit = self->dv_unit;
int scode = da->da_scode;
int ipl;
#else /* ! NEWCONFIG */
void
dcaattach(hd)
register struct hp_device *hd;
{
int unit = hd->hp_unit;
struct dcadevice *dca = (struct dcadevice *)hd->hp_addr;
struct dca_softc *sc = &dca_softc[unit];
int scode = hd->hp_args->hw_sc;
int ipl = hd->hp_ipl;
#endif /* NEWCONFIG */
if (scode == conscode) {
dca = (struct dcadevice *)conaddr;
@ -243,7 +192,6 @@ dcaattach(hd)
*/
cn_tab->cn_dev = makedev(dcamajor, unit);
} else {
#ifdef NEWCONFIG
dca = (struct dcadevice *)iomap(dio_scodetopa(da->da_scode),
da->da_size);
if (dca == NULL) {
@ -251,19 +199,12 @@ dcaattach(hd)
sc->sc_dev.dv_xname);
return;
}
#endif /* NEWCONFIG */
}
sc->sc_dca = dca;
#ifdef NEWCONFIG
ipl = DIO_IPL(dca);
printf(" ipl %d", ipl);
#else /* ! NEWCONFIG */
/* XXX Set the device class. */
hd->hp_dev.dv_class = DV_TTY;
bcopy(&hd->hp_dev, &sc->sc_dev, sizeof(struct device));
#endif /* NEWCONFIG */
dca->dca_reset = 0xFF;
DELAY(100);
@ -279,11 +220,7 @@ dcaattach(hd)
(sc->sc_flags & DCA_HASFIFO) ? ISRPRI_TTY : ISRPRI_TTYNOBUF);
sc->sc_flags |= DCA_ACTIVE;
#ifdef NEWCONFIG
if (self->dv_cfdata->cf_flags)
#else
if (hd->hp_flags)
#endif
sc->sc_flags |= DCA_SOFTCAR;
/* Enable interrupts. */
@ -341,15 +278,9 @@ dcaopen(dev, flag, mode, p)
u_char code;
int s, error = 0;
#ifdef NEWCONFIG
if (unit >= dca_cd.cd_ndevs ||
(sc = dca_cd.cd_devs[unit]) == NULL)
return (ENXIO);
#else
if (unit >= NDCA)
return (ENXIO);
sc = &dca_softc[unit];
#endif /* NEWCONFIG */
if ((sc->sc_flags & DCA_ACTIVE) == 0)
return (ENXIO);
@ -444,11 +375,7 @@ dcaclose(dev, flag, mode, p)
unit = DCAUNIT(dev);
#ifdef NEWCONFIG
sc = dca_cd.cd_devs[unit];
#else
sc = &dca_softc[unit];
#endif
dca = sc->sc_dca;
tp = sc->sc_tty;
@ -488,11 +415,7 @@ dcaread(dev, uio, flag)
struct tty *tp;
int error, of;
#ifdef NEWCONFIG
sc = dca_cd.cd_devs[unit];
#else
sc = &dca_softc[unit];
#endif
tp = sc->sc_tty;
of = sc->sc_oflows;
@ -512,12 +435,8 @@ dcawrite(dev, uio, flag)
struct uio *uio;
int flag;
{
#ifdef NEWCONFIG
struct dca_softc *sc = dca_cd.cd_devs[DCAUNIT(dev)];
struct tty *tp = sc->sc_tty;
#else
struct tty *tp = dca_softc[DCAUNIT(dev)].sc_tty;
#endif
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
}
@ -526,11 +445,7 @@ struct tty *
dcatty(dev)
dev_t dev;
{
#ifdef NEWCONFIG
struct dca_softc *sc = dca_cd.cd_devs[DCAUNIT(dev)];
#else
struct dca_softc *sc = &dca_softc[DCAUNIT(dev)];
#endif
return (sc->sc_tty);
}
@ -702,11 +617,7 @@ dcaioctl(dev, cmd, data, flag, p)
struct proc *p;
{
int unit = DCAUNIT(dev);
#ifdef NEWCONFIG
struct dca_softc *sc = dca_cd.cd_devs[unit];
#else
struct dca_softc *sc = &dca_softc[unit];
#endif
struct tty *tp = sc->sc_tty;
struct dcadevice *dca = sc->sc_dca;
int error;
@ -795,11 +706,7 @@ dcaparam(tp, t)
register struct termios *t;
{
int unit = DCAUNIT(tp->t_dev);
#ifdef NEWCONFIG
struct dca_softc *sc = dca_cd.cd_devs[unit];
#else
struct dca_softc *sc = &dca_softc[unit];
#endif
struct dcadevice *dca = sc->sc_dca;
int cfcr, cflag = t->c_cflag;
int ospeed = ttspeedtab(t->c_ospeed, dcaspeedtab);
@ -875,11 +782,7 @@ dcastart(tp)
register struct tty *tp;
{
int s, c, unit = DCAUNIT(tp->t_dev);
#ifdef NEWCONFIG
struct dca_softc *sc = dca_cd.cd_devs[unit];
#else
struct dca_softc *sc = &dca_softc[unit];
#endif
struct dcadevice *dca = sc->sc_dca;
s = spltty();

View File

@ -1,140 +0,0 @@
/* $NetBSD: device.h,v 1.9 1996/10/20 23:47:40 thorpej Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)device.h 8.1 (Berkeley) 6/10/93
*/
#include <sys/device.h>
struct driver {
int (*d_match)();
void (*d_attach)();
char *d_name;
int (*d_start)();
int (*d_go)();
int (*d_intr)();
int (*d_done)();
};
struct hp_hw {
caddr_t hw_pa; /* physical address of control space */
int hw_size; /* size of control space */
caddr_t hw_kva; /* kernel virtual address of control space */
short hw_id; /* HW returned id */
short hw_secid; /* secondary HW id (displays) */
short hw_type; /* type (defined below) */
short hw_sc; /* select code (if applicable) */
};
struct hp_ctlr {
struct driver *hp_driver;
int hp_unit;
int hp_alive;
char *hp_addr;
int hp_flags;
int hp_ipl;
struct hp_hw *hp_args;
char hp_xname[8];
struct device hp_dev;
};
struct hp_device {
struct driver *hp_driver;
struct driver *hp_cdriver;
int hp_unit;
int hp_ctlr;
int hp_slave;
char *hp_addr;
int hp_dk;
int hp_flags;
int hp_alive;
int hp_ipl;
struct hp_hw *hp_args;
struct device hp_dev;
};
/* XXX until the code is cleaed up */
#define hp_xname hp_dev.dv_xname
/* XXX This needs to die. */
struct devqueue {
struct devqueue *dq_forw;
struct devqueue *dq_back;
int dq_ctlr;
int dq_unit;
int dq_slave;
void *dq_softc;
struct driver *dq_driver;
};
#define MAXCTLRS 16 /* Size of HW table (arbitrary) */
#define MAXSLAVES 8 /* Slaves per controller (HPIB/SCSI limit) */
/* bus types */
#define B_MASK 0xE000
#define B_DIO 0x2000
#define B_DIOII 0x4000
#define B_VME 0x6000
/* controller types */
#define C_MASK 0x8F
#define C_FLAG 0x80
#define C_HPIB 0x81
#define C_SCSI 0x82
#define C_VME 0x83
/* device types (controllers with no slaves) */
#define D_MASK 0x8F
#define D_BITMAP 0x01
#define D_LAN 0x02
#define D_FPA 0x03
#define D_KEYBOARD 0x04
#define D_COMMDCA 0x05
#define D_COMMDCM 0x06
#define D_COMMDCL 0x07
#define D_PPORT 0x08
#define D_MISC 0x7F
#define HW_ISCTLR(hw) ((hw)->hw_type & C_FLAG)
#define HW_ISDIOII(hw) ((hw)->hw_type & B_DIOII)
#define HW_ISHPIB(hw) (((hw)->hw_type & C_MASK) == C_HPIB)
#define HW_ISSCSI(hw) (((hw)->hw_type & C_MASK) == C_SCSI)
#define HW_ISDEV(hw,d) (((hw)->hw_type & D_MASK) == (d))
#ifdef _KERNEL
#ifdef hp300
extern struct hp_hw sc_table[];
extern struct hp_ctlr hp_cinit[];
extern struct hp_device hp_dinit[];
extern caddr_t sctopa(), iomap();
#endif
#endif

View File

@ -1,6 +1,6 @@
#! /usr/bin/awk -f
#
# $NetBSD: devlist2h.awk,v 1.1 1996/12/17 08:41:02 thorpej Exp $
# $NetBSD: devlist2h.awk,v 1.2 1997/01/30 09:18:36 thorpej Exp $
#
# Copyright (c) 1996 Jason R. Thorpe. All rights reserved.
# Copyright (c) 1995, 1996 Christopher G. Demetriou

View File

@ -1,4 +1,4 @@
/* $NetBSD: dio.c,v 1.2 1997/01/12 21:27:26 thorpej Exp $ */
/* $NetBSD: dio.c,v 1.3 1997/01/30 09:18:37 thorpej Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -60,7 +60,6 @@ extern caddr_t internalhpib;
int dio_scodesize __P((struct dio_attach_args *));
char *dio_devinfo __P((struct dio_attach_args *, char *, size_t));
#ifdef NEWCONFIG
int diomatch __P((struct device *, struct cfdata *, void *));
void dioattach __P((struct device *, struct device *, void *));
int dioprint __P((void *, const char *));
@ -190,7 +189,6 @@ dioprint(aux, pnp)
printf(" scode %d", da->da_scode);
return (UNCONF);
}
#endif /* NEWCONFIG */
/*
* Convert a select code to a system physical address.

View File

@ -1,4 +1,4 @@
$NetBSD: diodevs,v 1.1 1996/12/17 08:41:03 thorpej Exp $
$NetBSD: diodevs,v 1.2 1997/01/30 09:18:38 thorpej Exp $
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.

View File

@ -2,7 +2,7 @@
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
* NetBSD: diodevs,v 1.1 1996/12/17 08:41:03 thorpej Exp
* NetBSD:
*/
/*-

View File

@ -2,7 +2,7 @@
* THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.
*
* generated from:
* NetBSD: diodevs,v 1.1 1996/12/17 08:41:03 thorpej Exp
* NetBSD:
*/
/*-

View File

@ -1,4 +1,4 @@
/* $NetBSD: dioreg.h,v 1.2 1997/01/12 21:27:27 thorpej Exp $ */
/* $NetBSD: dioreg.h,v 1.3 1997/01/30 09:18:40 thorpej Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.

View File

@ -1,4 +1,4 @@
/* $NetBSD: diovar.h,v 1.1 1996/12/17 08:41:05 thorpej Exp $ */
/* $NetBSD: diovar.h,v 1.2 1997/01/30 09:18:41 thorpej Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf.c,v 1.22 1997/01/10 00:07:27 scottr Exp $ */
/* $NetBSD: grf.c,v 1.23 1997/01/30 09:18:42 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -82,14 +82,13 @@ extern struct emul emul_hpux;
#if NITE > 0
#include <hp300/dev/itevar.h>
#else
#define iteon(u,f) 0 /* normally returns int */
#define iteon(u,f) 0 /* noramlly returns int */
#define iteoff(u,f)
#endif /* NITE > 0 */
/* prototypes for the devsw entry points */
cdev_decl(grf);
#ifdef NEWCONFIG
int grfmatch __P((struct device *, struct cfdata *, void *));
void grfattach __P((struct device *, struct device *, void *));
@ -102,10 +101,6 @@ struct cfdriver grf_cd = {
};
int grfprint __P((void *, const char *));
#else /* ! NEWCONFIG */
#include "grf.h"
struct grf_softc grf_softc[NGRF];
#endif /* NEWCONFIG */
/*
* Frambuffer state information, statically allocated for benefit
@ -121,7 +116,6 @@ int grfdebug = 0;
#define GDB_LOCK 0x08
#endif
#ifdef NEWCONFIG
int
grfmatch(parent, match, aux)
struct device *parent;
@ -161,7 +155,6 @@ grfprint(aux, pnp)
return (UNCONF);
}
#endif /* NEWCONFIG */
/*ARGSUSED*/
int
@ -175,15 +168,9 @@ grfopen(dev, flags, mode, p)
struct grf_data *gp;
int error = 0;
#ifdef NEWCONFIG
if (unit >= grf_cd.cd_ndevs ||
(sc = grf_cd.cd_devs[unit]) == NULL)
return (ENXIO);
#else
if (unit >= NGRF)
return(ENXIO);
sc = &grf_softc[unit];
#endif
gp = sc->sc_data;
@ -230,11 +217,7 @@ grfclose(dev, flags, mode, p)
struct grf_softc *sc;
struct grf_data *gp;
#ifdef NEWCONFIG
sc = grf_cd.cd_devs[unit];
#else
sc = &grf_softc[unit];
#endif
gp = sc->sc_data;
@ -262,11 +245,7 @@ grfioctl(dev, cmd, data, flag, p)
struct grf_data *gp;
int error, unit = GRFUNIT(dev);
#ifdef NEWCONFIG
sc = grf_cd.cd_devs[unit];
#else
sc = &grf_softc[unit];
#endif
gp = sc->sc_data;
@ -325,11 +304,7 @@ grfmmap(dev, off, prot)
dev_t dev;
int off, prot;
{
#ifdef NEWCONFIG
struct grf_softc *sc = grf_cd.cd_devs[GRFUNIT(dev)];
#else
struct grf_softc *sc = &grf_softc[GRFUNIT(dev)];
#endif
return (grfaddr(sc, off));
}
@ -342,11 +317,7 @@ grfon(dev)
struct grf_softc *sc;
struct grf_data *gp;
#ifdef NEWCONFIG
sc = grf_cd.cd_devs[unit];
#else
sc = &grf_softc[unit];
#endif
gp = sc->sc_data;
/*
@ -369,11 +340,7 @@ grfoff(dev)
struct grf_data *gp;
int error;
#ifdef NEWCONFIG
sc = grf_cd.cd_devs[unit];
#else
sc = &grf_softc[unit];
#endif
gp = sc->sc_data;
(void) grfunmap(dev, (caddr_t)0, curproc);
@ -381,7 +348,7 @@ grfoff(dev)
(dev&GRFOVDEV) ? GM_GRFOVOFF : GM_GRFOFF,
(caddr_t)0);
/* XXX: see comment for iteoff above */
iteon(sc->sc_ite->sc_data, 2);
(void) iteon(sc->sc_ite->sc_data, 2);
return(error);
}
@ -419,11 +386,7 @@ hpuxgrfioctl(dev, cmd, data, flag, p)
caddr_t data;
struct proc *p;
{
#ifdef NEWCONFIG
struct grf_softc *sc = grf_cd.cd_devs[GRFUNIT(dev)];
#else
struct grf_softc *sc = &grf_softc[GRFUNIT(dev)];
#endif
struct grf_data *gp = sc->sc_data;
int error;
@ -621,15 +584,9 @@ grfdevno(dev)
struct grf_data *gp;
int newdev;
#ifdef NEWCONFIG
if (unit >= grf_cd.cd_ndevs ||
(sc = grf_cd.cd_devs[unit]) == NULL)
return (bsdtohpuxdev(dev));
#else
if (unit >= NGRF)
return (bsdtohpuxdev(dev));
sc = &grf_softc[unit];
#endif
gp = sc->sc_data;
if ((gp->g_flags & GF_ALIVE) == 0)
@ -659,11 +616,7 @@ grfmap(dev, addrp, p)
caddr_t *addrp;
struct proc *p;
{
#ifdef NEWCONFIG
struct grf_softc *sc = grf_cd.cd_devs[GRFUNIT(dev)];
#else
struct grf_softc *sc = &grf_softc[GRFUNIT(dev)];
#endif
struct grf_data *gp = sc->sc_data;
int len, error;
struct vnode vn;
@ -696,11 +649,7 @@ grfunmap(dev, addr, p)
caddr_t addr;
struct proc *p;
{
#ifdef NEWCONFIG
struct grf_softc *sc = grf_cd.cd_devs[GRFUNIT(dev)];
#else
struct grf_softc *sc = &grf_softc[GRFUNIT(dev)];
#endif
struct grf_data *gp = sc->sc_data;
vm_size_t size;
int rv;

View File

@ -1,82 +0,0 @@
/* $NetBSD: grf_conf.c,v 1.4 1996/12/17 08:41:06 thorpej Exp $ */
/*
* XXX This file is old config only!
*/
/*
* Copyright (c) 1996 Jason R. Thorpe. All rights reserved.
* Copyright (c) 1991 University of Utah.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* the Systems Programming Group of the University of Utah Computer
* Science Department.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* from: Utah $Hdr: grf_conf.c 1.2 92/01/22$
*
* @(#)grf_conf.c 8.1 (Berkeley) 6/10/93
*/
/*
* XXX this information could be generated by config.
*/
#include "grf.h"
#if NGRF > 0
#include <sys/types.h>
#include <sys/device.h>
#include <hp300/dev/grfioctl.h> /* XXX */
#include <hp300/dev/grfvar.h>
extern struct grfsw dvbox_grfsw;
extern struct grfsw gbox_grfsw;
extern struct grfsw hyper_grfsw;
extern struct grfsw rbox_grfsw;
extern struct grfsw topcat_grfsw;
extern struct grfsw lrcatseye_grfsw;
extern struct grfsw hrcatseye_grfsw;
extern struct grfsw hrmcatseye_grfsw;
struct grfsw *grfsw[] = {
&topcat_grfsw,
&gbox_grfsw,
&rbox_grfsw,
&lrcatseye_grfsw,
&hrcatseye_grfsw,
&hrmcatseye_grfsw,
&dvbox_grfsw,
&hyper_grfsw,
};
int ngrfsw = sizeof(grfsw) / sizeof(grfsw[0]);
#endif /* NGRF > 0 */

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_dv.c,v 1.9 1996/12/17 08:41:07 thorpej Exp $ */
/* $NetBSD: grf_dv.c,v 1.10 1997/01/30 09:18:45 thorpej Exp $ */
/*
* Copyright (c) 1996 Jason R. Thorpe. All rights reserved.
@ -78,7 +78,6 @@ int dv_init __P((struct grf_data *, int, caddr_t));
int dv_mode __P((struct grf_data *, int, caddr_t));
void dv_reset __P((struct dvboxfb *));
#ifdef NEWCONFIG
int dvbox_intio_match __P((struct device *, struct cfdata *, void *));
void dvbox_intio_attach __P((struct device *, struct device *, void *));
@ -96,7 +95,6 @@ struct cfattach dvbox_dio_ca = {
struct cfdriver dvbox_cd = {
NULL, "dvbox", DV_DULL
};
#endif /* NEWCONFIG */
/* DaVinci grf switch */
struct grfsw dvbox_grfsw = {
@ -120,7 +118,6 @@ struct itesw dvbox_itesw = {
};
#endif /* NITE > 0 */
#ifdef NEWCONFIG
int
dvbox_intio_match(parent, match, aux)
struct device *parent;
@ -195,7 +192,6 @@ dvbox_dio_attach(parent, self, aux)
grfdev_attach(sc, dv_init, grf, &dvbox_grfsw);
}
#endif /* NEWCONFIG */
/*
* Initialize hardware.

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_gb.c,v 1.9 1996/12/17 08:41:08 thorpej Exp $ */
/* $NetBSD: grf_gb.c,v 1.10 1997/01/30 09:18:45 thorpej Exp $ */
/*
* Copyright (c) 1996 Jason R. Thorpe. All rights reserved.
@ -88,7 +88,6 @@ int gb_init __P((struct grf_data *gp, int, caddr_t));
int gb_mode __P((struct grf_data *gp, int, caddr_t));
void gb_microcode __P((struct gboxfb *));
#ifdef NEWCONFIG
int gbox_intio_match __P((struct device *, struct cfdata *, void *));
void gbox_intio_attach __P((struct device *, struct device *, void *));
@ -106,7 +105,6 @@ struct cfattach gbox_dio_ca = {
struct cfdriver gbox_cd = {
NULL, "gbox", DV_DULL
};
#endif /* NEWCONFIG */
/* Gatorbox grf switch */
struct grfsw gbox_grfsw = {
@ -130,7 +128,6 @@ struct itesw gbox_itesw = {
};
#endif /* NITE > 0 */
#ifdef NEWCONFIG
int
gbox_intio_match(parent, match, aux)
struct device *parent;
@ -205,7 +202,6 @@ gbox_dio_attach(parent, self, aux)
grfdev_attach(sc, gb_init, grf, &gbox_grfsw);
}
#endif /* NEWCONFIG */
/*
* Initialize hardware.

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_hy.c,v 1.7 1996/12/17 08:41:09 thorpej Exp $ */
/* $NetBSD: grf_hy.c,v 1.8 1997/01/30 09:18:47 thorpej Exp $ */
/*
* Copyright (c) 1996 Jason R. Thorpe. All rights reserved.
@ -82,7 +82,6 @@ int hy_init __P((struct grf_data *gp, int, caddr_t));
int hy_mode __P((struct grf_data *gp, int, caddr_t));
void hyper_ite_fontinit __P((struct ite_data *));
#ifdef NEWCONFIG
int hyper_dio_match __P((struct device *, struct cfdata *, void *));
void hyper_dio_attach __P((struct device *, struct device *, void *));
@ -93,7 +92,6 @@ struct cfattach hyper_dio_ca = {
struct cfdriver hyper_cd = {
NULL, "hyper", DV_DULL
};
#endif /* NEWCONFIG */
/* Hyperion grf switch */
struct grfsw hyper_grfsw = {
@ -118,7 +116,6 @@ struct itesw hyper_itesw = {
};
#endif /* NITE > 0 */
#ifdef NEWCONFIG
int
hyper_dio_match(parent, match, aux)
struct device *parent;
@ -157,7 +154,6 @@ hyper_dio_attach(parent, self, aux)
grfdev_attach(sc, hy_init, grf, &hyper_grfsw);
}
#endif /* NEWCONFIG */
/*
* Initialize hardware.

View File

@ -1,178 +0,0 @@
/* $NetBSD: grf_machdep.c,v 1.7 1996/12/17 08:41:09 thorpej Exp $ */
/*
* XXX This file is old config only!
*/
/*
* Copyright (c) 1996 Jason R. Thorpe. All rights reserved.
* Copyright (c) 1991 University of Utah.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* the Systems Programming Group of the University of Utah Computer
* Science Department.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* from: Utah $Hdr: grf_machdep.c 1.1 92/01/21
*
* @(#)grf_machdep.c 8.2 (Berkeley) 1/12/94
*/
/*
* Graphics display driver for the HP300/400 DIO/DIO-II based machines.
* This is the hardware-dependent configuration portion of the driver.
*/
#include "grf.h"
#if NGRF > 0
#include <sys/param.h>
#include <sys/malloc.h>
#include <sys/systm.h>
#include <machine/autoconf.h>
#include <hp300/dev/device.h>
#include <hp300/dev/grfioctl.h>
#include <hp300/dev/grfvar.h>
#include <hp300/dev/grfreg.h>
#include <hp300/dev/itevar.h>
#include "ite.h"
int grfmatch();
void grfattach();
int grfinit __P((struct hp_device *, struct grf_data *, int));
struct driver grfdriver = { grfmatch, grfattach, "grf" };
int
grfmatch(hd)
struct hp_device *hd;
{
struct grf_softc *sc = &grf_softc[hd->hp_unit];
int scode;
if (hd->hp_args->hw_pa == (caddr_t)GRFIADDR) /* XXX */
scode = -1;
else
scode = hd->hp_args->hw_sc;
if (scode == conscode) {
/*
* We've already been initialized.
*/
sc->sc_data = &grf_cn;
return (1);
}
/*
* Allocate storage space for the grf_data.
*/
sc->sc_data = (struct grf_data *)malloc(sizeof(struct grf_data),
M_DEVBUF, M_NOWAIT);
if (sc->sc_data == NULL) {
printf("grfmatch: malloc for grf_data failed\n");
return (0);
}
bzero(sc->sc_data, sizeof(struct grf_data));
return (grfinit(hd, sc->sc_data, scode));
}
void
grfattach(hd)
struct hp_device *hd;
{
struct grf_softc *sc = &grf_softc[hd->hp_unit];
struct grf_data *gp = sc->sc_data;
int scode, isconsole;
if (hd->hp_args->hw_pa == (caddr_t)GRFIADDR) /* XXX */
scode = -1;
else
scode = hd->hp_args->hw_sc;
if (scode == conscode)
isconsole = 1;
else
isconsole = 0;
sc->sc_scode = scode;
printf(": %d x %d ", gp->g_display.gd_dwidth,
gp->g_display.gd_dheight);
if (gp->g_display.gd_colors == 2)
printf("monochrome");
else
printf("%d color", gp->g_display.gd_colors);
printf(" %s display", gp->g_sw->gd_desc);
if (isconsole)
printf(" (console)");
printf("\n");
#if NITE > 0
/* XXX hack */
ite_attach_grf(hd->hp_unit, isconsole);
#endif /* NITE > 0 */
}
int
grfinit(hd, gp, scode)
struct hp_device *hd;
struct grf_data *gp;
int scode;
{
register struct grfsw *gsw;
struct grfreg *gr;
caddr_t addr = hd->hp_addr;
int i;
gr = (struct grfreg *) addr;
if (gr->gr_id != GRFHWID)
return(0);
for (i = 0; i < ngrfsw; ++i) {
gsw = grfsw[i];
if (gsw->gd_hwid == gr->gr_id2)
break;
}
if ((i < ngrfsw) && (*gsw->gd_init)(gp, scode, addr)) {
gp->g_sw = gsw;
gp->g_display.gd_id = gsw->gd_swid;
gp->g_flags = GF_ALIVE;
return(1);
}
return(0);
}
#endif /* NGRF > 0 */

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_rb.c,v 1.9 1996/12/17 08:41:10 thorpej Exp $ */
/* $NetBSD: grf_rb.c,v 1.10 1997/01/30 09:18:48 thorpej Exp $ */
/*
* Copyright (c) 1996 Jason R. Thorpe. All rights reserved.
@ -77,7 +77,6 @@
int rb_init __P((struct grf_data *gp, int, caddr_t));
int rb_mode __P((struct grf_data *gp, int, caddr_t));
#ifdef NEWCONFIG
int rbox_intio_match __P((struct device *, struct cfdata *, void *));
void rbox_intio_attach __P((struct device *, struct device *, void *));
@ -95,7 +94,6 @@ struct cfattach rbox_dio_ca = {
struct cfdriver rbox_cd = {
NULL, "rbox", DV_DULL
};
#endif /* NEWCONFIG */
/* Renaissance grf switch */
struct grfsw rbox_grfsw = {
@ -119,7 +117,6 @@ struct itesw rbox_itesw = {
};
#endif /* NITE > 0 */
#ifdef NEWCONFIG
int
rbox_intio_match(parent, match, aux)
struct device *parent;
@ -194,7 +191,6 @@ rbox_dio_attach(parent, self, aux)
grfdev_attach(sc, rb_init, grf, &rbox_grfsw);
}
#endif /* NEWCONFIG */
/*
* Initialize hardware.

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_subr.c,v 1.1 1996/12/17 08:41:11 thorpej Exp $ */
/* $NetBSD: grf_subr.c,v 1.2 1997/01/30 09:18:49 thorpej Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.

View File

@ -1,4 +1,4 @@
/* $NetBSD: grf_tc.c,v 1.9 1996/12/17 08:41:12 thorpej Exp $ */
/* $NetBSD: grf_tc.c,v 1.10 1997/01/30 09:18:50 thorpej Exp $ */
/*
* Copyright (c) 1996 Jason R. Thorpe. All rights reserved.
@ -77,7 +77,6 @@
int tc_init __P((struct grf_data *, int, caddr_t));
int tc_mode __P((struct grf_data *, int, caddr_t));
#ifdef NEWCONFIG
void topcat_common_attach __P((struct grfdev_softc *, caddr_t, u_int8_t));
int topcat_intio_match __P((struct device *, struct cfdata *, void *));
@ -97,7 +96,6 @@ struct cfattach topcat_dio_ca = {
struct cfdriver topcat_cd = {
NULL, "topcat", DV_DULL
};
#endif /* NEWCONFIG */
/* Topcat (bobcat) grf switch */
struct grfsw topcat_grfsw = {
@ -136,7 +134,6 @@ struct itesw topcat_itesw = {
};
#endif /* NITE > 0 */
#ifdef NEWCONFIG
int
topcat_intio_match(parent, match, aux)
struct device *parent;
@ -267,7 +264,6 @@ topcat_common_attach(sc, grf, secid)
grfdev_attach(sc, tc_init, grf, sw);
}
#endif /* NEWCONFIG */
/*
* Initialize hardware.

View File

@ -1,4 +1,4 @@
/* $NetBSD: grfvar.h,v 1.8 1996/12/17 08:41:12 thorpej Exp $ */
/* $NetBSD: grfvar.h,v 1.9 1997/01/30 09:18:51 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -123,15 +123,8 @@ struct grfdev_attach_args {
#ifdef _KERNEL
extern struct grf_data grf_cn; /* grf_data for console device */
#ifndef NEWCONFIG
extern struct grf_softc grf_softc[];
extern struct grfsw *grfsw[];
extern int ngrfsw;
#endif /* ! NEWCONFIG */
#ifdef NEWCONFIG
void grfdev_attach __P((struct grfdev_softc *,
int (*init)(struct grf_data *, int, caddr_t),
caddr_t, struct grfsw *));
#endif /* NEWCONFIG */
#endif /* _KERNEL */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le.c,v 1.36 1996/12/17 08:41:13 thorpej Exp $ */
/* $NetBSD: if_le.c,v 1.37 1997/01/30 09:18:53 thorpej Exp $ */
/*-
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@ -65,10 +65,6 @@
#include <hp300/hp300/led.h>
#endif
#ifndef NEWCONFIG
#include <hp300/dev/device.h>
#endif
#include <dev/ic/am7990reg.h>
#include <dev/ic/am7990var.h>
@ -78,24 +74,12 @@
#include <hp300/dev/if_lereg.h>
#include <hp300/dev/if_levar.h>
#ifdef NEWCONFIG
int lematch __P((struct device *, struct cfdata *, void *));
void leattach __P((struct device *, struct device *, void *));
struct cfattach le_ca = {
sizeof(struct le_softc), lematch, leattach
};
#else /* ! NEWCONFIG */
#include "le.h"
struct le_softc le_softc[NLE];
int lematch __P((struct hp_device *));
void leattach __P((struct hp_device *));
struct driver ledriver = {
lematch, leattach, "le",
};
#endif /* NEWCONFIG */
int leintr __P((void *));
@ -139,7 +123,6 @@ lerdcsr(sc, port)
return (val);
}
#ifdef NEWCONFIG
int
lematch(parent, match, aux)
struct device *parent;
@ -152,76 +135,38 @@ lematch(parent, match, aux)
return (1);
return (0);
}
#else /* ! NEWCONFIG */
int
lematch(hd)
struct hp_device *hd;
{
register struct lereg0 *ler0;
struct le_softc *lesc = &le_softc[hd->hp_unit];
ler0 = (struct lereg0 *)(lestd[0] + (int)hd->hp_addr);
if (ler0->ler0_id != LEID)
return (0);
hd->hp_ipl = LE_IPL(ler0->ler0_status);
lesc->sc_hd = hd;
return (1);
}
#endif /* NEWCONFIG */
/*
* Interface exists: make available by filling in network interface
* record. System will initialize the interface when it is ready
* to accept packets.
*/
#ifdef NEWCONFIG
void
leattach(parent, self, aux)
struct device *parent, *self;
void *aux;
#else /* ! NEWCONFIG */
void
leattach(hd)
struct hp_device *hd;
#endif /* NEWCONFIG */
{
register struct lereg0 *ler0;
#ifdef NEWCONFIG
struct dio_attach_args *da = aux;
struct le_softc *lesc = (struct le_softc *)self;
caddr_t addr;
#else
struct le_softc *lesc = &le_softc[hd->hp_unit];
caddr_t addr = hd->hp_addr;
#endif /* NEWCONFIG */
struct am7990_softc *sc = &lesc->sc_am7990;
char *cp;
int i, ipl;
#ifdef NEWCONFIG
addr = iomap(dio_scodetopa(da->da_scode), da->da_size);
if (addr == 0) {
printf("\n%s: can't map LANCE registers\n",
sc->sc_dev.dv_xname);
return;
}
#endif /* NEWCONFIG */
ler0 = lesc->sc_r0 = (struct lereg0 *)(lestd[0] + (int)addr);
ler0->ler0_id = 0xFF;
DELAY(100);
#ifdef NEWCONFIG
ipl = DIO_IPL(addr);
printf(" ipl %d", ipl);
#else /* ! NEWCONFIG */
/* XXXX kluge for now */
hd->hp_dev.dv_class = DV_IFNET;
bcopy(&hd->hp_dev, &sc->sc_dev, sizeof(struct device));
ipl = hd->hp_ipl;
#endif /* NEWCONFIG */
lesc->sc_r1 = (struct lereg1 *)(lestd[1] + (int)addr);
sc->sc_mem = (void *)(lestd[2] + (int)addr);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_levar.h,v 1.5 1996/12/17 08:41:14 thorpej Exp $ */
/* $NetBSD: if_levar.h,v 1.6 1997/01/30 09:18:54 thorpej Exp $ */
/*-
* Copyright (c) 1995 Charles M. Hannum. All rights reserved.
@ -49,9 +49,6 @@
struct le_softc {
struct am7990_softc sc_am7990; /* glue to MI code */
#ifndef NEWCONFIG
struct hp_device *sc_hd;
#endif
struct isr sc_isr;
struct lereg0 *sc_r0; /* DIO registers */
struct lereg1 *sc_r1; /* LANCE registers */

View File

@ -1,4 +1,4 @@
/* $NetBSD: intio.c,v 1.1 1996/12/17 08:41:15 thorpej Exp $ */
/* $NetBSD: intio.c,v 1.2 1997/01/30 09:18:54 thorpej Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.

View File

@ -1,4 +1,4 @@
/* $NetBSD: intiovar.h,v 1.1 1996/12/17 08:41:15 thorpej Exp $ */
/* $NetBSD: intiovar.h,v 1.2 1997/01/30 09:18:55 thorpej Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.

View File

@ -1,4 +1,4 @@
/* $NetBSD: ite.c,v 1.34 1996/12/17 08:41:16 thorpej Exp $ */
/* $NetBSD: ite.c,v 1.35 1997/01/30 09:18:56 thorpej Exp $ */
/*
* Copyright (c) 1996 Jason R. Thorpe. All rights reserved.
@ -87,7 +87,6 @@ int iteburst = 64;
struct ite_data *kbd_ite = NULL;
#ifdef NEWCONFIG
int itematch __P((struct device *, struct cfdata *, void *));
void iteattach __P((struct device *, struct device *, void *));
@ -98,10 +97,6 @@ struct cfattach ite_ca = {
struct cfdriver ite_cd = {
NULL, "ite", DV_TTY
};
#else /* ! NEWCONFIG */
#include "grf.h"
struct ite_softc ite_softc[NGRF];
#endif /* NEWCONFIG */
/*
* Terminal emulator state information, statically allocated
@ -140,7 +135,6 @@ u_char ite_console_attributes[0x2200];
(*(sp)->ite_cursor)((ip), MOVE_CURSOR); \
}
#ifdef NEWCONFIG
int
itematch(parent, match, aux)
struct device *parent;
@ -190,59 +184,6 @@ iteattach(parent, self, aux)
printf("\n");
}
#else /* ! NEWCONFIG */
/*
* Dummy for pseudo-device config.
*/
/*ARGSUSED*/
void
iteattach(n)
int n;
{
}
/*
* Allocate storage for ite data structures.
* XXX This is a kludge and will go away with new config.
*/
void
ite_attach_grf(unit, isconsole)
int unit, isconsole;
{
struct ite_softc *ite = &ite_softc[unit];
struct grf_softc *grf = &grf_softc[unit];
/*
* Check to see if our structure is pre-allocated.
*/
if (isconsole) {
ite->sc_data = &ite_cn;
/*
* We didn't know which unit this would be during
* the console probe, so we have to fixup cn_dev here.
*/
cn_tab->cn_dev = makedev(ite_major(), unit);
} else {
ite->sc_data =
(struct ite_data *)malloc(sizeof(struct ite_data),
M_DEVBUF, M_NOWAIT);
if (ite->sc_data == NULL) {
printf("ite_attach_grf: malloc for ite_data failed\n");
return;
}
bzero(ite->sc_data, sizeof(struct ite_data));
}
/*
* Cross-reference the ite and the grf.
*/
ite->sc_grf = grf;
grf->sc_ite = ite;
printf("ite%d at grf%d: attached\n", unit, unit);
}
#endif /* NEWCONFIG */
/*
* Perform functions necessary to setup device as a terminal emulator.
@ -356,15 +297,9 @@ iteopen(dev, mode, devtype, p)
int error;
int first = 0;
#ifdef NEWCONFIG
if (unit >= ite_cd.cd_ndevs ||
(sc = ite_cd.cd_devs[unit]) == NULL)
return (ENXIO);
#else
if (unit >= NGRF)
return (ENXIO);
sc = &ite_softc[unit];
#endif
ip = sc->sc_data;
if (ip->tty == NULL) {
@ -410,11 +345,7 @@ iteclose(dev, flag, mode, p)
int flag, mode;
struct proc *p;
{
#ifdef NEWCONFIG
struct ite_softc *sc = ite_cd.cd_devs[ITEUNIT(dev)];
#else
struct ite_softc *sc = &ite_softc[ITEUNIT(dev)];
#endif
struct ite_data *ip = sc->sc_data;
struct tty *tp = ip->tty;
@ -435,11 +366,7 @@ iteread(dev, uio, flag)
struct uio *uio;
int flag;
{
#ifdef NEWCONFIG
struct ite_softc *sc = ite_cd.cd_devs[ITEUNIT(dev)];
#else
struct ite_softc *sc = &ite_softc[ITEUNIT(dev)];
#endif
struct tty *tp = sc->sc_data->tty;
return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
@ -451,11 +378,7 @@ itewrite(dev, uio, flag)
struct uio *uio;
int flag;
{
#ifdef NEWCONFIG
struct ite_softc *sc = ite_cd.cd_devs[ITEUNIT(dev)];
#else
struct ite_softc *sc = &ite_softc[ITEUNIT(dev)];
#endif
struct tty *tp = sc->sc_data->tty;
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
@ -465,11 +388,7 @@ struct tty *
itetty(dev)
dev_t dev;
{
#ifdef NEWCONFIG
struct ite_softc *sc = ite_cd.cd_devs[ITEUNIT(dev)];
#else
struct ite_softc *sc = &ite_softc[ITEUNIT(dev)];
#endif
return (sc->sc_data->tty);
}
@ -482,11 +401,7 @@ iteioctl(dev, cmd, addr, flag, p)
int flag;
struct proc *p;
{
#ifdef NEWCONFIG
struct ite_softc *sc = ite_cd.cd_devs[ITEUNIT(dev)];
#else
struct ite_softc *sc = &ite_softc[ITEUNIT(dev)];
#endif
struct ite_data *ip = sc->sc_data;
struct tty *tp = ip->tty;
int error;
@ -509,11 +424,7 @@ itestart(tp)
struct ite_softc *sc;
struct ite_data *ip;
#ifdef NEWCONFIG
sc = ite_cd.cd_devs[ITEUNIT(tp->t_dev)];
#else
sc = &ite_softc[ITEUNIT(tp->t_dev)];
#endif
ip = sc->sc_data;
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: itevar.h,v 1.12 1997/01/09 01:07:59 scottr Exp $ */
/* $NetBSD: itevar.h,v 1.13 1997/01/30 09:18:57 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -93,7 +93,7 @@ struct ite_softc {
struct ite_data *sc_data; /* terminal state info */
struct grf_softc *sc_grf; /* pointer to framebuffer */
};
#endif
#endif /* _KERNEL */
/* Flags */
#define ITE_ALIVE 0x01 /* hardware exists */