Mathew King | 7a8108d | 2021-03-11 08:24:40 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
| 2 | |
Mathew King | d490afb | 2021-03-11 08:25:52 -0700 | [diff] [blame] | 3 | #include <amdblocks/gpio_banks.h> |
| 4 | #include <baseboard/variants.h> |
Mathew King | 7a8108d | 2021-03-11 08:24:40 -0700 | [diff] [blame] | 5 | #include <security/vboot/vboot_common.h> |
| 6 | |
Mathew King | d490afb | 2021-03-11 08:25:52 -0700 | [diff] [blame] | 7 | static void setup_gpio(void) |
| 8 | { |
| 9 | const struct soc_amd_gpio *gpios; |
| 10 | size_t num_gpios; |
| 11 | |
| 12 | if (CONFIG(VBOOT_STARTS_BEFORE_BOOTBLOCK)) { |
| 13 | gpios = variant_early_gpio_table(&num_gpios); |
| 14 | program_gpios(gpios, num_gpios); |
| 15 | } |
| 16 | } |
| 17 | |
Mathew King | 7a8108d | 2021-03-11 08:24:40 -0700 | [diff] [blame] | 18 | void verstage_mainboard_early_init(void) |
| 19 | { |
Mathew King | d490afb | 2021-03-11 08:25:52 -0700 | [diff] [blame] | 20 | setup_gpio(); |
Mathew King | 7a8108d | 2021-03-11 08:24:40 -0700 | [diff] [blame] | 21 | } |