summaryrefslogtreecommitdiff
path: root/src/mainboard/prodrive/hermes/bootblock.c
blob: 8f2687f217c7e8c5b21cf002a4e7e7ae1161da3e (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
/* SPDX-License-Identifier: GPL-2.0-only */

#include <bootblock_common.h>
#include <console/console.h>
#include <gpio.h>

#include "gpio.h"

void bootblock_mainboard_early_init(void)
{
	/* This is a hack for FSP because it does things in MemoryInit()
	   which it shouldn't do. We have to prepare certain gpios here
	   because of the brokenness in FSP. */
	program_early_gpio_pads();
}

void bootblock_mainboard_init(void)
{
	u8 bmc_hsi = (gpio_get(GPP_K13) << 3) |
		(gpio_get(GPP_K12) << 2) |
		(gpio_get(GPP_K14) << 1) |
		(gpio_get(GPP_K16) << 0);

	printk(BIOS_INFO, "BMC HSI 0x%x\n", bmc_hsi);
}