162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Hardware info about DECstation DS2100/3100 systems (otherwise known as 362306a36Sopenharmony_ci * pmin/pmax or KN01). 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 662306a36Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 762306a36Sopenharmony_ci * for more details. 862306a36Sopenharmony_ci * 962306a36Sopenharmony_ci * Copyright (C) 1995,1996 by Paul M. Antoine, some code and definitions 1062306a36Sopenharmony_ci * are by courtesy of Chris Fraser. 1162306a36Sopenharmony_ci * Copyright (C) 2002, 2003, 2005 Maciej W. Rozycki 1262306a36Sopenharmony_ci */ 1362306a36Sopenharmony_ci#ifndef __ASM_MIPS_DEC_KN01_H 1462306a36Sopenharmony_ci#define __ASM_MIPS_DEC_KN01_H 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#define KN01_SLOT_BASE 0x10000000 1762306a36Sopenharmony_ci#define KN01_SLOT_SIZE 0x01000000 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci/* 2062306a36Sopenharmony_ci * Address ranges for devices. 2162306a36Sopenharmony_ci */ 2262306a36Sopenharmony_ci#define KN01_PMASK (0*KN01_SLOT_SIZE) /* color plane mask */ 2362306a36Sopenharmony_ci#define KN01_PCC (1*KN01_SLOT_SIZE) /* PCC (DC503) cursor */ 2462306a36Sopenharmony_ci#define KN01_VDAC (2*KN01_SLOT_SIZE) /* color map */ 2562306a36Sopenharmony_ci#define KN01_RES_3 (3*KN01_SLOT_SIZE) /* unused */ 2662306a36Sopenharmony_ci#define KN01_RES_4 (4*KN01_SLOT_SIZE) /* unused */ 2762306a36Sopenharmony_ci#define KN01_RES_5 (5*KN01_SLOT_SIZE) /* unused */ 2862306a36Sopenharmony_ci#define KN01_RES_6 (6*KN01_SLOT_SIZE) /* unused */ 2962306a36Sopenharmony_ci#define KN01_ERRADDR (7*KN01_SLOT_SIZE) /* write error address */ 3062306a36Sopenharmony_ci#define KN01_LANCE (8*KN01_SLOT_SIZE) /* LANCE (Am7990) Ethernet */ 3162306a36Sopenharmony_ci#define KN01_LANCE_MEM (9*KN01_SLOT_SIZE) /* LANCE buffer memory */ 3262306a36Sopenharmony_ci#define KN01_SII (10*KN01_SLOT_SIZE) /* SII (DC7061) SCSI */ 3362306a36Sopenharmony_ci#define KN01_SII_MEM (11*KN01_SLOT_SIZE) /* SII buffer memory */ 3462306a36Sopenharmony_ci#define KN01_DZ11 (12*KN01_SLOT_SIZE) /* DZ11 (DC7085) serial */ 3562306a36Sopenharmony_ci#define KN01_RTC (13*KN01_SLOT_SIZE) /* DS1287 RTC (bytes #0) */ 3662306a36Sopenharmony_ci#define KN01_ESAR (13*KN01_SLOT_SIZE) /* MAC address (bytes #1) */ 3762306a36Sopenharmony_ci#define KN01_CSR (14*KN01_SLOT_SIZE) /* system ctrl & status reg */ 3862306a36Sopenharmony_ci#define KN01_SYS_ROM (15*KN01_SLOT_SIZE) /* system board ROM */ 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci/* 4262306a36Sopenharmony_ci * Frame buffer memory address. 4362306a36Sopenharmony_ci */ 4462306a36Sopenharmony_ci#define KN01_VFB_MEM 0x0fc00000 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ci/* 4762306a36Sopenharmony_ci * CPU interrupt bits. 4862306a36Sopenharmony_ci */ 4962306a36Sopenharmony_ci#define KN01_CPU_INR_BUS 6 /* memory, I/O bus read/write errors */ 5062306a36Sopenharmony_ci#define KN01_CPU_INR_VIDEO 6 /* PCC area detect #2 */ 5162306a36Sopenharmony_ci#define KN01_CPU_INR_RTC 5 /* DS1287 RTC */ 5262306a36Sopenharmony_ci#define KN01_CPU_INR_DZ11 4 /* DZ11 (DC7085) serial */ 5362306a36Sopenharmony_ci#define KN01_CPU_INR_LANCE 3 /* LANCE (Am7990) Ethernet */ 5462306a36Sopenharmony_ci#define KN01_CPU_INR_SII 2 /* SII (DC7061) SCSI */ 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci/* 5862306a36Sopenharmony_ci * System Control & Status Register bits. 5962306a36Sopenharmony_ci */ 6062306a36Sopenharmony_ci#define KN01_CSR_MNFMOD (1<<15) /* MNFMOD manufacturing jumper */ 6162306a36Sopenharmony_ci#define KN01_CSR_STATUS (1<<14) /* self-test result status output */ 6262306a36Sopenharmony_ci#define KN01_CSR_PARDIS (1<<13) /* parity error disable */ 6362306a36Sopenharmony_ci#define KN01_CSR_CRSRTST (1<<12) /* PCC test output */ 6462306a36Sopenharmony_ci#define KN01_CSR_MONO (1<<11) /* mono/color fb SIMM installed */ 6562306a36Sopenharmony_ci#define KN01_CSR_MEMERR (1<<10) /* write timeout error status & ack*/ 6662306a36Sopenharmony_ci#define KN01_CSR_VINT (1<<9) /* PCC area detect #2 status & ack */ 6762306a36Sopenharmony_ci#define KN01_CSR_TXDIS (1<<8) /* DZ11 transmit disable */ 6862306a36Sopenharmony_ci#define KN01_CSR_VBGTRG (1<<2) /* blue DAC voltage over green (r/o) */ 6962306a36Sopenharmony_ci#define KN01_CSR_VRGTRG (1<<1) /* red DAC voltage over green (r/o) */ 7062306a36Sopenharmony_ci#define KN01_CSR_VRGTRB (1<<0) /* red DAC voltage over blue (r/o) */ 7162306a36Sopenharmony_ci#define KN01_CSR_LEDS (0xff<<0) /* ~diagnostic LEDs (w/o) */ 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci#ifndef __ASSEMBLY__ 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_ci#include <linux/interrupt.h> 7762306a36Sopenharmony_ci#include <linux/spinlock.h> 7862306a36Sopenharmony_ci#include <linux/types.h> 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_cistruct pt_regs; 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ciextern u16 cached_kn01_csr; 8362306a36Sopenharmony_ci 8462306a36Sopenharmony_ciextern void dec_kn01_be_init(void); 8562306a36Sopenharmony_ciextern int dec_kn01_be_handler(struct pt_regs *regs, int is_fixup); 8662306a36Sopenharmony_ciextern irqreturn_t dec_kn01_be_interrupt(int irq, void *dev_id); 8762306a36Sopenharmony_ci#endif 8862306a36Sopenharmony_ci 8962306a36Sopenharmony_ci#endif /* __ASM_MIPS_DEC_KN01_H */ 90