diff options
author | Paul Burton <paul.burton@imgtec.com> | 2016-08-26 17:17:35 +0300 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2016-10-05 02:31:20 +0300 |
commit | c11e3b48dbc367e38dfaea6e8a61d3b39f476685 (patch) | |
tree | 206ec739e07875e5cb77a71fe2fed8b9a7cbcba9 /arch/mips/mti-sead3/sead3-init.c | |
parent | b6d5e47e67292542a41c3fe367bacb364eb4e601 (diff) | |
download | linux-c11e3b48dbc367e38dfaea6e8a61d3b39f476685.tar.xz |
MIPS: SEAD3: Probe UARTs using DT
Probe the UARTs on SEAD3 boards using device tree rather than platform
code, in order to reduce the amount of the latter. This requires that
CONFIG_SERIAL_OF_PLATFORM be enabled, so enable it in sead3_defconfig.
The SEAD3 DT shim code is extended to read bootloader environment
variables to determine the appropriate UART & mode for kernel console
output & set the stdout-path property of the chosen node accordingly.
In contrast to the old platform code, which appears to have only ever
set "console=ttyS0,38400n8r" with the code in console_config never
having an effect, this will honor the "yamontty" environment variable to
select between the 2 UARTs on the board and then check the "modetty0" or
"modetty1" variable as appropriate to determine the UART configuration.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14048/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mti-sead3/sead3-init.c')
-rw-r--r-- | arch/mips/mti-sead3/sead3-init.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/arch/mips/mti-sead3/sead3-init.c b/arch/mips/mti-sead3/sead3-init.c index 3572ea30173e..e81f5b7657f0 100644 --- a/arch/mips/mti-sead3/sead3-init.c +++ b/arch/mips/mti-sead3/sead3-init.c @@ -17,47 +17,6 @@ extern char except_vec_nmi; extern char except_vec_ejtag_debug; -#ifdef CONFIG_SERIAL_8250_CONSOLE -static void __init console_config(void) -{ - char console_string[40]; - int baud = 0; - char parity = '\0', bits = '\0', flow = '\0'; - char *s; - - if ((strstr(fw_getcmdline(), "console=")) == NULL) { - s = fw_getenv("modetty0"); - if (s) { - while (*s >= '0' && *s <= '9') - baud = baud*10 + *s++ - '0'; - if (*s == ',') - s++; - if (*s) - parity = *s++; - if (*s == ',') - s++; - if (*s) - bits = *s++; - if (*s == ',') - s++; - if (*s == 'h') - flow = 'r'; - } - if (baud == 0) - baud = 38400; - if (parity != 'n' && parity != 'o' && parity != 'e') - parity = 'n'; - if (bits != '7' && bits != '8') - bits = '8'; - if (flow == '\0') - flow = 'r'; - sprintf(console_string, " console=ttyS0,%d%c%c%c", baud, - parity, bits, flow); - strcat(fw_getcmdline(), console_string); - } -} -#endif - static void __init mips_nmi_setup(void) { void *base; @@ -140,11 +99,6 @@ void __init prom_init(void) else if ((strstr(fw_getcmdline(), "console=ttyS1")) != NULL) fw_init_early_console(1); #endif -#ifdef CONFIG_SERIAL_8250_CONSOLE - if ((strstr(fw_getcmdline(), "console=")) == NULL) - strcat(fw_getcmdline(), " console=ttyS0,38400n8r"); - console_config(); -#endif } void __init prom_free_prom_memory(void) |