Christian Walter | b646e28 | 2020-01-09 15:42:42 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <bootblock_common.h> |
| 4 | #include <console/console.h> |
| 5 | #include <soc/gpio.h> |
| 6 | #include <variant/gpio.h> |
| 7 | #include "gpio.h" |
| 8 | |
Christian Walter | b646e28 | 2020-01-09 15:42:42 +0100 | [diff] [blame] | 9 | void bootblock_mainboard_early_init(void) |
| 10 | { |
Angel Pons | fe17a8c | 2020-11-24 15:26:10 +0100 | [diff] [blame^] | 11 | /* This is a hack for FSP because it does things in MemoryInit() |
| 12 | which it shouldn't do. We have to prepare certain gpios here |
| 13 | because of the brokenness in FSP. */ |
| 14 | program_early_gpio_pads(); |
Christian Walter | b646e28 | 2020-01-09 15:42:42 +0100 | [diff] [blame] | 15 | } |
| 16 | |
| 17 | void bootblock_mainboard_init(void) |
| 18 | { |
| 19 | u8 bmc_hsi = (gpio_get(GPP_K13) << 3) | |
| 20 | (gpio_get(GPP_K12) << 2) | |
| 21 | (gpio_get(GPP_K14) << 1) | |
| 22 | (gpio_get(GPP_K16) << 0); |
| 23 | |
| 24 | printk(BIOS_INFO, "BMC HSI 0x%x\n", bmc_hsi); |
| 25 | } |