From 9251293f18d94239165cbf2c85d695ef3bfc1d94 Mon Sep 17 00:00:00 2001 From: ragge Date: Fri, 22 May 1998 09:49:07 +0000 Subject: [PATCH] Remove unnecessary code for interrupt vector handling. --- sys/arch/vax/include/cpu.h | 6 +---- sys/arch/vax/include/ka410.h | 17 +----------- sys/arch/vax/include/uvax.h | 27 +++++++++++++++++-- sys/arch/vax/include/vsbus.h | 50 ++++++++++++++++++++++++++++++++---- 4 files changed, 72 insertions(+), 28 deletions(-) diff --git a/sys/arch/vax/include/cpu.h b/sys/arch/vax/include/cpu.h index 887e3c305bc9..b5ddd25b91a4 100644 --- a/sys/arch/vax/include/cpu.h +++ b/sys/arch/vax/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.26 1998/04/13 12:12:59 ragge Exp $ */ +/* $NetBSD: cpu.h,v 1.27 1998/05/22 09:49:07 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden @@ -55,10 +55,6 @@ struct cpu_dep { int (*cpu_clkread) __P((time_t)); /* Read cpu clock time */ void (*cpu_clkwrite) __P((void)); /* Write system time to cpu */ int cpu_vups; /* speed of cpu */ - u_char *cpu_intreq; /* Used on some VAXstations */ - u_char *cpu_intclr; /* Used on some VAXstations */ - u_char *cpu_intmsk; /* Used on some VAXstations */ - struct uc_map *cpu_map; /* Map containing important addresses */ void (*cpu_halt) __P((void)); /* Cpu dependent halt call */ void (*cpu_reboot) __P((int)); /* Cpu dependent reboot call */ void (*cpu_clrf) __P((void)); /* Clear cold/warm start flags */ diff --git a/sys/arch/vax/include/ka410.h b/sys/arch/vax/include/ka410.h index 6aa2f0667ae5..e31389baa7e7 100644 --- a/sys/arch/vax/include/ka410.h +++ b/sys/arch/vax/include/ka410.h @@ -1,4 +1,4 @@ -/* $NetBSD: ka410.h,v 1.2 1997/02/19 10:06:05 ragge Exp $ */ +/* $NetBSD: ka410.h,v 1.3 1998/05/22 09:49:08 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -146,19 +146,6 @@ extern volatile unsigned char *ka410_intmsk; #define INTR_SC (1<<1) /* SCSI controller */ #define INTR_DC (1<<0) /* Disk controller */ -/* - * interrupt vector numbers - */ -#define IVEC_BASE 0x20040020 -#define IVEC_SR 0x000002C0 -#define IVEC_ST 0x000002C4 -#define IVEC_NP 0x00000250 -#define IVEC_NS 0x00000254 -#define IVEC_VF 0x00000244 -#define IVEC_VS 0x00000248 -#define IVEC_SC 0x000003F8 -#define IVEC_DC 0x000003FC - /* * Clock-Chip data in NVRAM */ @@ -208,5 +195,3 @@ struct ka410_clock { /* Prototypes */ int ka410_setup __P((struct uvax_calls *p, int flags)); -static int ka410_clkread __P((time_t)); -static void ka410_clkwrite __P((void)); diff --git a/sys/arch/vax/include/uvax.h b/sys/arch/vax/include/uvax.h index 1c95d5698111..a6c8b86f90db 100644 --- a/sys/arch/vax/include/uvax.h +++ b/sys/arch/vax/include/uvax.h @@ -1,4 +1,4 @@ -/* $NetBSD: uvax.h,v 1.2 1997/02/19 10:06:07 ragge Exp $ */ +/* $NetBSD: uvax.h,v 1.3 1998/05/22 09:49:08 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -79,7 +79,6 @@ struct uc_map { u_long um_virt; }; extern struct uc_map *uc_physmap; - /* * Generic definitions common on all MicroVAXen clock chip. */ @@ -102,6 +101,30 @@ extern struct uc_map *uc_physmap; #define uVAX_CLKRSTRT 010 #define uVAX_CLKLANG 0360 +/* + * Miscellaneous registers common on most VAXststions. + */ +struct vs_cpu { + u_long vc_hltcod; /* Halt Code Register */ + u_long vc_410mser; /* VS2K */ + u_long vc_410cear; /* VS2K */ + u_char vc_intmsk; /* Interrupt mask register */ + u_char vc_vdcorg; /* Mono display origin */ + u_char vc_vdcsel; /* Video interrupt select */ + u_char vc_intreq; /* Interrupt request register */ +#define vc_intclr vc_intreq + u_short vc_diagdsp; /* Diagnostic display register */ + u_short pad4; + u_long vc_parctl; /* Parity Control Register */ + u_short pad5; + u_short pad6; + u_short pad7; + u_short vc_diagtme; /* Diagnostic time register */ +}; +#define PARCTL_DMA 0x1000000 +#define PARCTL_CPEN 2 +#define PARCTL_DPEN 1 + /* Prototypes */ int uvax_clkread __P((time_t)); void uvax_clkwrite __P((void)); diff --git a/sys/arch/vax/include/vsbus.h b/sys/arch/vax/include/vsbus.h index 81257f57d11b..dff9df7a8cf0 100644 --- a/sys/arch/vax/include/vsbus.h +++ b/sys/arch/vax/include/vsbus.h @@ -1,4 +1,4 @@ -/* $NetBSD: vsbus.h,v 1.1 1996/07/20 17:58:28 ragge Exp $ */ +/* $NetBSD: vsbus.h,v 1.2 1998/05/22 09:49:08 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -76,10 +76,50 @@ struct confargs { #define ca_leflags ca_aux2 }; -int vsbus_intr_register __P((struct confargs *, int(*)(void*), void*)); -int vsbus_intr_enable __P((struct confargs *)); -int vsbus_intr_disable __P((struct confargs *)); -int vsbus_intr_unregister __P((struct confargs *)); +struct vsbus_attach_args { + int va_type; +}; + +/* + * Some chip addresses and constants, same on all VAXstations. + */ +#define NI_ADDR 0x20090000 /* Ethernet address */ +#define DZ_CSR 0x200a0000 /* DZ11-compatible chip csr */ +#define VS_CLOCK 0x200b0000 /* clock chip address */ +#define NI_BASE 0x200e0000 /* LANCE CSRs */ +#define NI_IOSIZE (128 * NBPG) /* IO address size */ +#define VS_REGS 0x20080000 /* Misc cpu internal regs */ + +/* + * interrupt vector numbers + */ +#define IVEC_BASE 0x20040020 +#define IVEC_SR 0x000002C0 +#define INR_SR 7 +#define IVEC_ST 0x000002C4 +#define INR_ST 6 +#define IVEC_NP 0x00000250 +#define INR_NP 5 +#define IVEC_NS 0x00000254 +#define INR_NS 4 +#define IVEC_VF 0x00000244 +#define INR_VF 3 +#define IVEC_VS 0x00000248 +#define INR_VS 2 +#define IVEC_SC 0x000003F8 +#define INR_SC 1 +#define IVEC_DC 0x000003FC +#define INR_DC 0 + +caddr_t dz_regs; /* On-board serial line */ +caddr_t le_iomem; /* base addr of RAM -- CPU's view */ +short *lance_csr; /* LANCE CSR virtual address */ +int *lance_addr; /* Ethernet address */ +struct vs_cpu *vs_cpu; /* Common CPU registers */ + +void vsbus_intr_enable __P((int)); +void vsbus_intr_disable __P((int)); +void vsbus_intr_attach __P((int, void(*)(int), int)); int vsbus_lockDMA __P((struct confargs *)); int vsbus_unlockDMA __P((struct confargs *));