162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * include/asm-mips/dec/kn05.h 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * DECstation/DECsystem 5000/260 (4max+ or KN05), 5000/150 (4min 662306a36Sopenharmony_ci * or KN04-BA), Personal DECstation/DECsystem 5000/50 (4maxine or 762306a36Sopenharmony_ci * KN04-CA) and DECsystem 5900/260 (KN05) R4k CPU card MB ASIC 862306a36Sopenharmony_ci * definitions. 962306a36Sopenharmony_ci * 1062306a36Sopenharmony_ci * Copyright (C) 2002, 2003, 2005, 2008 Maciej W. Rozycki 1162306a36Sopenharmony_ci * 1262306a36Sopenharmony_ci * WARNING! All this information is pure guesswork based on the 1362306a36Sopenharmony_ci * ROM. It is provided here in hope it will give someone some 1462306a36Sopenharmony_ci * food for thought. No documentation for the KN05 nor the KN04 1562306a36Sopenharmony_ci * module has been located so far. 1662306a36Sopenharmony_ci */ 1762306a36Sopenharmony_ci#ifndef __ASM_MIPS_DEC_KN05_H 1862306a36Sopenharmony_ci#define __ASM_MIPS_DEC_KN05_H 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci#include <asm/dec/ioasic_addrs.h> 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci/* 2362306a36Sopenharmony_ci * The oncard MB (Memory Buffer) ASIC provides an additional address 2462306a36Sopenharmony_ci * decoder. Certain address ranges within the "high" 16 slots are 2562306a36Sopenharmony_ci * passed to the I/O ASIC's decoder like with the KN03 or KN02-BA/CA. 2662306a36Sopenharmony_ci * Others are handled locally. "Low" slots are always passed. 2762306a36Sopenharmony_ci */ 2862306a36Sopenharmony_ci#define KN4K_SLOT_BASE 0x1fc00000 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci#define KN4K_MB_ROM (0*IOASIC_SLOT_SIZE) /* KN05/KN04 card ROM */ 3162306a36Sopenharmony_ci#define KN4K_IOCTL (1*IOASIC_SLOT_SIZE) /* I/O ASIC */ 3262306a36Sopenharmony_ci#define KN4K_ESAR (2*IOASIC_SLOT_SIZE) /* LANCE MAC address chip */ 3362306a36Sopenharmony_ci#define KN4K_LANCE (3*IOASIC_SLOT_SIZE) /* LANCE Ethernet */ 3462306a36Sopenharmony_ci#define KN4K_MB_INT (4*IOASIC_SLOT_SIZE) /* MB interrupt register */ 3562306a36Sopenharmony_ci#define KN4K_MB_EA (5*IOASIC_SLOT_SIZE) /* MB error address? */ 3662306a36Sopenharmony_ci#define KN4K_MB_EC (6*IOASIC_SLOT_SIZE) /* MB error ??? */ 3762306a36Sopenharmony_ci#define KN4K_MB_CSR (7*IOASIC_SLOT_SIZE) /* MB control & status */ 3862306a36Sopenharmony_ci#define KN4K_RES_08 (8*IOASIC_SLOT_SIZE) /* unused? */ 3962306a36Sopenharmony_ci#define KN4K_RES_09 (9*IOASIC_SLOT_SIZE) /* unused? */ 4062306a36Sopenharmony_ci#define KN4K_RES_10 (10*IOASIC_SLOT_SIZE) /* unused? */ 4162306a36Sopenharmony_ci#define KN4K_RES_11 (11*IOASIC_SLOT_SIZE) /* unused? */ 4262306a36Sopenharmony_ci#define KN4K_SCSI (12*IOASIC_SLOT_SIZE) /* ASC SCSI */ 4362306a36Sopenharmony_ci#define KN4K_RES_13 (13*IOASIC_SLOT_SIZE) /* unused? */ 4462306a36Sopenharmony_ci#define KN4K_RES_14 (14*IOASIC_SLOT_SIZE) /* unused? */ 4562306a36Sopenharmony_ci#define KN4K_RES_15 (15*IOASIC_SLOT_SIZE) /* unused? */ 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci/* 4862306a36Sopenharmony_ci * MB ASIC interrupt bits. 4962306a36Sopenharmony_ci */ 5062306a36Sopenharmony_ci#define KN4K_MB_INR_MB 4 /* ??? */ 5162306a36Sopenharmony_ci#define KN4K_MB_INR_MT 3 /* memory, I/O bus read/write errors */ 5262306a36Sopenharmony_ci#define KN4K_MB_INR_RES_2 2 /* unused */ 5362306a36Sopenharmony_ci#define KN4K_MB_INR_RTC 1 /* RTC */ 5462306a36Sopenharmony_ci#define KN4K_MB_INR_TC 0 /* I/O ASIC cascade */ 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ci/* 5762306a36Sopenharmony_ci * Bits for the MB interrupt register. 5862306a36Sopenharmony_ci * The register appears read-only. 5962306a36Sopenharmony_ci */ 6062306a36Sopenharmony_ci#define KN4K_MB_INT_IRQ (0x1f<<0) /* CPU Int[4:0] status. */ 6162306a36Sopenharmony_ci#define KN4K_MB_INT_IRQ_N(n) (1<<(n)) /* Individual status bits. */ 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ci/* 6462306a36Sopenharmony_ci * Bits for the MB control & status register. 6562306a36Sopenharmony_ci * Set to 0x00bf8001 for KN05 and to 0x003f8000 for KN04 by the firmware. 6662306a36Sopenharmony_ci */ 6762306a36Sopenharmony_ci#define KN4K_MB_CSR_PF (1<<0) /* PreFetching enable? */ 6862306a36Sopenharmony_ci#define KN4K_MB_CSR_F (1<<1) /* ??? */ 6962306a36Sopenharmony_ci#define KN4K_MB_CSR_ECC (0xff<<2) /* ??? */ 7062306a36Sopenharmony_ci#define KN4K_MB_CSR_OD (1<<10) /* ??? */ 7162306a36Sopenharmony_ci#define KN4K_MB_CSR_CP (1<<11) /* ??? */ 7262306a36Sopenharmony_ci#define KN4K_MB_CSR_UNC (1<<12) /* ??? */ 7362306a36Sopenharmony_ci#define KN4K_MB_CSR_IM (1<<13) /* ??? */ 7462306a36Sopenharmony_ci#define KN4K_MB_CSR_NC (1<<14) /* ??? */ 7562306a36Sopenharmony_ci#define KN4K_MB_CSR_EE (1<<15) /* (bus) Exception Enable? */ 7662306a36Sopenharmony_ci#define KN4K_MB_CSR_MSK (0x1f<<16) /* CPU Int[4:0] mask */ 7762306a36Sopenharmony_ci#define KN4K_MB_CSR_MSK_N(n) (1<<((n)+16)) /* Individual mask bits. */ 7862306a36Sopenharmony_ci#define KN4K_MB_CSR_FW (1<<21) /* ??? */ 7962306a36Sopenharmony_ci#define KN4K_MB_CSR_W (1<<31) /* ??? */ 8062306a36Sopenharmony_ci 8162306a36Sopenharmony_ci#endif /* __ASM_MIPS_DEC_KN05_H */ 82