From 64a6bcaa4eb491170b4424f7d676f09854c2744a Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Tue, 16 Apr 2019 15:21:09 -0600 Subject: kohaku: mb/hatch/gpio: Scrub Kohaku GPIOs. Ensure Kohaku GPIO pins are configured correctly w/r/t Hatch. Implement the base/override model for GPIOs (regular and early). The 'hatch' baseboard contains the base GPIOs, and variants can override individual pads. BUG=b:129707481 BRANCH=none TEST=Compiles for all variants. Change-Id: Ie5c83a0538d367ea11e9499f21cea41891d7a78e Signed-off-by: Tim Wawrzynczak Reviewed-on: https://review.coreboot.org/c/coreboot/+/32326 Tested-by: build bot (Jenkins) Reviewed-by: Paul Fagerburg Reviewed-by: Furquan Shaikh --- src/mainboard/google/hatch/bootblock.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/mainboard/google/hatch/bootblock.c') diff --git a/src/mainboard/google/hatch/bootblock.c b/src/mainboard/google/hatch/bootblock.c index 9cde37a90e..9534af11d9 100644 --- a/src/mainboard/google/hatch/bootblock.c +++ b/src/mainboard/google/hatch/bootblock.c @@ -19,11 +19,18 @@ static void early_config_gpio(void) { - const struct pad_config *early_gpio_table; - size_t num_gpios = 0; + const struct pad_config *base_early_table; + const struct pad_config *override_early_table; + size_t base_gpios; + size_t override_gpios; - early_gpio_table = variant_early_gpio_table(&num_gpios); - gpio_configure_pads(early_gpio_table, num_gpios); + base_early_table = base_early_gpio_table(&base_gpios); + override_early_table = override_early_gpio_table(&override_gpios); + + gpio_configure_pads_with_override(base_early_table, + base_gpios, + override_early_table, + override_gpios); } void bootblock_mainboard_init(void) -- cgit v1.2.3