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