162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci * drivers/video/clgenfb.h - Cirrus Logic chipset constants
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci * Copyright 1999 Jeff Garzik <jgarzik@pobox.com>
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci * Original clgenfb author:  Frank Neumann
762306a36Sopenharmony_ci *
862306a36Sopenharmony_ci * Based on retz3fb.c and clgen.c:
962306a36Sopenharmony_ci *      Copyright (C) 1997 Jes Sorensen
1062306a36Sopenharmony_ci *      Copyright (C) 1996 Frank Neumann
1162306a36Sopenharmony_ci *
1262306a36Sopenharmony_ci ***************************************************************
1362306a36Sopenharmony_ci *
1462306a36Sopenharmony_ci * Format this code with GNU indent '-kr -i8 -pcs' options.
1562306a36Sopenharmony_ci *
1662306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public
1762306a36Sopenharmony_ci * License.  See the file COPYING in the main directory of this archive
1862306a36Sopenharmony_ci * for more details.
1962306a36Sopenharmony_ci *
2062306a36Sopenharmony_ci */
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci#ifndef __CLGENFB_H__
2362306a36Sopenharmony_ci#define __CLGENFB_H__
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci/* OLD COMMENT: definitions for Piccolo/SD64 VGA controller chip   */
2662306a36Sopenharmony_ci/* OLD COMMENT: these definitions might most of the time also work */
2762306a36Sopenharmony_ci/* OLD COMMENT: for other CL-GD542x/543x based boards..            */
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci/*** External/General Registers ***/
3062306a36Sopenharmony_ci#define CL_POS102	0x102  	/* POS102 register */
3162306a36Sopenharmony_ci#define CL_VSSM		0x46e8 	/* Adapter Sleep */
3262306a36Sopenharmony_ci#define CL_VSSM2	0x3c3	/* Motherboard Sleep */
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci/*** VGA Sequencer Registers ***/
3562306a36Sopenharmony_ci/* the following are from the "extension registers" group */
3662306a36Sopenharmony_ci#define CL_SEQR6	0x6	/* Unlock ALL Extensions */
3762306a36Sopenharmony_ci#define CL_SEQR7	0x7	/* Extended Sequencer Mode */
3862306a36Sopenharmony_ci#define CL_SEQR8	0x8	/* EEPROM Control */
3962306a36Sopenharmony_ci#define CL_SEQR9	0x9	/* Scratch Pad 0 (do not access!) */
4062306a36Sopenharmony_ci#define CL_SEQRA	0xa	/* Scratch Pad 1 (do not access!) */
4162306a36Sopenharmony_ci#define CL_SEQRB	0xb	/* VCLK0 Numerator */
4262306a36Sopenharmony_ci#define CL_SEQRC	0xc	/* VCLK1 Numerator */
4362306a36Sopenharmony_ci#define CL_SEQRD	0xd	/* VCLK2 Numerator */
4462306a36Sopenharmony_ci#define CL_SEQRE	0xe	/* VCLK3 Numerator */
4562306a36Sopenharmony_ci#define CL_SEQRF	0xf	/* DRAM Control */
4662306a36Sopenharmony_ci#define CL_SEQR10	0x10	/* Graphics Cursor X Position */
4762306a36Sopenharmony_ci#define CL_SEQR11	0x11	/* Graphics Cursor Y Position */
4862306a36Sopenharmony_ci#define CL_SEQR12	0x12	/* Graphics Cursor Attributes */
4962306a36Sopenharmony_ci#define CL_SEQR13	0x13	/* Graphics Cursor Pattern Address Offset */
5062306a36Sopenharmony_ci#define CL_SEQR14	0x14	/* Scratch Pad 2 (CL-GD5426/'28 Only) (do not access!) */
5162306a36Sopenharmony_ci#define CL_SEQR15	0x15	/* Scratch Pad 3 (CL-GD5426/'28 Only) (do not access!) */
5262306a36Sopenharmony_ci#define CL_SEQR16	0x16	/* Performance Tuning (CL-GD5424/'26/'28 Only) */
5362306a36Sopenharmony_ci#define CL_SEQR17	0x17	/* Configuration ReadBack and Extended Control (CL-GF5428 Only) */
5462306a36Sopenharmony_ci#define CL_SEQR18	0x18	/* Signature Generator Control (Not CL-GD5420) */
5562306a36Sopenharmony_ci#define CL_SEQR19	0x19	/* Signature Generator Result Low Byte (Not CL-GD5420) */
5662306a36Sopenharmony_ci#define CL_SEQR1A	0x1a	/* Signature Generator Result High Byte (Not CL-GD5420) */
5762306a36Sopenharmony_ci#define CL_SEQR1B	0x1b	/* VCLK0 Denominator and Post-Scalar Value */
5862306a36Sopenharmony_ci#define CL_SEQR1C	0x1c	/* VCLK1 Denominator and Post-Scalar Value */
5962306a36Sopenharmony_ci#define CL_SEQR1D	0x1d	/* VCLK2 Denominator and Post-Scalar Value */
6062306a36Sopenharmony_ci#define CL_SEQR1E	0x1e	/* VCLK3 Denominator and Post-Scalar Value */
6162306a36Sopenharmony_ci#define CL_SEQR1F	0x1f	/* BIOS ROM write enable and MCLK Select */
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci/*** CRT Controller Registers ***/
6462306a36Sopenharmony_ci#define CL_CRT22	0x22	/* Graphics Data Latches ReadBack */
6562306a36Sopenharmony_ci#define CL_CRT24	0x24	/* Attribute Controller Toggle ReadBack */
6662306a36Sopenharmony_ci#define CL_CRT26	0x26	/* Attribute Controller Index ReadBack */
6762306a36Sopenharmony_ci/* the following are from the "extension registers" group */
6862306a36Sopenharmony_ci#define CL_CRT19	0x19	/* Interlace End */
6962306a36Sopenharmony_ci#define CL_CRT1A	0x1a	/* Interlace Control */
7062306a36Sopenharmony_ci#define CL_CRT1B	0x1b	/* Extended Display Controls */
7162306a36Sopenharmony_ci#define CL_CRT1C	0x1c	/* Sync adjust and genlock register */
7262306a36Sopenharmony_ci#define CL_CRT1D	0x1d	/* Overlay Extended Control register */
7362306a36Sopenharmony_ci#define CL_CRT1E	0x1e	/* Another overflow register */
7462306a36Sopenharmony_ci#define CL_CRT25	0x25	/* Part Status Register */
7562306a36Sopenharmony_ci#define CL_CRT27	0x27	/* ID Register */
7662306a36Sopenharmony_ci#define CL_CRT51	0x51	/* P4 disable "flicker fixer" */
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ci/*** Graphics Controller Registers ***/
7962306a36Sopenharmony_ci/* the following are from the "extension registers" group */
8062306a36Sopenharmony_ci#define CL_GR9		0x9	/* Offset Register 0 */
8162306a36Sopenharmony_ci#define CL_GRA		0xa	/* Offset Register 1 */
8262306a36Sopenharmony_ci#define CL_GRB		0xb	/* Graphics Controller Mode Extensions */
8362306a36Sopenharmony_ci#define CL_GRC		0xc	/* Color Key (CL-GD5424/'26/'28 Only) */
8462306a36Sopenharmony_ci#define CL_GRD		0xd	/* Color Key Mask (CL-GD5424/'26/'28 Only) */
8562306a36Sopenharmony_ci#define CL_GRE		0xe	/* Miscellaneous Control (Cl-GD5428 Only) */
8662306a36Sopenharmony_ci#define CL_GRF		0xf	/* Display Compression Control register */
8762306a36Sopenharmony_ci#define CL_GR10		0x10	/* 16-bit Pixel BG Color High Byte (Not CL-GD5420) */
8862306a36Sopenharmony_ci#define CL_GR11		0x11	/* 16-bit Pixel FG Color High Byte (Not CL-GD5420) */
8962306a36Sopenharmony_ci#define CL_GR12		0x12	/* Background Color Byte 2 Register */
9062306a36Sopenharmony_ci#define CL_GR13		0x13	/* Foreground Color Byte 2 Register */
9162306a36Sopenharmony_ci#define CL_GR14		0x14	/* Background Color Byte 3 Register */
9262306a36Sopenharmony_ci#define CL_GR15		0x15	/* Foreground Color Byte 3 Register */
9362306a36Sopenharmony_ci/* the following are CL-GD5426/'28 specific blitter registers */
9462306a36Sopenharmony_ci#define CL_GR20		0x20	/* BLT Width Low */
9562306a36Sopenharmony_ci#define CL_GR21		0x21	/* BLT Width High */
9662306a36Sopenharmony_ci#define CL_GR22		0x22	/* BLT Height Low */
9762306a36Sopenharmony_ci#define CL_GR23		0x23	/* BLT Height High */
9862306a36Sopenharmony_ci#define CL_GR24		0x24	/* BLT Destination Pitch Low */
9962306a36Sopenharmony_ci#define CL_GR25		0x25	/* BLT Destination Pitch High */
10062306a36Sopenharmony_ci#define CL_GR26		0x26	/* BLT Source Pitch Low */
10162306a36Sopenharmony_ci#define CL_GR27		0x27	/* BLT Source Pitch High */
10262306a36Sopenharmony_ci#define CL_GR28		0x28	/* BLT Destination Start Low */
10362306a36Sopenharmony_ci#define CL_GR29		0x29	/* BLT Destination Start Mid */
10462306a36Sopenharmony_ci#define CL_GR2A		0x2a	/* BLT Destination Start High */
10562306a36Sopenharmony_ci#define CL_GR2C		0x2c	/* BLT Source Start Low */
10662306a36Sopenharmony_ci#define CL_GR2D		0x2d	/* BLT Source Start Mid */
10762306a36Sopenharmony_ci#define CL_GR2E		0x2e	/* BLT Source Start High */
10862306a36Sopenharmony_ci#define CL_GR2F		0x2f	/* Picasso IV Blitter compat mode..? */
10962306a36Sopenharmony_ci#define CL_GR30		0x30	/* BLT Mode */
11062306a36Sopenharmony_ci#define CL_GR31		0x31	/* BLT Start/Status */
11162306a36Sopenharmony_ci#define CL_GR32		0x32	/* BLT Raster Operation */
11262306a36Sopenharmony_ci#define CL_GR33		0x33	/* another P4 "compat" register.. */
11362306a36Sopenharmony_ci#define CL_GR34		0x34	/* Transparent Color Select Low */
11462306a36Sopenharmony_ci#define CL_GR35		0x35	/* Transparent Color Select High */
11562306a36Sopenharmony_ci#define CL_GR38		0x38	/* Source Transparent Color Mask Low */
11662306a36Sopenharmony_ci#define CL_GR39		0x39	/* Source Transparent Color Mask High */
11762306a36Sopenharmony_ci
11862306a36Sopenharmony_ci/*** Attribute Controller Registers ***/
11962306a36Sopenharmony_ci#define CL_AR33		0x33	/* The "real" Pixel Panning register (?) */
12062306a36Sopenharmony_ci#define CL_AR34		0x34	/* TEST */
12162306a36Sopenharmony_ci
12262306a36Sopenharmony_ci#endif /* __CLGENFB_H__ */
123