From 4f7cf3a4466df8f84ef352d2d496a2e7a075ac13 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 30 Jul 2015 16:47:18 -0500 Subject: uart8250mem: provide uart_fill_lb() There was no implementation for uart_fill_lb() in the 8250mem driver. Rectify this so when 8250MEM and CONSOLE_SERIAL are employed then the build doesn't fail. BUG=chrome-os-partner:43419 BRANCH=None TEST=Built with glados using 8250MEM Original-Change-Id: I35d6b15e47989c1854ddcee9c6d46711edffaf3e Original-Signed-off-by: Aaron Durbin Original-Reviewed-on: https://chromium-review.googlesource.com/289899 Original-Reviewed-by: Patrick Georgi Change-Id: I972b069a4def666f509268816de91ed6c0f655d9 Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/11169 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/drivers/uart/uart8250mem.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/drivers/uart/uart8250mem.c b/src/drivers/uart/uart8250mem.c index d276fd0410..fb7327e238 100644 --- a/src/drivers/uart/uart8250mem.c +++ b/src/drivers/uart/uart8250mem.c @@ -19,9 +19,11 @@ */ #include +#include #include #include #include +#include #include #include "uart8250reg.h" @@ -146,3 +148,20 @@ void uart_tx_flush(int idx) return; uart8250_mem_tx_flush(base); } + +#if ENV_RAMSTAGE +void uart_fill_lb(void *data) +{ + struct lb_serial serial; + serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED; + serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE); + serial.baud = default_baudrate(); + if (IS_ENABLED(CONFIG_DRIVERS_UART_8250MEM_32)) + serial.regwidth = sizeof(uint32_t); + else + serial.regwidth = sizeof(uint8_t); + lb_add_serial(&serial, data); + + lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data); +} +#endif -- cgit v1.2.3