diff options
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/vga.c | 23 | ||||
| -rw-r--r-- | sys/dev/ic/vgavar.h | 3 |
2 files changed, 23 insertions, 3 deletions
diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c index d1bdf32cfd7..df09cc7af1f 100644 --- a/sys/dev/ic/vga.c +++ b/sys/dev/ic/vga.c @@ -1,4 +1,4 @@ -/* $NetBSD: vga.c,v 1.87 2006/04/15 17:48:23 jmmv Exp $ */ +/* $NetBSD: vga.c,v 1.88 2006/08/13 20:24:51 jmcneill Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -35,7 +35,7 @@ #include "opt_wsmsgattrs.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.87 2006/04/15 17:48:23 jmmv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.88 2006/08/13 20:24:51 jmcneill Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -704,6 +704,25 @@ vga_cnattach(bus_space_tag_t iot, bus_space_tag_t memt, int type, int check) } 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) { #ifdef __i386__ diff --git a/sys/dev/ic/vgavar.h b/sys/dev/ic/vgavar.h index af71cdbb439..21566ab78bd 100644 --- a/sys/dev/ic/vgavar.h +++ b/sys/dev/ic/vgavar.h @@ -1,4 +1,4 @@ -/* $NetBSD: vgavar.h,v 1.24 2006/02/16 20:17:16 perry Exp $ */ +/* $NetBSD: vgavar.h,v 1.25 2006/08/13 20:24:51 jmcneill Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -190,6 +190,7 @@ void vga_common_attach(struct vga_softc *, bus_space_tag_t, int vga_is_console(bus_space_tag_t, int); int vga_cnattach(bus_space_tag_t, bus_space_tag_t, int, int); +int vga_cndetach(void); #ifndef VGA_RASTERCONSOLE struct wsscreen_descr; |
