1*384740dcSRalf Baechle /* 2*384740dcSRalf Baechle * Hardware info about DECstation 5000/200 systems (otherwise known as 3*384740dcSRalf Baechle * 3max or KN02). 4*384740dcSRalf Baechle * 5*384740dcSRalf Baechle * This file is subject to the terms and conditions of the GNU General Public 6*384740dcSRalf Baechle * License. See the file "COPYING" in the main directory of this archive 7*384740dcSRalf Baechle * for more details. 8*384740dcSRalf Baechle * 9*384740dcSRalf Baechle * Copyright (C) 1995,1996 by Paul M. Antoine, some code and definitions 10*384740dcSRalf Baechle * are by courtesy of Chris Fraser. 11*384740dcSRalf Baechle * Copyright (C) 2002, 2003, 2005 Maciej W. Rozycki 12*384740dcSRalf Baechle */ 13*384740dcSRalf Baechle #ifndef __ASM_MIPS_DEC_KN02_H 14*384740dcSRalf Baechle #define __ASM_MIPS_DEC_KN02_H 15*384740dcSRalf Baechle 16*384740dcSRalf Baechle #define KN02_SLOT_BASE 0x1fc00000 17*384740dcSRalf Baechle #define KN02_SLOT_SIZE 0x00080000 18*384740dcSRalf Baechle 19*384740dcSRalf Baechle /* 20*384740dcSRalf Baechle * Address ranges decoded by the "system slot" logic for onboard devices. 21*384740dcSRalf Baechle */ 22*384740dcSRalf Baechle #define KN02_SYS_ROM (0*KN02_SLOT_SIZE) /* system board ROM */ 23*384740dcSRalf Baechle #define KN02_RES_1 (1*KN02_SLOT_SIZE) /* unused */ 24*384740dcSRalf Baechle #define KN02_CHKSYN (2*KN02_SLOT_SIZE) /* ECC syndrome */ 25*384740dcSRalf Baechle #define KN02_ERRADDR (3*KN02_SLOT_SIZE) /* bus error address */ 26*384740dcSRalf Baechle #define KN02_DZ11 (4*KN02_SLOT_SIZE) /* DZ11 (DC7085) serial */ 27*384740dcSRalf Baechle #define KN02_RTC (5*KN02_SLOT_SIZE) /* DS1287 RTC */ 28*384740dcSRalf Baechle #define KN02_CSR (6*KN02_SLOT_SIZE) /* system ctrl & status reg */ 29*384740dcSRalf Baechle #define KN02_SYS_ROM_7 (7*KN02_SLOT_SIZE) /* system board ROM (alias) */ 30*384740dcSRalf Baechle 31*384740dcSRalf Baechle 32*384740dcSRalf Baechle /* 33*384740dcSRalf Baechle * System Control & Status Register bits. 34*384740dcSRalf Baechle */ 35*384740dcSRalf Baechle #define KN02_CSR_RES_28 (0xf<<28) /* unused */ 36*384740dcSRalf Baechle #define KN02_CSR_PSU (1<<27) /* power supply unit warning */ 37*384740dcSRalf Baechle #define KN02_CSR_NVRAM (1<<26) /* ~NVRAM clear jumper */ 38*384740dcSRalf Baechle #define KN02_CSR_REFEVEN (1<<25) /* mem refresh bank toggle */ 39*384740dcSRalf Baechle #define KN02_CSR_NRMOD (1<<24) /* ~NRMOD manufact. jumper */ 40*384740dcSRalf Baechle #define KN02_CSR_IOINTEN (0xff<<16) /* IRQ mask bits */ 41*384740dcSRalf Baechle #define KN02_CSR_DIAGCHK (1<<15) /* diagn/norml ECC reads */ 42*384740dcSRalf Baechle #define KN02_CSR_DIAGGEN (1<<14) /* diagn/norml ECC writes */ 43*384740dcSRalf Baechle #define KN02_CSR_CORRECT (1<<13) /* ECC correct/check */ 44*384740dcSRalf Baechle #define KN02_CSR_LEDIAG (1<<12) /* ECC diagn. latch strobe */ 45*384740dcSRalf Baechle #define KN02_CSR_TXDIS (1<<11) /* DZ11 transmit disable */ 46*384740dcSRalf Baechle #define KN02_CSR_BNK32M (1<<10) /* 32M/8M stride */ 47*384740dcSRalf Baechle #define KN02_CSR_DIAGDN (1<<9) /* DIAGDN manufact. jumper */ 48*384740dcSRalf Baechle #define KN02_CSR_BAUD38 (1<<8) /* DZ11 38/19kbps ext. rate */ 49*384740dcSRalf Baechle #define KN02_CSR_IOINT (0xff<<0) /* IRQ status bits (r/o) */ 50*384740dcSRalf Baechle #define KN02_CSR_LEDS (0xff<<0) /* ~diagnostic LEDs (w/o) */ 51*384740dcSRalf Baechle 52*384740dcSRalf Baechle 53*384740dcSRalf Baechle /* 54*384740dcSRalf Baechle * CPU interrupt bits. 55*384740dcSRalf Baechle */ 56*384740dcSRalf Baechle #define KN02_CPU_INR_RES_6 6 /* unused */ 57*384740dcSRalf Baechle #define KN02_CPU_INR_BUS 5 /* memory, I/O bus read/write errors */ 58*384740dcSRalf Baechle #define KN02_CPU_INR_RES_4 4 /* unused */ 59*384740dcSRalf Baechle #define KN02_CPU_INR_RTC 3 /* DS1287 RTC */ 60*384740dcSRalf Baechle #define KN02_CPU_INR_CASCADE 2 /* CSR cascade */ 61*384740dcSRalf Baechle 62*384740dcSRalf Baechle /* 63*384740dcSRalf Baechle * CSR interrupt bits. 64*384740dcSRalf Baechle */ 65*384740dcSRalf Baechle #define KN02_CSR_INR_DZ11 7 /* DZ11 (DC7085) serial */ 66*384740dcSRalf Baechle #define KN02_CSR_INR_LANCE 6 /* LANCE (Am7990) Ethernet */ 67*384740dcSRalf Baechle #define KN02_CSR_INR_ASC 5 /* ASC (NCR53C94) SCSI */ 68*384740dcSRalf Baechle #define KN02_CSR_INR_RES_4 4 /* unused */ 69*384740dcSRalf Baechle #define KN02_CSR_INR_RES_3 3 /* unused */ 70*384740dcSRalf Baechle #define KN02_CSR_INR_TC2 2 /* TURBOchannel slot #2 */ 71*384740dcSRalf Baechle #define KN02_CSR_INR_TC1 1 /* TURBOchannel slot #1 */ 72*384740dcSRalf Baechle #define KN02_CSR_INR_TC0 0 /* TURBOchannel slot #0 */ 73*384740dcSRalf Baechle 74*384740dcSRalf Baechle 75*384740dcSRalf Baechle #define KN02_IRQ_BASE 8 /* first IRQ assigned to CSR */ 76*384740dcSRalf Baechle #define KN02_IRQ_LINES 8 /* number of CSR interrupts */ 77*384740dcSRalf Baechle 78*384740dcSRalf Baechle #define KN02_IRQ_NR(n) ((n) + KN02_IRQ_BASE) 79*384740dcSRalf Baechle #define KN02_IRQ_MASK(n) (1 << (n)) 80*384740dcSRalf Baechle #define KN02_IRQ_ALL 0xff 81*384740dcSRalf Baechle 82*384740dcSRalf Baechle 83*384740dcSRalf Baechle #ifndef __ASSEMBLY__ 84*384740dcSRalf Baechle 85*384740dcSRalf Baechle #include <linux/types.h> 86*384740dcSRalf Baechle 87*384740dcSRalf Baechle extern u32 cached_kn02_csr; 88*384740dcSRalf Baechle extern void init_kn02_irqs(int base); 89*384740dcSRalf Baechle #endif 90*384740dcSRalf Baechle 91*384740dcSRalf Baechle #endif /* __ASM_MIPS_DEC_KN02_H */ 92