diff options
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/arch/alpha/conf/GENERIC | 3 | ||||
| -rw-r--r-- | sys/arch/alpha/conf/files.alpha | 6 | ||||
| -rw-r--r-- | sys/arch/alpha/isa/isa_machdep.c | 51 | ||||
| -rw-r--r-- | sys/arch/alpha/isa/isa_machdep.h | 4 |
4 files changed, 59 insertions, 5 deletions
diff --git a/sys/arch/alpha/conf/GENERIC b/sys/arch/alpha/conf/GENERIC index e06b34f02d4..3acc61e5b39 100644 --- a/sys/arch/alpha/conf/GENERIC +++ b/sys/arch/alpha/conf/GENERIC @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.97 1998/07/27 18:27:08 thorpej Exp $ +# $NetBSD: GENERIC,v 1.98 1998/08/07 10:26:38 drochner Exp $ # # Generic Alpha kernel. Enough to get booted, etc., but not much more. @@ -177,6 +177,7 @@ pckbd* at pckbc? # PC keyboard (kbd port) psm* at pckbc? # PS/2-style mouse (aux port) pcppi* at isa? # PC prog. periph. interface spkr0 at pcppi? # IBM BASIC emulation +isabeep0 at pcppi? # "keyboard" beep com* at isa? port 0x3f8 irq 4 # standard serial ports com* at isa? port 0x2f8 irq 3 cs* at isa? port 0x300 iomem ? irq ? drq ? # CS8900 Ethernet diff --git a/sys/arch/alpha/conf/files.alpha b/sys/arch/alpha/conf/files.alpha index ec668c229c8..4eccaa5017b 100644 --- a/sys/arch/alpha/conf/files.alpha +++ b/sys/arch/alpha/conf/files.alpha @@ -1,4 +1,4 @@ -# $NetBSD: files.alpha,v 1.86 1998/07/31 04:38:51 thorpej Exp $ +# $NetBSD: files.alpha,v 1.87 1998/08/07 10:26:38 drochner Exp $ # # alpha-specific configuration info @@ -218,6 +218,10 @@ file arch/alpha/isa/isa_machdep.c isa include "dev/pckbc/files.pckbc" +# ISA speaker generates keyboard beep +device isabeep +attach isabeep at pcppi + # Floppy disk controller device fdc { drive = -1 } attach fdc at isa diff --git a/sys/arch/alpha/isa/isa_machdep.c b/sys/arch/alpha/isa/isa_machdep.c index 11387027f93..8527deda93f 100644 --- a/sys/arch/alpha/isa/isa_machdep.c +++ b/sys/arch/alpha/isa/isa_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.11 1998/05/28 16:59:31 drochner Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.12 1998/08/07 10:26:39 drochner Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -33,7 +33,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.11 1998/05/28 16:59:31 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.12 1998/08/07 10:26:39 drochner Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -52,6 +52,21 @@ __KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.11 1998/05/28 16:59:31 drochner Ex #include <dev/isa/vga_isavar.h> #endif +#include "pcppi.h" +#if (NPCPPI > 0) +#include <dev/isa/pcppivar.h> + +int isabeepmatch __P((struct device *, struct cfdata *, void *)); +void isabeepattach __P((struct device *, struct device *, void *)); + +struct cfattach isabeep_ca = { + sizeof(struct device), isabeepmatch, isabeepattach +}; + +static int ppi_attached; +static pcppi_tag_t ppicookie; +#endif /* PCPPI */ + int isa_display_console(iot, memt) bus_space_tag_t iot, memt; @@ -64,3 +79,35 @@ isa_display_console(iot, memt) #endif return(res); } + +#if (NPCPPI > 0) +int +isabeepmatch(parent, match, aux) + struct device *parent; + struct cfdata *match; + void *aux; +{ + return (!ppi_attached); +} + +void +isabeepattach(parent, self, aux) + struct device *parent, *self; + void *aux; +{ + printf("\n"); + + ppicookie = ((struct pcppi_attach_args *)aux)->pa_cookie; + ppi_attached = 1; +} +#endif + +void +isabeep(pitch, period) + int pitch, period; +{ +#if (NPCPPI > 0) + if (ppi_attached) + pcppi_bell(ppicookie, pitch, period, 0); +#endif +} diff --git a/sys/arch/alpha/isa/isa_machdep.h b/sys/arch/alpha/isa/isa_machdep.h index e85bacaf787..d087fa06052 100644 --- a/sys/arch/alpha/isa/isa_machdep.h +++ b/sys/arch/alpha/isa/isa_machdep.h @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.h,v 1.8 1998/06/09 01:06:33 thorpej Exp $ */ +/* $NetBSD: isa_machdep.h,v 1.9 1998/08/07 10:26:39 drochner Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -106,3 +106,5 @@ struct alpha_isa_chipset { * NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE. */ int isa_display_console __P((bus_space_tag_t, bus_space_tag_t)); + +void isabeep __P((int, int)); |
