libpayload: If there's no IO space, complain if the serial claims to use it
Change-Id: I36c750d520ff034c9ca9b9af46bd99bd49af7355 Signed-off-by: Gabe Black <gabeblack@google.com> Reviewed-on: http://review.coreboot.org/2659 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
parent
1c1171208f
commit
d8d4d113f0
|
@ -97,11 +97,19 @@ void serial_init(void)
|
|||
serial_is_mem_mapped =
|
||||
(lib_sysinfo.serial->type == CB_SERIAL_TYPE_MEMORY_MAPPED);
|
||||
|
||||
if (!serial_is_mem_mapped && (inb(IOBASE + 0x05) == 0xFF) &&
|
||||
(inb(IOBASE + 0x06) == 0xFF)) {
|
||||
if (!serial_is_mem_mapped) {
|
||||
#ifdef CONFIG_IO_ADDRESS_SPACE
|
||||
if ((inb(IOBASE + 0x05) == 0xFF) &&
|
||||
(inb(IOBASE + 0x06) == 0xFF)) {
|
||||
return;
|
||||
}
|
||||
#else
|
||||
printf("IO space mapped serial not supported.");
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
serial_hardware_is_present = 1;
|
||||
|
||||
#ifdef CONFIG_SERIAL_SET_SPEED
|
||||
|
|
Loading…
Reference in New Issue