summaryrefslogtreecommitdiff
path: root/src/mainboard/google
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard/google')
-rw-r--r--src/mainboard/google/hatch/ramstage.c35
1 files changed, 22 insertions, 13 deletions
diff --git a/src/mainboard/google/hatch/ramstage.c b/src/mainboard/google/hatch/ramstage.c
index 04e1bc10ea..e9f50625cd 100644
--- a/src/mainboard/google/hatch/ramstage.c
+++ b/src/mainboard/google/hatch/ramstage.c
@@ -23,19 +23,7 @@
void mainboard_silicon_init_params(FSP_S_CONFIG *params)
{
- 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);
-
- gpio_configure_pads_with_override(base_table,
- base_gpios,
- override_table,
- override_gpios);
}
void __weak variant_devtree_update(void)
@@ -43,13 +31,34 @@ void __weak variant_devtree_update(void)
/* Override dev tree settings per board */
}
-static void mainboard_enable(struct device *dev)
+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;
+
+ base_table = base_gpio_table(&base_gpios);
+ override_table = override_gpio_table(&override_gpios);
+
+ gpio_configure_pads_with_override(base_table,
+ base_gpios,
+ override_table,
+ override_gpios);
+}
+
struct chip_operations mainboard_ops = {
+ .init = mainboard_chip_init,
.enable_dev = mainboard_enable,
};