Module Name: src
Committed By: simonb
Date: Tue Aug 11 12:38:24 UTC 2009
Modified Files:
src/sys/arch/sbmips/sbmips: console.c
Log Message:
Allow console speed to be overriden with "options CONSPEED=xxx".
Default to 115200 (original hard-coded value).
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sbmips/sbmips/console.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sbmips/sbmips/console.c
diff -u src/sys/arch/sbmips/sbmips/console.c:1.5 src/sys/arch/sbmips/sbmips/console.c:1.6
--- src/sys/arch/sbmips/sbmips/console.c:1.5 Sun Dec 11 12:18:51 2005
+++ src/sys/arch/sbmips/sbmips/console.c Tue Aug 11 12:38:24 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: console.c,v 1.5 2005/12/11 12:18:51 christos Exp $ */
+/* $NetBSD: console.c,v 1.6 2009/08/11 12:38:24 simonb Exp $ */
/*
* Copyright 2000, 2001
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.5 2005/12/11 12:18:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.6 2009/08/11 12:38:24 simonb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -47,17 +47,20 @@
#include <mips/sibyte/dev/sbscnvar.h>
#define CONMODE ((TTYDEF_CFLAG & ~(CSIZE | CSTOPB | PARENB)) | CS8) /* 8N1 */
+#ifndef CONSPEED
+#define CONSPEED 115200
+#endif
void
consinit(void)
{
#ifdef JTAGCONSOLE
- sbjcn_cnattach(0x1001FF80, 0, 115200, CONMODE);
+ sbjcn_cnattach(0x1001FF80, 0, CONSPEED, CONMODE);
#else
- sbscn_cnattach(0x10060100, 0, 115200, CONMODE);
+ sbscn_cnattach(0x10060100, 0, CONSPEED, CONMODE);
#ifdef KGDB
- sbscn_kgdb_attach(0x10060100, 1, 115200, CONMODE);
+ sbscn_kgdb_attach(0x10060100, 1, CONSPEED, CONMODE);
#endif
#endif
}