summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/octopus/mainboard.c12
-rw-r--r--src/mainboard/google/octopus/variants/baseboard/gpio.c8
-rw-r--r--src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h3
-rw-r--r--src/mainboard/google/octopus/variants/bip/gpio.c2
4 files changed, 18 insertions, 7 deletions
diff --git a/src/mainboard/google/octopus/mainboard.c b/src/mainboard/google/octopus/mainboard.c
index fa2075bc3d..5c10d94672 100644
--- a/src/mainboard/google/octopus/mainboard.c
+++ b/src/mainboard/google/octopus/mainboard.c
@@ -34,14 +34,18 @@
static void mainboard_init(void *chip_info)
{
int boardid;
- 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;
boardid = board_id();
printk(BIOS_INFO, "Board ID: %d\n", boardid);
- 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);
mainboard_ec_init();
}
diff --git a/src/mainboard/google/octopus/variants/baseboard/gpio.c b/src/mainboard/google/octopus/variants/baseboard/gpio.c
index 7b1075fc65..3dee892110 100644
--- a/src/mainboard/google/octopus/variants/baseboard/gpio.c
+++ b/src/mainboard/google/octopus/variants/baseboard/gpio.c
@@ -281,12 +281,18 @@ static const struct pad_config gpio_table[] = {
PAD_NC(GPIO_210, DN_20K),
};
-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;
+}
+
/* GPIOs needed prior to ramstage. */
static const struct pad_config early_gpio_table[] = {
PAD_CFG_GPI(GPIO_190, NONE, DEEP), /* PCH_WP_OD */
diff --git a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h
index c9d7d7bf85..04f87968d0 100644
--- a/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/octopus/variants/baseboard/include/baseboard/variants.h
@@ -23,7 +23,8 @@
/* 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_override_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, int slp_typ);
diff --git a/src/mainboard/google/octopus/variants/bip/gpio.c b/src/mainboard/google/octopus/variants/bip/gpio.c
index 5f83ee4dfa..18cb6d9464 100644
--- a/src/mainboard/google/octopus/variants/bip/gpio.c
+++ b/src/mainboard/google/octopus/variants/bip/gpio.c
@@ -259,7 +259,7 @@ static const struct pad_config gpio_table[] = {
PAD_CFG_GPO_IOSSTATE_IOSTERM(GPIO_210, 0, DEEP, NONE, HIZCRx0, DISPUPD),
};
-const struct pad_config *variant_gpio_table(size_t *num)
+const struct pad_config *variant_base_gpio_table(size_t *num)
{
*num = ARRAY_SIZE(gpio_table);
return gpio_table;