Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hp300/dev Replace badbaddr() with hp300_bus_space_p...
details: https://anonhg.NetBSD.org/src/rev/7412d219c111
branches: trunk
changeset: 581622:7412d219c111
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Fri Jun 03 11:51:16 2005 +0000
description:
Replace badbaddr() with hp300_bus_space_probe() to avoid -Wcast-qual warning.
diffstat:
sys/arch/hp300/dev/dma.c | 6 +++---
sys/arch/hp300/dev/dmareg.h | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (45 lines):
diff -r 6c62a61dfcd2 -r 7412d219c111 sys/arch/hp300/dev/dma.c
--- a/sys/arch/hp300/dev/dma.c Fri Jun 03 11:44:39 2005 +0000
+++ b/sys/arch/hp300/dev/dma.c Fri Jun 03 11:51:16 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dma.c,v 1.31 2004/08/28 17:37:00 thorpej Exp $ */
+/* $NetBSD: dma.c,v 1.32 2005/06/03 11:51:16 tsutsui Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.31 2004/08/28 17:37:00 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dma.c,v 1.32 2005/06/03 11:51:16 tsutsui Exp $");
#include <machine/hp300spu.h> /* XXX param.h includes cpu.h */
@@ -211,7 +211,7 @@
* so we just hope nobody has an A card (A cards will work if
* splbio works out to ipl 3).
*/
- if (badbaddr((char *)&dma->dma_id[2])) {
+ if (hp300_bus_space_probe(sc->sc_bst, sc->sc_bsh, DMA_ID2, 1) == 0) {
rev = 'B';
#if !defined(HP320)
panic("dmainit: DMA card requires hp320 support");
diff -r 6c62a61dfcd2 -r 7412d219c111 sys/arch/hp300/dev/dmareg.h
--- a/sys/arch/hp300/dev/dmareg.h Fri Jun 03 11:44:39 2005 +0000
+++ b/sys/arch/hp300/dev/dmareg.h Fri Jun 03 11:51:16 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dmareg.h,v 1.13 2003/08/07 16:27:28 agc Exp $ */
+/* $NetBSD: dmareg.h,v 1.14 2005/06/03 11:51:16 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1990, 1993
@@ -73,6 +73,8 @@
/* addresses */
#define DMA_BASE IIOV(0x500000)
+#define DMA_ID2 offsetof(struct dmareg, dma_id[2])
+
/* command bits */
#define DMA_ENAB 0x0001
#define DMA_WORD 0x0002
Home |
Main Index |
Thread Index |
Old Index