pmax has IPL_ constants; Define TC_IPL_ using them until all tc

drivers are converted to use IPL_.

Commit changes to if_le_ibus.c as a child of ibus.
This commit is contained in:
jonathan 1998-04-19 13:04:24 +00:00
parent fc2608c7a2
commit b4d3bac06e
2 changed files with 25 additions and 33 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_le_ibus.c,v 1.8 1998/01/12 09:51:32 thorpej Exp $ */
/* $NetBSD: if_le_ibus.c,v 1.9 1998/04/19 13:04:24 jonathan Exp $ */
/*
* Copyright 1996 The Board of Trustees of The Leland Stanford
@ -41,8 +41,8 @@
#include <dev/tc/if_levar.h>
#include <dev/tc/tcvar.h>
#include <machine/autoconf.h>
#include <pmax/ibus/ibusvar.h>
#include <pmax/pmax/kn01.h>
#include <pmax/pmax/kn01var.h>
extern void le_dec_copytobuf_gap2 __P((struct am7990_softc *, void *,
int, int));
@ -65,14 +65,18 @@ le_pmax_match(parent, match, aux)
struct cfdata *match;
void *aux;
{
extern struct cfdriver mainbus_cd;
struct ibus_attach_args *d = aux;
if (parent->dv_cfdata->cf_driver == &mainbus_cd) {
struct confargs *d = aux;
if (strcmp("lance", d->ca_name) == 0)
return (1);
}
return (0);
#define CFNAME(cf) ((cf)->dv_cfdata->cf_driver->cd_name)
if (strcmp(CFNAME(parent), "ibus") != 0)
return (0);
#undef CFNAME
if (strcmp("lance", d->ia_name) != 0)
return (0);
return (1);
}
void
@ -83,12 +87,12 @@ le_pmax_attach(parent, self, aux)
register struct le_softc *lesc = (void *)self;
register struct am7990_softc *sc = &lesc->sc_am7990;
register u_char *cp;
register struct confargs *ca = aux;
register struct ibus_attach_args *ia = aux;
/*
* It's on the baseboard, with a dedicated interrupt line.
*/
lesc->sc_r1 = (struct lereg1 *)(ca->ca_addr);
lesc->sc_r1 = (struct lereg1 *)(ia->ia_addr);
/*XXX*/ sc->sc_mem = (void *)TC_PHYS_TO_UNCACHED(0x19000000);
/*XXX*/ cp = (u_char *)(TC_PHYS_TO_UNCACHED(KN01_SYS_CLOCK) + 1);
@ -99,8 +103,9 @@ le_pmax_attach(parent, self, aux)
sc->sc_zerobuf = le_dec_zerobuf_gap2;
dec_le_common_attach(sc, cp);
/* XXX more thought about ca->slotpri */
kn01_intr_establish(parent, (void*)ca->ca_slotpri, TC_IPL_NET,
/* XXX more thought about ia->ia_cookie */
ibus_intr_establish((void*)ia->ia_cookie, TC_IPL_NET,
am7990_intr, sc);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcvar.h,v 1.11 1998/01/19 02:51:40 thorpej Exp $ */
/* $NetBSD: tcvar.h,v 1.12 1998/04/19 13:04:24 jonathan Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
@ -51,15 +51,13 @@ ERROR: COMPILING FOR UNSUPPORTED MACHINE, OR MORE THAN ONE.
#endif
/*
* In the long run, the following block will go completely away
* (i.e. both parts of the #if, including the #include, etc.).
* For now, the MI TC code still uses the old definitions provided
* by the pmax port, and not the new definitions provided by the
* alpha port.
* In the long run, the following block will go completely away.
* For now, the MI TC code still uses the old TC_IPL_ names
* and not the new IPL_ names.
*/
#ifdef __alpha__
#if 1
/*
* On the alpha, map the new definitions to the old.
* Map the new definitions to the old.
*/
#include <machine/intr.h>
@ -70,19 +68,8 @@ ERROR: COMPILING FOR UNSUPPORTED MACHINE, OR MORE THAN ONE.
#define TC_IPL_NET IPL_NET
#define TC_IPL_TTY IPL_TTY
#define TC_IPL_CLOCK IPL_CLOCK
#endif /* 1 */
#else
/*
* On the pmax, we still need the old definitions.
*/
typedef enum {
TC_IPL_NONE, /* block only this interrupt */
TC_IPL_BIO, /* block disk interrupts */
TC_IPL_NET, /* block network interrupts */
TC_IPL_TTY, /* block terminal interrupts */
TC_IPL_CLOCK, /* block clock interrupts */
} tc_intrlevel_t;
#endif
/*
* Arguments used to attach TurboChannel busses.