summaryrefslogtreecommitdiff
path: root/src/mainboard/ocp/deltalake/uartio_vpd.c
blob: 4c2d876c7d5c2c72f18b3e72129752c3de6d0387 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* SPDX-License-Identifier: GPL-2.0-only */

#include <drivers/vpd/vpd.h>
#include <console/uart.h>

#include "vpd.h"

unsigned int get_uart_for_console(void)
{
	int val_int = COREBOOT_UART_IO_DEFAULT;

	if (vpd_get_int(COREBOOT_UART_IO, VPD_RW_THEN_RO, (int *const) &val_int)) {
		if (val_int > 3)
			val_int = COREBOOT_UART_IO_DEFAULT;
	}
	return val_int;
}