Commit e9feeb207e55373f718b33e0d6cb0c2f8b58f3c1
1 parent
c5033d7803
Exists in
master
and in
7 other branches
[MIPS] IP22: Fix serial console detection
From: Kaj-Michael Lang <milang@tal.org> In ip22-setup.c the checks for serial/graphics console logic does not check if ARCS console=g but the machine is using serial console, as it does if no keyboard is attached. This patch adds a check if ConsoleOut is serial. There might also be support for other graphics than Newport soon... Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Showing 1 changed file with 8 additions and 2 deletions Side-by-side Diff
arch/mips/sgi-ip22/ip22-setup.c
... | ... | @@ -56,6 +56,7 @@ |
56 | 56 | void __init plat_setup(void) |
57 | 57 | { |
58 | 58 | char *ctype; |
59 | + char *cserial; | |
59 | 60 | |
60 | 61 | board_be_init = ip22_be_init; |
61 | 62 | ip22_time_init(); |
62 | 63 | |
... | ... | @@ -81,9 +82,14 @@ |
81 | 82 | /* ARCS console environment variable is set to "g?" for |
82 | 83 | * graphics console, it is set to "d" for the first serial |
83 | 84 | * line and "d2" for the second serial line. |
85 | + * | |
86 | + * Need to check if the case is 'g' but no keyboard: | |
87 | + * (ConsoleIn/Out = serial) | |
84 | 88 | */ |
85 | 89 | ctype = ArcGetEnvironmentVariable("console"); |
86 | - if (ctype && *ctype == 'd') { | |
90 | + cserial = ArcGetEnvironmentVariable("ConsoleOut"); | |
91 | + | |
92 | + if ((ctype && *ctype == 'd') || (cserial && *cserial == 's')) { | |
87 | 93 | static char options[8]; |
88 | 94 | char *baud = ArcGetEnvironmentVariable("dbaud"); |
89 | 95 | if (baud) |
... | ... | @@ -91,7 +97,7 @@ |
91 | 97 | add_preferred_console("ttyS", *(ctype + 1) == '2' ? 1 : 0, |
92 | 98 | baud ? options : NULL); |
93 | 99 | } else if (!ctype || *ctype != 'g') { |
94 | - /* Use ARC if we don't want serial ('d') or Newport ('g'). */ | |
100 | + /* Use ARC if we don't want serial ('d') or graphics ('g'). */ | |
95 | 101 | prom_flags |= PROM_FLAG_USE_AS_CONSOLE; |
96 | 102 | add_preferred_console("arc", 0, NULL); |
97 | 103 | } |