summaryrefslogtreecommitdiff
path: root/src/mainboard/siemens/chili/variants
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2020-11-24 19:48:36 +0000
committerMichael Niewöhner <foss@mniewoehner.de>2020-11-30 23:08:50 +0000
commit617150e0ff5b84b531e88e89d5ab7d3f93636434 (patch)
tree4fb54532ca85d41015423dd5f602546e148c9281 /src/mainboard/siemens/chili/variants
parente8774933d39fab2cb4eb443f69a583d1fa5bd238 (diff)
mb/siemens/chili: Configure GPIOs in gpio.c
Get rid of variant_gpio_table() and configure GPIOs in gpio.c instead of passing data around. Change-Id: Ib158d6bdbcbceb3c1dc4f47fc7c3e098b9c7e5c4 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47974 Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/siemens/chili/variants')
-rw-r--r--src/mainboard/siemens/chili/variants/base/gpio.c7
-rw-r--r--src/mainboard/siemens/chili/variants/chili/gpio.c7
2 files changed, 6 insertions, 8 deletions
diff --git a/src/mainboard/siemens/chili/variants/base/gpio.c b/src/mainboard/siemens/chili/variants/base/gpio.c
index 61ec27dfa6..9d459ccc2a 100644
--- a/src/mainboard/siemens/chili/variants/base/gpio.c
+++ b/src/mainboard/siemens/chili/variants/base/gpio.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/gpio.h>
-#include <variant.h>
+#include <mainboard/gpio.h>
static const struct pad_config gpio_table[] = {
/* GPP_A14 GPIO */ PAD_NC(GPP_A14, NONE),
@@ -122,8 +122,7 @@ static const struct pad_config gpio_table[] = {
/* GPP_J11 A4WP_PRESENT */ PAD_CFG_NF(GPP_J11, NONE, DEEP, NF1),
};
-const struct pad_config *variant_gpio_table(size_t *num)
+void mainboard_configure_gpios(void)
{
- *num = ARRAY_SIZE(gpio_table);
- return gpio_table;
+ gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
}
diff --git a/src/mainboard/siemens/chili/variants/chili/gpio.c b/src/mainboard/siemens/chili/variants/chili/gpio.c
index d7e5ab02b2..a259547771 100644
--- a/src/mainboard/siemens/chili/variants/chili/gpio.c
+++ b/src/mainboard/siemens/chili/variants/chili/gpio.c
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <soc/gpio.h>
-#include <variant.h>
+#include <mainboard/gpio.h>
static const struct pad_config gpio_table[] = {
/* GPP_A14 GPIO 0x0000002644000300 */ PAD_NC(GPP_A14, NONE),
@@ -121,8 +121,7 @@ static const struct pad_config gpio_table[] = {
/* GPP_J11 A4WP_PRESENT 0x0000003944000700 */ PAD_CFG_NF(GPP_J11, NONE, DEEP, NF1),
};
-const struct pad_config *variant_gpio_table(size_t *num)
+void mainboard_configure_gpios(void)
{
- *num = ARRAY_SIZE(gpio_table);
- return gpio_table;
+ gpio_configure_pads(gpio_table, ARRAY_SIZE(gpio_table));
}