Fix autoconfiguration stuff to match the alpha. The DS3100 will now
configure properly. Also fix devices with TurboChannel and mainbus attachments so they will work if no TurboChannel was configured. Fix a panic when the dtop keyboard handler receieves a character before the device has been opened.
This commit is contained in:
parent
9d8526a68d
commit
de1b9b4230
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cfb.c,v 1.18 1996/04/08 00:57:45 jonathan Exp $ */
|
||||
/* $NetBSD: cfb.c,v 1.19 1996/05/29 06:15:40 mhitch Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -182,7 +182,7 @@ cfbmatch(parent, match, aux)
|
|||
void *aux;
|
||||
{
|
||||
/*struct cfdata *cf = match;*/
|
||||
struct confargs *ca = aux;
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
||||
#ifdef FBDRIVER_DOES_ATTACH
|
||||
/* leave configuration to the fb driver */
|
||||
|
@ -190,7 +190,7 @@ cfbmatch(parent, match, aux)
|
|||
#endif
|
||||
|
||||
/* make sure that we're looking for this type of device. */
|
||||
if (!TC_BUS_MATCHNAME(ca, "PMAG-BA "))
|
||||
if (!TC_BUS_MATCHNAME(ta, "PMAG-BA "))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
@ -207,8 +207,8 @@ cfbattach(parent, self, aux)
|
|||
struct device *self;
|
||||
void *aux;
|
||||
{
|
||||
struct confargs *ca = aux;
|
||||
caddr_t base = (caddr_t)(ca->ca_addr);
|
||||
struct tc_attach_args *ta = aux;
|
||||
caddr_t base = (caddr_t)(ta->ta_addr);
|
||||
int unit = self->dv_unit;
|
||||
struct fbinfo *fi = (struct fbinfo *) self;
|
||||
|
||||
|
@ -230,7 +230,7 @@ cfbattach(parent, self, aux)
|
|||
* disabling of TC option interrupts doesn't work.
|
||||
*/
|
||||
if (pmax_boardtype == DS_3MIN) {
|
||||
tc_intr_establish(parent, (void*)ca->ca_slotpri, TC_IPL_NONE,
|
||||
tc_intr_establish(parent, (void*)ta->ta_cookie, TC_IPL_NONE,
|
||||
cfb_intr, fi);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dc.c,v 1.16 1996/05/19 00:58:03 jonathan Exp $ */
|
||||
/* $NetBSD: dc.c,v 1.17 1996/05/29 06:15:45 mhitch Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -78,6 +78,8 @@
|
|||
#include <sys/device.h>
|
||||
#include <machine/autoconf.h>
|
||||
#include <machine/machConst.h>
|
||||
#include <dev/tc/tcvar.h>
|
||||
#include <dev/tc/ioasicvar.h>
|
||||
|
||||
#include <machine/dc7085cons.h>
|
||||
#include <machine/pmioctl.h>
|
||||
|
@ -89,10 +91,12 @@
|
|||
#include <pmax/dev/lk201.h>
|
||||
|
||||
#include "dcvar.h"
|
||||
#include "tc.h"
|
||||
|
||||
#include <pmax/dev/lk201var.h> /* XXX KbdReset band friends */
|
||||
|
||||
extern int pmax_boardtype;
|
||||
extern struct cfdriver mainbus_cd;
|
||||
|
||||
struct dc_softc {
|
||||
struct device sc_dv;
|
||||
|
@ -203,9 +207,20 @@ dcmatch(parent, match, aux)
|
|||
void *aux;
|
||||
{
|
||||
struct confargs *ca = aux;
|
||||
#if NTC>0
|
||||
struct ioasicdev_attach_args *d = aux;
|
||||
#endif
|
||||
|
||||
static int nunits = 0;
|
||||
|
||||
#if NTC>0
|
||||
if (parent->dv_cfdata->cf_driver != &mainbus_cd &&
|
||||
strcmp(d->iada_modname, "dc") != 0 &&
|
||||
strcmp(d->iada_modname, "mdc") != 0 &&
|
||||
strcmp(d->iada_modname, "dc7085") != 0)
|
||||
return (0);
|
||||
else
|
||||
#endif
|
||||
if (strcmp(ca->ca_name, "dc") != 0 &&
|
||||
strcmp(ca->ca_name, "mdc") != 0 &&
|
||||
strcmp(ca->ca_name, "dc7085") != 0)
|
||||
|
@ -230,15 +245,32 @@ dcattach(parent, self, aux)
|
|||
void *aux;
|
||||
{
|
||||
register struct confargs *ca = aux;
|
||||
#if NTC>0
|
||||
struct ioasicdev_attach_args *d = aux;
|
||||
#endif
|
||||
caddr_t dcaddr;
|
||||
|
||||
dcaddr = (caddr_t)ca->ca_addr;
|
||||
(void) dc_doprobe((void*)MACH_PHYS_TO_UNCACHED(dcaddr),
|
||||
self->dv_unit, self->dv_cfdata->cf_flags,
|
||||
ca->ca_slot);
|
||||
#if NTC>0
|
||||
if (parent->dv_cfdata->cf_driver != &mainbus_cd) {
|
||||
dcaddr = (caddr_t)d->iada_addr;
|
||||
(void) dc_doprobe((void*)MACH_PHYS_TO_UNCACHED(dcaddr),
|
||||
self->dv_unit, self->dv_cfdata->cf_flags,
|
||||
(int)d->iada_cookie);
|
||||
/* tie pseudo-slot to device */
|
||||
ioasic_intr_establish(parent, d->iada_cookie, TC_IPL_TTY,
|
||||
dcintr, self);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
dcaddr = (caddr_t)ca->ca_addr;
|
||||
(void) dc_doprobe((void*)MACH_PHYS_TO_UNCACHED(dcaddr),
|
||||
self->dv_unit, self->dv_cfdata->cf_flags,
|
||||
ca->ca_slot);
|
||||
|
||||
/* tie pseudo-slot to device */
|
||||
BUS_INTR_ESTABLISH(ca, dcintr, self);
|
||||
/* tie pseudo-slot to device */
|
||||
BUS_INTR_ESTABLISH(ca, dcintr, self);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dtop.c,v 1.14 1996/05/19 01:12:40 jonathan Exp $ */
|
||||
/* $NetBSD: dtop.c,v 1.15 1996/05/29 06:15:48 mhitch Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -120,7 +120,8 @@ SOFTWARE.
|
|||
|
||||
#include <pmax/pmax/asic.h>
|
||||
#include <pmax/pmax/maxine.h>
|
||||
|
||||
#include <dev/tc/tcvar.h>
|
||||
#include <dev/tc/ioasicvar.h>
|
||||
|
||||
#include <pmax/dev/dtopreg.h>
|
||||
#include <pmax/dev/lk201.h>
|
||||
|
@ -239,12 +240,12 @@ dtopmatch(parent, match, aux)
|
|||
void *aux;
|
||||
{
|
||||
/*struct cfdata *cf = match;*/
|
||||
struct confargs *ca = aux;
|
||||
struct ioasicdev_attach_args *d = aux;
|
||||
|
||||
if (badaddr((caddr_t)(ca->ca_addr), 2))
|
||||
if (badaddr((caddr_t)(d->iada_addr), 2))
|
||||
return (0);
|
||||
|
||||
if (strcmp(ca->ca_name, "dtop") != 0)
|
||||
if (strcmp(d->iada_modname, "dtop") != 0)
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
@ -256,13 +257,13 @@ dtopattach(parent, self, aux)
|
|||
struct device *self;
|
||||
void *aux;
|
||||
{
|
||||
register struct confargs *ca = aux;
|
||||
register struct ioasicdev_attach_args *d = aux;
|
||||
struct dtop_softc *sc = (struct dtop_softc*) self;
|
||||
int i;
|
||||
|
||||
|
||||
sc->poll = (poll_reg_t)MACH_PHYS_TO_UNCACHED(XINE_REG_INTR);
|
||||
sc->data = (data_reg_t)ca->ca_addr;
|
||||
sc->data = (data_reg_t)d->iada_addr;
|
||||
|
||||
for (i = 0; i < DTOP_MAX_DEVICES; i++)
|
||||
sc->device[i].handler = dtop_null_device_handler;
|
||||
|
@ -276,7 +277,7 @@ dtopattach(parent, self, aux)
|
|||
sc->probed_once = 1;
|
||||
|
||||
/* tie pseudo-slot to device */
|
||||
BUS_INTR_ESTABLISH(ca, dtopintr, (void*)sc);
|
||||
ioasic_intr_establish(parent, d->iada_cookie, TC_IPL_NONE, dtopintr, sc);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
|
@ -884,7 +885,7 @@ dtop_keyboard_handler(dev, msg, event, outc)
|
|||
if (dtopDivertXInput) {
|
||||
(*dtopDivertXInput)(*ns);
|
||||
c = -1; /* consumed by X */
|
||||
} else if (c >= 0)
|
||||
} else if (c >= 0 && tp != NULL)
|
||||
(*linesw[tp->t_line].l_rint)(c, tp);
|
||||
dev->keyboard.k_ar_state = K_AR_ACTIVE;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mfb.c,v 1.13 1996/05/19 01:18:57 jonathan Exp $ */
|
||||
/* $NetBSD: mfb.c,v 1.14 1996/05/29 06:15:50 mhitch Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -210,7 +210,7 @@ mfbmatch(parent, match, aux)
|
|||
void *match;
|
||||
void *aux;
|
||||
{
|
||||
struct confargs *ca = aux;
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
||||
#ifdef FBDRIVER_DOES_ATTACH
|
||||
/* leave configuration to the fb driver */
|
||||
|
@ -218,7 +218,7 @@ mfbmatch(parent, match, aux)
|
|||
#endif
|
||||
|
||||
/* make sure that we're looking for this type of device. */
|
||||
if (!TC_BUS_MATCHNAME(ca, "PMAG-AA "))
|
||||
if (!TC_BUS_MATCHNAME(ta, "PMAG-AA "))
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
@ -230,15 +230,15 @@ mfbattach(parent, self, aux)
|
|||
struct device *self;
|
||||
void *aux;
|
||||
{
|
||||
struct confargs *ca = aux;
|
||||
caddr_t mfbaddr = (caddr_t) ca->ca_addr;
|
||||
struct tc_attach_args *ta = aux;
|
||||
caddr_t mfbaddr = (caddr_t) ta->ta_addr;
|
||||
int unit = self->dv_unit;
|
||||
|
||||
#ifdef notyet
|
||||
struct fbinfo *fi = &mfbfi;
|
||||
|
||||
/* if this is the console, it's already configured. */
|
||||
if (ca->ca_slotpri == cons_slot)
|
||||
if (ta->ta_cookie == cons_slot)
|
||||
return; /* XXX patch up f softc pointer */
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sfb.c,v 1.11 1996/04/08 00:57:44 jonathan Exp $ */
|
||||
/* $NetBSD: sfb.c,v 1.12 1996/05/29 06:15:52 mhitch Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -156,17 +156,17 @@ sfbmatch(parent, match, aux)
|
|||
void *aux;
|
||||
{
|
||||
/*struct cfdata *cf = match;*/
|
||||
struct confargs *ca = aux;
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
||||
/* make sure that we're looking for this type of device. */
|
||||
if (!TC_BUS_MATCHNAME(ca, "PMAGB-BA"))
|
||||
if (!TC_BUS_MATCHNAME(ta, "PMAGB-BA"))
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* if the TC rom ident matches, assume the VRAM is present too.
|
||||
*/
|
||||
#if 0
|
||||
if (badaddr( ((caddr_t)ca->ca_addr) + SFB_OFFSET_VRAM, 4))
|
||||
if (badaddr( ((caddr_t)ta->ta_addr) + SFB_OFFSET_VRAM, 4))
|
||||
return (0);
|
||||
#endif
|
||||
|
||||
|
@ -183,14 +183,14 @@ sfbattach(parent, self, aux)
|
|||
struct device *self;
|
||||
void *aux;
|
||||
{
|
||||
struct confargs *ca = aux;
|
||||
caddr_t sfbaddr = (caddr_t)ca->ca_addr;
|
||||
struct tc_attach_args *ta = aux;
|
||||
caddr_t sfbaddr = (caddr_t)ta->ta_addr;
|
||||
int unit = self->dv_unit;
|
||||
struct fbinfo *fi = (struct fbinfo *) self;
|
||||
|
||||
#ifdef notyet
|
||||
/* if this is the console, it's already configured. */
|
||||
if (ca->ca_slotpri == cons_slot)
|
||||
if (ta->ta_cookie == cons_slot)
|
||||
return; /* XXX patch up f softc pointer */
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: xcfb.c,v 1.14 1996/04/08 00:57:40 jonathan Exp $ */
|
||||
/* $NetBSD: xcfb.c,v 1.15 1996/05/29 06:15:53 mhitch Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -194,11 +194,11 @@ xcfbmatch(parent, match, aux)
|
|||
void *aux;
|
||||
{
|
||||
/*struct cfdata *cf = match;*/
|
||||
struct confargs *ca = aux;
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
||||
/* Make sure that it's an xcfb. */
|
||||
if (!TC_BUS_MATCHNAME(ca, "PMAG-DV ") &&
|
||||
strcmp(ca->ca_name, "xcfb") != 0)
|
||||
if (!TC_BUS_MATCHNAME(ta, "PMAG-DV ") &&
|
||||
strcmp(ta->ta_modname, "xcfb") != 0)
|
||||
return (0);
|
||||
|
||||
return (1);
|
||||
|
@ -210,9 +210,9 @@ xcfbattach(parent, self, aux)
|
|||
struct device *self;
|
||||
void *aux;
|
||||
{
|
||||
struct confargs *ca = aux;
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
||||
if (!xcfbinit(NULL, (caddr_t)ca->ca_addr, self->dv_unit, 0));
|
||||
if (!xcfbinit(NULL, (caddr_t)ta->ta_addr, self->dv_unit, 0));
|
||||
return;
|
||||
|
||||
/* no interrupts for XCFB */
|
||||
|
|
Loading…
Reference in New Issue