summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>2000-06-28 03:20:56 +0000
committerkato <kato@FreeBSD.org>2000-06-28 03:20:56 +0000
commit8b446b8a025ff8f00e6d88b6a6402f11d6f589cf (patch)
treebee217f7e21707f19dae9f11f80dc0ec814c211d
parent54a8c464976389474b558d703645d673a3034d32 (diff)
downloadFreeBSD-src-8b446b8a025ff8f00e6d88b6a6402f11d6f589cf.zip
FreeBSD-src-8b446b8a025ff8f00e6d88b6a6402f11d6f589cf.tar.gz
Merged from sys/i386/isa/spkr.c revision 1.47.
-rw-r--r--sys/pc98/pc98/spkr.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/sys/pc98/pc98/spkr.c b/sys/pc98/pc98/spkr.c
index 4ec23a3..2b47828 100644
--- a/sys/pc98/pc98/spkr.c
+++ b/sys/pc98/pc98/spkr.c
@@ -13,12 +13,16 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/bus.h>
#include <sys/kernel.h>
+#include <sys/module.h>
#include <sys/bio.h>
#include <sys/buf.h>
#include <sys/uio.h>
#include <sys/conf.h>
#include <sys/ctype.h>
+#include <sys/malloc.h>
+#include <isa/isavar.h>
#ifdef PC98
#include <pc98/pc98/pc98.h>
#else
@@ -626,5 +630,46 @@ spkr_drvinit(void *unused)
SYSINIT(spkrdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,spkr_drvinit,NULL)
+/*
+ * Install placeholder to claim the resources owned by the
+ * AT tone generator.
+ */
+static struct isa_pnp_id atspeaker_ids[] = {
+ { 0x0008d041 /* PNP0800 */, "AT speaker" },
+ { 0 }
+};
+
+static int
+atspeaker_probe(device_t dev)
+{
+ return(ISA_PNP_PROBE(device_get_parent(dev), dev, atspeaker_ids));
+}
+
+static int
+atspeaker_attach(device_t dev)
+{
+ return(0);
+}
+
+static device_method_t atspeaker_methods[] = {
+ /* Device interface */
+ DEVMETHOD(device_probe, atspeaker_probe),
+ DEVMETHOD(device_attach, atspeaker_attach),
+ DEVMETHOD(device_detach, bus_generic_detach),
+ DEVMETHOD(device_shutdown, bus_generic_shutdown),
+ DEVMETHOD(device_suspend, bus_generic_suspend),
+ DEVMETHOD(device_resume, bus_generic_resume),
+ { 0, 0 }
+};
+
+static driver_t atspeaker_driver = {
+ "atspeaker",
+ atspeaker_methods,
+ 1, /* no softc */
+};
+
+static devclass_t atspeaker_devclass;
+
+DRIVER_MODULE(atspeaker, isa, atspeaker_driver, atspeaker_devclass, 0, 0);
/* spkr.c ends here */
OpenPOWER on IntegriCloud