Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/dev Check for "ssp-console" and "ssp-contro...



details:   https://anonhg.NetBSD.org/src/rev/efee0d5dd733
branches:  trunk
changeset: 750416:efee0d5dd733
user:      jdc <jdc%NetBSD.org@localhost>
date:      Wed Dec 30 21:03:48 2009 +0000

description:
Check for "ssp-console" and "ssp-control" properties.
If we find them, set the baud rate to 115200.
This allows the RSC to be the console on an E250:

  sab1 at ebus0 addr 200000-20007f ipl 35: rev 3.2
  sabtty2 at sab1 port 0: console i/o
  sabtty3 at sab1 port 1

XXX; We should really check the baud rate properties and use those to set
our rates.

diffstat:

 sys/arch/sparc64/dev/sab.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (41 lines):

diff -r 1fe15eb475b6 -r efee0d5dd733 sys/arch/sparc64/dev/sab.c
--- a/sys/arch/sparc64/dev/sab.c        Wed Dec 30 20:45:46 2009 +0000
+++ b/sys/arch/sparc64/dev/sab.c        Wed Dec 30 21:03:48 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sab.c,v 1.42 2008/06/11 18:52:32 cegger Exp $  */
+/*     $NetBSD: sab.c,v 1.43 2009/12/30 21:03:48 jdc Exp $     */
 /*     $OpenBSD: sab.c,v 1.7 2002/04/08 17:49:42 jason Exp $   */
 
 /*
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sab.c,v 1.42 2008/06/11 18:52:32 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sab.c,v 1.43 2009/12/30 21:03:48 jdc Exp $");
 
 #include "opt_kgdb.h"
 #include <sys/types.h>
@@ -375,6 +375,7 @@
        struct sabtty_attach_args *sa = aux;
        int r;
        int maj;
+       int node;
        int is_kgdb = 0;
 
 #ifdef KGDB
@@ -442,7 +443,13 @@
                }
 
                t.c_ispeed= 0;
-               t.c_ospeed = 9600;
+               node = sc->sc_parent->sc_node;
+               /* Are we connected to an E250 RSC? */
+               if (sc->sc_portno == prom_getpropint(node, "ssp-console", -1) ||
+                   sc->sc_portno == prom_getpropint(node, "ssp-control", -1))
+                       t.c_ospeed = 115200;
+               else
+                       t.c_ospeed = 9600;
                t.c_cflag = CREAD | CS8 | HUPCL;
                sc->sc_tty->t_ospeed = 0;
                sabttyparam(sc, sc->sc_tty, &t);



Home | Main Index | Thread Index | Old Index