Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax Define and use VS_REGS_KA49 rather than magic n...
details: https://anonhg.NetBSD.org/src/rev/ba3c33719a40
branches: trunk
changeset: 779929:ba3c33719a40
user: abs <abs%NetBSD.org@localhost>
date: Thu Jun 28 13:58:21 2012 +0000
description:
Define and use VS_REGS_KA49 rather than magic numbers. From OpenBSD.
diffstat:
sys/arch/vax/include/vsbus.h | 5 ++++-
sys/arch/vax/vsa/dz_vsbus.c | 10 +++++-----
sys/arch/vax/vsa/vsbus.c | 6 +++---
3 files changed, 12 insertions(+), 9 deletions(-)
diffs (92 lines):
diff -r eab324ca6027 -r ba3c33719a40 sys/arch/vax/include/vsbus.h
--- a/sys/arch/vax/include/vsbus.h Thu Jun 28 13:53:49 2012 +0000
+++ b/sys/arch/vax/include/vsbus.h Thu Jun 28 13:58:21 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vsbus.h,v 1.18 2008/03/11 05:34:02 matt Exp $ */
+/* $NetBSD: vsbus.h,v 1.19 2012/06/28 13:58:21 abs Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -60,10 +60,13 @@
*/
#define VS_CFGTST 0x20020000 /* config register */
#define VS_REGS 0x20080000 /* Misc CPU internal regs */
+#define VS_REGS_KA49 0x25c00000 /* ... same, on 512KB ROM systems */
#define NI_ADDR 0x20090000 /* Ethernet address */
#define DZ_CSR 0x200a0000 /* DZ11-compatible chip csr */
+#define DZ_CSR_KA49 0x25000000 /* ... same, on 512KB ROM systems */
#define VS_CLOCK 0x200b0000 /* clock chip address */
#define SCA_REGS 0x200c0000 /* disk device addresses */
+#define SCA_REGS_KA49 0x26000000 /* ... same, on 512KB ROM systems */
#define NI_BASE 0x200e0000 /* LANCE CSRs */
#define NI_IOSIZE (128 * VAX_NBPG) /* IO address size */
diff -r eab324ca6027 -r ba3c33719a40 sys/arch/vax/vsa/dz_vsbus.c
--- a/sys/arch/vax/vsa/dz_vsbus.c Thu Jun 28 13:53:49 2012 +0000
+++ b/sys/arch/vax/vsa/dz_vsbus.c Thu Jun 28 13:58:21 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dz_vsbus.c,v 1.42 2010/12/14 23:31:16 matt Exp $ */
+/* $NetBSD: dz_vsbus.c,v 1.43 2012/06/28 13:58:21 abs Exp $ */
/*
* Copyright (c) 1998 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dz_vsbus.c,v 1.42 2010/12/14 23:31:16 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dz_vsbus.c,v 1.43 2012/06/28 13:58:21 abs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -123,7 +123,7 @@
#if VAX53 || VAX49 || VAXANY
if (vax_boardtype == VAX_BTYP_53 || vax_boardtype == VAX_BTYP_49)
- if (cf->cf_loc[VSBUSCF_CSR] != 0x25000000)
+ if (cf->cf_loc[VSBUSCF_CSR] != DZ_CSR_KA49)
return 0; /* Ugly */
#endif
@@ -262,12 +262,12 @@
break;
case VAX_BTYP_49:
- ioaddr = 0x25000000;
+ ioaddr = DZ_CSR_KA49;
diagcons = (vax_confdata & 8 ? 3 : 0);
break;
case VAX_BTYP_53:
- ioaddr = 0x25000000;
+ ioaddr = DZ_CSR_KA49;
diagcons = 3;
break;
diff -r eab324ca6027 -r ba3c33719a40 sys/arch/vax/vsa/vsbus.c
--- a/sys/arch/vax/vsa/vsbus.c Thu Jun 28 13:53:49 2012 +0000
+++ b/sys/arch/vax/vsa/vsbus.c Thu Jun 28 13:58:21 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vsbus.c,v 1.59 2010/12/14 23:31:17 matt Exp $ */
+/* $NetBSD: vsbus.c,v 1.60 2012/06/28 13:58:21 abs Exp $ */
/*
* Copyright (c) 1996, 1999 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vsbus.c,v 1.59 2010/12/14 23:31:17 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vsbus.c,v 1.60 2012/06/28 13:58:21 abs Exp $");
#include "opt_cputype.h"
@@ -122,7 +122,7 @@
#if VAX49 || VAX53
case VAX_BTYP_53:
case VAX_BTYP_49:
- sc->sc_vsregs = vax_map_physmem(0x25c00000, 1);
+ sc->sc_vsregs = vax_map_physmem(VS_REGS_KA49, 1);
sc->sc_intreq = (char *)sc->sc_vsregs + 12;
sc->sc_intclr = (char *)sc->sc_vsregs + 12;
sc->sc_intmsk = (char *)sc->sc_vsregs + 8;
Home |
Main Index |
Thread Index |
Old Index