aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/dec
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-mips/dec
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-mips/dec')
-rw-r--r--include/asm-mips/dec/ecc.h55
-rw-r--r--include/asm-mips/dec/interrupts.h125
-rw-r--r--include/asm-mips/dec/ioasic.h36
-rw-r--r--include/asm-mips/dec/ioasic_addrs.h151
-rw-r--r--include/asm-mips/dec/ioasic_ints.h74
-rw-r--r--include/asm-mips/dec/kn01.h83
-rw-r--r--include/asm-mips/dec/kn02.h106
-rw-r--r--include/asm-mips/dec/kn02ba.h67
-rw-r--r--include/asm-mips/dec/kn02ca.h79
-rw-r--r--include/asm-mips/dec/kn02xa.h75
-rw-r--r--include/asm-mips/dec/kn03.h83
-rw-r--r--include/asm-mips/dec/kn05.h71
-rw-r--r--include/asm-mips/dec/kn230.h26
-rw-r--r--include/asm-mips/dec/machtype.h27
-rw-r--r--include/asm-mips/dec/prom.h173
-rw-r--r--include/asm-mips/dec/serial.h36
-rw-r--r--include/asm-mips/dec/tc.h43
-rw-r--r--include/asm-mips/dec/tcinfo.h47
-rw-r--r--include/asm-mips/dec/tcmodule.h39
19 files changed, 1396 insertions, 0 deletions
diff --git a/include/asm-mips/dec/ecc.h b/include/asm-mips/dec/ecc.h
new file mode 100644
index 000000000000..724908b0bf13
--- /dev/null
+++ b/include/asm-mips/dec/ecc.h
@@ -0,0 +1,55 @@
1/*
2 * include/asm-mips/dec/ecc.h
3 *
4 * ECC handling logic definitions common to DECstation/DECsystem
5 * 5000/200 (KN02), 5000/240 (KN03), 5000/260 (KN05) and
6 * DECsystem 5900 (KN03), 5900/260 (KN05) systems.
7 *
8 * Copyright (C) 2003 Maciej W. Rozycki
9 *
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version
13 * 2 of the License, or (at your option) any later version.
14 */
15#ifndef __ASM_MIPS_DEC_ECC_H
16#define __ASM_MIPS_DEC_ECC_H
17
18/*
19 * Error Address Register bits.
20 * The register is r/wc -- any write clears it.
21 */
22#define KN0X_EAR_VALID (1<<31) /* error data valid, bus IRQ */
23#define KN0X_EAR_CPU (1<<30) /* CPU/DMA transaction */
24#define KN0X_EAR_WRITE (1<<29) /* write/read transaction */
25#define KN0X_EAR_ECCERR (1<<28) /* ECC/timeout or overrun */
26#define KN0X_EAR_RES_27 (1<<27) /* unused */
27#define KN0X_EAR_ADDRESS (0x7ffffff<<0) /* address involved */
28
29/*
30 * Error Syndrome Register bits.
31 * The register is frozen when EAR.VALID is set, otherwise it records bits
32 * from the last memory read. The register is r/wc -- any write clears it.
33 */
34#define KN0X_ESR_VLDHI (1<<31) /* error data valid hi word */
35#define KN0X_ESR_CHKHI (0x7f<<24) /* check bits read from mem */
36#define KN0X_ESR_SNGHI (1<<23) /* single/double bit error */
37#define KN0X_ESR_SYNHI (0x7f<<16) /* syndrome from ECC logic */
38#define KN0X_ESR_VLDLO (1<<15) /* error data valid lo word */
39#define KN0X_ESR_CHKLO (0x7f<<8) /* check bits read from mem */
40#define KN0X_ESR_SNGLO (1<<7) /* single/double bit error */
41#define KN0X_ESR_SYNLO (0x7f<<0) /* syndrome from ECC logic */
42
43
44#ifndef __ASSEMBLY__
45
46#include <linux/interrupt.h>
47
48struct pt_regs;
49
50extern void dec_ecc_be_init(void);
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);
53#endif
54
55#endif /* __ASM_MIPS_DEC_ECC_H */
diff --git a/include/asm-mips/dec/interrupts.h b/include/asm-mips/dec/interrupts.h
new file mode 100644
index 000000000000..273e4d65bfe6
--- /dev/null
+++ b/include/asm-mips/dec/interrupts.h
@@ -0,0 +1,125 @@
1/*
2 * Miscellaneous definitions used to initialise the interrupt vector table
3 * with the machine-specific interrupt routines.
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) 1997 by Paul M. Antoine.
10 * reworked 1998 by Harald Koerfgen.
11 * Copyright (C) 2001, 2002, 2003 Maciej W. Rozycki
12 */
13
14#ifndef __ASM_DEC_INTERRUPTS_H
15#define __ASM_DEC_INTERRUPTS_H
16
17#include <asm/mipsregs.h>
18
19
20/*
21 * The list of possible system devices which provide an
22 * interrupt. Not all devices exist on a given system.
23 */
24#define DEC_IRQ_CASCADE 0 /* cascade from CSR or I/O ASIC */
25
26/* Ordinary interrupts */
27#define DEC_IRQ_AB_RECV 1 /* ACCESS.bus receive */
28#define DEC_IRQ_AB_XMIT 2 /* ACCESS.bus transmit */
29#define DEC_IRQ_DZ11 3 /* DZ11 (DC7085) serial */
30#define DEC_IRQ_ASC 4 /* ASC (NCR53C94) SCSI */
31#define DEC_IRQ_FLOPPY 5 /* 82077 FDC */
32#define DEC_IRQ_FPU 6 /* R3k FPU */
33#define DEC_IRQ_HALT 7 /* HALT button or from ACCESS.Bus */
34#define DEC_IRQ_ISDN 8 /* Am79C30A ISDN */
35#define DEC_IRQ_LANCE 9 /* LANCE (Am7990) Ethernet */
36#define DEC_IRQ_BUS 10 /* memory, I/O bus read/write errors */
37#define DEC_IRQ_PSU 11 /* power supply unit warning */
38#define DEC_IRQ_RTC 12 /* DS1287 RTC */
39#define DEC_IRQ_SCC0 13 /* SCC (Z85C30) serial #0 */
40#define DEC_IRQ_SCC1 14 /* SCC (Z85C30) serial #1 */
41#define DEC_IRQ_SII 15 /* SII (DC7061) SCSI */
42#define DEC_IRQ_TC0 16 /* TURBOchannel slot #0 */
43#define DEC_IRQ_TC1 17 /* TURBOchannel slot #1 */
44#define DEC_IRQ_TC2 18 /* TURBOchannel slot #2 */
45#define DEC_IRQ_TIMER 19 /* ARC periodic timer */
46#define DEC_IRQ_VIDEO 20 /* framebuffer */
47
48/* I/O ASIC DMA interrupts */
49#define DEC_IRQ_ASC_MERR 21 /* ASC memory read error */
50#define DEC_IRQ_ASC_ERR 22 /* ASC page overrun */
51#define DEC_IRQ_ASC_DMA 23 /* ASC buffer pointer loaded */
52#define DEC_IRQ_FLOPPY_ERR 24 /* FDC error */
53#define DEC_IRQ_ISDN_ERR 25 /* ISDN memory read/overrun error */
54#define DEC_IRQ_ISDN_RXDMA 26 /* ISDN recv buffer pointer loaded */
55#define DEC_IRQ_ISDN_TXDMA 27 /* ISDN xmit buffer pointer loaded */
56#define DEC_IRQ_LANCE_MERR 28 /* LANCE memory read error */
57#define DEC_IRQ_SCC0A_RXERR 29 /* SCC0A (printer) receive overrun */
58#define DEC_IRQ_SCC0A_RXDMA 30 /* SCC0A receive half page */
59#define DEC_IRQ_SCC0A_TXERR 31 /* SCC0A xmit memory read/overrun */
60#define DEC_IRQ_SCC0A_TXDMA 32 /* SCC0A transmit page end */
61#define DEC_IRQ_AB_RXERR 33 /* ACCESS.bus receive overrun */
62#define DEC_IRQ_AB_RXDMA 34 /* ACCESS.bus receive half page */
63#define DEC_IRQ_AB_TXERR 35 /* ACCESS.bus xmit memory read/ovrn */
64#define DEC_IRQ_AB_TXDMA 36 /* ACCESS.bus transmit page end */
65#define DEC_IRQ_SCC1A_RXERR 37 /* SCC1A (modem) receive overrun */
66#define DEC_IRQ_SCC1A_RXDMA 38 /* SCC1A receive half page */
67#define DEC_IRQ_SCC1A_TXERR 39 /* SCC1A xmit memory read/overrun */
68#define DEC_IRQ_SCC1A_TXDMA 40 /* SCC1A transmit page end */
69
70/* TC5 & TC6 are virtual slots for KN02's onboard devices */
71#define DEC_IRQ_TC5 DEC_IRQ_ASC /* virtual PMAZ-AA */
72#define DEC_IRQ_TC6 DEC_IRQ_LANCE /* virtual PMAD-AA */
73
74#define DEC_NR_INTS 41
75
76
77/* Largest of cpu mask_nr tables. */
78#define DEC_MAX_CPU_INTS 6
79/* Largest of asic mask_nr tables. */
80#define DEC_MAX_ASIC_INTS 9
81
82
83/*
84 * CPU interrupt bits common to all systems.
85 */
86#define DEC_CPU_INR_FPU 7 /* R3k FPU */
87#define DEC_CPU_INR_SW1 1 /* software #1 */
88#define DEC_CPU_INR_SW0 0 /* software #0 */
89
90#define DEC_CPU_IRQ_BASE 0 /* first IRQ assigned to CPU */
91
92#define DEC_CPU_IRQ_NR(n) ((n) + DEC_CPU_IRQ_BASE)
93#define DEC_CPU_IRQ_MASK(n) (1 << ((n) + CAUSEB_IP))
94#define DEC_CPU_IRQ_ALL (0xff << CAUSEB_IP)
95
96
97#ifndef __ASSEMBLY__
98
99/*
100 * Interrupt table structures to hide differences between systems.
101 */
102typedef union { int i; void *p; } int_ptr;
103extern int dec_interrupt[DEC_NR_INTS];
104extern int_ptr cpu_mask_nr_tbl[DEC_MAX_CPU_INTS][2];
105extern int_ptr asic_mask_nr_tbl[DEC_MAX_ASIC_INTS][2];
106extern int cpu_fpu_mask;
107
108
109/*
110 * Common interrupt routine prototypes for all DECStations
111 */
112extern void kn02_io_int(void);
113extern void kn02xa_io_int(void);
114extern void kn03_io_int(void);
115extern void asic_dma_int(void);
116extern void asic_all_int(void);
117extern void kn02_all_int(void);
118extern void cpu_all_int(void);
119
120extern void dec_intr_unimplemented(void);
121extern void asic_intr_unimplemented(void);
122
123#endif /* __ASSEMBLY__ */
124
125#endif
diff --git a/include/asm-mips/dec/ioasic.h b/include/asm-mips/dec/ioasic.h
new file mode 100644
index 000000000000..486a5b0a1302
--- /dev/null
+++ b/include/asm-mips/dec/ioasic.h
@@ -0,0 +1,36 @@
1/*
2 * include/asm-mips/dec/ioasic.h
3 *
4 * DEC I/O ASIC access operations.
5 *
6 * Copyright (C) 2000, 2002, 2003 Maciej W. Rozycki
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 */
13
14#ifndef __ASM_DEC_IOASIC_H
15#define __ASM_DEC_IOASIC_H
16
17#include <linux/spinlock.h>
18#include <linux/types.h>
19
20extern spinlock_t ioasic_ssr_lock;
21
22extern volatile u32 *ioasic_base;
23
24static inline void ioasic_write(unsigned int reg, u32 v)
25{
26 ioasic_base[reg / 4] = v;
27}
28
29static inline u32 ioasic_read(unsigned int reg)
30{
31 return ioasic_base[reg / 4];
32}
33
34extern void init_ioasic_irqs(int base);
35
36#endif /* __ASM_DEC_IOASIC_H */
diff --git a/include/asm-mips/dec/ioasic_addrs.h b/include/asm-mips/dec/ioasic_addrs.h
new file mode 100644
index 000000000000..5e18a7510592
--- /dev/null
+++ b/include/asm-mips/dec/ioasic_addrs.h
@@ -0,0 +1,151 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Definitions for the address map in the JUNKIO Asic
7 *
8 * Created with Information from:
9 *
10 * "DEC 3000 300/400/500/600/700/800/900 AXP Models System Programmer's Manual"
11 *
12 * and the Mach Sources
13 *
14 * Copyright (C) 199x the Anonymous
15 * Copyright (C) 2002, 2003 Maciej W. Rozycki
16 */
17
18#ifndef __ASM_MIPS_DEC_IOASIC_ADDRS_H
19#define __ASM_MIPS_DEC_IOASIC_ADDRS_H
20
21#define IOASIC_SLOT_SIZE 0x00040000
22
23/*
24 * Address ranges decoded by the I/O ASIC for onboard devices.
25 */
26#define IOASIC_SYS_ROM (0*IOASIC_SLOT_SIZE) /* system board ROM */
27#define IOASIC_IOCTL (1*IOASIC_SLOT_SIZE) /* I/O ASIC */
28#define IOASIC_ESAR (2*IOASIC_SLOT_SIZE) /* LANCE MAC address chip */
29#define IOASIC_LANCE (3*IOASIC_SLOT_SIZE) /* LANCE Ethernet */
30#define IOASIC_SCC0 (4*IOASIC_SLOT_SIZE) /* SCC #0 */
31#define IOASIC_VDAC_HI (5*IOASIC_SLOT_SIZE) /* VDAC (maxine) */
32#define IOASIC_SCC1 (6*IOASIC_SLOT_SIZE) /* SCC #1 (3min, 3max+) */
33#define IOASIC_VDAC_LO (7*IOASIC_SLOT_SIZE) /* VDAC (maxine) */
34#define IOASIC_TOY (8*IOASIC_SLOT_SIZE) /* RTC */
35#define IOASIC_ISDN (9*IOASIC_SLOT_SIZE) /* ISDN (maxine) */
36#define IOASIC_ERRADDR (9*IOASIC_SLOT_SIZE) /* bus error address (3max+) */
37#define IOASIC_CHKSYN (10*IOASIC_SLOT_SIZE) /* ECC syndrome (3max+) */
38#define IOASIC_ACC_BUS (10*IOASIC_SLOT_SIZE) /* ACCESS.bus (maxine) */
39#define IOASIC_MCR (11*IOASIC_SLOT_SIZE) /* memory control (3max+) */
40#define IOASIC_FLOPPY (11*IOASIC_SLOT_SIZE) /* FDC (maxine) */
41#define IOASIC_SCSI (12*IOASIC_SLOT_SIZE) /* ASC SCSI */
42#define IOASIC_FDC_DMA (13*IOASIC_SLOT_SIZE) /* FDC DMA (maxine) */
43#define IOASIC_SCSI_DMA (14*IOASIC_SLOT_SIZE) /* ??? */
44#define IOASIC_RES_15 (15*IOASIC_SLOT_SIZE) /* unused? */
45
46
47/*
48 * Offsets for I/O ASIC registers (relative to (system_base + IOASIC_IOCTL)).
49 */
50 /* all systems */
51#define IO_REG_SCSI_DMA_P 0x00 /* SCSI DMA Pointer */
52#define IO_REG_SCSI_DMA_BP 0x10 /* SCSI DMA Buffer Pointer */
53#define IO_REG_LANCE_DMA_P 0x20 /* LANCE DMA Pointer */
54#define IO_REG_SCC0A_T_DMA_P 0x30 /* SCC0A Transmit DMA Pointer */
55#define IO_REG_SCC0A_R_DMA_P 0x40 /* SCC0A Receive DMA Pointer */
56
57 /* except Maxine */
58#define IO_REG_SCC1A_T_DMA_P 0x50 /* SCC1A Transmit DMA Pointer */
59#define IO_REG_SCC1A_R_DMA_P 0x60 /* SCC1A Receive DMA Pointer */
60
61 /* Maxine */
62#define IO_REG_AB_T_DMA_P 0x50 /* ACCESS.bus Transmit DMA Pointer */
63#define IO_REG_AB_R_DMA_P 0x60 /* ACCESS.bus Receive DMA Pointer */
64#define IO_REG_FLOPPY_DMA_P 0x70 /* Floppy DMA Pointer */
65#define IO_REG_ISDN_T_DMA_P 0x80 /* ISDN Transmit DMA Pointer */
66#define IO_REG_ISDN_T_DMA_BP 0x90 /* ISDN Transmit DMA Buffer Pointer */
67#define IO_REG_ISDN_R_DMA_P 0xa0 /* ISDN Receive DMA Pointer */
68#define IO_REG_ISDN_R_DMA_BP 0xb0 /* ISDN Receive DMA Buffer Pointer */
69
70 /* all systems */
71#define IO_REG_DATA_0 0xc0 /* System Data Buffer 0 */
72#define IO_REG_DATA_1 0xd0 /* System Data Buffer 1 */
73#define IO_REG_DATA_2 0xe0 /* System Data Buffer 2 */
74#define IO_REG_DATA_3 0xf0 /* System Data Buffer 3 */
75
76 /* all systems */
77#define IO_REG_SSR 0x100 /* System Support Register */
78#define IO_REG_SIR 0x110 /* System Interrupt Register */
79#define IO_REG_SIMR 0x120 /* System Interrupt Mask Reg. */
80#define IO_REG_SAR 0x130 /* System Address Register */
81
82 /* Maxine */
83#define IO_REG_ISDN_T_DATA 0x140 /* ISDN Xmit Data Register */
84#define IO_REG_ISDN_R_DATA 0x150 /* ISDN Receive Data Register */
85
86 /* all systems */
87#define IO_REG_LANCE_SLOT 0x160 /* LANCE I/O Slot Register */
88#define IO_REG_SCSI_SLOT 0x170 /* SCSI Slot Register */
89#define IO_REG_SCC0A_SLOT 0x180 /* SCC0A DMA Slot Register */
90
91 /* except Maxine */
92#define IO_REG_SCC1A_SLOT 0x190 /* SCC1A DMA Slot Register */
93
94 /* Maxine */
95#define IO_REG_AB_SLOT 0x190 /* ACCESS.bus DMA Slot Register */
96#define IO_REG_FLOPPY_SLOT 0x1a0 /* Floppy Slot Register */
97
98 /* all systems */
99#define IO_REG_SCSI_SCR 0x1b0 /* SCSI Partial-Word DMA Control */
100#define IO_REG_SCSI_SDR0 0x1c0 /* SCSI DMA Partial Word 0 */
101#define IO_REG_SCSI_SDR1 0x1d0 /* SCSI DMA Partial Word 1 */
102#define IO_REG_FCTR 0x1e0 /* Free-Running Counter */
103#define IO_REG_RES_31 0x1f0 /* unused */
104
105
106/*
107 * The upper 16 bits of the System Support Register are a part of the
108 * I/O ASIC's internal DMA engine and thus are common to all I/O ASIC
109 * machines. The exception is the Maxine, which makes use of the
110 * FLOPPY and ISDN bits (otherwise unused) and has a different SCC
111 * wiring.
112 */
113 /* all systems */
114#define IO_SSR_SCC0A_TX_DMA_EN (1<<31) /* SCC0A transmit DMA enable */
115#define IO_SSR_SCC0A_RX_DMA_EN (1<<30) /* SCC0A receive DMA enable */
116#define IO_SSR_RES_27 (1<<27) /* unused */
117#define IO_SSR_RES_26 (1<<26) /* unused */
118#define IO_SSR_RES_25 (1<<25) /* unused */
119#define IO_SSR_RES_24 (1<<24) /* unused */
120#define IO_SSR_RES_23 (1<<23) /* unused */
121#define IO_SSR_SCSI_DMA_DIR (1<<18) /* SCSI DMA direction */
122#define IO_SSR_SCSI_DMA_EN (1<<17) /* SCSI DMA enable */
123#define IO_SSR_LANCE_DMA_EN (1<<16) /* LANCE DMA enable */
124
125 /* except Maxine */
126#define IO_SSR_SCC1A_TX_DMA_EN (1<<29) /* SCC1A transmit DMA enable */
127#define IO_SSR_SCC1A_RX_DMA_EN (1<<28) /* SCC1A receive DMA enable */
128#define IO_SSR_RES_22 (1<<22) /* unused */
129#define IO_SSR_RES_21 (1<<21) /* unused */
130#define IO_SSR_RES_20 (1<<20) /* unused */
131#define IO_SSR_RES_19 (1<<19) /* unused */
132
133 /* Maxine */
134#define IO_SSR_AB_TX_DMA_EN (1<<29) /* ACCESS.bus xmit DMA enable */
135#define IO_SSR_AB_RX_DMA_EN (1<<28) /* ACCESS.bus recv DMA enable */
136#define IO_SSR_FLOPPY_DMA_DIR (1<<22) /* Floppy DMA direction */
137#define IO_SSR_FLOPPY_DMA_EN (1<<21) /* Floppy DMA enable */
138#define IO_SSR_ISDN_TX_DMA_EN (1<<20) /* ISDN transmit DMA enable */
139#define IO_SSR_ISDN_RX_DMA_EN (1<<19) /* ISDN receive DMA enable */
140
141/*
142 * The lower 16 bits are system-specific. Bits 15,11:8 are common and
143 * defined here. The rest is defined in system-specific headers.
144 */
145#define KN0X_IO_SSR_DIAGDN (1<<15) /* diagnostic jumper */
146#define KN0X_IO_SSR_SCC_RST (1<<11) /* ~SCC0,1 (Z85C30) reset */
147#define KN0X_IO_SSR_RTC_RST (1<<10) /* ~RTC (DS1287) reset */
148#define KN0X_IO_SSR_ASC_RST (1<<9) /* ~ASC (NCR53C94) reset */
149#define KN0X_IO_SSR_LANCE_RST (1<<8) /* ~LANCE (Am7990) reset */
150
151#endif /* __ASM_MIPS_DEC_IOASIC_ADDRS_H */
diff --git a/include/asm-mips/dec/ioasic_ints.h b/include/asm-mips/dec/ioasic_ints.h
new file mode 100644
index 000000000000..9aaa9869615f
--- /dev/null
+++ b/include/asm-mips/dec/ioasic_ints.h
@@ -0,0 +1,74 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Definitions for the interrupt related bits in the I/O ASIC
7 * interrupt status register (and the interrupt mask register, of course)
8 *
9 * Created with Information from:
10 *
11 * "DEC 3000 300/400/500/600/700/800/900 AXP Models System Programmer's Manual"
12 *
13 * and the Mach Sources
14 *
15 * Copyright (C) 199x the Anonymous
16 * Copyright (C) 2002 Maciej W. Rozycki
17 */
18
19#ifndef __ASM_DEC_IOASIC_INTS_H
20#define __ASM_DEC_IOASIC_INTS_H
21
22/*
23 * The upper 16 bits are a part of the I/O ASIC's internal DMA engine
24 * and thus are common to all I/O ASIC machines. The exception is
25 * the Maxine, which makes use of the FLOPPY and ISDN bits (otherwise
26 * unused) and has a different SCC wiring.
27 */
28 /* all systems */
29#define IO_INR_SCC0A_TXDMA 31 /* SCC0A transmit page end */
30#define IO_INR_SCC0A_TXERR 30 /* SCC0A transmit memory read error */
31#define IO_INR_SCC0A_RXDMA 29 /* SCC0A receive half page */
32#define IO_INR_SCC0A_RXERR 28 /* SCC0A receive overrun */
33#define IO_INR_ASC_DMA 19 /* ASC buffer pointer loaded */
34#define IO_INR_ASC_ERR 18 /* ASC page overrun */
35#define IO_INR_ASC_MERR 17 /* ASC memory read error */
36#define IO_INR_LANCE_MERR 16 /* LANCE memory read error */
37
38 /* except Maxine */
39#define IO_INR_SCC1A_TXDMA 27 /* SCC1A transmit page end */
40#define IO_INR_SCC1A_TXERR 26 /* SCC1A transmit memory read error */
41#define IO_INR_SCC1A_RXDMA 25 /* SCC1A receive half page */
42#define IO_INR_SCC1A_RXERR 24 /* SCC1A receive overrun */
43#define IO_INR_RES_23 23 /* unused */
44#define IO_INR_RES_22 22 /* unused */
45#define IO_INR_RES_21 21 /* unused */
46#define IO_INR_RES_20 20 /* unused */
47
48 /* Maxine */
49#define IO_INR_AB_TXDMA 27 /* ACCESS.bus transmit page end */
50#define IO_INR_AB_TXERR 26 /* ACCESS.bus xmit memory read error */
51#define IO_INR_AB_RXDMA 25 /* ACCESS.bus receive half page */
52#define IO_INR_AB_RXERR 24 /* ACCESS.bus receive overrun */
53#define IO_INR_FLOPPY_ERR 23 /* FDC error */
54#define IO_INR_ISDN_TXDMA 22 /* ISDN xmit buffer pointer loaded */
55#define IO_INR_ISDN_RXDMA 21 /* ISDN recv buffer pointer loaded */
56#define IO_INR_ISDN_ERR 20 /* ISDN memory read/overrun error */
57
58#define IO_INR_DMA 16 /* first DMA IRQ */
59
60/*
61 * The lower 16 bits are system-specific and thus defined in
62 * system-specific headers.
63 */
64
65
66#define IO_IRQ_BASE 8 /* first IRQ assigned to I/O ASIC */
67#define IO_IRQ_LINES 32 /* number of I/O ASIC interrupts */
68
69#define IO_IRQ_NR(n) ((n) + IO_IRQ_BASE)
70#define IO_IRQ_MASK(n) (1 << (n))
71#define IO_IRQ_ALL 0x0000ffff
72#define IO_IRQ_DMA 0xffff0000
73
74#endif /* __ASM_DEC_IOASIC_INTS_H */
diff --git a/include/asm-mips/dec/kn01.h b/include/asm-mips/dec/kn01.h
new file mode 100644
index 000000000000..946943502f83
--- /dev/null
+++ b/include/asm-mips/dec/kn01.h
@@ -0,0 +1,83 @@
1/*
2 * Hardware info about DECstation DS2100/3100 systems (otherwise known as
3 * pmin/pmax or KN01).
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.
11 * Copyright (C) 2002, 2003 Maciej W. Rozycki
12 */
13#ifndef __ASM_MIPS_DEC_KN01_H
14#define __ASM_MIPS_DEC_KN01_H
15
16#include <asm/addrspace.h>
17
18#define KN01_SLOT_BASE KSEG1ADDR(0x10000000)
19#define KN01_SLOT_SIZE 0x01000000
20
21/*
22 * Address ranges for devices.
23 */
24#define KN01_PMASK (0*KN01_SLOT_SIZE) /* color plane mask */
25#define KN01_PCC (1*KN01_SLOT_SIZE) /* PCC (DC503) cursor */
26#define KN01_VDAC (2*KN01_SLOT_SIZE) /* color map */
27#define KN01_RES_3 (3*KN01_SLOT_SIZE) /* unused */
28#define KN01_RES_4 (4*KN01_SLOT_SIZE) /* unused */
29#define KN01_RES_5 (5*KN01_SLOT_SIZE) /* unused */
30#define KN01_RES_6 (6*KN01_SLOT_SIZE) /* unused */
31#define KN01_ERRADDR (7*KN01_SLOT_SIZE) /* write error address */
32#define KN01_LANCE (8*KN01_SLOT_SIZE) /* LANCE (Am7990) Ethernet */
33#define KN01_LANCE_MEM (9*KN01_SLOT_SIZE) /* LANCE buffer memory */
34#define KN01_SII (10*KN01_SLOT_SIZE) /* SII (DC7061) SCSI */
35#define KN01_SII_MEM (11*KN01_SLOT_SIZE) /* SII buffer memory */
36#define KN01_DZ11 (12*KN01_SLOT_SIZE) /* DZ11 (DC7085) serial */
37#define KN01_RTC (13*KN01_SLOT_SIZE) /* DS1287 RTC (bytes #0) */
38#define KN01_ESAR (13*KN01_SLOT_SIZE) /* MAC address (bytes #1) */
39#define KN01_CSR (14*KN01_SLOT_SIZE) /* system ctrl & status reg */
40#define KN01_SYS_ROM (15*KN01_SLOT_SIZE) /* system board ROM */
41
42
43/*
44 * Some port addresses...
45 */
46#define KN01_LANCE_BASE (KN01_SLOT_BASE + KN01_LANCE) /* 0xB8000000 */
47#define KN01_DZ11_BASE (KN01_SLOT_BASE + KN01_DZ11) /* 0xBC000000 */
48#define KN01_RTC_BASE (KN01_SLOT_BASE + KN01_RTC) /* 0xBD000000 */
49
50
51/*
52 * Frame buffer memory address.
53 */
54#define KN01_VFB_MEM KSEG1ADDR(0x0fc00000)
55
56/*
57 * CPU interrupt bits.
58 */
59#define KN01_CPU_INR_BUS 6 /* memory, I/O bus read/write errors */
60#define KN01_CPU_INR_VIDEO 6 /* PCC area detect #2 */
61#define KN01_CPU_INR_RTC 5 /* DS1287 RTC */
62#define KN01_CPU_INR_DZ11 4 /* DZ11 (DC7085) serial */
63#define KN01_CPU_INR_LANCE 3 /* LANCE (Am7990) Ethernet */
64#define KN01_CPU_INR_SII 2 /* SII (DC7061) SCSI */
65
66
67/*
68 * System Control & Status Register bits.
69 */
70#define KN01_CSR_MNFMOD (1<<15) /* MNFMOD manufacturing jumper */
71#define KN01_CSR_STATUS (1<<14) /* self-test result status output */
72#define KN01_CSR_PARDIS (1<<13) /* parity error disable */
73#define KN01_CSR_CRSRTST (1<<12) /* PCC test output */
74#define KN01_CSR_MONO (1<<11) /* mono/color fb SIMM installed */
75#define KN01_CSR_MEMERR (1<<10) /* write timeout error status & ack*/
76#define KN01_CSR_VINT (1<<9) /* PCC area detect #2 status & ack */
77#define KN01_CSR_TXDIS (1<<8) /* DZ11 transmit disable */
78#define KN01_CSR_VBGTRG (1<<2) /* blue DAC voltage over green (r/o) */
79#define KN01_CSR_VRGTRG (1<<1) /* red DAC voltage over green (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) */
82
83#endif /* __ASM_MIPS_DEC_KN01_H */
diff --git a/include/asm-mips/dec/kn02.h b/include/asm-mips/dec/kn02.h
new file mode 100644
index 000000000000..f797f7045920
--- /dev/null
+++ b/include/asm-mips/dec/kn02.h
@@ -0,0 +1,106 @@
1/*
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.
11 * Copyright (C) 2002, 2003 Maciej W. Rozycki
12 */
13#ifndef __ASM_MIPS_DEC_KN02_H
14#define __ASM_MIPS_DEC_KN02_H
15
16#ifndef __ASSEMBLY__
17#include <linux/spinlock.h>
18#include <linux/types.h>
19#endif
20
21#include <asm/addrspace.h>
22#include <asm/dec/ecc.h>
23
24
25#define KN02_SLOT_BASE KSEG1ADDR(0x1fc00000)
26#define KN02_SLOT_SIZE 0x00080000
27
28/*
29 * Address ranges decoded by the "system slot" logic for onboard devices.
30 */
31#define KN02_SYS_ROM (0*KN02_SLOT_SIZE) /* system board ROM */
32#define KN02_RES_1 (1*KN02_SLOT_SIZE) /* unused */
33#define KN02_CHKSYN (2*KN02_SLOT_SIZE) /* ECC syndrome */
34#define KN02_ERRADDR (3*KN02_SLOT_SIZE) /* bus error address */
35#define KN02_DZ11 (4*KN02_SLOT_SIZE) /* DZ11 (DC7085) serial */
36#define KN02_RTC (5*KN02_SLOT_SIZE) /* DS1287 RTC */
37#define KN02_CSR (6*KN02_SLOT_SIZE) /* system ctrl & status reg */
38#define KN02_SYS_ROM_7 (7*KN02_SLOT_SIZE) /* system board ROM (alias) */
39
40
41/*
42 * Some port addresses...
43 */
44#define KN02_DZ11_BASE (KN02_SLOT_BASE + KN02_DZ11) /* DZ11 */
45#define KN02_RTC_BASE (KN02_SLOT_BASE + KN02_RTC) /* RTC */
46#define KN02_CSR_BASE (KN02_SLOT_BASE + KN02_CSR) /* CSR */
47
48
49/*
50 * System Control & Status Register bits.
51 */
52#define KN02_CSR_RES_28 (0xf<<28) /* unused */
53#define KN02_CSR_PSU (1<<27) /* power supply unit warning */
54#define KN02_CSR_NVRAM (1<<26) /* ~NVRAM clear jumper */
55#define KN02_CSR_REFEVEN (1<<25) /* mem refresh bank toggle */
56#define KN03_CSR_NRMOD (1<<24) /* ~NRMOD manufact. jumper */
57#define KN03_CSR_IOINTEN (0xff<<16) /* IRQ mask bits */
58#define KN02_CSR_DIAGCHK (1<<15) /* diagn/norml ECC reads */
59#define KN02_CSR_DIAGGEN (1<<14) /* diagn/norml ECC writes */
60#define KN02_CSR_CORRECT (1<<13) /* ECC correct/check */
61#define KN02_CSR_LEDIAG (1<<12) /* ECC diagn. latch strobe */
62#define KN02_CSR_TXDIS (1<<11) /* DZ11 transmit disable */
63#define KN02_CSR_BNK32M (1<<10) /* 32M/8M stride */
64#define KN02_CSR_DIAGDN (1<<9) /* DIAGDN manufact. jumper */
65#define KN02_CSR_BAUD38 (1<<8) /* DZ11 38/19kbps ext. rate */
66#define KN03_CSR_IOINT (0xff<<0) /* IRQ status bits (r/o) */
67#define KN03_CSR_LEDS (0xff<<0) /* ~diagnostic LEDs (w/o) */
68
69
70/*
71 * CPU interrupt bits.
72 */
73#define KN02_CPU_INR_RES_6 6 /* unused */
74#define KN02_CPU_INR_BUS 5 /* memory, I/O bus read/write errors */
75#define KN02_CPU_INR_RES_4 4 /* unused */
76#define KN02_CPU_INR_RTC 3 /* DS1287 RTC */
77#define KN02_CPU_INR_CASCADE 2 /* CSR cascade */
78
79/*
80 * CSR interrupt bits.
81 */
82#define KN02_CSR_INR_DZ11 7 /* DZ11 (DC7085) serial */
83#define KN02_CSR_INR_LANCE 6 /* LANCE (Am7990) Ethernet */
84#define KN02_CSR_INR_ASC 5 /* ASC (NCR53C94) SCSI */
85#define KN02_CSR_INR_RES_4 4 /* unused */
86#define KN02_CSR_INR_RES_3 3 /* unused */
87#define KN02_CSR_INR_TC2 2 /* TURBOchannel slot #2 */
88#define KN02_CSR_INR_TC1 1 /* TURBOchannel slot #1 */
89#define KN02_CSR_INR_TC0 0 /* TURBOchannel slot #0 */
90
91
92#define KN02_IRQ_BASE 8 /* first IRQ assigned to CSR */
93#define KN02_IRQ_LINES 8 /* number of CSR interrupts */
94
95#define KN02_IRQ_NR(n) ((n) + KN02_IRQ_BASE)
96#define KN02_IRQ_MASK(n) (1 << (n))
97#define KN02_IRQ_ALL 0xff
98
99
100#ifndef __ASSEMBLY__
101extern u32 cached_kn02_csr;
102extern spinlock_t kn02_lock;
103extern void init_kn02_irqs(int base);
104#endif
105
106#endif /* __ASM_MIPS_DEC_KN02_H */
diff --git a/include/asm-mips/dec/kn02ba.h b/include/asm-mips/dec/kn02ba.h
new file mode 100644
index 000000000000..c957a4f1b32d
--- /dev/null
+++ b/include/asm-mips/dec/kn02ba.h
@@ -0,0 +1,67 @@
1/*
2 * include/asm-mips/dec/kn02ba.h
3 *
4 * DECstation 5000/1xx (3min or KN02-BA) definitions.
5 *
6 * Copyright (C) 2002, 2003 Maciej W. Rozycki
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 */
13#ifndef __ASM_MIPS_DEC_KN02BA_H
14#define __ASM_MIPS_DEC_KN02BA_H
15
16#include <asm/dec/kn02xa.h> /* For common definitions. */
17
18/*
19 * CPU interrupt bits.
20 */
21#define KN02BA_CPU_INR_HALT 6 /* HALT button */
22#define KN02BA_CPU_INR_CASCADE 5 /* I/O ASIC cascade */
23#define KN02BA_CPU_INR_TC2 4 /* TURBOchannel slot #2 */
24#define KN02BA_CPU_INR_TC1 3 /* TURBOchannel slot #1 */
25#define KN02BA_CPU_INR_TC0 2 /* TURBOchannel slot #0 */
26
27/*
28 * I/O ASIC interrupt bits. Star marks denote non-IRQ status bits.
29 */
30#define KN02BA_IO_INR_RES_15 15 /* unused */
31#define KN02BA_IO_INR_NVRAM 14 /* (*) NVRAM clear jumper */
32#define KN02BA_IO_INR_RES_13 13 /* unused */
33#define KN02BA_IO_INR_BUS 12 /* memory, I/O bus read/write errors */
34#define KN02BA_IO_INR_RES_11 11 /* unused */
35#define KN02BA_IO_INR_NRMOD 10 /* (*) NRMOD manufacturing jumper */
36#define KN02BA_IO_INR_ASC 9 /* ASC (NCR53C94) SCSI */
37#define KN02BA_IO_INR_LANCE 8 /* LANCE (Am7990) Ethernet */
38#define KN02BA_IO_INR_SCC1 7 /* SCC (Z85C30) serial #1 */
39#define KN02BA_IO_INR_SCC0 6 /* SCC (Z85C30) serial #0 */
40#define KN02BA_IO_INR_RTC 5 /* DS1287 RTC */
41#define KN02BA_IO_INR_PSU 4 /* power supply unit warning */
42#define KN02BA_IO_INR_RES_3 3 /* unused */
43#define KN02BA_IO_INR_ASC_DATA 2 /* SCSI data ready (for PIO) */
44#define KN02BA_IO_INR_PBNC 1 /* ~HALT button debouncer */
45#define KN02BA_IO_INR_PBNO 0 /* HALT button debouncer */
46
47
48/*
49 * Memory Error Register bits.
50 */
51#define KN02BA_MER_RES_27 (1<<27) /* unused */
52
53/*
54 * Memory Size Register bits.
55 */
56#define KN02BA_MSR_RES_17 (0x3ff<<17) /* unused */
57
58/*
59 * I/O ASIC System Support Register bits.
60 */
61#define KN02BA_IO_SSR_TXDIS1 (1<<14) /* SCC1 transmit disable */
62#define KN02BA_IO_SSR_TXDIS0 (1<<13) /* SCC0 transmit disable */
63#define KN02BA_IO_SSR_RES_12 (1<<12) /* unused */
64
65#define KN02BA_IO_SSR_LEDS (0xff<<0) /* ~diagnostic LEDs */
66
67#endif /* __ASM_MIPS_DEC_KN02BA_H */
diff --git a/include/asm-mips/dec/kn02ca.h b/include/asm-mips/dec/kn02ca.h
new file mode 100644
index 000000000000..92c0fe256099
--- /dev/null
+++ b/include/asm-mips/dec/kn02ca.h
@@ -0,0 +1,79 @@
1/*
2 * include/asm-mips/dec/kn02ca.h
3 *
4 * Personal DECstation 5000/xx (Maxine or KN02-CA) definitions.
5 *
6 * Copyright (C) 2002, 2003 Maciej W. Rozycki
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 */
13#ifndef __ASM_MIPS_DEC_KN02CA_H
14#define __ASM_MIPS_DEC_KN02CA_H
15
16#include <asm/dec/kn02xa.h> /* For common definitions. */
17
18/*
19 * CPU interrupt bits.
20 */
21#define KN02CA_CPU_INR_HALT 6 /* HALT from ACCESS.Bus */
22#define KN02CA_CPU_INR_CASCADE 5 /* I/O ASIC cascade */
23#define KN02CA_CPU_INR_BUS 4 /* memory, I/O bus read/write errors */
24#define KN02CA_CPU_INR_RTC 3 /* DS1287 RTC */
25#define KN02CA_CPU_INR_TIMER 2 /* ARC periodic timer */
26
27/*
28 * I/O ASIC interrupt bits. Star marks denote non-IRQ status bits.
29 */
30#define KN02CA_IO_INR_FLOPPY 15 /* 82077 FDC */
31#define KN02CA_IO_INR_NVRAM 14 /* (*) NVRAM clear jumper */
32#define KN02CA_IO_INR_POWERON 13 /* (*) ACCESS.Bus/power-on reset */
33#define KN02CA_IO_INR_TC0 12 /* TURBOchannel slot #0 */
34#define KN02CA_IO_INR_TIMER 12 /* ARC periodic timer (?) */
35#define KN02CA_IO_INR_ISDN 11 /* Am79C30A ISDN */
36#define KN02CA_IO_INR_NRMOD 10 /* (*) NRMOD manufacturing jumper */
37#define KN02CA_IO_INR_ASC 9 /* ASC (NCR53C94) SCSI */
38#define KN02CA_IO_INR_LANCE 8 /* LANCE (Am7990) Ethernet */
39#define KN02CA_IO_INR_HDFLOPPY 7 /* (*) HD (1.44MB) floppy status */
40#define KN02CA_IO_INR_SCC0 6 /* SCC (Z85C30) serial #0 */
41#define KN02CA_IO_INR_TC1 5 /* TURBOchannel slot #1 */
42#define KN02CA_IO_INR_XDFLOPPY 4 /* (*) XD (2.88MB) floppy status */
43#define KN02CA_IO_INR_VIDEO 3 /* framebuffer */
44#define KN02CA_IO_INR_XVIDEO 2 /* ~framebuffer */
45#define KN02CA_IO_INR_AB_XMIT 1 /* ACCESS.bus transmit */
46#define KN02CA_IO_INR_AB_RECV 0 /* ACCESS.bus receive */
47
48
49/*
50 * Memory Error Register bits.
51 */
52#define KN02CA_MER_INTR (1<<27) /* ARC IRQ status & ack */
53
54/*
55 * Memory Size Register bits.
56 */
57#define KN02CA_MSR_INTREN (1<<26) /* ARC periodic IRQ enable */
58#define KN02CA_MSR_MS10EN (1<<25) /* 10/1ms IRQ period select */
59#define KN02CA_MSR_PFORCE (0xf<<21) /* byte lane error force */
60#define KN02CA_MSR_MABEN (1<<20) /* A side VFB address enable */
61#define KN02CA_MSR_LASTBANK (0x7<<17) /* onboard RAM bank # */
62
63/*
64 * I/O ASIC System Support Register bits.
65 */
66#define KN03CA_IO_SSR_RES_14 (1<<14) /* unused */
67#define KN03CA_IO_SSR_RES_13 (1<<13) /* unused */
68#define KN03CA_IO_SSR_ISDN_RST (1<<12) /* ~ISDN (Am79C30A) reset */
69
70#define KN03CA_IO_SSR_FLOPPY_RST (1<<7) /* ~FDC (82077) reset */
71#define KN03CA_IO_SSR_VIDEO_RST (1<<6) /* ~framebuffer reset */
72#define KN03CA_IO_SSR_AB_RST (1<<5) /* ACCESS.bus reset */
73#define KN03CA_IO_SSR_RES_4 (1<<4) /* unused */
74#define KN03CA_IO_SSR_RES_3 (1<<4) /* unused */
75#define KN03CA_IO_SSR_RES_2 (1<<2) /* unused */
76#define KN03CA_IO_SSR_RES_1 (1<<1) /* unused */
77#define KN03CA_IO_SSR_LED (1<<0) /* power LED */
78
79#endif /* __ASM_MIPS_DEC_KN02CA_H */
diff --git a/include/asm-mips/dec/kn02xa.h b/include/asm-mips/dec/kn02xa.h
new file mode 100644
index 000000000000..648c4dcbba1d
--- /dev/null
+++ b/include/asm-mips/dec/kn02xa.h
@@ -0,0 +1,75 @@
1/*
2 * Hardware info common to DECstation 5000/1xx systems (otherwise
3 * known as 3min or kn02ba) and Personal DECstations 5000/xx ones
4 * (otherwise known as maxine or kn02ca).
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 *
10 * Copyright (C) 1995,1996 by Paul M. Antoine, some code and definitions
11 * are by courtesy of Chris Fraser.
12 * Copyright (C) 2000, 2002, 2003 Maciej W. Rozycki
13 *
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.
16 */
17#ifndef __ASM_MIPS_DEC_KN02XA_H
18#define __ASM_MIPS_DEC_KN02XA_H
19
20#include <asm/addrspace.h>
21#include <asm/dec/ioasic_addrs.h>
22
23#define KN02XA_SLOT_BASE KSEG1ADDR(0x1c000000)
24
25/*
26 * Some port addresses...
27 */
28#define KN02XA_IOASIC_BASE (KN02XA_SLOT_BASE + IOASIC_IOCTL) /* I/O ASIC */
29#define KN02XA_RTC_BASE (KN02XA_SLOT_BASE + IOASIC_TOY) /* RTC */
30
31
32/*
33 * Memory control ASIC registers.
34 */
35#define KN02XA_MER KSEG1ADDR(0x0c400000) /* memory error register */
36#define KN02XA_MSR KSEG1ADDR(0x0c800000) /* memory size register */
37
38/*
39 * CPU control ASIC registers.
40 */
41#define KN02XA_MEM_CONF KSEG1ADDR(0x0e000000) /* write timeout config */
42#define KN02XA_EAR KSEG1ADDR(0x0e000004) /* error address register */
43#define KN02XA_BOOT0 KSEG1ADDR(0x0e000008) /* boot 0 register */
44#define KN02XA_MEM_INTR KSEG1ADDR(0x0e00000c) /* write err IRQ stat & ack */
45
46/*
47 * Memory Error Register bits, common definitions.
48 * The rest is defined in system-specific headers.
49 */
50#define KN02XA_MER_RES_28 (0xf<<28) /* unused */
51#define KN02XA_MER_RES_17 (0x3ff<<17) /* unused */
52#define KN02XA_MER_PAGERR (1<<16) /* 2k page boundary error */
53#define KN02XA_MER_TRANSERR (1<<15) /* transfer length error */
54#define KN02XA_MER_PARDIS (1<<14) /* parity error disable */
55#define KN02XA_MER_RES_12 (0x3<<12) /* unused */
56#define KN02XA_MER_BYTERR (0xf<<8) /* byte lane error bitmask */
57#define KN02XA_MER_RES_0 (0xff<<0) /* unused */
58
59/*
60 * Memory Size Register bits, common definitions.
61 * The rest is defined in system-specific headers.
62 */
63#define KN02XA_MSR_RES_27 (0x1f<<27) /* unused */
64#define KN02XA_MSR_RES_14 (0x7<<14) /* unused */
65#define KN02XA_MSR_SIZE (1<<13) /* 16M/4M stride */
66#define KN02XA_MSR_RES_0 (0x1fff<<0) /* unused */
67
68/*
69 * Error Address Register bits.
70 */
71#define KN02XA_EAR_RES_29 (0x7<<29) /* unused */
72#define KN02XA_EAR_ADDRESS (0x7ffffff<<2) /* address involved */
73#define KN02XA_EAR_RES_0 (0x3<<0) /* unused */
74
75#endif /* __ASM_MIPS_DEC_KN02XA_H */
diff --git a/include/asm-mips/dec/kn03.h b/include/asm-mips/dec/kn03.h
new file mode 100644
index 000000000000..676abd17c6a4
--- /dev/null
+++ b/include/asm-mips/dec/kn03.h
@@ -0,0 +1,83 @@
1/*
2 * Hardware info about DECstation 5000/2x0 systems (otherwise known as
3 * 3max+) and DECsystem 5900 systems (otherwise known as bigmax) which
4 * differ mechanically but are otherwise identical (both are known as
5 * KN03).
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
10 *
11 * Copyright (C) 1995,1996 by Paul M. Antoine, some code and definitions
12 * are by courtesy of Chris Fraser.
13 * Copyright (C) 2000, 2002, 2003 Maciej W. Rozycki
14 */
15#ifndef __ASM_MIPS_DEC_KN03_H
16#define __ASM_MIPS_DEC_KN03_H
17
18#include <asm/addrspace.h>
19#include <asm/dec/ecc.h>
20#include <asm/dec/ioasic_addrs.h>
21
22#define KN03_SLOT_BASE KSEG1ADDR(0x1f800000)
23
24/*
25 * Some port addresses...
26 */
27#define KN03_IOASIC_BASE (KN03_SLOT_BASE + IOASIC_IOCTL) /* I/O ASIC */
28#define KN03_RTC_BASE (KN03_SLOT_BASE + IOASIC_TOY) /* RTC */
29#define KN03_MCR_BASE (KN03_SLOT_BASE + IOASIC_MCR) /* MCR */
30
31
32/*
33 * CPU interrupt bits.
34 */
35#define KN03_CPU_INR_HALT 6 /* HALT button */
36#define KN03_CPU_INR_BUS 5 /* memory, I/O bus read/write errors */
37#define KN03_CPU_INR_RES_4 4 /* unused */
38#define KN03_CPU_INR_RTC 3 /* DS1287 RTC */
39#define KN03_CPU_INR_CASCADE 2 /* I/O ASIC cascade */
40
41/*
42 * I/O ASIC interrupt bits. Star marks denote non-IRQ status bits.
43 */
44#define KN03_IO_INR_3MAXP 15 /* (*) 3max+/bigmax ID */
45#define KN03_IO_INR_NVRAM 14 /* (*) NVRAM clear jumper */
46#define KN03_IO_INR_TC2 13 /* TURBOchannel slot #2 */
47#define KN03_IO_INR_TC1 12 /* TURBOchannel slot #1 */
48#define KN03_IO_INR_TC0 11 /* TURBOchannel slot #0 */
49#define KN03_IO_INR_NRMOD 10 /* (*) NRMOD manufacturing jumper */
50#define KN03_IO_INR_ASC 9 /* ASC (NCR53C94) SCSI */
51#define KN03_IO_INR_LANCE 8 /* LANCE (Am7990) Ethernet */
52#define KN03_IO_INR_SCC1 7 /* SCC (Z85C30) serial #1 */
53#define KN03_IO_INR_SCC0 6 /* SCC (Z85C30) serial #0 */
54#define KN03_IO_INR_RTC 5 /* DS1287 RTC */
55#define KN03_IO_INR_PSU 4 /* power supply unit warning */
56#define KN03_IO_INR_RES_3 3 /* unused */
57#define KN03_IO_INR_ASC_DATA 2 /* SCSI data ready (for PIO) */
58#define KN03_IO_INR_PBNC 1 /* ~HALT button debouncer */
59#define KN03_IO_INR_PBNO 0 /* HALT button debouncer */
60
61
62/*
63 * Memory Control Register bits.
64 */
65#define KN03_MCR_RES_16 (0xffff<<16) /* unused */
66#define KN03_MCR_DIAGCHK (1<<15) /* diagn/norml ECC reads */
67#define KN03_MCR_DIAGGEN (1<<14) /* diagn/norml ECC writes */
68#define KN03_MCR_CORRECT (1<<13) /* ECC correct/check */
69#define KN03_MCR_RES_11 (0x3<<12) /* unused */
70#define KN03_MCR_BNK32M (1<<10) /* 32M/8M stride */
71#define KN03_MCR_RES_7 (0x7<<7) /* unused */
72#define KN03_MCR_CHECK (0x7f<<0) /* diagnostic check bits */
73
74/*
75 * I/O ASIC System Support Register bits.
76 */
77#define KN03_IO_SSR_TXDIS1 (1<<14) /* SCC1 transmit disable */
78#define KN03_IO_SSR_TXDIS0 (1<<13) /* SCC0 transmit disable */
79#define KN03_IO_SSR_RES_12 (1<<12) /* unused */
80
81#define KN03_IO_SSR_LEDS (0xff<<0) /* ~diagnostic LEDs */
82
83#endif /* __ASM_MIPS_DEC_KN03_H */
diff --git a/include/asm-mips/dec/kn05.h b/include/asm-mips/dec/kn05.h
new file mode 100644
index 000000000000..b120362b8f13
--- /dev/null
+++ b/include/asm-mips/dec/kn05.h
@@ -0,0 +1,71 @@
1/*
2 * include/asm-mips/dec/kn05.h
3 *
4 * DECstation 5000/260 (4max+ or KN05) and DECsystem 5900/260
5 * definitions.
6 *
7 * Copyright (C) 2002, 2003 Maciej W. Rozycki
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version
12 * 2 of the License, or (at your option) any later version.
13 *
14 * WARNING! All this information is pure guesswork based on the
15 * ROM. It is provided here in hope it will give someone some
16 * food for thought. No documentation for the KN05 module has
17 * been located so far.
18 */
19#ifndef __ASM_MIPS_DEC_KN05_H
20#define __ASM_MIPS_DEC_KN05_H
21
22#include <asm/dec/ioasic_addrs.h>
23
24/*
25 * The oncard MB (Memory Buffer) ASIC provides an additional address
26 * 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
28 * handled locally. "Low" slots are always passed.
29 */
30#define KN05_MB_ROM (16*IOASIC_SLOT_SIZE) /* KN05 card ROM */
31#define KN05_IOCTL (17*IOASIC_SLOT_SIZE) /* I/O ASIC */
32#define KN05_ESAR (18*IOASIC_SLOT_SIZE) /* LANCE MAC address chip */
33#define KN05_LANCE (19*IOASIC_SLOT_SIZE) /* LANCE Ethernet */
34#define KN05_MB_INT (20*IOASIC_SLOT_SIZE) /* MB interrupt register */
35#define KN05_MB_EA (21*IOASIC_SLOT_SIZE) /* MB error address? */
36#define KN05_MB_EC (22*IOASIC_SLOT_SIZE) /* MB error ??? */
37#define KN05_MB_CSR (23*IOASIC_SLOT_SIZE) /* MB control & status */
38#define KN05_RES_24 (24*IOASIC_SLOT_SIZE) /* unused? */
39#define KN05_RES_25 (25*IOASIC_SLOT_SIZE) /* unused? */
40#define KN05_RES_26 (26*IOASIC_SLOT_SIZE) /* unused? */
41#define KN05_RES_27 (27*IOASIC_SLOT_SIZE) /* unused? */
42#define KN05_SCSI (28*IOASIC_SLOT_SIZE) /* ASC SCSI */
43#define KN05_RES_29 (29*IOASIC_SLOT_SIZE) /* unused? */
44#define KN05_RES_30 (30*IOASIC_SLOT_SIZE) /* unused? */
45#define KN05_RES_31 (31*IOASIC_SLOT_SIZE) /* unused? */
46
47/*
48 * Bits for the MB interrupt register.
49 * The register appears read-only.
50 */
51#define KN05_MB_INT_TC (1<<0) /* TURBOchannel? */
52#define KN05_MB_INT_RTC (1<<1) /* RTC? */
53#define KN05_MB_INT_MT (1<<3) /* ??? */
54
55/*
56 * Bits for the MB control & status register.
57 * Set to 0x00bf8001 on my system by the ROM.
58 */
59#define KN05_MB_CSR_PF (1<<0) /* PreFetching enable? */
60#define KN05_MB_CSR_F (1<<1) /* ??? */
61#define KN05_MB_CSR_ECC (0xff<<2) /* ??? */
62#define KN05_MB_CSR_OD (1<<10) /* ??? */
63#define KN05_MB_CSR_CP (1<<11) /* ??? */
64#define KN05_MB_CSR_UNC (1<<12) /* ??? */
65#define KN05_MB_CSR_IM (1<<13) /* ??? */
66#define KN05_MB_CSR_NC (1<<14) /* ??? */
67#define KN05_MB_CSR_EE (1<<15) /* (bus) Exception Enable? */
68#define KN05_MB_CSR_MSK (0x1f<<16) /* ??? */
69#define KN05_MB_CSR_FW (1<<21) /* ??? */
70
71#endif /* __ASM_MIPS_DEC_KN05_H */
diff --git a/include/asm-mips/dec/kn230.h b/include/asm-mips/dec/kn230.h
new file mode 100644
index 000000000000..ff1bf17de8d8
--- /dev/null
+++ b/include/asm-mips/dec/kn230.h
@@ -0,0 +1,26 @@
1/*
2 * include/asm-mips/dec/kn230.h
3 *
4 * DECsystem 5100 (MIPSmate or KN230) definitions.
5 *
6 * Copyright (C) 2002, 2003 Maciej W. Rozycki
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 */
13#ifndef __ASM_MIPS_DEC_KN230_H
14#define __ASM_MIPS_DEC_KN230_H
15
16/*
17 * CPU interrupt bits.
18 */
19#define KN230_CPU_INR_HALT 6 /* HALT button */
20#define KN230_CPU_INR_BUS 5 /* memory, I/O bus read/write errors */
21#define KN230_CPU_INR_RTC 4 /* DS1287 RTC */
22#define KN230_CPU_INR_SII 3 /* SII (DC7061) SCSI */
23#define KN230_CPU_INR_LANCE 3 /* LANCE (Am7990) Ethernet */
24#define KN230_CPU_INR_DZ11 2 /* DZ11 (DC7085) serial */
25
26#endif /* __ASM_MIPS_DEC_KN230_H */
diff --git a/include/asm-mips/dec/machtype.h b/include/asm-mips/dec/machtype.h
new file mode 100644
index 000000000000..a6ecdebc430a
--- /dev/null
+++ b/include/asm-mips/dec/machtype.h
@@ -0,0 +1,27 @@
1/*
2 * Various machine type macros
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (c) 1998, 2000 Harald Koerfgen
9 */
10
11#ifndef __ASM_DEC_MACHTYPE_H
12#define __ASM_DEC_MACHTYPE_H
13
14#include <asm/bootinfo.h>
15
16#define TURBOCHANNEL (mips_machtype == MACH_DS5000_200 || \
17 mips_machtype == MACH_DS5000_1XX || \
18 mips_machtype == MACH_DS5000_XX || \
19 mips_machtype == MACH_DS5000_2X0 || \
20 mips_machtype == MACH_DS5900)
21
22#define IOASIC (mips_machtype == MACH_DS5000_1XX || \
23 mips_machtype == MACH_DS5000_XX || \
24 mips_machtype == MACH_DS5000_2X0 || \
25 mips_machtype == MACH_DS5900)
26
27#endif
diff --git a/include/asm-mips/dec/prom.h b/include/asm-mips/dec/prom.h
new file mode 100644
index 000000000000..b63e2f2317d1
--- /dev/null
+++ b/include/asm-mips/dec/prom.h
@@ -0,0 +1,173 @@
1/*
2 * include/asm-mips/dec/prom.h
3 *
4 * DECstation PROM interface.
5 *
6 * Copyright (C) 2002 Maciej W. Rozycki
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 *
13 * Based on arch/mips/dec/prom/prom.h by the Anonymous.
14 */
15#ifndef _ASM_DEC_PROM_H
16#define _ASM_DEC_PROM_H
17
18#include <linux/config.h>
19#include <linux/types.h>
20
21#include <asm/addrspace.h>
22
23/*
24 * PMAX/3MAX PROM entry points for DS2100/3100's and DS5000/2xx's.
25 * Many of these will work for MIPSen as well!
26 */
27#define VEC_RESET (u64 *)KSEG1ADDR(0x1fc00000)
28 /* Prom base address */
29
30#define PMAX_PROM_ENTRY(x) (VEC_RESET + (x)) /* Prom jump table */
31
32#define PMAX_PROM_HALT PMAX_PROM_ENTRY(2) /* valid on MIPSen */
33#define PMAX_PROM_AUTOBOOT PMAX_PROM_ENTRY(5) /* valid on MIPSen */
34#define PMAX_PROM_OPEN PMAX_PROM_ENTRY(6)
35#define PMAX_PROM_READ PMAX_PROM_ENTRY(7)
36#define PMAX_PROM_CLOSE PMAX_PROM_ENTRY(10)
37#define PMAX_PROM_LSEEK PMAX_PROM_ENTRY(11)
38#define PMAX_PROM_GETCHAR PMAX_PROM_ENTRY(12)
39#define PMAX_PROM_PUTCHAR PMAX_PROM_ENTRY(13) /* 12 on MIPSen */
40#define PMAX_PROM_GETS PMAX_PROM_ENTRY(15)
41#define PMAX_PROM_PRINTF PMAX_PROM_ENTRY(17)
42#define PMAX_PROM_GETENV PMAX_PROM_ENTRY(33) /* valid on MIPSen */
43
44
45/*
46 * Magic number indicating REX PROM available on DECstation. Found in
47 * register a2 on transfer of control to program from PROM.
48 */
49#define REX_PROM_MAGIC 0x30464354
50
51#ifdef CONFIG_MIPS64
52
53#define prom_is_rex(magic) 1 /* KN04 and KN05 are REX PROMs. */
54
55#else /* !CONFIG_MIPS64 */
56
57#define prom_is_rex(magic) ((magic) == REX_PROM_MAGIC)
58
59#endif /* !CONFIG_MIPS64 */
60
61
62/*
63 * 3MIN/MAXINE PROM entry points for DS5000/1xx's, DS5000/xx's and
64 * DS5000/2x0.
65 */
66#define REX_PROM_GETBITMAP 0x84/4 /* get mem bitmap */
67#define REX_PROM_GETCHAR 0x24/4 /* getch() */
68#define REX_PROM_GETENV 0x64/4 /* get env. variable */
69#define REX_PROM_GETSYSID 0x80/4 /* get system id */
70#define REX_PROM_GETTCINFO 0xa4/4
71#define REX_PROM_PRINTF 0x30/4 /* printf() */
72#define REX_PROM_SLOTADDR 0x6c/4 /* slotaddr */
73#define REX_PROM_BOOTINIT 0x54/4 /* open() */
74#define REX_PROM_BOOTREAD 0x58/4 /* read() */
75#define REX_PROM_CLEARCACHE 0x7c/4
76
77
78/*
79 * Used by rex_getbitmap().
80 */
81typedef struct {
82 int pagesize;
83 unsigned char bitmap[0];
84} memmap;
85
86
87/*
88 * Function pointers as read from a PROM's callback vector.
89 */
90extern int (*__rex_bootinit)(void);
91extern int (*__rex_bootread)(void);
92extern int (*__rex_getbitmap)(memmap *);
93extern unsigned long *(*__rex_slot_address)(int);
94extern void *(*__rex_gettcinfo)(void);
95extern int (*__rex_getsysid)(void);
96extern void (*__rex_clear_cache)(void);
97
98extern int (*__prom_getchar)(void);
99extern char *(*__prom_getenv)(char *);
100extern int (*__prom_printf)(char *, ...);
101
102extern int (*__pmax_open)(char*, int);
103extern int (*__pmax_lseek)(int, long, int);
104extern int (*__pmax_read)(int, void *, int);
105extern int (*__pmax_close)(int);
106
107
108#ifdef CONFIG_MIPS64
109
110/*
111 * On MIPS64 we have to call PROM functions via a helper
112 * dispatcher to accomodate ABI incompatibilities.
113 */
114#define __DEC_PROM_O32 __attribute__((alias("call_o32")))
115
116int _rex_bootinit(int (*)(void)) __DEC_PROM_O32;
117int _rex_bootread(int (*)(void)) __DEC_PROM_O32;
118int _rex_getbitmap(int (*)(memmap *), memmap *) __DEC_PROM_O32;
119unsigned long *_rex_slot_address(unsigned long *(*)(int), int) __DEC_PROM_O32;
120void *_rex_gettcinfo(void *(*)(void)) __DEC_PROM_O32;
121int _rex_getsysid(int (*)(void)) __DEC_PROM_O32;
122void _rex_clear_cache(void (*)(void)) __DEC_PROM_O32;
123
124int _prom_getchar(int (*)(void)) __DEC_PROM_O32;
125char *_prom_getenv(char *(*)(char *), char *) __DEC_PROM_O32;
126int _prom_printf(int (*)(char *, ...), char *, ...) __DEC_PROM_O32;
127
128
129#define rex_bootinit() _rex_bootinit(__rex_bootinit)
130#define rex_bootread() _rex_bootread(__rex_bootread)
131#define rex_getbitmap(x) _rex_getbitmap(__rex_getbitmap, x)
132#define rex_slot_address(x) _rex_slot_address(__rex_slot_address, x)
133#define rex_gettcinfo() _rex_gettcinfo(__rex_gettcinfo)
134#define rex_getsysid() _rex_getsysid(__rex_getsysid)
135#define rex_clear_cache() _rex_clear_cache(__rex_clear_cache)
136
137#define prom_getchar() _prom_getchar(__prom_getchar)
138#define prom_getenv(x) _prom_getenv(__prom_getenv, x)
139#define prom_printf(x...) _prom_printf(__prom_printf, x)
140
141#else /* !CONFIG_MIPS64 */
142
143/*
144 * On plain MIPS we just call PROM functions directly.
145 */
146#define rex_bootinit __rex_bootinit
147#define rex_bootread __rex_bootread
148#define rex_getbitmap __rex_getbitmap
149#define rex_slot_address __rex_slot_address
150#define rex_gettcinfo __rex_gettcinfo
151#define rex_getsysid __rex_getsysid
152#define rex_clear_cache __rex_clear_cache
153
154#define prom_getchar __prom_getchar
155#define prom_getenv __prom_getenv
156#define prom_printf __prom_printf
157
158#define pmax_open __pmax_open
159#define pmax_lseek __pmax_lseek
160#define pmax_read __pmax_read
161#define pmax_close __pmax_close
162
163#endif /* !CONFIG_MIPS64 */
164
165
166extern void prom_meminit(u32);
167extern void prom_identify_arch(u32);
168extern void prom_init_cmdline(s32, s32 *, u32);
169
170extern void register_prom_console(void);
171extern void unregister_prom_console(void);
172
173#endif /* _ASM_DEC_PROM_H */
diff --git a/include/asm-mips/dec/serial.h b/include/asm-mips/dec/serial.h
new file mode 100644
index 000000000000..acad75890a05
--- /dev/null
+++ b/include/asm-mips/dec/serial.h
@@ -0,0 +1,36 @@
1/*
2 * include/asm-mips/dec/serial.h
3 *
4 * Definitions common to all DECstation serial devices.
5 *
6 * Copyright (C) 2004 Maciej W. Rozycki
7 *
8 * Based on bits extracted from drivers/tc/zs.h for which
9 * the following copyrights apply:
10 *
11 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
12 * Copyright (C) 1996 Paul Mackerras (Paul.Mackerras@cs.anu.edu.au)
13 * Copyright (C) Harald Koerfgen
14 *
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version
18 * 2 of the License, or (at your option) any later version.
19 */
20#ifndef __ASM_MIPS_DEC_SERIAL_H
21#define __ASM_MIPS_DEC_SERIAL_H
22
23struct dec_serial_hook {
24 int (*init_channel)(void *handle);
25 void (*init_info)(void *handle);
26 void (*rx_char)(unsigned char ch, unsigned char fl);
27 int (*poll_rx_char)(void *handle);
28 int (*poll_tx_char)(void *handle, unsigned char ch);
29 unsigned int cflags;
30};
31
32extern int register_dec_serial_hook(unsigned int channel,
33 struct dec_serial_hook *hook);
34extern int unregister_dec_serial_hook(unsigned int channel);
35
36#endif /* __ASM_MIPS_DEC_SERIAL_H */
diff --git a/include/asm-mips/dec/tc.h b/include/asm-mips/dec/tc.h
new file mode 100644
index 000000000000..d7bba43f863a
--- /dev/null
+++ b/include/asm-mips/dec/tc.h
@@ -0,0 +1,43 @@
1/*
2 * Interface to the TURBOchannel related routines
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (c) 1998 Harald Koerfgen
9 */
10#ifndef ASM_TC_H
11#define ASM_TC_H
12
13extern unsigned long system_base;
14
15/*
16 * Search for a TURBOchannel Option Module
17 * with a certain name. Returns slot number
18 * of the first card not in use or -ENODEV
19 * if none found.
20 */
21extern int search_tc_card(const char *);
22/*
23 * Marks the card in slot as used
24 */
25extern void claim_tc_card(int);
26/*
27 * Marks the card in slot as free
28 */
29extern void release_tc_card(int);
30/*
31 * Return base address of card in slot
32 */
33extern unsigned long get_tc_base_addr(int);
34/*
35 * Return interrupt number of slot
36 */
37extern unsigned long get_tc_irq_nr(int);
38/*
39 * Return TURBOchannel clock frequency in hz
40 */
41extern unsigned long get_tc_speed(void);
42
43#endif
diff --git a/include/asm-mips/dec/tcinfo.h b/include/asm-mips/dec/tcinfo.h
new file mode 100644
index 000000000000..cc23509ee77a
--- /dev/null
+++ b/include/asm-mips/dec/tcinfo.h
@@ -0,0 +1,47 @@
1/*
2 * Various TURBOchannel related stuff
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Information obtained through the get_tcinfo prom call
9 * created from:
10 *
11 * TURBOchannel Firmware Specification
12 *
13 * EK-TCAAD-FS-004
14 * from Digital Equipment Corporation
15 *
16 * Copyright (c) 1998 Harald Koerfgen
17 */
18
19typedef struct {
20 int revision;
21 int clk_period;
22 int slot_size;
23 int io_timeout;
24 int dma_range;
25 int max_dma_burst;
26 int parity;
27 int reserved[4];
28} tcinfo;
29
30#define MAX_SLOT 7
31
32typedef struct {
33 unsigned long base_addr;
34 unsigned char name[9];
35 unsigned char vendor[9];
36 unsigned char firmware[9];
37 int interrupt;
38 int flags;
39} slot_info;
40
41/*
42 * Values for flags
43 */
44#define FREE 1<<0
45#define IN_USE 1<<1
46
47
diff --git a/include/asm-mips/dec/tcmodule.h b/include/asm-mips/dec/tcmodule.h
new file mode 100644
index 000000000000..6268e8915d87
--- /dev/null
+++ b/include/asm-mips/dec/tcmodule.h
@@ -0,0 +1,39 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Offsets for the ROM header locations for
7 * TURBOchannel cards
8 *
9 * created from:
10 *
11 * TURBOchannel Firmware Specification
12 *
13 * EK-TCAAD-FS-004
14 * from Digital Equipment Corporation
15 *
16 * Jan.1998 Harald Koerfgen
17 */
18#ifndef __ASM_DEC_TCMODULE_H
19#define __ASM_DEC_TCMODULE_H
20
21#define OLDCARD 0x3c0000
22#define NEWCARD 0x000000
23
24#define TC_ROM_WIDTH 0x3e0
25#define TC_ROM_STRIDE 0x3e4
26#define TC_ROM_SIZE 0x3e8
27#define TC_SLOT_SIZE 0x3ec
28#define TC_PATTERN0 0x3f0
29#define TC_PATTERN1 0x3f4
30#define TC_PATTERN2 0x3f8
31#define TC_PATTERN3 0x3fc
32#define TC_FIRM_VER 0x400
33#define TC_VENDOR 0x420
34#define TC_MODULE 0x440
35#define TC_FIRM_TYPE 0x460
36#define TC_FLAGS 0x470
37#define TC_ROM_OBJECTS 0x480
38
39#endif /* __ASM_DEC_TCMODULE_H */