[linux-yocto] [PATCH 12/15] serial: 8250_port: prevent console to sleep

Nilesh Bacchewar nilesh.bacchewar at intel.com
Thu Nov 17 15:06:28 PST 2016


From: Andy Shevchenko <andriy.shevchenko at linux.intel.com>

Upstream-Status: Pending.

Prevent console to sleep during start-up stage.

Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
---
 drivers/tty/serial/8250/8250_port.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 830d453..0900b56 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -2895,6 +2895,12 @@ int serial8250_console_setup(struct uart_port *port, char *options, bool probe)
 	else if (probe)
 		baud = probe_baud(port);
 
+	/* At early stage device is not created yet, we can't do PM */
+	if (port->dev) {
+		/* Prevent all kind of power management of this port */
+		pm_runtime_get_noresume(port->dev);
+	}
+
 	return uart_set_options(port, port->cons, baud, parity, bits, flow);
 }
 
-- 
1.9.1



More information about the linux-yocto mailing list