serial: i.MX: evaluate linux,stdout-path property
authorSascha Hauer <s.hauer@pengutronix.de>
Mon, 5 Aug 2013 12:40:45 +0000 (14:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Aug 2013 18:23:53 +0000 (11:23 -0700)
devicetrees may have the linux,stdout-path property to specify the
console. This patch adds support to the i.MX serial driver for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c

index a5f32c7c6c66c6ef8bc889c157b8b2d2d35ba5a2..2c13155bb3bc0fda6aa3c8189da8a24ef96e1949 100644 (file)
@@ -1912,6 +1912,9 @@ static int serial_imx_probe_dt(struct imx_port *sport,
 
        sport->devdata = of_id->data;
 
+       if (of_device_is_stdout_path(np))
+               add_preferred_console(imx_reg.cons->name, sport->port.line, 0);
+
        return 0;
 }
 #else