[PATCH 4/4] tty: Atmel serial: add linux,stdout-path support

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Thu Nov 22 02:57:08 EST 2012


Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
Cc: linux-serial at vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Cc: kernel at pengutronix.de
Cc: Alan Cox <alan at linux.intel.com>
Cc: Grant Likely <grant.likely at secretlab.ca>
Cc: Nicolas Ferre <nicolas.ferre at atmel.com>
---
 drivers/tty/serial/atmel_serial.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 5608b6b..f62a3c3 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -1427,6 +1427,7 @@ static struct uart_ops atmel_pops = {
 static void __devinit atmel_of_init_port(struct atmel_uart_port *atmel_port,
 					 struct device_node *np)
 {
+	char *option = NULL;
 	u32 rs485_delay[2];
 
 	/* DMA/PDC usage specification */
@@ -1453,6 +1454,10 @@ static void __devinit atmel_of_init_port(struct atmel_uart_port *atmel_port,
 
 		if (of_get_property(np, "linux,rs485-enabled-at-boot-time", NULL))
 			rs485conf->flags |= SER_RS485_ENABLED;
+	} else if (of_device_is_stdout_path(np, &option)) {
+		pr_info("add preferred console %s%d option=%s\n",
+			ATMEL_DEVICENAME, atmel_port->uart.line, option);
+		add_preferred_console(ATMEL_DEVICENAME, atmel_port->uart.line, option);
 	}
 }
 
-- 
1.7.10.4



More information about the devicetree-discuss mailing list