summaryrefslogtreecommitdiffstats
path: root/src/mainboard/intel/glkrvp
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:49:21 +0000
commit9c27dc8d5683f8a09f10e249cbd577058f1da15c (patch)
tree0332912eee0ef20ede7f45d6c00c3f83a0113f23 /src/mainboard/intel/glkrvp
parentbb9dda4a7a33ab5b75b66ea5d33c2329a90dff81 (diff)
downloadcoreboot-9c27dc8d5683f8a09f10e249cbd577058f1da15c.tar.gz
coreboot-9c27dc8d5683f8a09f10e249cbd577058f1da15c.tar.bz2
coreboot-9c27dc8d5683f8a09f10e249cbd577058f1da15c.zip
mb/intel/glkrvp: 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: I80369ab70d5510cb4f388f3029119e7148361af4 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49435 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/intel/glkrvp')
-rw-r--r--src/mainboard/intel/glkrvp/bootblock.c6
-rw-r--r--src/mainboard/intel/glkrvp/variants/baseboard/gpio.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/mainboard/intel/glkrvp/bootblock.c b/src/mainboard/intel/glkrvp/bootblock.c
index 577dae507da0..0cbf3e62c265 100644
--- a/src/mainboard/intel/glkrvp/bootblock.c
+++ b/src/mainboard/intel/glkrvp/bootblock.c
@@ -6,12 +6,16 @@
#include <soc/gpio.h>
#include <variant/ec.h>
-void bootblock_mainboard_init(void)
+void bootblock_mainboard_early_init(void)
{
const struct pad_config *pads;
size_t num;
pads = variant_early_gpio_table(&num);
gpio_configure_pads(pads, num);
+}
+
+void bootblock_mainboard_init(void)
+{
mainboard_ec_init();
}
diff --git a/src/mainboard/intel/glkrvp/variants/baseboard/gpio.c b/src/mainboard/intel/glkrvp/variants/baseboard/gpio.c
index 28efde9bdb71..9a8188ba5d8c 100644
--- a/src/mainboard/intel/glkrvp/variants/baseboard/gpio.c
+++ b/src/mainboard/intel/glkrvp/variants/baseboard/gpio.c
@@ -237,6 +237,8 @@ static const struct pad_config early_gpio_table[] = {
PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_177, UP_20K, DEEP, NF1), /* SMB_CLK */
PAD_CFG_NF_IOSTANDBY_IGNORE(GPIO_178, UP_20K, DEEP, NF1), /* SMB_DATA */
PAD_NC(GPIO_154, NONE), /* LPC_CLKRUNB -- NC for eSPI */
+ PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_64, UP_20K, DEEP, NF1, HIZCRx1, DISPUPD),/* LPSS_UART2_RXD */
+ PAD_CFG_NF_IOSSTATE_IOSTERM(GPIO_65, UP_20K, DEEP, NF1, TxLASTRxE, DISPUPD),/* LPSS_UART2_TXD */
};
const struct pad_config * __weak