summaryrefslogtreecommitdiff
path: root/src/mainboard/google/poppy
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2019-10-23 09:52:32 -0700
committerPatrick Georgi <pgeorgi@google.com>2019-10-25 06:55:05 +0000
commitfb9f320d810b82790ecbaeeb8671c723f433e904 (patch)
tree838d7ce68dddefa6227be550f24593cfbc12cc9e /src/mainboard/google/poppy
parent80212aa1040577cf052bbf9f12abe079e36e4cf8 (diff)
downloadcoreboot-fb9f320d810b82790ecbaeeb8671c723f433e904.tar.xz
mb/google/{poppy,eve,fizz}: Configure GPIOs in mainboard chip->init()
mainboard_silicon_init_params() is supposed to be used for only overriding any FSP params as per mainboard configuration. GPIOs should be configured by mainboard as part of its chip init(). This ensures proper ordering w.r.t. any common operations that the SoC code might want to perform e.g. snapshot ITSS polarities. This change moves the configuration of GPIOs from mainboard_silicon_init_params() to mainboard chip->init(). Change-Id: Ied0201b954894acd3503801e7739b91a2cc9b4a8 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36268 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/poppy')
-rw-r--r--src/mainboard/google/poppy/mainboard.c14
-rw-r--r--src/mainboard/google/poppy/ramstage.c8
2 files changed, 14 insertions, 8 deletions
diff --git a/src/mainboard/google/poppy/mainboard.c b/src/mainboard/google/poppy/mainboard.c
index b3e91e888e..5aa45d40a8 100644
--- a/src/mainboard/google/poppy/mainboard.c
+++ b/src/mainboard/google/poppy/mainboard.c
@@ -21,6 +21,8 @@
#include <soc/nhlt.h>
#include <vendorcode/google/chromeos/chromeos.h>
+#include <variant/gpio.h>
+
static void mainboard_init(struct device *dev)
{
mainboard_ec_init();
@@ -62,6 +64,18 @@ static void mainboard_enable(struct device *dev)
dev->ops->write_acpi_tables = mainboard_write_acpi_tables;
}
+static void mainboard_chip_init(void *chip_info)
+{
+ const struct pad_config *pads;
+ size_t num;
+
+ pads = variant_gpio_table(&num);
+ gpio_configure_pads(pads, num);
+ pads = variant_sku_gpio_table(&num);
+ gpio_configure_pads(pads, num);
+}
+
struct chip_operations mainboard_ops = {
+ .init = mainboard_chip_init,
.enable_dev = mainboard_enable,
};
diff --git a/src/mainboard/google/poppy/ramstage.c b/src/mainboard/google/poppy/ramstage.c
index e39afecb9c..29a83df69b 100644
--- a/src/mainboard/google/poppy/ramstage.c
+++ b/src/mainboard/google/poppy/ramstage.c
@@ -16,17 +16,9 @@
#include <baseboard/variants.h>
#include <soc/ramstage.h>
-#include <variant/gpio.h>
-
void mainboard_silicon_init_params(FSP_SIL_UPD *params)
{
- const struct pad_config *pads;
- size_t num;
variant_devtree_update();
- pads = variant_gpio_table(&num);
- gpio_configure_pads(pads, num);
- pads = variant_sku_gpio_table(&num);
- gpio_configure_pads(pads, num);
}
void __weak variant_devtree_update(void)