mb/google/hatch: 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(). Additionally, this change moves mainboard_ec_init() to mainboard dev->init(). TEST=Verified that GPIOs are configured properly and hatch boots to OS. Change-Id: Ia509471a3678c60454cd4f14625f151860d9b9d2 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36267 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
91c8d35be3
commit
80212aa104
|
@ -22,13 +22,33 @@
|
|||
#include <vendorcode/google/chromeos/chromeos.h>
|
||||
|
||||
void mainboard_silicon_init_params(FSP_S_CONFIG *params)
|
||||
{
|
||||
variant_devtree_update();
|
||||
}
|
||||
|
||||
void __weak variant_devtree_update(void)
|
||||
{
|
||||
/* Override dev tree settings per board */
|
||||
}
|
||||
|
||||
static void mainboard_init(struct device *dev)
|
||||
{
|
||||
mainboard_ec_init();
|
||||
}
|
||||
|
||||
static void mainboard_enable(struct device *dev)
|
||||
{
|
||||
dev->ops->init = mainboard_init;
|
||||
dev->ops->acpi_inject_dsdt_generator = chromeos_dsdt_generator;
|
||||
}
|
||||
|
||||
static void mainboard_chip_init(void *chip_info)
|
||||
{
|
||||
const struct pad_config *base_table;
|
||||
const struct pad_config *override_table;
|
||||
size_t base_gpios;
|
||||
size_t override_gpios;
|
||||
|
||||
variant_devtree_update();
|
||||
base_table = base_gpio_table(&base_gpios);
|
||||
override_table = override_gpio_table(&override_gpios);
|
||||
|
||||
|
@ -38,18 +58,7 @@ void mainboard_silicon_init_params(FSP_S_CONFIG *params)
|
|||
override_gpios);
|
||||
}
|
||||
|
||||
void __weak variant_devtree_update(void)
|
||||
{
|
||||
/* Override dev tree settings per board */
|
||||
}
|
||||
|
||||
static void mainboard_enable(struct device *dev)
|
||||
{
|
||||
mainboard_ec_init();
|
||||
|
||||
dev->ops->acpi_inject_dsdt_generator = chromeos_dsdt_generator;
|
||||
}
|
||||
|
||||
struct chip_operations mainboard_ops = {
|
||||
.init = mainboard_chip_init,
|
||||
.enable_dev = mainboard_enable,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue