Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sgimips Following the example of the hpc/, gio/, an...
details: https://anonhg.NetBSD.org/src/rev/e7c268af496f
branches: trunk
changeset: 557781:e7c268af496f
user: sekiya <sekiya%NetBSD.org@localhost>
date: Sun Jan 18 04:06:42 2004 +0000
description:
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().
diffstat:
sys/arch/sgimips/conf/files.sgimips | 64 +--
sys/arch/sgimips/dev/com_mace.c | 115 ----
sys/arch/sgimips/dev/crime.c | 8 +-
sys/arch/sgimips/dev/if_mec.c | 885 -----------------------------------
sys/arch/sgimips/dev/if_mecreg.h | 176 ------
sys/arch/sgimips/dev/lpt_mace.c | 115 ----
sys/arch/sgimips/dev/macaureg.h | 54 --
sys/arch/sgimips/dev/mace.c | 358 --------------
sys/arch/sgimips/dev/macereg.h | 165 ------
sys/arch/sgimips/dev/macevar.h | 47 -
sys/arch/sgimips/dev/mcclock_mace.c | 218 --------
sys/arch/sgimips/dev/pckbc_mace.c | 147 -----
sys/arch/sgimips/mace/com_mace.c | 115 ++++
sys/arch/sgimips/mace/if_mec_mace.c | 885 +++++++++++++++++++++++++++++++++++
sys/arch/sgimips/mace/if_mecreg.h | 176 ++++++
sys/arch/sgimips/mace/lpt_mace.c | 115 ++++
sys/arch/sgimips/mace/macaureg.h | 54 ++
sys/arch/sgimips/mace/mace.c | 343 +++++++++++++
sys/arch/sgimips/mace/macereg.h | 165 ++++++
sys/arch/sgimips/mace/macevar.h | 47 +
sys/arch/sgimips/mace/mcclock_mace.c | 218 ++++++++
sys/arch/sgimips/mace/pci_mace.c | 578 ++++++++++++++++++++++
sys/arch/sgimips/mace/pcireg_mace.h | 102 ++++
sys/arch/sgimips/mace/pckbc_mace.c | 147 +++++
sys/arch/sgimips/pci/macepci.c | 578 ----------------------
sys/arch/sgimips/pci/macepcireg.h | 102 ----
sys/arch/sgimips/sgimips/autoconf.c | 7 +-
sys/arch/sgimips/sgimips/bus.c | 6 +-
sys/arch/sgimips/sgimips/console.c | 6 +-
29 files changed, 2966 insertions(+), 3030 deletions(-)
diffs (truncated from 6204 to 300 lines):
diff -r 6df18b72c8c4 -r e7c268af496f sys/arch/sgimips/conf/files.sgimips
--- a/sys/arch/sgimips/conf/files.sgimips Sun Jan 18 03:57:30 2004 +0000
+++ b/sys/arch/sgimips/conf/files.sgimips Sun Jan 18 04:06:42 2004 +0000
@@ -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 @@
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/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"
diff -r 6df18b72c8c4 -r e7c268af496f sys/arch/sgimips/dev/com_mace.c
--- a/sys/arch/sgimips/dev/com_mace.c Sun Jan 18 03:57:30 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/* $NetBSD: com_mace.c,v 1.11 2003/11/17 10:07:58 keihan Exp $ */
-
-/*
- * Copyright (c) 2000 Soren S. Jorvang
- * 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 for the
- * NetBSD Project. See http://www.NetBSD.org/ for
- * information about NetBSD.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com_mace.c,v 1.11 2003/11/17 10:07:58 keihan Exp $");
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/ioctl.h>
-#include <sys/select.h>
-#include <sys/tty.h>
-#include <sys/proc.h>
-#include <sys/user.h>
-#include <sys/file.h>
-#include <sys/uio.h>
-#include <sys/kernel.h>
-#include <sys/syslog.h>
-#include <sys/types.h>
-#include <sys/device.h>
-
-#include <machine/cpu.h>
-#include <machine/locore.h>
-#include <machine/autoconf.h>
-#include <machine/bus.h>
-
-#include <sgimips/dev/macevar.h>
-
-#include <dev/arcbios/arcbios.h>
-#include <dev/arcbios/arcbiosvar.h>
-
-#include <dev/ic/comreg.h>
-#include <dev/ic/comvar.h>
-
-struct com_mace_softc {
- struct com_softc sc_com;
-
- /* XXX intr cookie */
-};
-
-static int com_mace_match(struct device *, struct cfdata *, void *);
-static void com_mace_attach(struct device *, struct device *, void *);
-
-CFATTACH_DECL(com_mace, sizeof(struct com_mace_softc),
- com_mace_match, com_mace_attach, NULL, NULL);
-
-static int
-com_mace_match(parent, match, aux)
- struct device *parent;
- struct cfdata *match;
- void *aux;
-{
- return 1;
-}
-
-static void
-com_mace_attach(parent, self, aux)
- struct device *parent;
- struct device *self;
- void *aux;
-{
- struct com_mace_softc *msc = (void *)self;
- struct com_softc *sc = &msc->sc_com;
- struct mace_attach_args *maa = aux;
-
- sc->sc_iot = maa->maa_st;
-
- /*
- * XXX should check com_is_console() and
- * XXX use bus_space_map().
- */
- sc->sc_ioh = maa->maa_sh + maa->maa_offset;
- sc->sc_iobase = sc->sc_ioh;
-
- sc->sc_frequency = COM_FREQ;
-
-
- delay(10000);
- com_attach_subr(sc);
- delay(10000);
-
- mace_intr_establish(maa->maa_intr, maa->maa_intrmask, comintr, sc);
-
- return;
-}
diff -r 6df18b72c8c4 -r e7c268af496f sys/arch/sgimips/dev/crime.c
--- a/sys/arch/sgimips/dev/crime.c Sun Jan 18 03:57:30 2004 +0000
+++ b/sys/arch/sgimips/dev/crime.c Sun Jan 18 04:06:42 2004 +0000
@@ -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 @@
#include <sgimips/dev/crimevar.h>
#include <sgimips/dev/crimereg.h>
+#include <sgimips/mace/macevar.h>
#include "locators.h"
@@ -182,6 +183,9 @@
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!"); */
diff -r 6df18b72c8c4 -r e7c268af496f sys/arch/sgimips/dev/if_mec.c
--- a/sys/arch/sgimips/dev/if_mec.c Sun Jan 18 03:57:30 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,885 +0,0 @@
-/* $NetBSD: if_mec.c,v 1.13 2004/01/11 14:01:46 sekiya Exp $ */
-
-/*
- * Copyright (c) 2003 Christopher SEKIYA
- * 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 for the
- * NetBSD Project. See http://www.NetBSD.org/ for
- * information about NetBSD.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-/*
- * MACE MAC-110 ethernet driver
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.13 2004/01/11 14:01:46 sekiya Exp $");
-
-#include "opt_inet.h"
-#include "opt_ns.h"
-#include "bpfilter.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/device.h>
-#include <sys/callout.h>
-#include <sys/mbuf.h>
-#include <sys/malloc.h>
-#include <sys/kernel.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/errno.h>
-
Home |
Main Index |
Thread Index |
Old Index