diff options
Diffstat (limited to 'sys/arch/sun3/dev/cg4reg.h')
-rw-r--r-- | sys/arch/sun3/dev/cg4reg.h | 51 |
1 files changed, 41 insertions, 10 deletions
diff --git a/sys/arch/sun3/dev/cg4reg.h b/sys/arch/sun3/dev/cg4reg.h index 26627597489..51ec9638bd3 100644 --- a/sys/arch/sun3/dev/cg4reg.h +++ b/sys/arch/sun3/dev/cg4reg.h @@ -1,4 +1,4 @@ -/* $NetBSD: cg4reg.h,v 1.2 1995/04/07 02:47:40 gwr Exp $ */ +/* $NetBSD: cg4reg.h,v 1.3 1996/10/29 19:54:21 gwr Exp $ */ /* * Copyright (c) 1992, 1993 @@ -44,20 +44,51 @@ * @(#)cgthreereg.h 8.2 (Berkeley) 10/30/93 */ -/* Size that can be mapped. */ +/* + * Size that can be mapped (user-level mmap). + */ #define CG4_OVERLAY_SIZE 0x20000 /* size of overlay plane */ #define CG4_ENABLE_SIZE 0x20000 /* size of enable plane */ #define CG4_PIXMAP_SIZE 0x100000 /* size of frame buffer */ -#define CG4_MMAP_SIZE 0x140000 /* total mapping size */ + +/* number of colormap entries */ +#define CG4_CMAP_ENTRIES 256 + +/* + * There are two kinds of cg4 hardware: + * "Type A" has a AMD DACs (Digital-to-Analog Converters) + * "Type B" has a Brooktree DACs. H/W addresses differ too. + */ +#define CG4_TYPE_A 0 +#define CG4_TYPE_B 1 + +/* + * Memory layout of the Type A hardware (OBMEM) + */ +#define CG4A_DEF_BASE 0xFE400000 /* Sun3/110 */ +#define CG4A_OFF_ENABLE 0 +#define CG4A_OFF_PIXMAP 0x400000 +#define CG4A_OFF_OVERLAY 0xC00000 +#define CG4A_OBIO_CMAP 0x0E0000 /* OBIO space! */ + +/* colormap/status register structure */ +struct amd_regs { + u_char r[CG4_CMAP_ENTRIES]; + u_char g[CG4_CMAP_ENTRIES]; + u_char b[CG4_CMAP_ENTRIES]; + u_char status; +#define CG4A_STATUS_FIRSTHALF 0x80 +#define CG4A_STATUS_TOOLATE 0x40 +}; /* - * cgthree display registers. Much like bwtwo registers, except that - * there is a Brooktree Video DAC in there (so we also use btreg.h). + * Memory layout of the Type B hardware (OBMEM) + * Appears on the Sun3/60 at base 0xFF200000 */ +#define CG4B_DEF_BASE 0xFF200000 /* Sun3/60 */ +#define CG4B_OFF_CMAP 0 +#define CG4B_OFF_OVERLAY 0x200000 +#define CG4B_OFF_ENABLE 0x400000 +#define CG4B_OFF_PIXMAP 0x600000 -/* offsets (i.e. from 0xFF200000) */ -#define CG4REG_CMAP 0 -#define CG4REG_OVERLAY 0x200000 -#define CG4REG_ENABLE 0x400000 -#define CG4REG_PIXMAP 0x600000 |