MIPS: SEAD3: Probe UARTs using DT
authorPaul Burton <paul.burton@imgtec.com>
Fri, 26 Aug 2016 14:17:35 +0000 (15:17 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 4 Oct 2016 23:31:20 +0000 (01:31 +0200)
commitc11e3b48dbc367e38dfaea6e8a61d3b39f476685
tree206ec739e07875e5cb77a71fe2fed8b9a7cbcba9
parentb6d5e47e67292542a41c3fe367bacb364eb4e601
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>
arch/mips/boot/dts/mti/sead3.dts
arch/mips/configs/sead3_defconfig
arch/mips/include/asm/mips-boards/sead3int.h
arch/mips/mti-sead3/sead3-dtshim.c
arch/mips/mti-sead3/sead3-init.c
arch/mips/mti-sead3/sead3-platform.c