Module Name: src
Committed By: bouyer
Date: Sun Feb 14 13:41:51 UTC 2010
Modified Files:
src/etc/etc.sparc64 [netbsd-5]: MAKEDEV.conf
src/share/man/man4/man4.sparc64 [netbsd-5]: sab.4
src/sys/arch/sparc64/dev [netbsd-5]: sab.c
Log Message:
Pull up following revision(s) (requested by jdc in ticket #1297):
etc/etc.sparc64/MAKEDEV.conf: revision 1.14
sys/arch/sparc64/dev/sab.c: revision 1.43, 1.44
share/man/man4/man4.sparc64/sab.4: revision 1.4
Allow the RSC to be the console on an E250, by checking for RSC-specific
properties, and by not changing the port baud rate.
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.2.1 src/etc/etc.sparc64/MAKEDEV.conf
cvs rdiff -u -r1.3 -r1.3.4.1 src/share/man/man4/man4.sparc64/sab.4
cvs rdiff -u -r1.42 -r1.42.6.1 src/sys/arch/sparc64/dev/sab.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/etc/etc.sparc64/MAKEDEV.conf
diff -u src/etc/etc.sparc64/MAKEDEV.conf:1.13 src/etc/etc.sparc64/MAKEDEV.conf:1.13.2.1
--- src/etc/etc.sparc64/MAKEDEV.conf:1.13 Sat Sep 13 11:46:18 2008
+++ src/etc/etc.sparc64/MAKEDEV.conf Sun Feb 14 13:41:50 2010
@@ -1,7 +1,8 @@
-# $NetBSD: MAKEDEV.conf,v 1.13 2008/09/13 11:46:18 tsutsui Exp $
+# $NetBSD: MAKEDEV.conf,v 1.13.2.1 2010/02/14 13:41:50 bouyer Exp $
all_md)
- makedev std_sparc64 ttya ttyb ttyc ttyd ttyC00 ttyC01 ttyh0 ttyh1
+ makedev std_sparc64 ttya ttyb ttyc ttyd ttyC00 ttyC01
+ makedev ttyh0 ttyh1 ttyh2 ttyh3
makedev sd0 sd1 sd2 sd3 sd4 ss0 ch0 uk0 uk1
makedev wd0 wd1 wd2 wd3 cd0 st0 st1 fd0
makedev audio
Index: src/share/man/man4/man4.sparc64/sab.4
diff -u src/share/man/man4/man4.sparc64/sab.4:1.3 src/share/man/man4/man4.sparc64/sab.4:1.3.4.1
--- src/share/man/man4/man4.sparc64/sab.4:1.3 Wed Apr 30 13:10:56 2008
+++ src/share/man/man4/man4.sparc64/sab.4 Sun Feb 14 13:41:50 2010
@@ -1,4 +1,4 @@
-.\" $NetBSD: sab.4,v 1.3 2008/04/30 13:10:56 martin Exp $
+.\" $NetBSD: sab.4,v 1.3.4.1 2010/02/14 13:41:50 bouyer Exp $
.\"
.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -24,7 +24,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd October 29, 2003
+.Dd January 18, 2010
.Dt SAB 4 sparc64
.Os
.Sh NAME
@@ -45,16 +45,24 @@
.Tn Infineon
(previously
.Tn Siemens )
-82532 serial communications interface found in Sun Ultra 5/10
-workstations.
+82532 serial communications interface found in many
+.Tn Sun Ultra
+workstations and servers.
.Pp
Input and output speeds for each line may be set to any baud rate in the
-following list: 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400,
-4800, 9600, 19200, 38400, 57600, 76800, 115200, 153600, 230400, 307200,
+following list: 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400,
+4800, 9600, 19200, 38400, 57600, 76800, 115200, 153600, 230400, 307200,
460800, 614400, 921600.
+.Sh NOTES
+The speed cannot be changed on the ports connected the
+.Tn Remote System Control
+(RSC) on a
+.Tn Sun Enterprise[tm] 250 Server
+(ttyh2 and ttyh3).
+These ports are fixed at 115200 baud.
.Sh FILES
.Bl -tag -width XdevXttyh0X
-.It Pa /dev/ttyh[01]
+.It Pa /dev/ttyh[0123]
serial ports
.El
.Sh DIAGNOSTICS
Index: src/sys/arch/sparc64/dev/sab.c
diff -u src/sys/arch/sparc64/dev/sab.c:1.42 src/sys/arch/sparc64/dev/sab.c:1.42.6.1
--- src/sys/arch/sparc64/dev/sab.c:1.42 Wed Jun 11 18:52:32 2008
+++ src/sys/arch/sparc64/dev/sab.c Sun Feb 14 13:41:50 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: sab.c,v 1.42 2008/06/11 18:52:32 cegger Exp $ */
+/* $NetBSD: sab.c,v 1.42.6.1 2010/02/14 13:41:50 bouyer 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.42.6.1 2010/02/14 13:41:50 bouyer 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;
@@ -442,7 +443,10 @@
}
t.c_ispeed= 0;
- t.c_ospeed = 9600;
+ if (sc->sc_flags & SABTTYF_IS_RSC)
+ 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);
@@ -1032,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);
@@ -1299,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