console uart: Fill coreboot table entries
Also fixes the reported baudrate to take get_option() into account.
Change-Id: Ieadad70b00df02a530b0ccb6fa4e1b51526089f3
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/5310
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
diff --git a/src/drivers/uart/pl011.c b/src/drivers/uart/pl011.c
index e4bfdc6..41e66fa 100644
--- a/src/drivers/uart/pl011.c
+++ b/src/drivers/uart/pl011.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/
+#include <boot/coreboot_tables.h>
#include <console/uart.h>
static void pl011_uart_tx_byte(unsigned int *uart_base, unsigned char data)
@@ -25,13 +26,6 @@
return CONFIG_CONSOLE_SERIAL_UART_ADDRESS;
}
-#if !defined(__PRE_RAM__)
-uint32_t uartmem_getbaseaddr(void)
-{
- return CONFIG_CONSOLE_SERIAL_UART_ADDRESS;
-}
-#endif
-
void uart_init(void)
{
}
@@ -50,3 +44,16 @@
{
return 0;
}
+
+#ifndef __PRE_RAM__
+void uart_fill_lb(void *data)
+{
+ struct lb_serial serial;
+ serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED;
+ serial.baseaddr = uart_platform_base(0);
+ serial.baud = default_baudrate();
+ lb_add_serial(&serial, data);
+
+ lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
+}
+#endif