Thread (1 message) 1 message, 1 author, 2012-11-21
DORMANTno replies

[PATCH 3/4] serial: i.MX: evaluate linux,stdout-path property

From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2012-11-21 15:57:07
Also in: linux-arm-kernel, linux-serial
Subsystem: the rest, tty layer and serial drivers · Maintainers: Linus Torvalds, Greg Kroah-Hartman, Jiri Slaby

From: Sascha Hauer <redacted>

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 <redacted>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj-sclMFOaUSTBWk0Htik3J/w@public.gmane.org>
Cc: linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Greg Kroah-Hartman <redacted>
Cc: kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Cc: Alan Cox <alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Cc: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Cc: Nicolas Ferre <redacted>
---
 drivers/tty/serial/imx.c |    4 ++++
 1 file changed, 4 insertions(+)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 07a8ca1..28a3193 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1398,6 +1398,7 @@ static int serial_imx_probe_dt(struct imx_port *sport,
 	struct device_node *np = pdev->dev.of_node;
 	const struct of_device_id *of_id =
 			of_match_device(imx_uart_dt_ids, &pdev->dev);
+	char *option = NULL;
 	int ret;
 
 	if (!np)
@@ -1419,6 +1420,9 @@ static int serial_imx_probe_dt(struct imx_port *sport,
 
 	sport->devdata = of_id->data;
 
+	if (of_device_is_stdout_path(np, &option))
+		add_preferred_console(imx_reg.cons->name, sport->port.line, option);
+
 	return 0;
 }
 #else
-- 
1.7.10.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help