summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/google/dedede/mainboard.c12
-rw-r--r--src/mainboard/google/dedede/variants/baseboard/gpio.c8
-rw-r--r--src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h3
3 files changed, 17 insertions, 6 deletions
diff --git a/src/mainboard/google/dedede/mainboard.c b/src/mainboard/google/dedede/mainboard.c
index fe89527e5a..cb84e1f400 100644
--- a/src/mainboard/google/dedede/mainboard.c
+++ b/src/mainboard/google/dedede/mainboard.c
@@ -22,11 +22,15 @@ static void mainboard_config_isst(void *unused)
static void mainboard_init(void *chip_info)
{
- const struct pad_config *pads;
- size_t num;
+ const struct pad_config *base_pads;
+ const struct pad_config *override_pads;
+ size_t base_num, override_num;
- pads = variant_gpio_table(&num);
- gpio_configure_pads(pads, num);
+ base_pads = variant_base_gpio_table(&base_num);
+ override_pads = variant_override_gpio_table(&override_num);
+
+ gpio_configure_pads_with_override(base_pads, base_num,
+ override_pads, override_num);
}
static void mainboard_dev_init(struct device *dev)
diff --git a/src/mainboard/google/dedede/variants/baseboard/gpio.c b/src/mainboard/google/dedede/variants/baseboard/gpio.c
index 71c0c1448a..1284bc5e34 100644
--- a/src/mainboard/google/dedede/variants/baseboard/gpio.c
+++ b/src/mainboard/google/dedede/variants/baseboard/gpio.c
@@ -420,12 +420,18 @@ static const struct pad_config early_gpio_table[] = {
PAD_CFG_GPI(GPP_S0, NONE, DEEP),
};
-const struct pad_config *__weak variant_gpio_table(size_t *num)
+const struct pad_config *__weak variant_base_gpio_table(size_t *num)
{
*num = ARRAY_SIZE(gpio_table);
return gpio_table;
}
+const struct pad_config *__weak variant_override_gpio_table(size_t *num)
+{
+ *num = 0;
+ return NULL;
+}
+
const struct pad_config *__weak variant_early_gpio_table(size_t *num)
{
*num = ARRAY_SIZE(early_gpio_table);
diff --git a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
index 5d8355b2fe..1f4044366d 100644
--- a/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/dedede/variants/baseboard/include/baseboard/variants.h
@@ -13,10 +13,11 @@
/* The next set of functions return the gpio table and fill in the number of
* entries for each table. */
-const struct pad_config *variant_gpio_table(size_t *num);
+const struct pad_config *variant_base_gpio_table(size_t *num);
const struct pad_config *variant_early_gpio_table(size_t *num);
const struct pad_config *variant_sleep_gpio_table(size_t *num);
const struct cros_gpio *variant_cros_gpios(size_t *num);
+const struct pad_config *variant_override_gpio_table(size_t *num);
/**
* Get board's Hardware features as defined in FW_CONFIG