diff options
author | bde <bde@FreeBSD.org> | 1998-10-22 05:58:45 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-10-22 05:58:45 +0000 |
commit | df88297cad3e438e774e13137af8eaff53c0fc7f (patch) | |
tree | d694ec5d94b6e29be85865e36be61cbb2bea66dc /sys/pc98 | |
parent | 7a07480a8f242db0c438040f3beb4ce7b2c7cde2 (diff) | |
download | FreeBSD-src-df88297cad3e438e774e13137af8eaff53c0fc7f.zip FreeBSD-src-df88297cad3e438e774e13137af8eaff53c0fc7f.tar.gz |
Initialize isa_devtab entries for interrupt handlers in individual
device drivers, not in ioconf.c. Use a different hack in isa_device.h
so that a new config(8) is not required yet.
pc98 parts approved by: kato
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/cbus/fdc.c | 6 | ||||
-rw-r--r-- | sys/pc98/cbus/sio.c | 16 | ||||
-rw-r--r-- | sys/pc98/pc98/fd.c | 6 | ||||
-rw-r--r-- | sys/pc98/pc98/if_ed.c | 6 | ||||
-rw-r--r-- | sys/pc98/pc98/if_fe.c | 7 | ||||
-rw-r--r-- | sys/pc98/pc98/lpt.c | 6 | ||||
-rw-r--r-- | sys/pc98/pc98/mse.c | 6 | ||||
-rw-r--r-- | sys/pc98/pc98/npx.c | 5 | ||||
-rw-r--r-- | sys/pc98/pc98/pc98.c | 9 | ||||
-rw-r--r-- | sys/pc98/pc98/sio.c | 16 | ||||
-rw-r--r-- | sys/pc98/pc98/syscons.c | 6 | ||||
-rw-r--r-- | sys/pc98/pc98/wd.c | 4 |
12 files changed, 60 insertions, 33 deletions
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c index 889c066..08ceb23 100644 --- a/sys/pc98/cbus/fdc.c +++ b/sys/pc98/cbus/fdc.c @@ -43,7 +43,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.40 1998/09/15 14:07:08 kato Exp $ + * $Id: fd.c,v 1.41 1998/09/16 08:08:38 kato Exp $ * */ @@ -316,6 +316,7 @@ static int fd_in(fdcu_t, int *); static void fdstart(fdcu_t); static timeout_t fd_iotimeout; static timeout_t fd_pseudointr; +static ointhand2_t fdintr; static int fdstate(fdcu_t, fdc_p); static int retrier(fdcu_t); static int fdformat(dev_t, struct fd_formb *, struct proc *); @@ -723,6 +724,7 @@ fdattach(struct isa_device *dev) int typesize; #endif + dev->id_ointr = fdintr; fdc->fdcu = fdcu; fdc->flags |= FDC_ATTACHED; #ifdef PC98 @@ -1605,7 +1607,7 @@ fd_pseudointr(void *arg1) * keep calling the state machine until it returns a 0 * * ALWAYS called at SPLBIO * \***********************************************************************/ -void +static void fdintr(fdcu_t fdcu) { fdc_p fdc = fdc_data + fdcu; diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index abce135..c619be4 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.66 1998/08/28 12:44:49 kato Exp $ + * $Id: sio.c,v 1.67 1998/09/14 11:37:29 kato Exp $ */ #include "opt_comconsole.h" @@ -74,9 +74,9 @@ * * 1) config * options COM_MULTIPORT #if using MC16550II - * device sio0 at nec? port 0x30 tty irq 4 vector siointr #internal - * device sio1 at nec? port 0xd2 tty irq 5 flags 0x101 vector siointr #mc1 - * device sio2 at nec? port 0x8d2 tty flags 0x101 vector siointr #mc2 + * device sio0 at nec? port 0x30 tty irq 4 #internal + * device sio1 at nec? port 0xd2 tty irq 5 flags 0x101 #mc1 + * device sio2 at nec? port 0x8d2 tty flags 0x101 #mc2 * # ~~~~~iobase ~~multi port flag * # ~ master device is sio1 * 2) device @@ -103,8 +103,8 @@ * # options COM_MULTIPORT # support for MICROCORE MC16550II * ... comment-out this line, which will conflict with B98_01. * options "B98_01" # support for AIWA B98-01 - * device sio1 at nec? port 0x00d1 tty irq ? vector siointr - * device sio2 at nec? port 0x00d5 tty irq ? vector siointr + * device sio1 at nec? port 0x00d1 tty irq ? + * device sio2 at nec? port 0x00d5 tty irq ? * ... you can leave these lines `irq ?', irq will be autodetected. */ #ifdef PC98 @@ -404,6 +404,7 @@ static int sioattach __P((struct isa_device *dev)); static timeout_t siobusycheck; static timeout_t siodtrwakeup; static void comhardclose __P((struct com_s *com)); +static ointhand2_t siointr; static void siointr1 __P((struct com_s *com)); static int commctl __P((struct com_s *com, int bits, int how)); static int comparam __P((struct tty *tp, struct termios *t)); @@ -1186,6 +1187,7 @@ sioattach(isdp) int s; int unit; + isdp->id_ointr = siointr; isdp->id_ri_flags |= RI_FAST; iobase = isdp->id_iobase; unit = isdp->id_unit; @@ -1897,7 +1899,7 @@ siodtrwakeup(chan) wakeup(&com->dtr_wait); } -void +static void siointr(unit) int unit; { diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c index 889c066..08ceb23 100644 --- a/sys/pc98/pc98/fd.c +++ b/sys/pc98/pc98/fd.c @@ -43,7 +43,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.40 1998/09/15 14:07:08 kato Exp $ + * $Id: fd.c,v 1.41 1998/09/16 08:08:38 kato Exp $ * */ @@ -316,6 +316,7 @@ static int fd_in(fdcu_t, int *); static void fdstart(fdcu_t); static timeout_t fd_iotimeout; static timeout_t fd_pseudointr; +static ointhand2_t fdintr; static int fdstate(fdcu_t, fdc_p); static int retrier(fdcu_t); static int fdformat(dev_t, struct fd_formb *, struct proc *); @@ -723,6 +724,7 @@ fdattach(struct isa_device *dev) int typesize; #endif + dev->id_ointr = fdintr; fdc->fdcu = fdcu; fdc->flags |= FDC_ATTACHED; #ifdef PC98 @@ -1605,7 +1607,7 @@ fd_pseudointr(void *arg1) * keep calling the state machine until it returns a 0 * * ALWAYS called at SPLBIO * \***********************************************************************/ -void +static void fdintr(fdcu_t fdcu) { fdc_p fdc = fdc_data + fdcu; diff --git a/sys/pc98/pc98/if_ed.c b/sys/pc98/pc98/if_ed.c index 9b7f815..1c3e999 100644 --- a/sys/pc98/pc98/if_ed.c +++ b/sys/pc98/pc98/if_ed.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_ed.c,v 1.53 1998/10/08 17:04:58 kato Exp $ + * $Id: if_ed.c,v 1.54 1998/10/08 17:16:41 kato Exp $ */ /* @@ -179,6 +179,7 @@ static int ed_attach __P((struct ed_softc *, int, int)); static int ed_attach_isa __P((struct isa_device *)); static void ed_init __P((void *)); +static ointhand2_t edintr; static int ed_ioctl __P((struct ifnet *, u_long, caddr_t)); static int ed_probe __P((struct isa_device *)); static void ed_start __P((struct ifnet *)); @@ -2481,6 +2482,7 @@ ed_attach_isa(isa_dev) struct ed_softc *sc = &ed_softc[unit]; int flags = isa_dev->id_flags; + isa_dev->id_ointr = edintr; return ed_attach(sc, unit, flags); } @@ -3317,7 +3319,7 @@ edintr_sc(sc) } } -void +static void edintr(unit) int unit; { diff --git a/sys/pc98/pc98/if_fe.c b/sys/pc98/pc98/if_fe.c index 64b3091..d22087d 100644 --- a/sys/pc98/pc98/if_fe.c +++ b/sys/pc98/pc98/if_fe.c @@ -21,7 +21,7 @@ */ /* - * $Id: if_fe.c,v 1.33 1998/10/08 17:06:32 kato Exp $ + * $Id: if_fe.c,v 1.34 1998/10/08 17:16:41 kato Exp $ * * Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards. * To be used with FreeBSD 2.x @@ -242,6 +242,7 @@ static struct fe_softc { static int fe_probe ( struct isa_device * ); static int fe_attach ( struct isa_device * ); static void fe_init ( int ); +static ointhand2_t feintr; static int fe_ioctl ( struct ifnet *, u_long, caddr_t ); static void fe_start ( struct ifnet * ); static void fe_reset ( int ); @@ -2126,6 +2127,8 @@ fe_attach ( DEVICE * dev ) #endif struct fe_softc *sc = &fe_softc[dev->id_unit]; + dev->id_ointr = feintr; + /* * Initialize ifnet structure */ @@ -3044,7 +3047,7 @@ fe_rint ( struct fe_softc * sc, u_char rstat ) /* * Ethernet interface interrupt processor */ -void +static void feintr ( int unit ) { struct fe_softc *sc = &fe_softc[unit]; diff --git a/sys/pc98/pc98/lpt.c b/sys/pc98/pc98/lpt.c index 1fac3d8..6931657 100644 --- a/sys/pc98/pc98/lpt.c +++ b/sys/pc98/pc98/lpt.c @@ -46,7 +46,7 @@ * SUCH DAMAGE. * * from: unknown origin, 386BSD 0.1 - * $Id: lpt.c,v 1.21 1998/06/17 16:33:14 kato Exp $ + * $Id: lpt.c,v 1.22 1998/08/17 08:21:09 kato Exp $ */ /* @@ -269,6 +269,7 @@ static struct lpt_softc { static timeout_t lptout; static int lptprobe (struct isa_device *dvp); static int lptattach (struct isa_device *isdp); +static ointhand2_t lptintr; #ifdef INET @@ -437,6 +438,7 @@ lptattach(struct isa_device *isdp) struct lpt_softc *sc; int unit; + isdp->id_ointr = lptintr; unit = isdp->id_unit; sc = lpt_sc + unit; sc->sc_port = isdp->id_iobase; @@ -783,7 +785,7 @@ lptwrite(dev_t dev, struct uio * uio, int ioflag) * do checking for interrupted write call. */ -void +static void lptintr(int unit) { struct lpt_softc *sc = lpt_sc + unit; diff --git a/sys/pc98/pc98/mse.c b/sys/pc98/pc98/mse.c index 65a8aa5..e5bcc44 100644 --- a/sys/pc98/pc98/mse.c +++ b/sys/pc98/pc98/mse.c @@ -11,7 +11,7 @@ * this software for any purpose. It is provided "as is" * without express or implied warranty. * - * $Id: mse.c,v 1.16 1998/01/24 02:54:38 eivind Exp $ + * $Id: mse.c,v 1.17 1998/06/08 08:55:44 kato Exp $ */ /* * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and @@ -88,6 +88,7 @@ static struct cdevsw mse_cdevsw = mseioctl, nostop, nullreset, nodevtotty,/* mse */ msepoll, nommap, NULL, "mse", NULL, -1 }; +static ointhand2_t mseintr; /* * Software control structure for mouse. The sc_enablemouse(), @@ -321,6 +322,7 @@ mseattach(idp) } #endif + idp->id_ointr = mseintr; sc->sc_port = idp->id_iobase; sc->mode.accelfactor = (idp->id_flags & MSE_CONFIG_ACCEL) >> 4; #ifdef DEVFS @@ -610,7 +612,7 @@ msepoll(dev, events, p) /* * mseintr: update mouse status. sc_deltax and sc_deltay are accumulative. */ -void +static void mseintr(unit) int unit; { diff --git a/sys/pc98/pc98/npx.c b/sys/pc98/pc98/npx.c index 504fd3c..baa96a6 100644 --- a/sys/pc98/pc98/npx.c +++ b/sys/pc98/pc98/npx.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * from: @(#)npx.c 7.2 (Berkeley) 5/12/91 - * $Id: npx.c,v 1.37 1998/05/04 07:33:32 kato Exp $ + * $Id: npx.c,v 1.38 1998/06/22 08:06:58 kato Exp $ */ #include "npx.h" @@ -100,6 +100,7 @@ void i586_bcopy __P((const void *from, void *to, size_t len)); void i586_bzero __P((void *buf, size_t len)); int i586_copyin __P((const void *udaddr, void *kaddr, size_t len)); int i586_copyout __P((const void *kaddr, void *udaddr, size_t len)); +ointhand2_t npxintr; #ifdef __GNUC__ @@ -427,6 +428,8 @@ int npxattach(dvp) struct isa_device *dvp; { + dvp->id_ointr = npxintr; + /* The caller has printed "irq 13" for the npx_irq13 case. */ if (!npx_irq13) { printf("npx%d: ", dvp->id_unit); diff --git a/sys/pc98/pc98/pc98.c b/sys/pc98/pc98/pc98.c index 185c349..94b4624 100644 --- a/sys/pc98/pc98/pc98.c +++ b/sys/pc98/pc98/pc98.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 - * $Id: pc98.c,v 1.52 1998/10/12 15:06:02 kato Exp $ + * $Id: pc98.c,v 1.53 1998/10/13 09:44:09 kato Exp $ */ /* @@ -583,7 +583,10 @@ config_isadev_c(isdp, mp, reconfig) isdp->id_alive = id_alive; } (*dp->attach)(isdp); - if (isdp->id_irq) { + if (isdp->id_irq != 0 && isdp->id_intr == NULL) + printf("%s%d: irq with no handler\n", + dp->name, isdp->id_unit); + if (isdp->id_irq != 0 && isdp->id_intr != NULL) { #ifdef APIC_IO /* * Some motherboards use upper IRQs for traditional @@ -620,7 +623,7 @@ config_isadev_c(isdp, mp, reconfig) } else { #if 0 /* This code has not been tested.... */ - if (isdp->id_irq) { + if (isdp->id_irq != 0 && isdp->id_intr != NULL) { icu_unset(ffs(isdp->id_irq) - 1, isdp->id_intr); if (mp) diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index abce135..c619be4 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.66 1998/08/28 12:44:49 kato Exp $ + * $Id: sio.c,v 1.67 1998/09/14 11:37:29 kato Exp $ */ #include "opt_comconsole.h" @@ -74,9 +74,9 @@ * * 1) config * options COM_MULTIPORT #if using MC16550II - * device sio0 at nec? port 0x30 tty irq 4 vector siointr #internal - * device sio1 at nec? port 0xd2 tty irq 5 flags 0x101 vector siointr #mc1 - * device sio2 at nec? port 0x8d2 tty flags 0x101 vector siointr #mc2 + * device sio0 at nec? port 0x30 tty irq 4 #internal + * device sio1 at nec? port 0xd2 tty irq 5 flags 0x101 #mc1 + * device sio2 at nec? port 0x8d2 tty flags 0x101 #mc2 * # ~~~~~iobase ~~multi port flag * # ~ master device is sio1 * 2) device @@ -103,8 +103,8 @@ * # options COM_MULTIPORT # support for MICROCORE MC16550II * ... comment-out this line, which will conflict with B98_01. * options "B98_01" # support for AIWA B98-01 - * device sio1 at nec? port 0x00d1 tty irq ? vector siointr - * device sio2 at nec? port 0x00d5 tty irq ? vector siointr + * device sio1 at nec? port 0x00d1 tty irq ? + * device sio2 at nec? port 0x00d5 tty irq ? * ... you can leave these lines `irq ?', irq will be autodetected. */ #ifdef PC98 @@ -404,6 +404,7 @@ static int sioattach __P((struct isa_device *dev)); static timeout_t siobusycheck; static timeout_t siodtrwakeup; static void comhardclose __P((struct com_s *com)); +static ointhand2_t siointr; static void siointr1 __P((struct com_s *com)); static int commctl __P((struct com_s *com, int bits, int how)); static int comparam __P((struct tty *tp, struct termios *t)); @@ -1186,6 +1187,7 @@ sioattach(isdp) int s; int unit; + isdp->id_ointr = siointr; isdp->id_ri_flags |= RI_FAST; iobase = isdp->id_iobase; unit = isdp->id_unit; @@ -1897,7 +1899,7 @@ siodtrwakeup(chan) wakeup(&com->dtr_wait); } -void +static void siointr(unit) int unit; { diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c index e85a1b3..2352434 100644 --- a/sys/pc98/pc98/syscons.c +++ b/sys/pc98/pc98/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.100 1998/08/28 12:45:43 kato Exp $ + * $Id: syscons.c,v 1.101 1998/09/14 11:37:58 kato Exp $ */ #include "sc.h" @@ -287,6 +287,7 @@ static const int nsccons = MAXCONS+2; /* prototypes */ static int scattach(struct isa_device *dev); +static ointhand2_t scintr; static int scparam(struct tty *tp, struct termios *t); static int scprobe(struct isa_device *dev); static int scvidprobe(int unit, int flags); @@ -831,6 +832,7 @@ scattach(struct isa_device *dev) int vc; #endif + dev->id_ointr = scintr; scinit(); flags = dev->id_flags; if (crtc_type != KD_VGA || VESA_MODE(bios_video_mode)) @@ -1096,7 +1098,7 @@ scwrite(dev_t dev, struct uio *uio, int flag) return((*linesw[tp->t_line].l_write)(tp, uio, flag)); } -void +static void scintr(int unit) { static struct tty *cur_tty; diff --git a/sys/pc98/pc98/wd.c b/sys/pc98/pc98/wd.c index 90fc584..25148ed 100644 --- a/sys/pc98/pc98/wd.c +++ b/sys/pc98/pc98/wd.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)wd.c 7.2 (Berkeley) 5/9/91 - * $Id: wd.c,v 1.63 1998/09/15 14:07:08 kato Exp $ + * $Id: wd.c,v 1.64 1998/10/13 09:44:09 kato Exp $ */ /* TODO: @@ -486,6 +486,8 @@ wdattach(struct isa_device *dvp) struct disk *du; struct wdparams *wp; + dvp->id_ointr = wdintr; + if (dvp->id_unit >= NWDC) return (0); |