summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2015-07-30 16:47:18 -0500
committerAaron Durbin <adurbin@chromium.org>2015-08-13 16:12:30 +0200
commit4f7cf3a4466df8f84ef352d2d496a2e7a075ac13 (patch)
tree79d31dc7b6b111412c075c25f290f0dba1f858e8 /src/drivers
parent2ca12740716fd70efb50f97b41c539ece43ff66a (diff)
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 <adurbin@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/289899 Original-Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> Change-Id: I972b069a4def666f509268816de91ed6c0f655d9 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/11169 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/uart/uart8250mem.c19
1 files changed, 19 insertions, 0 deletions
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 <arch/io.h>
+#include <boot/coreboot_tables.h>
#include <console/uart.h>
#include <device/device.h>
#include <delay.h>
+#include <rules.h>
#include <stdint.h>
#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