Following the example of the hpc/, gio/, and ioc/ directories, move the

mace devices to their own mace/ directory.  Alter conf/files.sgimips to
reflect this change in a sane manner (i.e., pull in dev/files.dev and
mace/files.mace when appropriate).

At the same time, allow crime_intr_establish() to fall through to
mace_intr_establish().  mace devices now call cpu_intr_establish().
This commit is contained in:
sekiya 2004-01-18 04:06:42 +00:00
parent c5bbd9dca0
commit 63b59c4db4
17 changed files with 59 additions and 123 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: files.sgimips,v 1.33 2004/01/18 00:55:26 sekiya Exp $
# $NetBSD: files.sgimips,v 1.34 2004/01/18 04:06:42 sekiya Exp $
maxpartitions 16
@ -14,61 +14,6 @@ device cpu
attach cpu at mainbus
file arch/sgimips/sgimips/cpu.c cpu
include "arch/sgimips/ioc/files.ioc"
define giobus {}
device imc: giobus, eisabus
attach imc at mainbus
file arch/sgimips/dev/imc.c imc
device pic: giobus
attach pic at mainbus
file arch/sgimips/dev/pic.c pic
device crime
attach crime at mainbus
file arch/sgimips/dev/crime.c crime
device mace {[offset = -1], [intr = -1], [intrmask = 0] }
attach mace at mainbus
file arch/sgimips/dev/mace.c mace
attach com at mace with com_mace
file arch/sgimips/dev/com_mace.c com_mace
device lpt
attach lpt at mace with lpt_mace
file arch/sgimips/dev/lpt_mace.c lpt_mace
file dev/ic/lpt.c lpt_mace
attach pckbc at mace with pckbc_mace
file arch/sgimips/dev/pckbc_mace.c pckbc_mace
device mcclock
attach mcclock at mace with mcclock_mace
file arch/sgimips/dev/mcclock_mace.c mcclock_mace
device mec: arp, ether, ifnet, mii
attach mec at mace
file arch/sgimips/dev/if_mec.c mec
device macau: audiobus, ad1848, auconv
attach macau at mace with macau
file arch/sgimips/dev/macau_mace.c macau
device macepci: pcibus
attach macepci at mace
file arch/sgimips/pci/macepci.c macepci
device zsc {[channel = -1]}
device zstty: tty
attach zstty at zsc
file dev/ic/z8530tty.c zstty needs-flag
file arch/sgimips/dev/zs_kgdb.c kgdb
file arch/sgimips/dev/zs.c zsc needs-flag
file dev/ic/z8530sc.c zsc
file dev/arcbios/arcbios.c
file dev/arcbios/arcbios_tty.c
@ -87,7 +32,12 @@ file dev/md_root.c memory_disk_hooks
file dev/cons.c
# Machine-independent I2O drivers.
# Machine-dependent drivers
include "arch/sgimips/ioc/files.ioc"
include "arch/sgimips/dev/files.dev"
include "arch/sgimips/mace/files.mace"
# Machine-independent drivers.
include "dev/i2o/files.i2o"
include "dev/pci/files.pci"

View File

@ -1,4 +1,4 @@
/* $NetBSD: crime.c,v 1.17 2004/01/18 00:54:55 sekiya Exp $ */
/* $NetBSD: crime.c,v 1.18 2004/01/18 04:06:42 sekiya Exp $ */
/*
* Copyright (c) 2004 Christopher SEKIYA
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.17 2004/01/18 00:54:55 sekiya Exp $");
__KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.18 2004/01/18 04:06:42 sekiya Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -55,6 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: crime.c,v 1.17 2004/01/18 00:54:55 sekiya Exp $");
#include <sgimips/dev/crimevar.h>
#include <sgimips/dev/crimereg.h>
#include <sgimips/mace/macevar.h>
#include "locators.h"
@ -182,6 +183,9 @@ crime_attach(struct device *parent, struct device *self, void *aux)
void *
crime_intr_establish(int irq, int level, int (*func)(void *), void *arg)
{
if (irq < 8)
return mace_intr_establish(irq, level, func, arg);
if (crime[irq].func != NULL)
return NULL; /* panic("Cannot share CRIME interrupts!"); */

View File

@ -1,4 +1,4 @@
/* $NetBSD: com_mace.c,v 1.11 2003/11/17 10:07:58 keihan Exp $ */
/* $NetBSD: com_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: com_mace.c,v 1.11 2003/11/17 10:07:58 keihan Exp $");
__KERNEL_RCSID(0, "$NetBSD: com_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -54,7 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: com_mace.c,v 1.11 2003/11/17 10:07:58 keihan Exp $")
#include <machine/autoconf.h>
#include <machine/bus.h>
#include <sgimips/dev/macevar.h>
#include <sgimips/mace/macevar.h>
#include <dev/arcbios/arcbios.h>
#include <dev/arcbios/arcbiosvar.h>
@ -109,7 +109,7 @@ com_mace_attach(parent, self, aux)
com_attach_subr(sc);
delay(10000);
mace_intr_establish(maa->maa_intr, maa->maa_intrmask, comintr, sc);
cpu_intr_establish(maa->maa_intr, maa->maa_intrmask, comintr, sc);
return;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_mec.c,v 1.13 2004/01/11 14:01:46 sekiya Exp $ */
/* $NetBSD: if_mec_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $ */
/*
* Copyright (c) 2003 Christopher SEKIYA
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.13 2004/01/11 14:01:46 sekiya Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_mec_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $");
#include "opt_inet.h"
#include "opt_ns.h"
@ -82,9 +82,9 @@ __KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.13 2004/01/11 14:01:46 sekiya Exp $");
#include <dev/mii/mii.h>
#include <dev/mii/miivar.h>
#include <sgimips/dev/macevar.h>
#include <sgimips/mace/macevar.h>
#include <sgimips/dev/if_mecreg.h>
#include <sgimips/mace/if_mecreg.h>
#include <dev/arcbios/arcbios.h>
#include <dev/arcbios/arcbiosvar.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_mecreg.h,v 1.5 2004/01/11 14:01:46 sekiya Exp $ */
/* $NetBSD: if_mecreg.h,v 1.1 2004/01/18 04:06:43 sekiya Exp $ */
/*
* Copyright (c) 2001 Christopher Sekiya

View File

@ -1,4 +1,4 @@
/* $NetBSD: lpt_mace.c,v 1.8 2003/11/17 10:07:58 keihan Exp $ */
/* $NetBSD: lpt_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $ */
/*
* Copyright (c) 2003 Christopher SEKIYA
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lpt_mace.c,v 1.8 2003/11/17 10:07:58 keihan Exp $");
__KERNEL_RCSID(0, "$NetBSD: lpt_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -56,7 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: lpt_mace.c,v 1.8 2003/11/17 10:07:58 keihan Exp $");
#include <machine/bus.h>
#include <machine/machtype.h>
#include <sgimips/dev/macevar.h>
#include <sgimips/mace/macevar.h>
#include <dev/ic/lptreg.h>
#include <dev/ic/lptvar.h>
@ -109,7 +109,7 @@ lpt_mace_attach(parent, self, aux)
lpt_attach_subr(sc);
mace_intr_establish(maa->maa_intr, maa->maa_intrmask, lptintr, sc);
cpu_intr_establish(maa->maa_intr, maa->maa_intrmask, lptintr, sc);
return;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mace.c,v 1.15 2003/11/17 10:07:58 keihan Exp $ */
/* $NetBSD: mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $ */
/*
* Copyright (c) 2003 Christopher Sekiya
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.15 2003/11/17 10:07:58 keihan Exp $");
__KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -68,8 +68,8 @@ __KERNEL_RCSID(0, "$NetBSD: mace.c,v 1.15 2003/11/17 10:07:58 keihan Exp $");
#include <machine/autoconf.h>
#include <machine/machtype.h>
#include <sgimips/dev/macevar.h>
#include <sgimips/dev/macereg.h>
#include <sgimips/mace/macevar.h>
#include <sgimips/mace/macereg.h>
#include <sgimips/dev/crimevar.h>
#include <sgimips/dev/crimereg.h>
@ -111,10 +111,7 @@ static void mace_blink(void *);
#endif
static int
mace_match(parent, match, aux)
struct device *parent;
struct cfdata *match;
void *aux;
mace_match(struct device *parent, struct cfdata *match, void *aux)
{
/*
@ -127,10 +124,7 @@ mace_match(parent, match, aux)
}
static void
mace_attach(parent, self, aux)
struct device *parent;
struct device *self;
void *aux;
mace_attach(struct device *parent, struct device *self, void *aux)
{
struct mace_softc *sc = (struct mace_softc *)self;
struct mainbus_attach_args *ma = aux;
@ -222,9 +216,7 @@ mace_attach(parent, self, aux)
static int
mace_print(aux, pnp)
void *aux;
const char *pnp;
mace_print(void *aux, const char *pnp)
{
struct mace_attach_args *maa = aux;
@ -242,10 +234,7 @@ mace_print(aux, pnp)
}
static int
mace_search(parent, cf, aux)
struct device *parent;
struct cfdata *cf;
void *aux;
mace_search(struct device *parent, struct cfdata *cf, void *aux)
{
struct mace_softc *sc = (struct mace_softc *)parent;
struct mace_attach_args maa;
@ -272,11 +261,7 @@ mace_search(parent, cf, aux)
}
void *
mace_intr_establish(intr, level, func, arg)
int intr;
int level;
int (*func)(void *);
void *arg;
mace_intr_establish(int intr, int level, int (*func)(void *), void *arg)
{
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: macereg.h,v 1.6 2003/11/17 10:07:58 keihan Exp $ */
/* $NetBSD: macereg.h,v 1.1 2004/01/18 04:06:43 sekiya Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang

View File

@ -1,4 +1,4 @@
/* $NetBSD: macevar.h,v 1.5 2003/11/17 10:07:58 keihan Exp $ */
/* $NetBSD: macevar.h,v 1.1 2004/01/18 04:06:43 sekiya Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang

View File

@ -1,4 +1,4 @@
/* $NetBSD: mcclock_mace.c,v 1.12 2003/10/25 16:15:07 chs Exp $ */
/* $NetBSD: mcclock_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $ */
/*
* Copyright (c) 2001 Antti Kantee. All Rights Reserved.
@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mcclock_mace.c,v 1.12 2003/10/25 16:15:07 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: mcclock_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -82,7 +82,7 @@ __KERNEL_RCSID(0, "$NetBSD: mcclock_mace.c,v 1.12 2003/10/25 16:15:07 chs Exp $"
#include <dev/clock_subr.h>
#include <dev/ic/ds1687reg.h>
#include <sgimips/dev/macevar.h>
#include <sgimips/mace/macevar.h>
#include <sgimips/sgimips/clockvar.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: macepci.c,v 1.17 2004/01/18 00:50:08 sekiya Exp $ */
/* $NetBSD: pci_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $ */
/*
* Copyright (c) 2001,2003 Christopher Sekiya
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: macepci.c,v 1.17 2004/01/18 00:50:08 sekiya Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -51,10 +51,10 @@ __KERNEL_RCSID(0, "$NetBSD: macepci.c,v 1.17 2004/01/18 00:50:08 sekiya Exp $");
#include <dev/pci/pcireg.h>
#include <dev/pci/pcidevs.h>
#include <sgimips/dev/macereg.h>
#include <sgimips/dev/macevar.h>
#include <sgimips/mace/macereg.h>
#include <sgimips/mace/macevar.h>
#include <sgimips/pci/macepcireg.h>
#include <sgimips/mace/pcireg_mace.h>
#include <sgimips/pci/pci_addr_fixup.h>
#define PCIBIOS_PRINTV(arg) \
@ -220,7 +220,7 @@ macepci_attach(parent, self, aux)
pba.pba_flags &= ~PCI_FLAGS_IO_ENABLED; /* Buggy? */
#endif
mace_intr_establish(maa->maa_intr, IPL_NONE, macepci_intr, sc);
cpu_intr_establish(maa->maa_intr, IPL_NONE, macepci_intr, sc);
config_found(self, &pba, macepci_print);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: macepcireg.h,v 1.4 2003/11/17 10:07:58 keihan Exp $ */
/* $NetBSD: pcireg_mace.h,v 1.1 2004/01/18 04:06:43 sekiya Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang

View File

@ -1,4 +1,4 @@
/* $NetBSD: pckbc_mace.c,v 1.9 2003/11/17 10:07:58 keihan Exp $ */
/* $NetBSD: pckbc_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $ */
/*
* Copyright (c) 2003 Christopher SEKIYA
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pckbc_mace.c,v 1.9 2003/11/17 10:07:58 keihan Exp $");
__KERNEL_RCSID(0, "$NetBSD: pckbc_mace.c,v 1.1 2004/01/18 04:06:43 sekiya Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -50,7 +50,7 @@ __KERNEL_RCSID(0, "$NetBSD: pckbc_mace.c,v 1.9 2003/11/17 10:07:58 keihan Exp $"
#include <machine/bus.h>
#include <machine/machtype.h>
#include <sgimips/dev/macevar.h>
#include <sgimips/mace/macevar.h>
#include <dev/ic/i8042reg.h>
#include <dev/ic/pckbcvar.h>
@ -143,5 +143,5 @@ pckbc_mace_intr_establish(sc, slot)
pckbc_slot_t slot;
{
mace_intr_establish(5, 0, pckbcintr, sc);
cpu_intr_establish(5, 0, pckbcintr, sc);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.18 2003/11/17 10:07:58 keihan Exp $ */
/* $NetBSD: autoconf.c,v 1.19 2004/01/18 04:06:43 sekiya Exp $ */
/*
* Copyright (c) 2000 Soren S. Jorvang
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.18 2003/11/17 10:07:58 keihan Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.19 2004/01/18 04:06:43 sekiya Exp $");
#include "opt_ddb.h"
#include "opt_machtypes.h"
@ -53,9 +53,6 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.18 2003/11/17 10:07:58 keihan Exp $")
#include <dev/scsipi/scsipi_all.h>
#include <dev/scsipi/scsiconf.h>
#include <sgimips/dev/crimereg.h>
#include <sgimips/dev/macereg.h>
struct device *booted_device = NULL;
static struct device *booted_controller = NULL;
static int booted_slot, booted_unit, booted_partition;

View File

@ -1,4 +1,4 @@
/* $NetBSD: bus.c,v 1.26 2004/01/18 00:47:21 sekiya Exp $ */
/* $NetBSD: bus.c,v 1.27 2004/01/18 04:06:43 sekiya Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.26 2004/01/18 00:47:21 sekiya Exp $");
__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.27 2004/01/18 04:06:43 sekiya Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -61,7 +61,7 @@ __KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.26 2004/01/18 00:47:21 sekiya Exp $");
#include <mips/locore.h>
#include <mips/cache.h>
#include <sgimips/dev/macereg.h>
#include <sgimips/mace/macereg.h>
static int _bus_dmamap_load_buffer(bus_dmamap_t, void *, bus_size_t,
struct proc *, int, vaddr_t *, int *, int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: console.c,v 1.20 2004/01/18 01:00:48 sekiya Exp $ */
/* $NetBSD: console.c,v 1.21 2004/01/18 04:06:43 sekiya Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.20 2004/01/18 01:00:48 sekiya Exp $");
__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.21 2004/01/18 04:06:43 sekiya Exp $");
#include "opt_kgdb.h"
#include "opt_machtypes.h"
@ -51,7 +51,7 @@ __KERNEL_RCSID(0, "$NetBSD: console.c,v 1.20 2004/01/18 01:00:48 sekiya Exp $");
#include <sgimips/gio/giovar.h>
#include <sgimips/hpc/hpcreg.h>
#include <sgimips/ioc/iocreg.h>
#include <sgimips/dev/macereg.h>
#include <sgimips/mace/macereg.h>
#include "com.h"
#include "zsc.h"