home *** CD-ROM | disk | FTP | other *** search
- /* Copyright (c) 1992 NeXT Computer, Inc. All rights reserved.
- *
- * JAWSModes.h - Private definitions for the JAWS display driver
- *
- * HISTORY
- * 02 Sep 92 Joe Pasqua
- * Created.
- * 12 July 1993 Derek B Clegg
- * Cleanup for external release.
- */
- #ifndef JAWSMODES_H__
- #define JAWSMODES_H__
-
- #define JAWS_EISA_ID 0x10AC6001
-
- #define JAWS_VIDEO_W 1120 /* 1120 x 832 mode */
- #define JAWS_VIDEO_MW 1120
- #define JAWS_VIDEO_H 832
- #define JAWS_VIDEO_NBPL (JAWS_VIDEO_MW * 2) /* 2 bytes/pixel */
-
- /* I/O Registers */
-
- #define JAWS_CTL_PHYS_512M 1
- #define JAWS_CTL_PHYS_640M 2
- #define JAWS_CTL_PHYS_768M 3
- #define JAWS_CTL_REG_IOADDR 0x6C88
-
- typedef struct {
- unsigned char phys:2;
- unsigned char cache:1;
- unsigned char ienable:1;
- unsigned char reset:1;
- unsigned char retrace:1;
- unsigned char JAWSvga:1;
- unsigned char bbp12:1;
- } jaws_ctl_reg_t;
-
- /* JAWS Control Bits Register
- * Make sure bit 0 is set - jaws_enable
- * Make sure of 20uS delay between CBR0_RESET and CBR0_ENABLE
- * Must RESET then set ENABLE.
- */
- #define JAWS_CBR0 0x6C84
-
- #define CBR0_ENABLE 0x01
- #define CBR0_ERROR 0x02
- #define CBR0_RESET 0x04
-
- /* JAWS Output Port 1 */
-
- #define JAWS_OPP1 0x6CA8
-
- #define OPP1_MULTI 0x01
- #define OPP1_VGA_PASS 0x02
- #define OPP1_MEM_OFF 0x00
- #define OPP1_MEM_512 0x04
- #define OPP1_MEM_640 0x08
- #define OPP1_MEM_768 0x0C
-
- /* JAWS Interrupt Config and Status Reg 0 */
-
- #define JAWS_CSR0 0x6CA9
-
- #define CSR0_INT_OFF 0x00
- #define CSR0_INT_05 0x09
- #define CSR0_INT_09 0x08 /* IRQ9 is rumoured to be broken. */
- #define CSR0_INT_10 0X0A
- #define CSR0_INT_11 0X0B
- #define CSR0_INT_SENSE 0x10
- #define CSR0_INT_VSENS 0x20
- #define CSR0_INT_STAT 0x80
-
- /* JAWS Input Port 1 */
-
- #define JAWS_IPP1 0x6CAC
-
- #define IPP1_BLANK 0x01
-
- /* JAWS Output Port 2
- * Must have CBR0_ENABLE set to use this register.
- * Must avoid values 0x00 and 0x0C.
- */
-
- #define JAWS_OPP2 0x6CAD
-
- #define OPP2_SCRATCH1 0x01
- #define OPP2_SCRATCH2 0x02
- #define OPP2_MODE_NORM 0x08
- #define OPP2_MODE_NeXT 0x10
- #define OPP2_FB_CACHE 0x20
-
- /* Memory address. */
-
- #define JAWS_BASE_512 0x20000000
- #define JAWS_BASE_640 0x28000000
- #define JAWS_BASE_768 0x30000000
- #define JAWS_G332_OFF 0x00200000
- #define JAWS_BASE_SIZ 0x00400000
-
- #define JAWS_PHYS_BAS JAWS_BASE_512
-
- /* JAWS_BASE_ADR is now a instance variable of the JAWS class. When
- * we map the fb's physical address we allow the system to choose a virtual
- * address. That address is `baseAddress'.
- */
- #if 0
- #define JAWS_BASE_ADR (VM_MIN_KERNEL_ADDRESS + JAWS_PHYS_BAS)
- #else
- #define JAWS_BASE_ADR (baseAddress)
- #endif
-
- #define JAWS_BASE_REG (JAWS_BASE_ADR + JAWS_G332_OFF)
-
- #define JAWS_BASE_END (JAWS_BASE_ADR + JAWS_BASE_SIZ)
-
- /* ASIC REGS */
-
- #define JAWS_DAC0 0x6C91
- #define JAWS_DAC1 0x6C92
- #define JAWS_DAC2 0x6C93
- #define JAWS_DAC3 0x6C94
- #define JAWS_DAC4 0x6C99
- #define JAWS_DAC5 0x6C9A
- #define JAWS_DAC6 0x6C9B
- #define JAWS_DAC7 0x6C9C
- #define JAWS_DAC8 0x6CAE
-
- /* Memory Registers. */
-
- /* BOOT register. */
-
- #define JAWS_BOOT_REG (JAWS_BASE_REG + 0x00000000)
-
- #define CLK_PLL_MUL_9 0x00000009
- #define CLK_PLL_MUL_B 0x0000000B /* Out of thin air !!! */
- #define CLK_PLL_MUL_C 0x0000000C
- #define CLK_SRC_PLL 0x00000020
- #define MPA_ALIGN 0x00000040
-
- #define JAWS_CRA_REG (JAWS_BASE_REG + 0x00000180)
-
- #define CRA_VTG_DIS 0x00000000
- #define CRA_VTG_ENA 0x00000001
-
- #define CRA_NON_INT 0x00000000
- #define CRA_INTRLCE 0x00000002
-
- #define CRA_FMT_CCI 0x00000000
- #define CRA_FMT_EIA 0x00000004
-
- #define CRA_MDE_MST 0x00000000
- #define CRA_MDE_SLV 0x00000008
-
- #define CRA_SYN_TES 0x00000000
- #define CRA_SYN_PLN 0x00000010
-
- #define CRA_SYN_CMP 0x00000000
- #define CRA_SYN_SEP 0x00000020
-
- #define CRA_FMT_C_S 0x00000000
- #define CRA_FMT_VID 0x00000040
-
- #define CRA_BLK_NON 0x00000000
- #define CRA_BLK_PED 0x00000080
-
- #define CRA_CBL_OUT 0x00000000
- #define CRA_CBL_INP 0x00000100
-
- #define CRA_BLK_PAD 0x00000000
- #define CRA_CLK_PAD 0x00000200
-
- #define CRA_BLK_NON 0x00000000
- #define CRA_BLK_FRC 0x00000400
-
- #define CRA_BLK_ENA 0x00000000
- #define CRA_BLK_DIS 0x00000800
-
- #define CRA_001_001 0x00000000
- #define CRA_256_002 0x00001000
- #define CRA_512_512 0x00002000
- #define CRA_1KB_1KB 0x00003000
-
- #define CRA_DMA_ENA 0x00000000
- #define CRA_DMA_DIS 0x00004000
-
- #define CRA_SYN_000 0x00000000
- #define CRA_SYN_001 0x00008000
- #define CRA_SYN_002 0x00010000
- #define CRA_SYN_003 0x00018000
- #define CRA_SYN_004 0x00020000
- #define CRA_SYN_005 0x00028000
- #define CRA_SYN_006 0x00030000
- #define CRA_SYN_007 0x00038000
-
- #define CRA_PPI_NON 0x00000000
- #define CRA_PPI_INT 0x00040000
-
- #define CRA_SMP_DIS 0x00000000
- #define CRA_SMP_DEL 0x00080000
-
- #define CRA_ILM_008 0x00600000
- #define CRA_ILM_004 0x00400000
- #define CRA_ILM_002 0x00200000
- #define CRA_ILM_001 0x00000000
-
- #define CRA_NON_016 0x00500000
- #define CRA_NON_015 0x00400000
- #define CRA_NON_008 0x00300000
- #define CRA_NON_004 0x00200000
- #define CRA_NON_002 0x00100000
- #define CRA_NON_001 0x00000000
-
- #define CRA_CRS_ENA 0x00000000
- #define CRA_CRS_DIS 0x00800000
-
- /* Various VTG registers. */
-
- #define JAWS_VTG_HALF_SYNC (JAWS_BASE_REG + 0x00000084)
- #define JAWS_VTG_BACK_PORCH (JAWS_BASE_REG + 0x00000088)
- #define JAWS_VTG_DISPLAY (JAWS_BASE_REG + 0x0000008C)
- #define JAWS_VTG_SHORTDISPLAY (JAWS_BASE_REG + 0x00000090)
- #define JAWS_VTG_BROADPAUSE (JAWS_BASE_REG + 0x00000094)
- #define JAWS_VTG_VSYNC (JAWS_BASE_REG + 0x00000098)
- #define JAWS_VTG_VPREEQUALISE (JAWS_BASE_REG + 0x0000009C)
- #define JAWS_VTG_VPOSTEQUALISE (JAWS_BASE_REG + 0x000000A0)
- #define JAWS_VTG_VBLANK (JAWS_BASE_REG + 0x000000A4)
- #define JAWS_VTG_VDISPLAY (JAWS_BASE_REG + 0x000000A8)
- #define JAWS_VTG_LINETIME (JAWS_BASE_REG + 0x000000AC)
- #define JAWS_VTG_LINESTART (JAWS_BASE_REG + 0x000000B0)
- #define JAWS_VTG_MEMINIT (JAWS_BASE_REG + 0x000000B4)
- #define JAWS_VTG_TRANSFERDELAY (JAWS_BASE_REG + 0x000000B8)
-
- /* MASK register. */
-
- #define JAWS_MASK_REG (JAWS_BASE_REG + 0x00000100)
-
- /* TOP of SCREEN. */
-
- #define JAWS_TOS_REG (JAWS_BASE_REG + 0x00000200)
-
- /* Colour palette. */
-
- #define JAWS_COL_PAL (JAWS_BASE_REG + 0x00000400)
-
- extern int *colour_palette;
-
- #define BLUE 0x00F0
- #define GREEN 0x0F00
- #define RED 0xF000
- #define WHITE 0xFFF0
- #define BLACK 0x0000
-
- #define OFF0 0x00000000
- #define OFF1 0x00080000
- #define OFF2 0x00100000
- #define OFF3 0x00180000
-
- #define Red 0xF000F000
- #define Grn 0x0F000F00
- #define Blu 0x00F000F0
- #define Wht 0xFFF0FFF0
-
- #endif /* JAWSMODES_H__ */
-