162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Hardware info about DECstation 5000/200 systems (otherwise known as 362306a36Sopenharmony_ci * 3max or KN02). 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_KN02_H 1462306a36Sopenharmony_ci#define __ASM_MIPS_DEC_KN02_H 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci#define KN02_SLOT_BASE 0x1fc00000 1762306a36Sopenharmony_ci#define KN02_SLOT_SIZE 0x00080000 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci/* 2062306a36Sopenharmony_ci * Address ranges decoded by the "system slot" logic for onboard devices. 2162306a36Sopenharmony_ci */ 2262306a36Sopenharmony_ci#define KN02_SYS_ROM (0*KN02_SLOT_SIZE) /* system board ROM */ 2362306a36Sopenharmony_ci#define KN02_RES_1 (1*KN02_SLOT_SIZE) /* unused */ 2462306a36Sopenharmony_ci#define KN02_CHKSYN (2*KN02_SLOT_SIZE) /* ECC syndrome */ 2562306a36Sopenharmony_ci#define KN02_ERRADDR (3*KN02_SLOT_SIZE) /* bus error address */ 2662306a36Sopenharmony_ci#define KN02_DZ11 (4*KN02_SLOT_SIZE) /* DZ11 (DC7085) serial */ 2762306a36Sopenharmony_ci#define KN02_RTC (5*KN02_SLOT_SIZE) /* DS1287 RTC */ 2862306a36Sopenharmony_ci#define KN02_CSR (6*KN02_SLOT_SIZE) /* system ctrl & status reg */ 2962306a36Sopenharmony_ci#define KN02_SYS_ROM_7 (7*KN02_SLOT_SIZE) /* system board ROM (alias) */ 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci/* 3362306a36Sopenharmony_ci * System Control & Status Register bits. 3462306a36Sopenharmony_ci */ 3562306a36Sopenharmony_ci#define KN02_CSR_RES_28 (0xf<<28) /* unused */ 3662306a36Sopenharmony_ci#define KN02_CSR_PSU (1<<27) /* power supply unit warning */ 3762306a36Sopenharmony_ci#define KN02_CSR_NVRAM (1<<26) /* ~NVRAM clear jumper */ 3862306a36Sopenharmony_ci#define KN02_CSR_REFEVEN (1<<25) /* mem refresh bank toggle */ 3962306a36Sopenharmony_ci#define KN02_CSR_NRMOD (1<<24) /* ~NRMOD manufact. jumper */ 4062306a36Sopenharmony_ci#define KN02_CSR_IOINTEN (0xff<<16) /* IRQ mask bits */ 4162306a36Sopenharmony_ci#define KN02_CSR_DIAGCHK (1<<15) /* diagn/norml ECC reads */ 4262306a36Sopenharmony_ci#define KN02_CSR_DIAGGEN (1<<14) /* diagn/norml ECC writes */ 4362306a36Sopenharmony_ci#define KN02_CSR_CORRECT (1<<13) /* ECC correct/check */ 4462306a36Sopenharmony_ci#define KN02_CSR_LEDIAG (1<<12) /* ECC diagn. latch strobe */ 4562306a36Sopenharmony_ci#define KN02_CSR_TXDIS (1<<11) /* DZ11 transmit disable */ 4662306a36Sopenharmony_ci#define KN02_CSR_BNK32M (1<<10) /* 32M/8M stride */ 4762306a36Sopenharmony_ci#define KN02_CSR_DIAGDN (1<<9) /* DIAGDN manufact. jumper */ 4862306a36Sopenharmony_ci#define KN02_CSR_BAUD38 (1<<8) /* DZ11 38/19kbps ext. rate */ 4962306a36Sopenharmony_ci#define KN02_CSR_IOINT (0xff<<0) /* IRQ status bits (r/o) */ 5062306a36Sopenharmony_ci#define KN02_CSR_LEDS (0xff<<0) /* ~diagnostic LEDs (w/o) */ 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci 5362306a36Sopenharmony_ci/* 5462306a36Sopenharmony_ci * CPU interrupt bits. 5562306a36Sopenharmony_ci */ 5662306a36Sopenharmony_ci#define KN02_CPU_INR_RES_6 6 /* unused */ 5762306a36Sopenharmony_ci#define KN02_CPU_INR_BUS 5 /* memory, I/O bus read/write errors */ 5862306a36Sopenharmony_ci#define KN02_CPU_INR_RES_4 4 /* unused */ 5962306a36Sopenharmony_ci#define KN02_CPU_INR_RTC 3 /* DS1287 RTC */ 6062306a36Sopenharmony_ci#define KN02_CPU_INR_CASCADE 2 /* CSR cascade */ 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci/* 6362306a36Sopenharmony_ci * CSR interrupt bits. 6462306a36Sopenharmony_ci */ 6562306a36Sopenharmony_ci#define KN02_CSR_INR_DZ11 7 /* DZ11 (DC7085) serial */ 6662306a36Sopenharmony_ci#define KN02_CSR_INR_LANCE 6 /* LANCE (Am7990) Ethernet */ 6762306a36Sopenharmony_ci#define KN02_CSR_INR_ASC 5 /* ASC (NCR53C94) SCSI */ 6862306a36Sopenharmony_ci#define KN02_CSR_INR_RES_4 4 /* unused */ 6962306a36Sopenharmony_ci#define KN02_CSR_INR_RES_3 3 /* unused */ 7062306a36Sopenharmony_ci#define KN02_CSR_INR_TC2 2 /* TURBOchannel slot #2 */ 7162306a36Sopenharmony_ci#define KN02_CSR_INR_TC1 1 /* TURBOchannel slot #1 */ 7262306a36Sopenharmony_ci#define KN02_CSR_INR_TC0 0 /* TURBOchannel slot #0 */ 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci#define KN02_IRQ_BASE 8 /* first IRQ assigned to CSR */ 7662306a36Sopenharmony_ci#define KN02_IRQ_LINES 8 /* number of CSR interrupts */ 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ci#define KN02_IRQ_NR(n) ((n) + KN02_IRQ_BASE) 7962306a36Sopenharmony_ci#define KN02_IRQ_MASK(n) (1 << (n)) 8062306a36Sopenharmony_ci#define KN02_IRQ_ALL 0xff 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci 8362306a36Sopenharmony_ci#ifndef __ASSEMBLY__ 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ci#include <linux/types.h> 8662306a36Sopenharmony_ci 8762306a36Sopenharmony_ciextern u32 cached_kn02_csr; 8862306a36Sopenharmony_ciextern void init_kn02_irqs(int base); 8962306a36Sopenharmony_ci#endif 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_ci#endif /* __ASM_MIPS_DEC_KN02_H */ 92