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 Re-do the previous check for the RSC co...
details: https://anonhg.NetBSD.org/src/rev/6c30fbabbc6f
branches: trunk
changeset: 750888:6c30fbabbc6f
user: jdc <jdc%NetBSD.org@localhost>
date: Mon Jan 18 09:58:20 2010 +0000
description:
Re-do the previous check for the RSC console:
Do the check in sabtty_console_flags() and set a flag if we are an RSC port.
If we are an RSC port, note that the baud rate is 115200, but don't write a
new value to the baud rate generator register, as this stops the console
working.
diffstat:
sys/arch/sparc64/dev/sab.c | 33 +++++++++++++++++----------------
1 files changed, 17 insertions(+), 16 deletions(-)
diffs (82 lines):
diff -r 38b13c731985 -r 6c30fbabbc6f sys/arch/sparc64/dev/sab.c
--- a/sys/arch/sparc64/dev/sab.c Mon Jan 18 04:53:10 2010 +0000
+++ b/sys/arch/sparc64/dev/sab.c Mon Jan 18 09:58:20 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sab.c,v 1.43 2009/12/30 21:03:48 jdc Exp $ */
+/* $NetBSD: sab.c,v 1.44 2010/01/18 09:58:20 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.43 2009/12/30 21:03:48 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sab.c,v 1.44 2010/01/18 09:58:20 jdc Exp $");
#include "opt_kgdb.h"
#include <sys/types.h>
@@ -104,14 +104,15 @@
u_char * sc_txp;
int sc_txc;
int sc_flags;
-#define SABTTYF_STOP 0x01
-#define SABTTYF_DONE 0x02
-#define SABTTYF_RINGOVERFLOW 0x04
-#define SABTTYF_CDCHG 0x08
-#define SABTTYF_CONS_IN 0x10
-#define SABTTYF_CONS_OUT 0x20
-#define SABTTYF_TXDRAIN 0x40
-#define SABTTYF_DONTDDB 0x80
+#define SABTTYF_STOP 0x0001
+#define SABTTYF_DONE 0x0002
+#define SABTTYF_RINGOVERFLOW 0x0004
+#define SABTTYF_CDCHG 0x0008
+#define SABTTYF_CONS_IN 0x0010
+#define SABTTYF_CONS_OUT 0x0020
+#define SABTTYF_TXDRAIN 0x0040
+#define SABTTYF_DONTDDB 0x0080
+#define SABTTYF_IS_RSC 0x0100
uint8_t sc_rbuf[SABTTY_RBUF_SIZE];
uint8_t *sc_rend, *sc_rput, *sc_rget;
uint8_t sc_polling, sc_pollrfc;
@@ -375,7 +376,6 @@
struct sabtty_attach_args *sa = aux;
int r;
int maj;
- int node;
int is_kgdb = 0;
#ifdef KGDB
@@ -443,10 +443,7 @@
}
t.c_ispeed= 0;
- 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))
+ if (sc->sc_flags & SABTTYF_IS_RSC)
t.c_ospeed = 115200;
else
t.c_ospeed = 9600;
@@ -1039,7 +1036,7 @@
dafo |= SAB_DAFO_PAR_NONE;
SAB_WRITE(sc, SAB_DAFO, dafo);
- if (ospeed != 0) {
+ if (!(sc->sc_flags & SABTTYF_IS_RSC) && ospeed != 0) {
SAB_WRITE(sc, SAB_BGR, ospeed & 0xff);
r = SAB_READ(sc, SAB_CCR2);
r &= ~(SAB_CCR2_BR9 | SAB_CCR2_BR8);
@@ -1306,6 +1303,10 @@
if (channel == cookie)
sc->sc_flags |= SABTTYF_CONS_OUT;
}
+ /* Are we connected to an E250 RSC? */
+ if (channel == prom_getpropint(node, "ssp-console", -1) ||
+ channel == prom_getpropint(node, "ssp-control", -1))
+ sc->sc_flags |= SABTTYF_IS_RSC;
}
void
Home |
Main Index |
Thread Index |
Old Index