Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm/gumstix If GUMSTIX_NETBSD_ARGS_CONSOLE is de...



details:   https://anonhg.NetBSD.org/src/rev/74269832d426
branches:  trunk
changeset: 757781:74269832d426
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Thu Sep 23 06:54:46 2010 +0000

description:
If GUMSTIX_NETBSD_ARGS_CONSOLE is defined, argument 'console=ttyS0,<speed>'
that u-boot passes Linux will be interpreted.

diffstat:

 sys/arch/evbarm/gumstix/gumstix_machdep.c |  16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r 54ff116aea50 -r 74269832d426 sys/arch/evbarm/gumstix/gumstix_machdep.c
--- a/sys/arch/evbarm/gumstix/gumstix_machdep.c Thu Sep 23 06:43:32 2010 +0000
+++ b/sys/arch/evbarm/gumstix/gumstix_machdep.c Thu Sep 23 06:54:46 2010 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index