of: Enable console on serial ports specified by /chosen/stdout-path
authorGrant Likely <grant.likely@linaro.org>
Fri, 28 Mar 2014 01:29:46 +0000 (18:29 -0700)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 5 Dec 2014 04:32:07 +0000 (13:32 +0900)
commitbb5c0c7d2d8bf8d274655e1b8e794782020c4ab7
treec85a2bc47634a3628d351f8804426e2f232271c8
parent34a36a73e4426c611b36f845fb3654ad8d8ea2b1
of: Enable console on serial ports specified by /chosen/stdout-path

If the devicetree specifies a serial port as a stdout device, then the
kernel can use it as the default console if nothing else was selected on
the command line. For any serial port that uses the uart_add_one_port()
feature, the uart_add_one_port() has all the information needed to
automatically enable the console device, which is what this patch does.

With this change applied, a device tree platform can be booted without
any console= parameters on the command line and the kernel will still be
able to determine its console.

Tested on QEMU Versatile model and i.MX

Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Sascha Hauer <s.hauer@pengutronix.de>
(cherry picked from commit a208ffd251d08ed7ba6bdf3ae1e423373fb12d3d)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/tty/serial/serial_core.c