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>
This commit is contained in:
committed by
Patrick Georgi
parent
c2610a4a18
commit
bbf6f3d384
@ -10,6 +10,7 @@
|
||||
#include <types.h>
|
||||
#include <console/uart.h>
|
||||
#include <arch/io.h>
|
||||
#include <boot/coreboot_tables.h>
|
||||
|
||||
#include <cpu/allwinner/a10/uart.h>
|
||||
|
||||
@ -43,6 +44,11 @@ unsigned int uart_platform_refclk(void)
|
||||
return 24000000;
|
||||
}
|
||||
|
||||
unsigned int uart_platform_base(int idx)
|
||||
{
|
||||
return (unsigned int)get_console_uart_base_addr();
|
||||
}
|
||||
|
||||
void uart_init(void)
|
||||
{
|
||||
void *uart_base = get_console_uart_base_addr();
|
||||
@ -63,14 +69,19 @@ void uart_tx_byte(unsigned char data)
|
||||
a10_uart_tx_blocking(get_console_uart_base_addr(), data);
|
||||
}
|
||||
|
||||
#if !defined(__PRE_RAM__)
|
||||
uint32_t uartmem_getbaseaddr(void)
|
||||
{
|
||||
return (uint32_t) get_console_uart_base_addr();
|
||||
}
|
||||
#endif
|
||||
|
||||
void uart_tx_flush(void)
|
||||
{
|
||||
}
|
||||
|
||||
#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
|
||||
|
Reference in New Issue
Block a user