Module Name: src
Committed By: kiyohara
Date: Thu Sep 23 06:54:46 UTC 2010
Modified Files:
src/sys/arch/evbarm/gumstix: gumstix_machdep.c
Log Message:
If GUMSTIX_NETBSD_ARGS_CONSOLE is defined, argument 'console=ttyS0,<speed>'
that u-boot passes Linux will be interpreted.
To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/evbarm/gumstix/gumstix_machdep.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/evbarm/gumstix/gumstix_machdep.c
diff -u src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.32 src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.33
--- src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.32 Mon Aug 30 05:37:30 2010
+++ src/sys/arch/evbarm/gumstix/gumstix_machdep.c Thu Sep 23 06:54:46 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: gumstix_machdep.c,v 1.32 2010/08/30 05:37:30 kiyohara Exp $ */
+/* $NetBSD: gumstix_machdep.c,v 1.33 2010/09/23 06:54:46 kiyohara Exp $ */
/*
* Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation.
* All rights reserved.
@@ -1203,6 +1203,17 @@
#if NCOM > 0
+#ifdef GUMSTIX_NETBSD_ARGS_CONSOLE
+ /* Maybe passed Linux's bootargs 'console=ttyS?,<speed>...' */
+ if (strncmp(console, "ttyS", 4) == 0 && console[5] == ',') {
+ int i;
+
+ comcnspeed = 0;
+ for (i = 6; i < strlen(console) && isdigit(console[i]); i++)
+ comcnspeed = comcnspeed * 10 + (console[i] - '0');
+ }
+#endif
+
#if defined(GUMSTIX)
#ifdef FFUARTCONSOLE
@@ -1212,7 +1223,8 @@
} else
#endif
#if defined(GUMSTIX_NETBSD_ARGS_CONSOLE)
- if (console[0] == '\0' || strcasecmp(console, "ffuart") == 0)
+ if (console[0] == '\0' || strcasecmp(console, "ffuart") == 0 ||
+ strncmp(console, "ttyS0,", 6) == 0)
#endif
{
int rv;