If the memory mapped UART isn't present, leave it out of the cb tables.
This way u-boot won't try to use a UART that isn't plugged in. Change-Id: I9a3a0d074dd03add8afbd4dad836c4c6a05abe6f Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: http://review.coreboot.org/729 Reviewed-by: Patrick Georgi <patrick@georgi-clan.de> Tested-by: build bot (Jenkins)
This commit is contained in:
committed by
Patrick Georgi
parent
d7a75ece85
commit
32829caf40
@@ -117,16 +117,20 @@ static struct lb_serial *lb_serial(struct lb_header *header)
|
|||||||
serial->baud = CONFIG_TTYS0_BAUD;
|
serial->baud = CONFIG_TTYS0_BAUD;
|
||||||
return serial;
|
return serial;
|
||||||
#elif CONFIG_CONSOLE_SERIAL8250MEM
|
#elif CONFIG_CONSOLE_SERIAL8250MEM
|
||||||
struct lb_record *rec;
|
if (uartmem_getbaseaddr()) {
|
||||||
struct lb_serial *serial;
|
struct lb_record *rec;
|
||||||
rec = lb_new_record(header);
|
struct lb_serial *serial;
|
||||||
serial = (struct lb_serial *)rec;
|
rec = lb_new_record(header);
|
||||||
serial->tag = LB_TAG_SERIAL;
|
serial = (struct lb_serial *)rec;
|
||||||
serial->size = sizeof(*serial);
|
serial->tag = LB_TAG_SERIAL;
|
||||||
serial->type = LB_SERIAL_TYPE_MEMORY_MAPPED;
|
serial->size = sizeof(*serial);
|
||||||
serial->baseaddr = uartmem_getbaseaddr();
|
serial->type = LB_SERIAL_TYPE_MEMORY_MAPPED;
|
||||||
serial->baud = CONFIG_TTYS0_BAUD;
|
serial->baseaddr = uartmem_getbaseaddr();
|
||||||
return serial;
|
serial->baud = CONFIG_TTYS0_BAUD;
|
||||||
|
return serial;
|
||||||
|
} else {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user