aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/prodrive/hermes/bootblock.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-11-24 15:26:10 +0100
committerPatrick Georgi <pgeorgi@google.com>2020-11-30 08:02:09 +0000
commitfe17a8cd6a2e734bd1bb8be45a41b3e1d46ab904 (patch)
treea9f0b0b8504328490e61fad4100ac0654bab4e0f /src/mainboard/prodrive/hermes/bootblock.c
parent329ebb340b157bc64065473a960a97eae0e30914 (diff)
mb/prodrive/hermes: Encapsulate GPIO setup
Having variants' gpio.c call the `gpio_configure_pads` function results in an API that does not need to pass data around, which is much simpler. Change-Id: I1064dc6258561bcf83f0e249d65b823368cf0d31 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47958 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
Diffstat (limited to 'src/mainboard/prodrive/hermes/bootblock.c')
-rw-r--r--src/mainboard/prodrive/hermes/bootblock.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/mainboard/prodrive/hermes/bootblock.c b/src/mainboard/prodrive/hermes/bootblock.c
index 1426a552d4..40fd0b48a3 100644
--- a/src/mainboard/prodrive/hermes/bootblock.c
+++ b/src/mainboard/prodrive/hermes/bootblock.c
@@ -6,20 +6,12 @@
#include <variant/gpio.h>
#include "gpio.h"
-static void early_config_gpio(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. */
- size_t num = 0;
- const struct pad_config *early_gpio_table = get_early_gpio_table(&num);
-
- gpio_configure_pads(early_gpio_table, num);
-}
-
void bootblock_mainboard_early_init(void)
{
- early_config_gpio();
+ /* 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)