summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authordogcow <dogcow@NetBSD.org>2007-03-15 16:58:36 +0000
committerdogcow <dogcow@NetBSD.org>2007-03-15 16:58:36 +0000
commitd515e7b784f4b67b2d2ec8e43eea0413780149aa (patch)
tree5c7aac002a62ef3e6274e5ad5602f848475135ef /sys/dev
parent1b83cbc3d6d74853c977e2e797e5b0cd3d0c6662 (diff)
Some delicious copypasta from sys/dev/ic/vga.c, so that unichromefb will
compile (and possibly work) when option VGA_RASTERCONSOLE is present.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/vga_raster.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/sys/dev/ic/vga_raster.c b/sys/dev/ic/vga_raster.c
index e024d0ee049..c4398bcc34b 100644
--- a/sys/dev/ic/vga_raster.c
+++ b/sys/dev/ic/vga_raster.c
@@ -1,4 +1,4 @@
-/* $NetBSD: vga_raster.c,v 1.26 2007/03/04 06:02:03 christos Exp $ */
+/* $NetBSD: vga_raster.c,v 1.27 2007/03/15 16:58:36 dogcow Exp $ */
/*
* Copyright (c) 2001, 2002 Bang Jun-Young
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.26 2007/03/04 06:02:03 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.27 2007/03/15 16:58:36 dogcow Exp $");
#include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */
@@ -557,6 +557,25 @@ vga_common_attach(struct vga_softc *sc, bus_space_tag_t iot,
}
int
+vga_cndetach(void)
+{
+ struct vga_config *vc;
+ struct vga_handle *vh;
+
+ vc = &vga_console_vc;
+ vh = &vc->hdl;
+
+ if (vgaconsole) {
+ bus_space_unmap(vh->vh_iot, vh->vh_ioh_vga, 0x10);
+ bus_space_unmap(vh->vh_iot, vh->vh_ioh_6845, 0x10);
+
+ return 1;
+ }
+
+ return 0;
+}
+
+int
vga_is_console(bus_space_tag_t iot, int type)
{
if (vgaconsole &&