aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/prodrive/hermes/variants/baseboard/gpio.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/variants/baseboard/gpio.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/variants/baseboard/gpio.c')
-rw-r--r--src/mainboard/prodrive/hermes/variants/baseboard/gpio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mainboard/prodrive/hermes/variants/baseboard/gpio.c b/src/mainboard/prodrive/hermes/variants/baseboard/gpio.c
index 8735a9ef4b..096dc35785 100644
--- a/src/mainboard/prodrive/hermes/variants/baseboard/gpio.c
+++ b/src/mainboard/prodrive/hermes/variants/baseboard/gpio.c
@@ -2,6 +2,8 @@
#include "include/variant/gpio.h"
#include <commonlib/helpers.h>
+#include <soc/gpio.h>
+#include <intelblocks/gpio_defs.h>
/* Pad configuration in ramstage */
static const struct pad_config gpio_table[] = {
@@ -389,14 +391,12 @@ const struct pad_config early_gpio_table[] = {
PAD_CFG_GPO(GPP_H5, 0, DEEP), /* PCH_HBLED_n */
};
-const struct pad_config *get_gpio_table(size_t *num)
+void program_gpio_pads(void)
{
- *num = ARRAY_SIZE(gpio_table);
- return gpio_table;
+ gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
}
-const struct pad_config *get_early_gpio_table(size_t *num)
+void program_early_gpio_pads(void)
{
- *num = ARRAY_SIZE(early_gpio_table);
- return early_gpio_table;
+ gpio_configure_pads(early_gpio_table, ARRAY_SIZE(early_gpio_table));
}