summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/drivers')
-rw-r--r--payloads/libpayload/drivers/serial.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/serial.c b/payloads/libpayload/drivers/serial.c
index 92782a0ee6..a4c1b1a2ab 100644
--- a/payloads/libpayload/drivers/serial.c
+++ b/payloads/libpayload/drivers/serial.c
@@ -117,6 +117,15 @@ void serial_init(void)
#ifdef CONFIG_LP_SERIAL_SET_SPEED
serial_hardware_init(CONFIG_LP_SERIAL_BAUD_RATE, 8, 0, 1);
#endif
+}
+
+void serial_console_init(void)
+{
+ if (!lib_sysinfo.serial)
+ return;
+
+ serial_init();
+
console_add_input_driver(&consin);
console_add_output_driver(&consout);
serial_hardware_is_present = 1;