Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/ixp12x0 Don't use dv_unit to determine console....



details:   https://anonhg.NetBSD.org/src/rev/94860a2b50cb
branches:  trunk
changeset: 543261:94860a2b50cb
user:      igy <igy%NetBSD.org@localhost>
date:      Fri Feb 21 01:53:35 2003 +0000

description:
Don't use dv_unit to determine console.  Back to comparing iobase again.
We always assume ixpcom is at statically mapped address (0xf0000000).

diffstat:

 sys/arch/arm/ixp12x0/ixp12x0_com.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (40 lines):

diff -r 423e13b62e62 -r 94860a2b50cb sys/arch/arm/ixp12x0/ixp12x0_com.c
--- a/sys/arch/arm/ixp12x0/ixp12x0_com.c        Fri Feb 21 01:25:11 2003 +0000
+++ b/sys/arch/arm/ixp12x0/ixp12x0_com.c        Fri Feb 21 01:53:35 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ixp12x0_com.c,v 1.11 2003/02/21 00:31:08 igy Exp $ */
+/*     $NetBSD: ixp12x0_com.c,v 1.12 2003/02/21 01:53:35 igy Exp $ */
 /*
  * Copyright (c) 1998, 1999, 2001, 2002 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -137,8 +137,10 @@
 static struct ixpcom_cons_softc {
        bus_space_tag_t         sc_iot;
        bus_space_handle_t      sc_ioh;
+       bus_addr_t              sc_baseaddr;
        int                     sc_ospeed;
        tcflag_t                sc_cflag;
+       int                     sc_attached;
 } ixpcomcn_sc;
 
 static struct cnm_state ixpcom_cnm_state;
@@ -199,7 +201,9 @@
        ixpcom_sc = sc;
 
        /* force to use ixpcom0 for console */
-       if (sc->sc_dev.dv_unit == 0) {
+       if (sc->sc_iot == ixpcomcn_sc.sc_iot
+           && sc->sc_baseaddr == ixpcomcn_sc.sc_baseaddr) {
+               ixpcomcn_sc.sc_attached = 1;
                sc->sc_speed = IXPCOMSPEED2BRD(ixpcomcn_sc.sc_ospeed);
 
                /* Make sure the console is always "hardwired". */
@@ -878,7 +882,7 @@
        cn_set_magic("\047\001\047\001");
 
        ixpcomcn_sc.sc_iot = iot;
-       ixpcomcn_sc.sc_ioh = iobase;
+       ixpcomcn_sc.sc_ioh = ixpcomcn_sc.sc_baseaddr = iobase;
        ixpcomcn_sc.sc_ospeed = ospeed;
        ixpcomcn_sc.sc_cflag = cflag;
 



Home | Main Index | Thread Index | Old Index