From 8d0fc7f86ec22bc4020c4f1643e518634aaa0eb1 Mon Sep 17 00:00:00 2001 From: Michael Shalayeff Date: Mon, 26 Feb 1996 10:26:51 +0000 Subject: From NetBSD Move the speaker to the 'new' config. --- sys/arch/i386/isa/spkr.c | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) (limited to 'sys/arch/i386/isa') diff --git a/sys/arch/i386/isa/spkr.c b/sys/arch/i386/isa/spkr.c index b2694ca1f37..fe0b8dab895 100644 --- a/sys/arch/i386/isa/spkr.c +++ b/sys/arch/i386/isa/spkr.c @@ -1,4 +1,4 @@ -/* $NetBSD: spkr.c,v 1.17 1994/10/30 21:44:18 cgd Exp $ */ +/* $NetBSD: spkr.c,v 1.18 1996/02/22 05:53:28 scottr Exp $ */ /* * spkr.c -- device driver for console speaker on 80386 @@ -9,12 +9,13 @@ * use hz value from param.c */ -#include "speaker.h" -#if NSPEAKER > 0 +#include "spkr.h" +#if NSPKR > 0 #include #include #include +#include #include #include @@ -22,10 +23,21 @@ #include #include -#include +#include #include #include +int spkrprobe __P((struct device *, void *, void *)); +void spkrattach __P((struct device *, struct device *, void *)); + +struct spkr_softc { + struct device sc_dev; +}; + +struct cfdriver spkrcd = { + NULL, "spkr", spkrprobe, spkrattach, DV_TTY, sizeof(struct spkr_softc) +}; + /**************** MACHINE DEPENDENT PART STARTS HERE ************************* * * This section defines a function tone() which causes a tone of given @@ -44,10 +56,6 @@ */ #define PIT_MODE (TIMER_SEL2|TIMER_16BIT|TIMER_SQWAVE) -void -speakerattach() -{ -} static int endtone() /* turn off the speaker, ending current tone */ @@ -402,6 +410,16 @@ size_t slen; static int spkr_active; /* exclusion flag */ static struct buf *spkr_inbuf; /* incoming buf */ +int spkrprobe (struct device *parent, void *match, void *aux) +{ + return 1; +} + +void spkrattach (struct device *parent, struct device *self, void *aux) +{ + printf("\n"); +} + int spkropen(dev) dev_t dev; { -- cgit v1.2.3