Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/prep Make assym.h be generated again



details:   https://anonhg.NetBSD.org/src/rev/aca5dc296cbc
branches:  trunk
changeset: 499550:aca5dc296cbc
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Nov 22 08:55:35 2000 +0000

description:
Make assym.h be generated again
Add pcmcia support to files.prep
Add isa_intr_alloc support.

diffstat:

 sys/arch/prep/conf/files.prep   |  15 ++++++++++++++-
 sys/arch/prep/include/intr.h    |   4 +++-
 sys/arch/prep/isa/isa_machdep.c |  39 ++++++++++++++++++++++++++++++++++++++-
 sys/arch/prep/prep/genassym.cf  |   4 ++--
 4 files changed, 57 insertions(+), 5 deletions(-)

diffs (112 lines):

diff -r 60e79e9aad93 -r aca5dc296cbc sys/arch/prep/conf/files.prep
--- a/sys/arch/prep/conf/files.prep     Wed Nov 22 08:40:47 2000 +0000
+++ b/sys/arch/prep/conf/files.prep     Wed Nov 22 08:55:35 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.prep,v 1.7 2000/11/08 19:48:52 ad Exp $
+#      $NetBSD: files.prep,v 1.8 2000/11/22 08:55:35 matt Exp $
 #
 # prep-specific configuration info
 #
@@ -142,3 +142,16 @@
 
 # OSS audio driver compatibility
 include "compat/ossaudio/files.ossaudio"
+
+# PCMCIA drivers/support
+defopt PCIC_ISA_ALLOC_IOBASE
+defopt PCIC_ISA_ALLOC_IOSIZE
+defopt PCIC_ISA_INTR_ALLOC_MASK
+
+device pcic: pcmciabus
+file   dev/ic/i82365.c                 pcic
+attach pcic at isa with pcic_isa
+file   dev/isa/i82365_isa.c            pcic_isa
+file   dev/isa/i82365_isasubr.c        pcic_isa
+
+include "dev/pcmcia/files.pcmcia"
diff -r 60e79e9aad93 -r aca5dc296cbc sys/arch/prep/include/intr.h
--- a/sys/arch/prep/include/intr.h      Wed Nov 22 08:40:47 2000 +0000
+++ b/sys/arch/prep/include/intr.h      Wed Nov 22 08:55:35 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.h,v 1.4 2000/08/22 19:46:31 thorpej Exp $ */
+/*     $NetBSD: intr.h,v 1.5 2000/11/22 08:55:36 matt Exp $    */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -102,6 +102,8 @@
 extern volatile int cpl, ipending, astpending, tickspending;
 extern int imask[];
 extern long intrcnt[];
+extern struct intrhand *intrhand[];
+extern int intrtype[];
 
 /*
  *  Reorder protection in the following inline functions is
diff -r 60e79e9aad93 -r aca5dc296cbc sys/arch/prep/isa/isa_machdep.c
--- a/sys/arch/prep/isa/isa_machdep.c   Wed Nov 22 08:40:47 2000 +0000
+++ b/sys/arch/prep/isa/isa_machdep.c   Wed Nov 22 08:55:35 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: isa_machdep.c,v 1.2 2000/06/04 19:14:59 cgd Exp $      */
+/*     $NetBSD: isa_machdep.c,v 1.3 2000/11/22 08:55:35 matt Exp $     */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -229,3 +229,40 @@
        isa_outb(IO_ELCR1, elcr[0]);
        isa_outb(IO_ELCR2, elcr[1]);
 }
+
+int
+isa_intr_alloc(isa_chipset_tag_t c, int mask, int type, int *irq_p)
+{
+       int irq;
+       int maybe_irq = -1;
+       int shared_depth = 0;
+       mask &= 0x8b28; /* choose from 3, 5, 8, 9, 11, 15 XXX */
+       for (irq = 0; mask != 0; mask >>= 1, irq++) {
+               if ((mask & 1) == 0)
+                       continue;
+               if (intrtype[irq] == IST_NONE) {
+                       *irq_p = irq;
+                       return 0;
+               }
+               /* Level interrupts can be shared */
+               if (type == IST_LEVEL && intrtype[irq] == IST_LEVEL) {
+                       struct intrhand *ih = intrhand[irq];
+                       int depth;
+                       if (maybe_irq == -1) {
+                               maybe_irq = irq;
+                               continue;
+                       }
+                       for (depth = 0; ih != NULL; ih = ih->ih_next)
+                               depth++;
+                       if (depth < shared_depth) {
+                               maybe_irq = irq;
+                               shared_depth = depth;
+                       }
+               }
+       }
+       if (maybe_irq != -1) {
+               *irq_p = maybe_irq;
+               return 0;
+       }
+       return 1;
+}
diff -r 60e79e9aad93 -r aca5dc296cbc sys/arch/prep/prep/genassym.cf
--- a/sys/arch/prep/prep/genassym.cf    Wed Nov 22 08:40:47 2000 +0000
+++ b/sys/arch/prep/prep/genassym.cf    Wed Nov 22 08:55:35 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: genassym.cf,v 1.3 2000/06/29 07:47:53 mrg Exp $
+#      $NetBSD: genassym.cf,v 1.4 2000/11/22 08:55:35 matt Exp $
 
 #
 # Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -35,7 +35,7 @@
 include <sys/time.h>
 include <sys/proc.h>
 
-#include <uvm/uvm_extern.h>
+include <uvm/uvm_extern.h>
 
 include <machine/pcb.h>
 include <machine/pmap.h>



Home | Main Index | Thread Index | Old Index