Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/hpcmips/vr BUGFIX: sg2com isn't attached as a conso...
details: https://anonhg.NetBSD.org/src/rev/d7066640fbac
branches: trunk
changeset: 520071:d7066640fbac
user: takemura <takemura%NetBSD.org@localhost>
date: Wed Jan 02 10:09:35 2002 +0000
description:
BUGFIX: sg2com isn't attached as a console device if it is a console.
diffstat:
sys/arch/hpcmips/vr/sg2com_vrip.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diffs (55 lines):
diff -r cc280139c5e0 -r d7066640fbac sys/arch/hpcmips/vr/sg2com_vrip.c
--- a/sys/arch/hpcmips/vr/sg2com_vrip.c Wed Jan 02 09:17:48 2002 +0000
+++ b/sys/arch/hpcmips/vr/sg2com_vrip.c Wed Jan 02 10:09:35 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sg2com_vrip.c,v 1.2 2001/12/29 09:26:23 takemura Exp $ */
+/* $NetBSD: sg2com_vrip.c,v 1.3 2002/01/02 10:09:35 takemura Exp $ */
/*-
* Copyright (c) 2001 TAKEMRUA Shin. All rights reserved.
@@ -68,6 +68,7 @@
};
static struct bus_space_tag sg2com_vrip_cniotx;
static bus_space_tag_t sg2com_vrip_cniot = &sg2com_vrip_cniotx;
+static int sg2com_vrip_cniobase;
static int sg2com_vrip_probe(struct device *, struct cfdata *, void *);
static void sg2com_vrip_attach(struct device *, struct device *, void *);
@@ -205,6 +206,7 @@
DPRINTF(("sg2com_vrip_cndb_attach(): probe failed\n"));
return (ENOTTY);
}
+ sg2com_vrip_cniobase = iobase;
DPRINTF(("sg2com_vrip_cndb_attach(): probe succeeded\n"));
#ifdef KGDB
if (kgdb)
@@ -240,7 +242,8 @@
int res;
if (sg2com_vrip_cniot->bs_base == iot &&
- com_is_console(sg2com_vrip_cniot->bs_base, va->va_addr, 0)) {
+ sg2com_vrip_cniobase == va->va_addr &&
+ com_is_console(sg2com_vrip_cniot, va->va_addr, 0)) {
/*
* We have alredy probed.
*/
@@ -268,10 +271,17 @@
struct sg2com_vrip_softc *vsc = (void *)self;
struct com_softc *sc = &vsc->sc_com;
struct vrip_attach_args *va = aux;
- bus_space_tag_t iot = &vsc->sc_iot;
+ bus_space_tag_t iot;
bus_space_handle_t ioh;
- sg2com_vrip_iot_init(iot, va->va_iot);
+ if (sg2com_vrip_cniot->bs_base == va->va_iot &&
+ sg2com_vrip_cniobase == va->va_addr &&
+ com_is_console(sg2com_vrip_cniot, va->va_addr, 0)) {
+ iot = sg2com_vrip_cniot;
+ } else {
+ iot = &vsc->sc_iot;
+ sg2com_vrip_iot_init(iot, va->va_iot);
+ }
if (bus_space_map(iot, va->va_addr, 1, 0, &ioh)) {
printf(": can't map bus space\n");
return;
Home |
Main Index |
Thread Index |
Old Index