Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/eisa Set/test sc_csr_memmapped instead of comparing ...
details: https://anonhg.NetBSD.org/src/rev/394d3d74de38
branches: trunk
changeset: 753328:394d3d74de38
user: dyoung <dyoung%NetBSD.org@localhost>
date: Mon Mar 22 23:01:10 2010 +0000
description:
Set/test sc_csr_memmapped instead of comparing bus_space_tag_t's.
diffstat:
sys/dev/eisa/if_fea.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (52 lines):
diff -r 6bf9e8488cff -r 394d3d74de38 sys/dev/eisa/if_fea.c
--- a/sys/dev/eisa/if_fea.c Mon Mar 22 23:00:47 2010 +0000
+++ b/sys/dev/eisa/if_fea.c Mon Mar 22 23:01:10 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_fea.c,v 1.43 2010/01/18 19:00:58 pooka Exp $ */
+/* $NetBSD: if_fea.c,v 1.44 2010/03/22 23:01:10 dyoung Exp $ */
/*-
* Copyright (c) 1995, 1996 Matt Thomas <matt%3am-software.com@localhost>
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.43 2010/01/18 19:00:58 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_fea.c,v 1.44 2010/03/22 23:01:10 dyoung Exp $");
#include "opt_inet.h"
@@ -164,7 +164,7 @@
data = PDQ_OS_IORD_8(sc->sc_iotag, sc->sc_iobase, PDQ_EISA_BURST_HOLDOFF);
#if defined(__NetBSD__)
PDQ_OS_IOWR_8(sc->sc_iotag, sc->sc_iobase, PDQ_EISA_BURST_HOLDOFF,
- sc->sc_iotag == sc->sc_csrtag ? data & ~1 : data | 1);
+ !sc->sc_csr_memmapped ? data & ~1 : data | 1);
#elif defined(PDQ_IOMAPPED)
PDQ_OS_IOWR_8(sc->sc_iotag, sc->sc_iobase, PDQ_EISA_BURST_HOLDOFF, data & ~1);
#else
@@ -477,6 +477,7 @@
pdq_eisa_subprobe(sc->sc_iotag, sc->sc_iobase, &maddr, &msiz, &irq);
if (maddr != 0 && msiz != 0) {
+ sc->sc_csr_memmapped = true;
sc->sc_csrtag = ea->ea_memt;
if (bus_space_map(sc->sc_csrtag, maddr, msiz, 0, &sc->sc_membase)) {
bus_space_unmap(sc->sc_iotag, sc->sc_iobase, EISA_SLOT_SIZE);
@@ -486,6 +487,7 @@
return;
}
} else {
+ sc->sc_csr_memmapped = false;
sc->sc_csrtag = sc->sc_iotag;
sc->sc_membase = sc->sc_iobase;
}
@@ -518,7 +520,7 @@
sc->sc_ats = shutdownhook_establish((void (*)(void *)) pdq_hwreset, sc->sc_pdq);
if (sc->sc_ats == NULL)
aprint_error_dev(self, "warning: couldn't establish shutdown hook\n");
- if (sc->sc_csrtag != sc->sc_iotag)
+ if (sc->sc_csr_memmapped)
printf("%s: using iomem 0x%x-0x%x\n", device_xname(&sc->sc_dev), maddr, maddr + msiz - 1);
if (intrstr != NULL)
printf("%s: interrupting at %s\n", device_xname(&sc->sc_dev), intrstr);
Home |
Main Index |
Thread Index |
Old Index