summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/isa
diff options
context:
space:
mode:
authorEric Jackson <ericj@cvs.openbsd.org>2000-11-16 04:33:48 +0000
committerEric Jackson <ericj@cvs.openbsd.org>2000-11-16 04:33:48 +0000
commit135b3449cca911fd86ce42497cad4c7ef445fb9d (patch)
tree229ba81f6deda1aef61b3758849c6799d24b057f /sys/arch/alpha/isa
parentcc4d62d2020e35e37077de37e616bf7374283dfe (diff)
configure vga, mouse and keyboard's once again. Currently only on eb164.
others soon. Some of this from NetBSD.
Diffstat (limited to 'sys/arch/alpha/isa')
-rw-r--r--sys/arch/alpha/isa/isa_machdep.c77
-rw-r--r--sys/arch/alpha/isa/isa_machdep.h4
2 files changed, 62 insertions, 19 deletions
diff --git a/sys/arch/alpha/isa/isa_machdep.c b/sys/arch/alpha/isa/isa_machdep.c
index ad642f6f0f7..03a9cf1043b 100644
--- a/sys/arch/alpha/isa/isa_machdep.c
+++ b/sys/arch/alpha/isa/isa_machdep.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: isa_machdep.c,v 1.6 1997/11/10 15:53:10 niklas Exp $ */
-/* $NetBSD: isa_machdep.c,v 1.5 1996/11/23 06:38:49 cgd Exp $ */
+/* $OpenBSD: isa_machdep.c,v 1.7 2000/11/16 04:33:47 ericj Exp $ */
+/* $NetBSD: isa_machdep.c,v 1.12 1998/08/07 10:26:39 drochner Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -38,34 +38,77 @@
#include <sys/systm.h>
#include <sys/errno.h>
#include <sys/device.h>
+
#include <vm/vm.h>
+#include <uvm/uvm_extern.h>
#include <dev/isa/isavar.h>
#include "vga_isa.h"
#if NVGA_ISA
+#include <dev/ic/mc6845reg.h>
+#include <dev/ic/pcdisplayvar.h>
#include <dev/isa/vga_isavar.h>
#endif
-struct {
- int (*probe) __P((bus_space_tag_t, bus_space_tag_t));
- void (*console) __P((bus_space_tag_t, bus_space_tag_t));
-} isa_display_console_devices[] = {
-#if NVGA_ISA
- { vga_isa_console_match, vga_isa_console_attach },
-#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
};
-void
+static int ppi_attached;
+static pcppi_tag_t ppicookie;
+#endif /* PCPPI */
+
+int
isa_display_console(iot, memt)
bus_space_tag_t iot, memt;
{
- int i = 0;
+ int res = ENXIO;
+#if NVGA_ISA
+ res = vga_isa_cnattach(iot, memt);
+ if (!res)
+ return(0);
+#endif
+ return(res);
+}
- while (isa_display_console_devices[i].probe != NULL)
- if ((*isa_display_console_devices[i].probe)(iot, memt)) {
- (*isa_display_console_devices[i].console)(iot, memt);
- break;
- }
+#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
+
+#if 0
+void
+isabeep(pitch, period)
+ int pitch, period;
+{
+#if (NPCPPI > 0)
+ if (ppi_attached)
+ pcppi_bell(ppicookie, pitch, period, 0);
+#endif
+}
+#endif
diff --git a/sys/arch/alpha/isa/isa_machdep.h b/sys/arch/alpha/isa/isa_machdep.h
index f2ab47a455e..cf2ed3c0fc0 100644
--- a/sys/arch/alpha/isa/isa_machdep.h
+++ b/sys/arch/alpha/isa/isa_machdep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: isa_machdep.h,v 1.6 2000/11/08 16:01:15 art Exp $ */
+/* $OpenBSD: isa_machdep.h,v 1.7 2000/11/16 04:33:47 ericj Exp $ */
/* $NetBSD: isa_machdep.h,v 1.3 1996/11/19 04:53:07 cgd Exp $ */
/*
@@ -59,4 +59,4 @@ struct alpha_isa_chipset {
* alpha-specific ISA functions.
* NOT TO BE USED DIRECTLY BY MACHINE INDEPENDENT CODE.
*/
-void isa_display_console __P((bus_space_tag_t, bus_space_tag_t));
+int isa_display_console __P((bus_space_tag_t, bus_space_tag_t));