summaryrefslogtreecommitdiff
path: root/src/mainboard/intel
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 18:41:05 +0000
commitbeee666ad330106ae7e428e16961535621ff1453 (patch)
tree52b21ea809d398450a6aef967e1240f653a3b166 /src/mainboard/intel
parenta7bc5b818a1eeb53dd59b81baf988228e110bcde (diff)
mb/intel/icelake_rvp: do UART pad config 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: Ib19a4f64eaf25bf2eb47ee60748a68538fc0729a Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49430 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/intel')
-rw-r--r--src/mainboard/intel/icelake_rvp/bootblock.c2
-rw-r--r--src/mainboard/intel/icelake_rvp/variants/icl_u/gpio.c4
-rw-r--r--src/mainboard/intel/icelake_rvp/variants/icl_y/gpio.c4
3 files changed, 9 insertions, 1 deletions
diff --git a/src/mainboard/intel/icelake_rvp/bootblock.c b/src/mainboard/intel/icelake_rvp/bootblock.c
index a8f7e41433..d7f3255974 100644
--- a/src/mainboard/intel/icelake_rvp/bootblock.c
+++ b/src/mainboard/intel/icelake_rvp/bootblock.c
@@ -5,7 +5,7 @@
#include <bootblock_common.h>
#include <soc/gpio.h>
-void bootblock_mainboard_init(void)
+void bootblock_mainboard_early_init(void)
{
const struct pad_config *pads;
size_t num;
diff --git a/src/mainboard/intel/icelake_rvp/variants/icl_u/gpio.c b/src/mainboard/intel/icelake_rvp/variants/icl_u/gpio.c
index 286753a820..30e249c22e 100644
--- a/src/mainboard/intel/icelake_rvp/variants/icl_u/gpio.c
+++ b/src/mainboard/intel/icelake_rvp/variants/icl_u/gpio.c
@@ -86,6 +86,10 @@ PAD_CFG_GPO(GPP_H0, 1, DEEP),
/* Early pad configuration in bootblock */
static const struct pad_config early_gpio_table[] = {
+ /* UART2 RX */
+ PAD_CFG_NF(GPP_C20, NONE, DEEP, NF1),
+ /* UART2 TX */
+ PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1),
};
const struct pad_config *variant_gpio_table(size_t *num)
diff --git a/src/mainboard/intel/icelake_rvp/variants/icl_y/gpio.c b/src/mainboard/intel/icelake_rvp/variants/icl_y/gpio.c
index 286753a820..30e249c22e 100644
--- a/src/mainboard/intel/icelake_rvp/variants/icl_y/gpio.c
+++ b/src/mainboard/intel/icelake_rvp/variants/icl_y/gpio.c
@@ -86,6 +86,10 @@ PAD_CFG_GPO(GPP_H0, 1, DEEP),
/* Early pad configuration in bootblock */
static const struct pad_config early_gpio_table[] = {
+ /* UART2 RX */
+ PAD_CFG_NF(GPP_C20, NONE, DEEP, NF1),
+ /* UART2 TX */
+ PAD_CFG_NF(GPP_C21, NONE, DEEP, NF1),
};
const struct pad_config *variant_gpio_table(size_t *num)