From 0d2905f4fcb37938f6fe43c6c818751d78ed14af Mon Sep 17 00:00:00 2001 From: junyoung Date: Sat, 29 Dec 2001 17:44:35 +0000 Subject: [PATCH] - Add a structure needed for access to CRTC registers. - Add definitions for misc output register. - Add defintions for the number of registers. --- sys/dev/ic/vgareg.h | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/sys/dev/ic/vgareg.h b/sys/dev/ic/vgareg.h index 3b2664f05d8e..3cc0e63c3311 100644 --- a/sys/dev/ic/vgareg.h +++ b/sys/dev/ic/vgareg.h @@ -1,4 +1,4 @@ -/* $NetBSD: vgareg.h,v 1.2 1998/05/28 16:48:41 drochner Exp $ */ +/* $NetBSD: vgareg.h,v 1.3 2001/12/29 17:44:35 junyoung Exp $ */ /* * Copyright (c) 1998 @@ -37,20 +37,35 @@ struct reg_vgaattr { /* indexed via port 0x3c0 */ char mode, overscan, colplen, horpixpan; char colreset, misc; }; -#define VGA_ATC_INDEX 0 -#define VGA_ATC_DATAW 0 -#define VGA_ATC_DATAR 1 +#define VGA_ATC_NREGS 21 +#define VGA_ATC_INDEX 0 +#define VGA_ATC_DATAW 0 +#define VGA_ATC_DATAR 1 struct reg_vgats { /* indexed via port 0x3c4 */ char syncreset, mode, wrplmask, fontsel, memmode; }; -#define VGA_TS_INDEX 4 -#define VGA_TS_DATA 5 +#define VGA_TS_NREGS 5 +#define VGA_TS_INDEX 4 +#define VGA_TS_DATA 5 struct reg_vgagdc { /* indexed via port 0x3ce */ char setres, ensetres, colorcomp, rotfunc; char rdplanesel, mode, misc, colorcare; char bitmask; }; -#define VGA_GDC_INDEX 0xe -#define VGA_GDC_DATA 0xf +#define VGA_GDC_NREGS 9 +#define VGA_GDC_INDEX 0xe +#define VGA_GDC_DATA 0xf + +struct reg_vgacrtc { /* indexed via port 0x3d4 */ + char index[25]; +}; +#define VGA_CRTC_NREGS 25 +#define VGA_CRTC_INDEX 0x14 +#define VGA_CRTC_DATA 0x15 + +/* misc output register */ +#define VGA_MISC_INDEX 2 +#define VGA_MISC_DATAR 0xc +#define VGA_MISC_DATAW 2