summaryrefslogtreecommitdiffstats
path: root/src/mainboard/google/octopus/bootblock.c
diff options
context:
space:
mode:
authorMichael Niewöhner <foss@mniewoehner.de>2020-12-21 03:46:58 +0100
committerMichael Niewöhner <foss@mniewoehner.de>2021-01-21 17:49:41 +0000
commit1c22753996fc7884115e478249b3080fb4bb9c83 (patch)
treeb14969a90898c1e80909f5a5a7ad8ac321362c6b /src/mainboard/google/octopus/bootblock.c
parent805b96cdc6c9ae288f18904ee3d1b13acd82d786 (diff)
downloadcoreboot-1c22753996fc7884115e478249b3080fb4bb9c83.tar.gz
coreboot-1c22753996fc7884115e478249b3080fb4bb9c83.tar.bz2
coreboot-1c22753996fc7884115e478249b3080fb4bb9c83.zip
mb/google/octopus: do UART pad configuration at board-level
UART pad configuration should not be done in common code, because that may cause short circuits, when the user sets a wrong UART index. Thus, add the corresponding pads to the early UART gpio table for the board as a first step. Common UART pad config code then gets dropped in CB:48829. Also switch to `bootblock_mainboard_early_init` to configure the pads in early bootblock before console initialization, to make the console work as early as possible. The board does not do any other gpio configuration in bootblock, so this should not influence behaviour in a negative way (e.g. breaking overrides). Change-Id: Ieeb738afd54e77ee853ee109009f611411aa0d4a Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49426 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/octopus/bootblock.c')
-rw-r--r--src/mainboard/google/octopus/bootblock.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mainboard/google/octopus/bootblock.c b/src/mainboard/google/octopus/bootblock.c
index e0f037f4a985..1802695b7d1c 100644
--- a/src/mainboard/google/octopus/bootblock.c
+++ b/src/mainboard/google/octopus/bootblock.c
@@ -5,13 +5,19 @@
#include <ec/ec.h>
#include <soc/gpio.h>
-void bootblock_mainboard_init(void)
+void bootblock_mainboard_early_init(void)
{
- const struct pad_config *pads, *override_pads;
- size_t num, override_num;
+ const struct pad_config *pads;
+ size_t num;
pads = mainboard_early_bootblock_gpio_table(&num);
gpio_configure_pads(pads, num);
+};
+
+void bootblock_mainboard_init(void)
+{
+ const struct pad_config *pads, *override_pads;
+ size_t num, override_num;
/*
* Perform EC init before configuring GPIOs. This is because variant