diff options
author | wollman <wollman@FreeBSD.org> | 1994-10-19 01:59:11 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1994-10-19 01:59:11 +0000 |
commit | 24e218260af83b7292524d1581b8dfcf5d3c8c5b (patch) | |
tree | 5d1fe7fa29fd95ce356cefa187ddba64b0b97b6d /sys/i386/isa/ctx.c | |
parent | c2771d0d1bd4ee9f81f73a838d7aa075897c1b71 (diff) | |
download | FreeBSD-src-24e218260af83b7292524d1581b8dfcf5d3c8c5b.zip FreeBSD-src-24e218260af83b7292524d1581b8dfcf5d3c8c5b.tar.gz |
Add support for devconf to a large number of device drivers, and do
the right thing in dev_goawayall() when kdc_goaway is null.
Diffstat (limited to 'sys/i386/isa/ctx.c')
-rw-r--r-- | sys/i386/isa/ctx.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/i386/isa/ctx.c b/sys/i386/isa/ctx.c index 8ba2cc6..7a14059 100644 --- a/sys/i386/isa/ctx.c +++ b/sys/i386/isa/ctx.c @@ -8,7 +8,7 @@ * of this software, nor does the author assume any responsibility * for damages incurred with its use. * - * $Id$ + * $Id: ctx.c,v 1.1 1994/10/01 17:59:41 davidg Exp $ */ /* @@ -153,6 +153,21 @@ struct ctx_soft_registers { } ctx_sr[NCTX]; +static struct kern_devconf kdc_ctx[NCTX] = { { + 0, 0, 0, /* filled in by dev_attach */ + "ctx", 0, { "isa0", MDDT_ISA, 0 }, + isa_generic_externalize, 0, 0, ISA_EXTERNALLEN +} }; + +static inline void +ctx_registerdev(struct isa_device *id) +{ + if(id->id_unit) + kdc_ctx[id->id_unit] = kdc_ctx[0]; + kdc_ctx[id->id_unit].kdc_unit = id->id_unit; + kdc_ctx[id->id_unit].kdc_isa = id; + dev_attach(&kdc_ctx[id->id_unit]); +} int ctxprobe(struct isa_device * devp) @@ -178,6 +193,7 @@ ctxattach(struct isa_device * devp) sr->iobase = devp->id_iobase; sr->maddr = devp->id_maddr; sr->msize = devp->id_msize; + ctx_registerdev(devp); return (1); } |