summaryrefslogtreecommitdiff
path: root/src/mainboard/google/zork/bootblock.c
blob: 559ca04d3c9a68563aa46486c2f5d1513c561c3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* SPDX-License-Identifier: GPL-2.0-only */

#include <bootblock_common.h>
#include <baseboard/variants.h>
#include <acpi/acpi.h>

void bootblock_mainboard_early_init(void)
{
	size_t num_gpios;
	const struct soc_amd_gpio *gpios;

	/*
	 * The GPIOs below would normally be programmed in verstage, but
	 * if we're not using PSP verstage, need to set them up here instead.
	 */
	if (!CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)) {
		gpios = variant_early_gpio_table(&num_gpios);
		gpio_configure_pads(gpios, num_gpios);

		gpios = variant_tpm_gpio_table(&num_gpios);
		gpio_configure_pads(gpios, num_gpios);

	}

	gpios = variant_bootblock_gpio_table(&num_gpios, acpi_get_sleep_type());
	gpio_configure_pads(gpios, num_gpios);

	baseboard_pcie_gpio_configure();
}