ARMV7: create a correct LB_SERIAL table entry

If CONFIG_CONSOLE_SERIAL is set, and we can call the standard function
and get a non-zero uart address, then we create an lb table entry.

The code was mostly right, just needed a tweak.

Change-Id: I5b36c7b4e580a23319b7ba92cc8ad61592b1757a
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: http://review.coreboot.org/2466
Tested-by: build bot (Jenkins)
Reviewed-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
Ronald G. Minnich 2013-02-20 14:13:01 -08:00
parent a8ae1c66f9
commit c8fadd9f46
3 changed files with 6 additions and 12 deletions

View File

@ -110,18 +110,7 @@ static struct lb_memory *lb_memory(struct lb_header *header)
static struct lb_serial *lb_serial(struct lb_header *header)
{
#if CONFIG_CONSOLE_SERIAL8250
struct lb_record *rec;
struct lb_serial *serial;
rec = lb_new_record(header);
serial = (struct lb_serial *)rec;
serial->tag = LB_TAG_SERIAL;
serial->size = sizeof(*serial);
serial->type = LB_SERIAL_TYPE_IO_MAPPED;
serial->baseaddr = CONFIG_TTYS0_BASE;
serial->baud = CONFIG_TTYS0_BAUD;
return serial;
#elif CONFIG_CONSOLE_SERIAL8250MEM
#if CONFIG_CONSOLE_SERIAL
if (uartmem_getbaseaddr()) {
struct lb_record *rec;
struct lb_serial *serial;

View File

@ -25,6 +25,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select ARCH_ARMV7
select CPU_ARMLTD_CORTEX_A9
select HAVE_UART_MEMORY_MAPPED
select DEFAULT_EARLY_CONSOLE
select HAVE_UART_SPECIAL
select BOARD_ROMSIZE_KB_4096

View File

@ -39,6 +39,10 @@ static const struct console_driver pl011_uart_console __console = {
.tx_flush = pl011_uart_tx_flush,
};
uint32_t uartmem_getbaseaddr(void)
{
return VEXPRESS_UART0_IO_ADDRESS;
}
#else
void uart_init(void)
{