18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Hardware info about DECstation DS2100/3100 systems (otherwise known as 38c2ecf20Sopenharmony_ci * pmin/pmax or KN01). 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public 68c2ecf20Sopenharmony_ci * License. See the file "COPYING" in the main directory of this archive 78c2ecf20Sopenharmony_ci * for more details. 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * Copyright (C) 1995,1996 by Paul M. Antoine, some code and definitions 108c2ecf20Sopenharmony_ci * are by courtesy of Chris Fraser. 118c2ecf20Sopenharmony_ci * Copyright (C) 2002, 2003, 2005 Maciej W. Rozycki 128c2ecf20Sopenharmony_ci */ 138c2ecf20Sopenharmony_ci#ifndef __ASM_MIPS_DEC_KN01_H 148c2ecf20Sopenharmony_ci#define __ASM_MIPS_DEC_KN01_H 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci#define KN01_SLOT_BASE 0x10000000 178c2ecf20Sopenharmony_ci#define KN01_SLOT_SIZE 0x01000000 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci/* 208c2ecf20Sopenharmony_ci * Address ranges for devices. 218c2ecf20Sopenharmony_ci */ 228c2ecf20Sopenharmony_ci#define KN01_PMASK (0*KN01_SLOT_SIZE) /* color plane mask */ 238c2ecf20Sopenharmony_ci#define KN01_PCC (1*KN01_SLOT_SIZE) /* PCC (DC503) cursor */ 248c2ecf20Sopenharmony_ci#define KN01_VDAC (2*KN01_SLOT_SIZE) /* color map */ 258c2ecf20Sopenharmony_ci#define KN01_RES_3 (3*KN01_SLOT_SIZE) /* unused */ 268c2ecf20Sopenharmony_ci#define KN01_RES_4 (4*KN01_SLOT_SIZE) /* unused */ 278c2ecf20Sopenharmony_ci#define KN01_RES_5 (5*KN01_SLOT_SIZE) /* unused */ 288c2ecf20Sopenharmony_ci#define KN01_RES_6 (6*KN01_SLOT_SIZE) /* unused */ 298c2ecf20Sopenharmony_ci#define KN01_ERRADDR (7*KN01_SLOT_SIZE) /* write error address */ 308c2ecf20Sopenharmony_ci#define KN01_LANCE (8*KN01_SLOT_SIZE) /* LANCE (Am7990) Ethernet */ 318c2ecf20Sopenharmony_ci#define KN01_LANCE_MEM (9*KN01_SLOT_SIZE) /* LANCE buffer memory */ 328c2ecf20Sopenharmony_ci#define KN01_SII (10*KN01_SLOT_SIZE) /* SII (DC7061) SCSI */ 338c2ecf20Sopenharmony_ci#define KN01_SII_MEM (11*KN01_SLOT_SIZE) /* SII buffer memory */ 348c2ecf20Sopenharmony_ci#define KN01_DZ11 (12*KN01_SLOT_SIZE) /* DZ11 (DC7085) serial */ 358c2ecf20Sopenharmony_ci#define KN01_RTC (13*KN01_SLOT_SIZE) /* DS1287 RTC (bytes #0) */ 368c2ecf20Sopenharmony_ci#define KN01_ESAR (13*KN01_SLOT_SIZE) /* MAC address (bytes #1) */ 378c2ecf20Sopenharmony_ci#define KN01_CSR (14*KN01_SLOT_SIZE) /* system ctrl & status reg */ 388c2ecf20Sopenharmony_ci#define KN01_SYS_ROM (15*KN01_SLOT_SIZE) /* system board ROM */ 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci/* 428c2ecf20Sopenharmony_ci * Frame buffer memory address. 438c2ecf20Sopenharmony_ci */ 448c2ecf20Sopenharmony_ci#define KN01_VFB_MEM 0x0fc00000 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci/* 478c2ecf20Sopenharmony_ci * CPU interrupt bits. 488c2ecf20Sopenharmony_ci */ 498c2ecf20Sopenharmony_ci#define KN01_CPU_INR_BUS 6 /* memory, I/O bus read/write errors */ 508c2ecf20Sopenharmony_ci#define KN01_CPU_INR_VIDEO 6 /* PCC area detect #2 */ 518c2ecf20Sopenharmony_ci#define KN01_CPU_INR_RTC 5 /* DS1287 RTC */ 528c2ecf20Sopenharmony_ci#define KN01_CPU_INR_DZ11 4 /* DZ11 (DC7085) serial */ 538c2ecf20Sopenharmony_ci#define KN01_CPU_INR_LANCE 3 /* LANCE (Am7990) Ethernet */ 548c2ecf20Sopenharmony_ci#define KN01_CPU_INR_SII 2 /* SII (DC7061) SCSI */ 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci/* 588c2ecf20Sopenharmony_ci * System Control & Status Register bits. 598c2ecf20Sopenharmony_ci */ 608c2ecf20Sopenharmony_ci#define KN01_CSR_MNFMOD (1<<15) /* MNFMOD manufacturing jumper */ 618c2ecf20Sopenharmony_ci#define KN01_CSR_STATUS (1<<14) /* self-test result status output */ 628c2ecf20Sopenharmony_ci#define KN01_CSR_PARDIS (1<<13) /* parity error disable */ 638c2ecf20Sopenharmony_ci#define KN01_CSR_CRSRTST (1<<12) /* PCC test output */ 648c2ecf20Sopenharmony_ci#define KN01_CSR_MONO (1<<11) /* mono/color fb SIMM installed */ 658c2ecf20Sopenharmony_ci#define KN01_CSR_MEMERR (1<<10) /* write timeout error status & ack*/ 668c2ecf20Sopenharmony_ci#define KN01_CSR_VINT (1<<9) /* PCC area detect #2 status & ack */ 678c2ecf20Sopenharmony_ci#define KN01_CSR_TXDIS (1<<8) /* DZ11 transmit disable */ 688c2ecf20Sopenharmony_ci#define KN01_CSR_VBGTRG (1<<2) /* blue DAC voltage over green (r/o) */ 698c2ecf20Sopenharmony_ci#define KN01_CSR_VRGTRG (1<<1) /* red DAC voltage over green (r/o) */ 708c2ecf20Sopenharmony_ci#define KN01_CSR_VRGTRB (1<<0) /* red DAC voltage over blue (r/o) */ 718c2ecf20Sopenharmony_ci#define KN01_CSR_LEDS (0xff<<0) /* ~diagnostic LEDs (w/o) */ 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ci#ifndef __ASSEMBLY__ 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ci#include <linux/interrupt.h> 778c2ecf20Sopenharmony_ci#include <linux/spinlock.h> 788c2ecf20Sopenharmony_ci#include <linux/types.h> 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_cistruct pt_regs; 818c2ecf20Sopenharmony_ci 828c2ecf20Sopenharmony_ciextern u16 cached_kn01_csr; 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ciextern void dec_kn01_be_init(void); 858c2ecf20Sopenharmony_ciextern int dec_kn01_be_handler(struct pt_regs *regs, int is_fixup); 868c2ecf20Sopenharmony_ciextern irqreturn_t dec_kn01_be_interrupt(int irq, void *dev_id); 878c2ecf20Sopenharmony_ci#endif 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci#endif /* __ASM_MIPS_DEC_KN01_H */ 90