]> git.baikalelectronics.ru Git - kernel.git/commit
serial: sprd: check console via stdout-path in addition
authorChunyan Zhang <chunyan.zhang@unisoc.com>
Mon, 16 Mar 2020 10:19:28 +0000 (18:19 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Mar 2020 14:20:41 +0000 (15:20 +0100)
commit02ec12b4299bf2d551f9f14cf45e50337b5aa3f7
treeee8d5e2afcca8b794447606cea9bdd8301245995
parent9feaeb555762973cadcc8c3128d3cb08cc4a2f6e
serial: sprd: check console via stdout-path in addition

The SPRD serial driver need to know which serial port would be used as
console in an early period during initialization, the purpose is to
keep the console port alive as possible even if there's some error
caused by no clock configured under serial devicetree nodes. But with
the patch [1], the console port couldn't be identified if missing
console command line.

So this patch adds using another interface to do check by reading
stdout-path.

[1] https://lore.kernel.org/lkml/20190826072929.7696-4-zhang.lyra@gmail.com/

Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>
Link: https://lore.kernel.org/r/20200316101930.9962-2-zhang.lyra@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sprd_serial.c