Make assym.h be generated again

Add pcmcia support to files.prep
Add isa_intr_alloc support.
This commit is contained in:
matt 2000-11-22 08:55:35 +00:00
parent 32831b2eb4
commit 03b44427da
4 changed files with 57 additions and 5 deletions

View File

@ -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 @@ include "dev/usb/files.usb"
# 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"

View File

@ -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 @@ static __inline void set_sint __P((int));
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

View File

@ -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_setirqstat(irq, enabled, type)
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;
}

View File

@ -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/param.h>
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>