Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbmips Remove a few more magic numbers.
details: https://anonhg.NetBSD.org/src/rev/3bf1351af1f8
branches: trunk
changeset: 525269:3bf1351af1f8
user: simonb <simonb%NetBSD.org@localhost>
date: Tue Apr 09 03:40:16 2002 +0000
description:
Remove a few more magic numbers.
diffstat:
sys/arch/evbmips/isa/mcclock_isa.c | 11 ++++++-----
sys/arch/evbmips/malta/malta_bus_mem.c | 8 ++++----
2 files changed, 10 insertions(+), 9 deletions(-)
diffs (86 lines):
diff -r dc646deb73e4 -r 3bf1351af1f8 sys/arch/evbmips/isa/mcclock_isa.c
--- a/sys/arch/evbmips/isa/mcclock_isa.c Tue Apr 09 03:38:28 2002 +0000
+++ b/sys/arch/evbmips/isa/mcclock_isa.c Tue Apr 09 03:40:16 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mcclock_isa.c,v 1.1 2002/03/07 14:44:03 simonb Exp $ */
+/* $NetBSD: mcclock_isa.c,v 1.2 2002/04/09 03:40:16 simonb Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.1 2002/03/07 14:44:03 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.2 2002/04/09 03:40:16 simonb Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -43,6 +43,7 @@
#include <evbmips/evbmips/clockvar.h>
#include <evbmips/dev/mcclockvar.h>
+#include <dev/isa/isareg.h>
#include <dev/isa/isavar.h>
struct mcclock_isa_softc {
@@ -75,7 +76,7 @@
if (ia->ia_nio < 1 ||
(ia->ia_io[0].ir_addr != ISACF_PORT_DEFAULT &&
- ia->ia_io[0].ir_addr != 0x70))
+ ia->ia_io[0].ir_addr != IO_RTC))
return (0);
if (ia->ia_niomem > 0 &&
@@ -90,13 +91,13 @@
(ia->ia_drq[0].ir_drq != ISACF_DRQ_DEFAULT))
return (0);
- if (bus_space_map(ia->ia_iot, 0x70, 0x2, 0, &ioh))
+ if (bus_space_map(ia->ia_iot, IO_RTC, 0x2, 0, &ioh))
return (0);
bus_space_unmap(ia->ia_iot, ioh, 0x2);
ia->ia_nio = 1;
- ia->ia_io[0].ir_addr = 0x70;
+ ia->ia_io[0].ir_addr = IO_RTC;
ia->ia_io[0].ir_size = 0x02;
ia->ia_niomem = 0;
diff -r dc646deb73e4 -r 3bf1351af1f8 sys/arch/evbmips/malta/malta_bus_mem.c
--- a/sys/arch/evbmips/malta/malta_bus_mem.c Tue Apr 09 03:38:28 2002 +0000
+++ b/sys/arch/evbmips/malta/malta_bus_mem.c Tue Apr 09 03:40:16 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: malta_bus_mem.c,v 1.2 2002/03/23 14:33:35 simonb Exp $ */
+/* $NetBSD: malta_bus_mem.c,v 1.3 2002/04/09 03:40:17 simonb Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
*/
/* MEM region 1 */
-#define CHIP_W1_BUS_START(v) 0x08000000UL
+#define CHIP_W1_BUS_START(v) MALTA_PCIMEM1_BASE
#define CHIP_W1_BUS_END(v) MALTA_PCIMEM1_SIZE + \
MALTA_PCIMEM2_SIZE
#define CHIP_W1_SYS_START(v) ((u_long)MALTA_PCIMEM1_BASE)
@@ -72,14 +72,14 @@
#else
/* MEM region 1 */
-#define CHIP_W1_BUS_START(v) 0x08000000UL
+#define CHIP_W1_BUS_START(v) MALTA_PCIMEM1_BASE
#define CHIP_W1_BUS_END(v) MALTA_PCIMEM1_SIZE
#define CHIP_W1_SYS_START(v) ((u_long)MALTA_PCIMEM1_BASE)
#define CHIP_W1_SYS_END(v) ((u_long)MALTA_PCIMEM1_BASE + \
CHIP_W1_BUS_END(v))
/* MEM region 2 */
-#define CHIP_W2_BUS_START(v) 0x10000000UL
+#define CHIP_W2_BUS_START(v) MALTA_PCIMEM2_BASE
#define CHIP_W2_BUS_END(v) MALTA_PCIMEM2_SIZE
#define CHIP_W2_SYS_START(v) ((u_long)MALTA_PCIMEM2_BASE)
#define CHIP_W2_SYS_END(v) ((u_long)MALTA_PCIMEM2_BASE + \
Home |
Main Index |
Thread Index |
Old Index