Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch netwinder and cats can share irqhandler.h, so move ...



details:   https://anonhg.NetBSD.org/src/rev/fb56a25fe67e
branches:  trunk
changeset: 538565:fb56a25fe67e
user:      chris <chris%NetBSD.org@localhost>
date:      Tue Oct 22 20:15:25 2002 +0000

description:
netwinder and cats can share irqhandler.h, so move (and rename) into the
footbridge dir, and share it.

diffstat:

 sys/arch/arm/footbridge/Makefile                |   4 +-
 sys/arch/arm/footbridge/footbridge_irqhandler.h |  87 +++++++++++++++++++++++
 sys/arch/cats/include/irqhandler.h              |  93 +------------------------
 sys/arch/netwinder/include/irqhandler.h         |  88 +-----------------------
 4 files changed, 93 insertions(+), 179 deletions(-)

diffs (295 lines):

diff -r 4207f20fbfec -r fb56a25fe67e sys/arch/arm/footbridge/Makefile
--- a/sys/arch/arm/footbridge/Makefile  Tue Oct 22 18:48:27 2002 +0000
+++ b/sys/arch/arm/footbridge/Makefile  Tue Oct 22 20:15:25 2002 +0000
@@ -1,7 +1,7 @@
-#      $NetBSD: Makefile,v 1.1 2002/09/28 15:53:03 chris Exp $
+#      $NetBSD: Makefile,v 1.2 2002/10/22 20:15:25 chris Exp $
 
 KDIR=  /sys/arch/arm/footbridge
 INCSDIR= /usr/include/arm/footbridge
-INCS=  footbridge_intr.h
+INCS=  footbridge_intr.h footbridge_irqhandler.h
 
 .include <bsd.kinc.mk>
diff -r 4207f20fbfec -r fb56a25fe67e sys/arch/arm/footbridge/footbridge_irqhandler.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/footbridge/footbridge_irqhandler.h   Tue Oct 22 20:15:25 2002 +0000
@@ -0,0 +1,87 @@
+/*     $NetBSD: footbridge_irqhandler.h,v 1.1 2002/10/22 20:15:25 chris Exp $  */
+
+/*
+ * Copyright (c) 1994-1996 Mark Brinicombe.
+ * Copyright (c) 1994 Brini.
+ * All rights reserved.
+ *
+ * This code is derived from software written for Brini by Mark Brinicombe
+ *
+ * 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 Mark Brinicombe
+ *     for the NetBSD Project.
+ * 4. The name of the company nor the name of the author may 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 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.
+ *
+ * IRQ related stuff (defines + structures)
+ *
+ * Created      : 30/09/94
+ */
+
+#ifndef _FOOTBRIDGE_IRQHANDLER_H_
+#define _FOOTBRIDGE_IRQHANDLER_H_
+
+#ifndef _LOCORE
+#include <sys/types.h>
+#endif /* _LOCORE */
+
+#define IRQ_INSTRUCT   -1
+#define NIRQS          0x20
+
+#include <machine/intr.h>
+
+#ifndef _LOCORE
+typedef struct irqhandler {
+       int (*ih_func) __P((void *arg));/* handler function */
+       void *ih_arg;                   /* Argument to handler */
+       int ih_level;                   /* Interrupt level */
+       int ih_num;                     /* Interrupt number (for accounting) */
+       const char *ih_name;            /* Name of interrupt (for vmstat -i) */
+       u_int ih_flags;                 /* Interrupt flags */
+       u_int ih_maskaddr;              /* mask address for expansion cards */
+       u_int ih_maskbits;              /* interrupt bit for expansion cards */
+       struct irqhandler *ih_next;     /* next handler */
+} irqhandler_t;
+
+#ifdef _KERNEL
+extern u_int irqmasks[IPL_LEVELS];
+extern irqhandler_t *irqhandlers[NIRQS];
+
+void irq_init __P((void));
+int irq_claim __P((int, irqhandler_t *));
+int irq_release __P((int, irqhandler_t *));
+void *intr_claim __P((int irq, int level, const char *name, int (*func) __P((void *)), void *arg));
+int intr_release __P((void *ih));
+void irq_setmasks __P((void));
+void disable_irq __P((int));
+void enable_irq __P((int));
+#endif /* _KERNEL */
+#endif /* _LOCORE */
+
+#define IRQ_FLAG_ACTIVE 0x00000001     /* This is the active handler in list */
+
+#endif /* _FOOTBRIDGE_IRQHANDLER_H_ */
+
+/* End of irqhandler.h */
diff -r 4207f20fbfec -r fb56a25fe67e sys/arch/cats/include/irqhandler.h
--- a/sys/arch/cats/include/irqhandler.h        Tue Oct 22 18:48:27 2002 +0000
+++ b/sys/arch/cats/include/irqhandler.h        Tue Oct 22 20:15:25 2002 +0000
@@ -1,92 +1,3 @@
-/*     $NetBSD: irqhandler.h,v 1.4 2002/04/12 18:50:32 thorpej Exp $   */
-
-/*
- * Copyright (c) 1994-1996 Mark Brinicombe.
- * Copyright (c) 1994 Brini.
- * All rights reserved.
- *
- * This code is derived from software written for Brini by Mark Brinicombe
- *
- * 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 Mark Brinicombe
- *     for the NetBSD Project.
- * 4. The name of the company nor the name of the author may 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 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.
- *
- * IRQ related stuff (defines + structures)
- *
- * Created      : 30/09/94
- */
-
-#ifndef _ARM32_IRQHANDLER_H_
-#define _ARM32_IRQHANDLER_H_
+/*     $NetBSD: irqhandler.h,v 1.5 2002/10/22 20:15:26 chris Exp $     */
 
-#ifndef _LOCORE
-#include <sys/types.h>
-#endif /* _LOCORE */
-
-/* Define the IRQ bits */
-
-#define IRQ_VSYNC      IRQ_FLYBACK     /* Aliased */
-#define IRQ_NETSLOT    IRQ_EXTENDED
-
-#define IRQ_INSTRUCT   -1
-#define NIRQS          0x20
-
-#include <machine/intr.h>
-
-#ifndef _LOCORE
-typedef struct irqhandler {
-       int (*ih_func) __P((void *arg));/* handler function */
-       void *ih_arg;                   /* Argument to handler */
-       int ih_level;                   /* Interrupt level */
-       int ih_num;                     /* Interrupt number (for accounting) */
-       const char *ih_name;            /* Name of interrupt (for vmstat -i) */
-       u_int ih_flags;                 /* Interrupt flags */
-       u_int ih_maskaddr;              /* mask address for expansion cards */
-       u_int ih_maskbits;              /* interrupt bit for expansion cards */
-       struct irqhandler *ih_next;     /* next handler */
-} irqhandler_t;
-
-#ifdef _KERNEL
-extern u_int irqmasks[IPL_LEVELS];
-extern irqhandler_t *irqhandlers[NIRQS];
-
-void irq_init __P((void));
-int irq_claim __P((int, irqhandler_t *));
-int irq_release __P((int, irqhandler_t *));
-void *intr_claim __P((int irq, int level, const char *name, int (*func) __P((void *)), void *arg));
-int intr_release __P((void *ih));
-void irq_setmasks __P((void));
-void disable_irq __P((int));
-void enable_irq __P((int));
-#endif /* _KERNEL */
-#endif /* _LOCORE */
-
-#define IRQ_FLAG_ACTIVE 0x00000001     /* This is the active handler in list */
-
-#endif /* _ARM32_IRQHANDLER_H_ */
-
-/* End of irqhandler.h */
+#include <arm/footbridge/footbridge_irqhandler.h>
diff -r 4207f20fbfec -r fb56a25fe67e sys/arch/netwinder/include/irqhandler.h
--- a/sys/arch/netwinder/include/irqhandler.h   Tue Oct 22 18:48:27 2002 +0000
+++ b/sys/arch/netwinder/include/irqhandler.h   Tue Oct 22 20:15:25 2002 +0000
@@ -1,87 +1,3 @@
-/*     $NetBSD: irqhandler.h,v 1.5 2002/04/12 18:50:33 thorpej Exp $   */
-
-/*
- * Copyright (c) 1994-1996 Mark Brinicombe.
- * Copyright (c) 1994 Brini.
- * All rights reserved.
- *
- * This code is derived from software written for Brini by Mark Brinicombe
- *
- * 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 Mark Brinicombe
- *     for the NetBSD Project.
- * 4. The name of the company nor the name of the author may 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 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.
- *
- * IRQ related stuff (defines + structures)
- *
- * Created      : 30/09/94
- */
+/*     $NetBSD: irqhandler.h,v 1.6 2002/10/22 20:15:26 chris Exp $     */
 
-#ifndef _ARM32_IRQHANDLER_H_
-#define _ARM32_IRQHANDLER_H_
-
-#ifndef _LOCORE
-#include <sys/types.h>
-#endif /* _LOCORE */
-
-#define        IRQ_INSTRUCT    -1
-#define NIRQS          0x20
-
-#include <machine/intr.h>
-
-#ifndef _LOCORE
-typedef struct irqhandler {
-       int (*ih_func) __P((void *arg));/* handler function */
-       void *ih_arg;                   /* Argument to handler */
-       int ih_level;                   /* Interrupt level */
-       int ih_num;                     /* Interrupt number (for accounting) */
-       const char *ih_name;            /* Name of interrupt (for vmstat -i) */
-       u_int ih_flags;                 /* Interrupt flags */
-       u_int ih_maskaddr;              /* mask address for expansion cards */
-       u_int ih_maskbits;              /* interrupt bit for expansion cards */
-       struct irqhandler *ih_next;     /* next handler */
-} irqhandler_t;
-
-#ifdef _KERNEL
-extern u_int irqmasks[IPL_LEVELS];
-extern irqhandler_t *irqhandlers[NIRQS];
-
-void irq_init __P((void));
-int irq_claim __P((int, irqhandler_t *));
-int irq_release __P((int, irqhandler_t *));
-void *intr_claim __P((int irq, int level, const char *name, int (*func) __P((void *)), void *arg));
-int intr_release __P((void *ih));
-void irq_setmasks __P((void));
-void disable_irq __P((int));
-void enable_irq __P((int));
-#endif /* _KERNEL */
-#endif /* _LOCORE */
-
-#define IRQ_FLAG_ACTIVE 0x00000001     /* This is the active handler in list */
-
-#endif /* _ARM32_IRQHANDLER_H_ */
-
-/* End of irqhandler.h */
+#include <arm/footbridge/footbridge_irqhandler.h>



Home | Main Index | Thread Index | Old Index