aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2005-06-22 16:56:26 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:31:30 -0400
commit64dac503e8265007ea5c53b4d6bf42488a8a8d7a (patch)
treed086e5ddd6d36118b476ed0fe01091d9d4d70cec
parent3b2396d972ce030e942fef9fcbea1e411b1a62db (diff)
System-specific handling of bus errors for DECstation variations
supporting parity errors only for memory (Pmax/3min/Maxine). Fixes for resources decoded by the KN04/KN05 MB ASIC. Additional clean-ups for the ECC handler. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/dec/Makefile4
-rw-r--r--arch/mips/dec/ecc-berr.c31
-rw-r--r--arch/mips/dec/kn02-irq.c4
-rw-r--r--arch/mips/dec/setup.c9
-rw-r--r--include/asm-mips/dec/ecc.h3
-rw-r--r--include/asm-mips/dec/kn01.h20
-rw-r--r--include/asm-mips/dec/kn02.h19
-rw-r--r--include/asm-mips/dec/kn02xa.h24
-rw-r--r--include/asm-mips/dec/kn05.h77
9 files changed, 121 insertions, 70 deletions
diff --git a/arch/mips/dec/Makefile b/arch/mips/dec/Makefile
index 688757a97cb8..ed181fdc3ac9 100644
--- a/arch/mips/dec/Makefile
+++ b/arch/mips/dec/Makefile
@@ -2,8 +2,8 @@
2# Makefile for the DECstation family specific parts of the kernel 2# Makefile for the DECstation family specific parts of the kernel
3# 3#
4 4
5obj-y := ecc-berr.o int-handler.o ioasic-irq.o kn02-irq.o reset.o \ 5obj-y := ecc-berr.o int-handler.o ioasic-irq.o kn01-berr.o \
6 setup.o time.o 6 kn02-irq.o kn02xa-berr.o reset.o setup.o time.o
7 7
8obj-$(CONFIG_PROM_CONSOLE) += promcon.o 8obj-$(CONFIG_PROM_CONSOLE) += promcon.o
9obj-$(CONFIG_CPU_HAS_WB) += wbflush.o 9obj-$(CONFIG_CPU_HAS_WB) += wbflush.o
diff --git a/arch/mips/dec/ecc-berr.c b/arch/mips/dec/ecc-berr.c
index a36503c95bbb..8f3498aa43ab 100644
--- a/arch/mips/dec/ecc-berr.c
+++ b/arch/mips/dec/ecc-berr.c
@@ -6,7 +6,7 @@
6 * 5000/240 (KN03), 5000/260 (KN05) and DECsystem 5900 (KN03), 6 * 5000/240 (KN03), 5000/260 (KN05) and DECsystem 5900 (KN03),
7 * 5900/260 (KN05) systems. 7 * 5900/260 (KN05) systems.
8 * 8 *
9 * Copyright (c) 2003 Maciej W. Rozycki 9 * Copyright (c) 2003, 2005 Maciej W. Rozycki
10 * 10 *
11 * This program is free software; you can redistribute it and/or 11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License 12 * modify it under the terms of the GNU General Public License
@@ -15,6 +15,7 @@
15 */ 15 */
16 16
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/interrupt.h>
18#include <linux/kernel.h> 19#include <linux/kernel.h>
19#include <linux/sched.h> 20#include <linux/sched.h>
20#include <linux/spinlock.h> 21#include <linux/spinlock.h>
@@ -57,7 +58,7 @@ static int dec_ecc_be_backend(struct pt_regs *regs, int is_fixup, int invoker)
57 58
58 const char *kind, *agent, *cycle, *event; 59 const char *kind, *agent, *cycle, *event;
59 const char *status = "", *xbit = "", *fmt = ""; 60 const char *status = "", *xbit = "", *fmt = "";
60 dma_addr_t address; 61 unsigned long address;
61 u16 syn = 0, sngl; 62 u16 syn = 0, sngl;
62 63
63 int i = 0; 64 int i = 0;
@@ -66,7 +67,7 @@ static int dec_ecc_be_backend(struct pt_regs *regs, int is_fixup, int invoker)
66 u32 chksyn = *kn0x_chksyn; 67 u32 chksyn = *kn0x_chksyn;
67 int action = MIPS_BE_FATAL; 68 int action = MIPS_BE_FATAL;
68 69
69 /* For non-ECC ack ASAP, so any subsequent errors get caught. */ 70 /* For non-ECC ack ASAP, so that any subsequent errors get caught. */
70 if ((erraddr & (KN0X_EAR_VALID | KN0X_EAR_ECCERR)) == KN0X_EAR_VALID) 71 if ((erraddr & (KN0X_EAR_VALID | KN0X_EAR_ECCERR)) == KN0X_EAR_VALID)
71 dec_ecc_be_ack(); 72 dec_ecc_be_ack();
72 73
@@ -74,7 +75,7 @@ static int dec_ecc_be_backend(struct pt_regs *regs, int is_fixup, int invoker)
74 75
75 if (!(erraddr & KN0X_EAR_VALID)) { 76 if (!(erraddr & KN0X_EAR_VALID)) {
76 /* No idea what happened. */ 77 /* No idea what happened. */
77 printk(KERN_ALERT "Unidentified bus error %s.\n", kind); 78 printk(KERN_ALERT "Unidentified bus error %s\n", kind);
78 return action; 79 return action;
79 } 80 }
80 81
@@ -126,7 +127,7 @@ static int dec_ecc_be_backend(struct pt_regs *regs, int is_fixup, int invoker)
126 /* Ack now, no rewrite will happen. */ 127 /* Ack now, no rewrite will happen. */
127 dec_ecc_be_ack(); 128 dec_ecc_be_ack();
128 129
129 fmt = KERN_ALERT "%s" "invalid.\n"; 130 fmt = KERN_ALERT "%s" "invalid\n";
130 } else { 131 } else {
131 sngl = syn & KN0X_ESR_SNGLO; 132 sngl = syn & KN0X_ESR_SNGLO;
132 syn &= KN0X_ESR_SYNLO; 133 syn &= KN0X_ESR_SYNLO;
@@ -161,12 +162,12 @@ static int dec_ecc_be_backend(struct pt_regs *regs, int is_fixup, int invoker)
161 if (syn == 0x01) { 162 if (syn == 0x01) {
162 fmt = KERN_ALERT "%s" 163 fmt = KERN_ALERT "%s"
163 "%#04x -- %s bit error " 164 "%#04x -- %s bit error "
164 "at check bit C%s.\n"; 165 "at check bit C%s\n";
165 xbit = "X"; 166 xbit = "X";
166 } else { 167 } else {
167 fmt = KERN_ALERT "%s" 168 fmt = KERN_ALERT "%s"
168 "%#04x -- %s bit error " 169 "%#04x -- %s bit error "
169 "at check bit C%s%u.\n"; 170 "at check bit C%s%u\n";
170 } 171 }
171 i = syn >> 2; 172 i = syn >> 2;
172 } else { 173 } else {
@@ -176,16 +177,16 @@ static int dec_ecc_be_backend(struct pt_regs *regs, int is_fixup, int invoker)
176 if (i < 32) 177 if (i < 32)
177 fmt = KERN_ALERT "%s" 178 fmt = KERN_ALERT "%s"
178 "%#04x -- %s bit error " 179 "%#04x -- %s bit error "
179 "at data bit D%s%u.\n"; 180 "at data bit D%s%u\n";
180 else 181 else
181 fmt = KERN_ALERT "%s" 182 fmt = KERN_ALERT "%s"
182 "%#04x -- %s bit error.\n"; 183 "%#04x -- %s bit error\n";
183 } 184 }
184 } 185 }
185 } 186 }
186 187
187 if (action != MIPS_BE_FIXUP) 188 if (action != MIPS_BE_FIXUP)
188 printk(KERN_ALERT "Bus error %s: %s %s %s at %#010lx.\n", 189 printk(KERN_ALERT "Bus error %s: %s %s %s at %#010lx\n",
189 kind, agent, cycle, event, address); 190 kind, agent, cycle, event, address);
190 191
191 if (action != MIPS_BE_FIXUP && erraddr & KN0X_EAR_ECCERR) 192 if (action != MIPS_BE_FIXUP && erraddr & KN0X_EAR_ECCERR)
@@ -207,8 +208,8 @@ irqreturn_t dec_ecc_be_interrupt(int irq, void *dev_id, struct pt_regs *regs)
207 return IRQ_HANDLED; 208 return IRQ_HANDLED;
208 209
209 /* 210 /*
210 * FIXME: Find affected processes and kill them, otherwise we 211 * FIXME: Find the affected processes and kill them, otherwise
211 * must die. 212 * we must die.
212 * 213 *
213 * The interrupt is asynchronously delivered thus EPC and RA 214 * The interrupt is asynchronously delivered thus EPC and RA
214 * may be irrelevant, but are printed for a reference. 215 * may be irrelevant, but are printed for a reference.
@@ -235,7 +236,7 @@ static inline void dec_kn02_be_init(void)
235 spin_lock_irqsave(&kn02_lock, flags); 236 spin_lock_irqsave(&kn02_lock, flags);
236 237
237 /* Preset write-only bits of the Control Register cache. */ 238 /* Preset write-only bits of the Control Register cache. */
238 cached_kn02_csr = *csr | KN03_CSR_LEDS; 239 cached_kn02_csr = *csr | KN02_CSR_LEDS;
239 240
240 /* Set normal ECC detection and generation. */ 241 /* Set normal ECC detection and generation. */
241 cached_kn02_csr &= ~(KN02_CSR_DIAGCHK | KN02_CSR_DIAGGEN); 242 cached_kn02_csr &= ~(KN02_CSR_DIAGCHK | KN02_CSR_DIAGGEN);
@@ -250,7 +251,7 @@ static inline void dec_kn02_be_init(void)
250static inline void dec_kn03_be_init(void) 251static inline void dec_kn03_be_init(void)
251{ 252{
252 volatile u32 *mcr = (void *)(KN03_SLOT_BASE + IOASIC_MCR); 253 volatile u32 *mcr = (void *)(KN03_SLOT_BASE + IOASIC_MCR);
253 volatile u32 *mbcs = (void *)(KN03_SLOT_BASE + KN05_MB_CSR); 254 volatile u32 *mbcs = (void *)(KN4K_SLOT_BASE + KN4K_MB_CSR);
254 255
255 kn0x_erraddr = (void *)(KN03_SLOT_BASE + IOASIC_ERRADDR); 256 kn0x_erraddr = (void *)(KN03_SLOT_BASE + IOASIC_ERRADDR);
256 kn0x_chksyn = (void *)(KN03_SLOT_BASE + IOASIC_CHKSYN); 257 kn0x_chksyn = (void *)(KN03_SLOT_BASE + IOASIC_CHKSYN);
@@ -265,7 +266,7 @@ static inline void dec_kn03_be_init(void)
265 *mcr = (*mcr & ~(KN03_MCR_DIAGCHK | KN03_MCR_DIAGGEN)) | 266 *mcr = (*mcr & ~(KN03_MCR_DIAGCHK | KN03_MCR_DIAGGEN)) |
266 KN03_MCR_CORRECT; 267 KN03_MCR_CORRECT;
267 if (current_cpu_data.cputype == CPU_R4400SC) 268 if (current_cpu_data.cputype == CPU_R4400SC)
268 *mbcs |= KN05_MB_CSR_EE; 269 *mbcs |= KN4K_MB_CSR_EE;
269 fast_iob(); 270 fast_iob();
270} 271}
271 272
diff --git a/arch/mips/dec/kn02-irq.c b/arch/mips/dec/kn02-irq.c
index e0bfcd1521e2..644085e10403 100644
--- a/arch/mips/dec/kn02-irq.c
+++ b/arch/mips/dec/kn02-irq.c
@@ -4,7 +4,7 @@
4 * DECstation 5000/200 (KN02) Control and Status Register 4 * DECstation 5000/200 (KN02) Control and Status Register
5 * interrupts. 5 * interrupts.
6 * 6 *
7 * Copyright (c) 2002, 2003 Maciej W. Rozycki 7 * Copyright (c) 2002, 2003, 2005 Maciej W. Rozycki
8 * 8 *
9 * This program is free software; you can redistribute it and/or 9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License 10 * modify it under the terms of the GNU General Public License
@@ -111,7 +111,7 @@ void __init init_kn02_irqs(int base)
111 111
112 /* Mask interrupts. */ 112 /* Mask interrupts. */
113 spin_lock_irqsave(&kn02_lock, flags); 113 spin_lock_irqsave(&kn02_lock, flags);
114 cached_kn02_csr &= ~KN03_CSR_IOINTEN; 114 cached_kn02_csr &= ~KN02_CSR_IOINTEN;
115 *csr = cached_kn02_csr; 115 *csr = cached_kn02_csr;
116 iob(); 116 iob();
117 spin_unlock_irqrestore(&kn02_lock, flags); 117 spin_unlock_irqrestore(&kn02_lock, flags);
diff --git a/arch/mips/dec/setup.c b/arch/mips/dec/setup.c
index 82408ce710fc..f63fb9cd43c6 100644
--- a/arch/mips/dec/setup.c
+++ b/arch/mips/dec/setup.c
@@ -113,7 +113,16 @@ void __init dec_be_init(void)
113{ 113{
114 switch (mips_machtype) { 114 switch (mips_machtype) {
115 case MACH_DS23100: /* DS2100/DS3100 Pmin/Pmax */ 115 case MACH_DS23100: /* DS2100/DS3100 Pmin/Pmax */
116 board_be_handler = dec_kn01_be_handler;
117 busirq.handler = dec_kn01_be_interrupt;
116 busirq.flags |= SA_SHIRQ; 118 busirq.flags |= SA_SHIRQ;
119 dec_kn01_be_init();
120 break;
121 case MACH_DS5000_1XX: /* DS5000/1xx 3min */
122 case MACH_DS5000_XX: /* DS5000/xx Maxine */
123 board_be_handler = dec_kn02xa_be_handler;
124 busirq.handler = dec_kn02xa_be_interrupt;
125 dec_kn02xa_be_init();
117 break; 126 break;
118 case MACH_DS5000_200: /* DS5000/200 3max */ 127 case MACH_DS5000_200: /* DS5000/200 3max */
119 case MACH_DS5000_2X0: /* DS5000/240 3max+ */ 128 case MACH_DS5000_2X0: /* DS5000/240 3max+ */
diff --git a/include/asm-mips/dec/ecc.h b/include/asm-mips/dec/ecc.h
index 724908b0bf13..19495a490e72 100644
--- a/include/asm-mips/dec/ecc.h
+++ b/include/asm-mips/dec/ecc.h
@@ -49,7 +49,8 @@ struct pt_regs;
49 49
50extern void dec_ecc_be_init(void); 50extern void dec_ecc_be_init(void);
51extern int dec_ecc_be_handler(struct pt_regs *regs, int is_fixup); 51extern int dec_ecc_be_handler(struct pt_regs *regs, int is_fixup);
52extern irqreturn_t dec_ecc_be_interrupt(int irq, void *dev_id, struct pt_regs *regs); 52extern irqreturn_t dec_ecc_be_interrupt(int irq, void *dev_id,
53 struct pt_regs *regs);
53#endif 54#endif
54 55
55#endif /* __ASM_MIPS_DEC_ECC_H */ 56#endif /* __ASM_MIPS_DEC_ECC_H */
diff --git a/include/asm-mips/dec/kn01.h b/include/asm-mips/dec/kn01.h
index 325fcbbbdfa0..607a385ffd8a 100644
--- a/include/asm-mips/dec/kn01.h
+++ b/include/asm-mips/dec/kn01.h
@@ -8,7 +8,7 @@
8 * 8 *
9 * Copyright (C) 1995,1996 by Paul M. Antoine, some code and definitions 9 * Copyright (C) 1995,1996 by Paul M. Antoine, some code and definitions
10 * are by courtesy of Chris Fraser. 10 * are by courtesy of Chris Fraser.
11 * Copyright (C) 2002, 2003 Maciej W. Rozycki 11 * Copyright (C) 2002, 2003, 2005 Maciej W. Rozycki
12 */ 12 */
13#ifndef __ASM_MIPS_DEC_KN01_H 13#ifndef __ASM_MIPS_DEC_KN01_H
14#define __ASM_MIPS_DEC_KN01_H 14#define __ASM_MIPS_DEC_KN01_H
@@ -80,4 +80,22 @@
80#define KN01_CSR_VRGTRB (1<<0) /* red DAC voltage over blue (r/o) */ 80#define KN01_CSR_VRGTRB (1<<0) /* red DAC voltage over blue (r/o) */
81#define KN01_CSR_LEDS (0xff<<0) /* ~diagnostic LEDs (w/o) */ 81#define KN01_CSR_LEDS (0xff<<0) /* ~diagnostic LEDs (w/o) */
82 82
83
84#ifndef __ASSEMBLY__
85
86#include <linux/interrupt.h>
87#include <linux/spinlock.h>
88#include <linux/types.h>
89
90struct pt_regs;
91
92extern u16 cached_kn01_csr;
93extern spinlock_t kn01_lock;
94
95extern void dec_kn01_be_init(void);
96extern int dec_kn01_be_handler(struct pt_regs *regs, int is_fixup);
97extern irqreturn_t dec_kn01_be_interrupt(int irq, void *dev_id,
98 struct pt_regs *regs);
99#endif
100
83#endif /* __ASM_MIPS_DEC_KN01_H */ 101#endif /* __ASM_MIPS_DEC_KN01_H */
diff --git a/include/asm-mips/dec/kn02.h b/include/asm-mips/dec/kn02.h
index 2c935f972c67..83a042e90687 100644
--- a/include/asm-mips/dec/kn02.h
+++ b/include/asm-mips/dec/kn02.h
@@ -8,16 +8,11 @@
8 * 8 *
9 * Copyright (C) 1995,1996 by Paul M. Antoine, some code and definitions 9 * Copyright (C) 1995,1996 by Paul M. Antoine, some code and definitions
10 * are by courtesy of Chris Fraser. 10 * are by courtesy of Chris Fraser.
11 * Copyright (C) 2002, 2003 Maciej W. Rozycki 11 * Copyright (C) 2002, 2003, 2005 Maciej W. Rozycki
12 */ 12 */
13#ifndef __ASM_MIPS_DEC_KN02_H 13#ifndef __ASM_MIPS_DEC_KN02_H
14#define __ASM_MIPS_DEC_KN02_H 14#define __ASM_MIPS_DEC_KN02_H
15 15
16#ifndef __ASSEMBLY__
17#include <linux/spinlock.h>
18#include <linux/types.h>
19#endif
20
21#include <asm/addrspace.h> 16#include <asm/addrspace.h>
22#include <asm/dec/ecc.h> 17#include <asm/dec/ecc.h>
23 18
@@ -53,8 +48,8 @@
53#define KN02_CSR_PSU (1<<27) /* power supply unit warning */ 48#define KN02_CSR_PSU (1<<27) /* power supply unit warning */
54#define KN02_CSR_NVRAM (1<<26) /* ~NVRAM clear jumper */ 49#define KN02_CSR_NVRAM (1<<26) /* ~NVRAM clear jumper */
55#define KN02_CSR_REFEVEN (1<<25) /* mem refresh bank toggle */ 50#define KN02_CSR_REFEVEN (1<<25) /* mem refresh bank toggle */
56#define KN03_CSR_NRMOD (1<<24) /* ~NRMOD manufact. jumper */ 51#define KN02_CSR_NRMOD (1<<24) /* ~NRMOD manufact. jumper */
57#define KN03_CSR_IOINTEN (0xff<<16) /* IRQ mask bits */ 52#define KN02_CSR_IOINTEN (0xff<<16) /* IRQ mask bits */
58#define KN02_CSR_DIAGCHK (1<<15) /* diagn/norml ECC reads */ 53#define KN02_CSR_DIAGCHK (1<<15) /* diagn/norml ECC reads */
59#define KN02_CSR_DIAGGEN (1<<14) /* diagn/norml ECC writes */ 54#define KN02_CSR_DIAGGEN (1<<14) /* diagn/norml ECC writes */
60#define KN02_CSR_CORRECT (1<<13) /* ECC correct/check */ 55#define KN02_CSR_CORRECT (1<<13) /* ECC correct/check */
@@ -63,8 +58,8 @@
63#define KN02_CSR_BNK32M (1<<10) /* 32M/8M stride */ 58#define KN02_CSR_BNK32M (1<<10) /* 32M/8M stride */
64#define KN02_CSR_DIAGDN (1<<9) /* DIAGDN manufact. jumper */ 59#define KN02_CSR_DIAGDN (1<<9) /* DIAGDN manufact. jumper */
65#define KN02_CSR_BAUD38 (1<<8) /* DZ11 38/19kbps ext. rate */ 60#define KN02_CSR_BAUD38 (1<<8) /* DZ11 38/19kbps ext. rate */
66#define KN03_CSR_IOINT (0xff<<0) /* IRQ status bits (r/o) */ 61#define KN02_CSR_IOINT (0xff<<0) /* IRQ status bits (r/o) */
67#define KN03_CSR_LEDS (0xff<<0) /* ~diagnostic LEDs (w/o) */ 62#define KN02_CSR_LEDS (0xff<<0) /* ~diagnostic LEDs (w/o) */
68 63
69 64
70/* 65/*
@@ -98,6 +93,10 @@
98 93
99 94
100#ifndef __ASSEMBLY__ 95#ifndef __ASSEMBLY__
96
97#include <linux/spinlock.h>
98#include <linux/types.h>
99
101extern u32 cached_kn02_csr; 100extern u32 cached_kn02_csr;
102extern spinlock_t kn02_lock; 101extern spinlock_t kn02_lock;
103extern void init_kn02_irqs(int base); 102extern void init_kn02_irqs(int base);
diff --git a/include/asm-mips/dec/kn02xa.h b/include/asm-mips/dec/kn02xa.h
index f6bdf730d9fb..3c25a3346f3f 100644
--- a/include/asm-mips/dec/kn02xa.h
+++ b/include/asm-mips/dec/kn02xa.h
@@ -9,7 +9,7 @@
9 * 9 *
10 * Copyright (C) 1995,1996 by Paul M. Antoine, some code and definitions 10 * Copyright (C) 1995,1996 by Paul M. Antoine, some code and definitions
11 * are by courtesy of Chris Fraser. 11 * are by courtesy of Chris Fraser.
12 * Copyright (C) 2000, 2002, 2003 Maciej W. Rozycki 12 * Copyright (C) 2000, 2002, 2003, 2005 Maciej W. Rozycki
13 * 13 *
14 * These are addresses which have to be known early in the boot process. 14 * These are addresses which have to be known early in the boot process.
15 * For other addresses refer to tc.h, ioasic_addrs.h and friends. 15 * For other addresses refer to tc.h, ioasic_addrs.h and friends.
@@ -52,8 +52,13 @@
52#define KN02XA_MER_PAGERR (1<<16) /* 2k page boundary error */ 52#define KN02XA_MER_PAGERR (1<<16) /* 2k page boundary error */
53#define KN02XA_MER_TRANSERR (1<<15) /* transfer length error */ 53#define KN02XA_MER_TRANSERR (1<<15) /* transfer length error */
54#define KN02XA_MER_PARDIS (1<<14) /* parity error disable */ 54#define KN02XA_MER_PARDIS (1<<14) /* parity error disable */
55#define KN02XA_MER_RES_12 (0x3<<12) /* unused */ 55#define KN02XA_MER_SIZE (1<<13) /* r/o mirror of MSR_SIZE */
56#define KN02XA_MER_BYTERR (0xf<<8) /* byte lane error bitmask */ 56#define KN02XA_MER_RES_12 (1<<12) /* unused */
57#define KN02XA_MER_BYTERR (0xf<<8) /* byte lane error bitmask: */
58#define KN02XA_MER_BYTERR_3 (0x8<<8) /* byte lane #3 */
59#define KN02XA_MER_BYTERR_2 (0x4<<8) /* byte lane #2 */
60#define KN02XA_MER_BYTERR_1 (0x2<<8) /* byte lane #1 */
61#define KN02XA_MER_BYTERR_0 (0x1<<8) /* byte lane #0 */
57#define KN02XA_MER_RES_0 (0xff<<0) /* unused */ 62#define KN02XA_MER_RES_0 (0xff<<0) /* unused */
58 63
59/* 64/*
@@ -72,4 +77,17 @@
72#define KN02XA_EAR_ADDRESS (0x7ffffff<<2) /* address involved */ 77#define KN02XA_EAR_ADDRESS (0x7ffffff<<2) /* address involved */
73#define KN02XA_EAR_RES_0 (0x3<<0) /* unused */ 78#define KN02XA_EAR_RES_0 (0x3<<0) /* unused */
74 79
80
81#ifndef __ASSEMBLY__
82
83#include <linux/interrupt.h>
84
85struct pt_regs;
86
87extern void dec_kn02xa_be_init(void);
88extern int dec_kn02xa_be_handler(struct pt_regs *regs, int is_fixup);
89extern irqreturn_t dec_kn02xa_be_interrupt(int irq, void *dev_id,
90 struct pt_regs *regs);
91#endif
92
75#endif /* __ASM_MIPS_DEC_KN02XA_H */ 93#endif /* __ASM_MIPS_DEC_KN02XA_H */
diff --git a/include/asm-mips/dec/kn05.h b/include/asm-mips/dec/kn05.h
index b120362b8f13..61feac382efb 100644
--- a/include/asm-mips/dec/kn05.h
+++ b/include/asm-mips/dec/kn05.h
@@ -1,10 +1,12 @@
1/* 1/*
2 * include/asm-mips/dec/kn05.h 2 * include/asm-mips/dec/kn05.h
3 * 3 *
4 * DECstation 5000/260 (4max+ or KN05) and DECsystem 5900/260 4 * DECstation/DECsystem 5000/260 (4max+ or KN05), 5000/150 (4min
5 * or KN04-BA), Personal DECstation/DECsystem 5000/50 (4maxine or
6 * KN04-CA) and DECsystem 5900/260 (KN05) R4k CPU card MB ASIC
5 * definitions. 7 * definitions.
6 * 8 *
7 * Copyright (C) 2002, 2003 Maciej W. Rozycki 9 * Copyright (C) 2002, 2003, 2005 Maciej W. Rozycki
8 * 10 *
9 * This program is free software; you can redistribute it and/or 11 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License 12 * modify it under the terms of the GNU General Public License
@@ -13,59 +15,62 @@
13 * 15 *
14 * WARNING! All this information is pure guesswork based on the 16 * WARNING! All this information is pure guesswork based on the
15 * ROM. It is provided here in hope it will give someone some 17 * ROM. It is provided here in hope it will give someone some
16 * food for thought. No documentation for the KN05 module has 18 * food for thought. No documentation for the KN05 nor the KN04
17 * been located so far. 19 * module has been located so far.
18 */ 20 */
19#ifndef __ASM_MIPS_DEC_KN05_H 21#ifndef __ASM_MIPS_DEC_KN05_H
20#define __ASM_MIPS_DEC_KN05_H 22#define __ASM_MIPS_DEC_KN05_H
21 23
24#include <asm/addrspace.h>
22#include <asm/dec/ioasic_addrs.h> 25#include <asm/dec/ioasic_addrs.h>
23 26
24/* 27/*
25 * The oncard MB (Memory Buffer) ASIC provides an additional address 28 * The oncard MB (Memory Buffer) ASIC provides an additional address
26 * decoder. Certain address ranges within the "high" 16 slots are 29 * decoder. Certain address ranges within the "high" 16 slots are
27 * passed to the I/O ASIC's decoder like with the KN03. Others are 30 * passed to the I/O ASIC's decoder like with the KN03 or KN02-BA/CA.
28 * handled locally. "Low" slots are always passed. 31 * Others are handled locally. "Low" slots are always passed.
29 */ 32 */
30#define KN05_MB_ROM (16*IOASIC_SLOT_SIZE) /* KN05 card ROM */ 33#define KN4K_SLOT_BASE KSEG1ADDR(0x1fc00000)
31#define KN05_IOCTL (17*IOASIC_SLOT_SIZE) /* I/O ASIC */ 34
32#define KN05_ESAR (18*IOASIC_SLOT_SIZE) /* LANCE MAC address chip */ 35#define KN4K_MB_ROM (0*IOASIC_SLOT_SIZE) /* KN05/KN04 card ROM */
33#define KN05_LANCE (19*IOASIC_SLOT_SIZE) /* LANCE Ethernet */ 36#define KN4K_IOCTL (1*IOASIC_SLOT_SIZE) /* I/O ASIC */
34#define KN05_MB_INT (20*IOASIC_SLOT_SIZE) /* MB interrupt register */ 37#define KN4K_ESAR (2*IOASIC_SLOT_SIZE) /* LANCE MAC address chip */
35#define KN05_MB_EA (21*IOASIC_SLOT_SIZE) /* MB error address? */ 38#define KN4K_LANCE (3*IOASIC_SLOT_SIZE) /* LANCE Ethernet */
36#define KN05_MB_EC (22*IOASIC_SLOT_SIZE) /* MB error ??? */ 39#define KN4K_MB_INT (4*IOASIC_SLOT_SIZE) /* MB interrupt register */
37#define KN05_MB_CSR (23*IOASIC_SLOT_SIZE) /* MB control & status */ 40#define KN4K_MB_EA (5*IOASIC_SLOT_SIZE) /* MB error address? */
38#define KN05_RES_24 (24*IOASIC_SLOT_SIZE) /* unused? */ 41#define KN4K_MB_EC (6*IOASIC_SLOT_SIZE) /* MB error ??? */
39#define KN05_RES_25 (25*IOASIC_SLOT_SIZE) /* unused? */ 42#define KN4K_MB_CSR (7*IOASIC_SLOT_SIZE) /* MB control & status */
40#define KN05_RES_26 (26*IOASIC_SLOT_SIZE) /* unused? */ 43#define KN4K_RES_08 (8*IOASIC_SLOT_SIZE) /* unused? */
41#define KN05_RES_27 (27*IOASIC_SLOT_SIZE) /* unused? */ 44#define KN4K_RES_09 (9*IOASIC_SLOT_SIZE) /* unused? */
42#define KN05_SCSI (28*IOASIC_SLOT_SIZE) /* ASC SCSI */ 45#define KN4K_RES_10 (10*IOASIC_SLOT_SIZE) /* unused? */
43#define KN05_RES_29 (29*IOASIC_SLOT_SIZE) /* unused? */ 46#define KN4K_RES_11 (11*IOASIC_SLOT_SIZE) /* unused? */
44#define KN05_RES_30 (30*IOASIC_SLOT_SIZE) /* unused? */ 47#define KN4K_SCSI (12*IOASIC_SLOT_SIZE) /* ASC SCSI */
45#define KN05_RES_31 (31*IOASIC_SLOT_SIZE) /* unused? */ 48#define KN4K_RES_13 (13*IOASIC_SLOT_SIZE) /* unused? */
49#define KN4K_RES_14 (14*IOASIC_SLOT_SIZE) /* unused? */
50#define KN4K_RES_15 (15*IOASIC_SLOT_SIZE) /* unused? */
46 51
47/* 52/*
48 * Bits for the MB interrupt register. 53 * Bits for the MB interrupt register.
49 * The register appears read-only. 54 * The register appears read-only.
50 */ 55 */
51#define KN05_MB_INT_TC (1<<0) /* TURBOchannel? */ 56#define KN4K_MB_INT_TC (1<<0) /* TURBOchannel? */
52#define KN05_MB_INT_RTC (1<<1) /* RTC? */ 57#define KN4K_MB_INT_RTC (1<<1) /* RTC? */
53#define KN05_MB_INT_MT (1<<3) /* ??? */ 58#define KN4K_MB_INT_MT (1<<3) /* ??? */
54 59
55/* 60/*
56 * Bits for the MB control & status register. 61 * Bits for the MB control & status register.
57 * Set to 0x00bf8001 on my system by the ROM. 62 * Set to 0x00bf8001 on my system by the ROM.
58 */ 63 */
59#define KN05_MB_CSR_PF (1<<0) /* PreFetching enable? */ 64#define KN4K_MB_CSR_PF (1<<0) /* PreFetching enable? */
60#define KN05_MB_CSR_F (1<<1) /* ??? */ 65#define KN4K_MB_CSR_F (1<<1) /* ??? */
61#define KN05_MB_CSR_ECC (0xff<<2) /* ??? */ 66#define KN4K_MB_CSR_ECC (0xff<<2) /* ??? */
62#define KN05_MB_CSR_OD (1<<10) /* ??? */ 67#define KN4K_MB_CSR_OD (1<<10) /* ??? */
63#define KN05_MB_CSR_CP (1<<11) /* ??? */ 68#define KN4K_MB_CSR_CP (1<<11) /* ??? */
64#define KN05_MB_CSR_UNC (1<<12) /* ??? */ 69#define KN4K_MB_CSR_UNC (1<<12) /* ??? */
65#define KN05_MB_CSR_IM (1<<13) /* ??? */ 70#define KN4K_MB_CSR_IM (1<<13) /* ??? */
66#define KN05_MB_CSR_NC (1<<14) /* ??? */ 71#define KN4K_MB_CSR_NC (1<<14) /* ??? */
67#define KN05_MB_CSR_EE (1<<15) /* (bus) Exception Enable? */ 72#define KN4K_MB_CSR_EE (1<<15) /* (bus) Exception Enable? */
68#define KN05_MB_CSR_MSK (0x1f<<16) /* ??? */ 73#define KN4K_MB_CSR_MSK (0x1f<<16) /* ??? */
69#define KN05_MB_CSR_FW (1<<21) /* ??? */ 74#define KN4K_MB_CSR_FW (1<<21) /* ??? */
70 75
71#endif /* __ASM_MIPS_DEC_KN05_H */ 76#endif /* __ASM_MIPS_DEC_KN05_H */