summaryrefslogtreecommitdiff
path: root/src/soc/amd/genoa/early_fch.c
diff options
context:
space:
mode:
authorVarshit Pandya <pandyavarshit@gmail.com>2023-10-06 18:14:02 +0530
committerFelix Held <felix-coreboot@felixheld.de>2023-10-11 17:49:32 +0000
commit970d7701c77f7d2f3b9691bc2644b2812caa1228 (patch)
tree290c4325e0e3bd8dedfeb43f3a192b327a778cab /src/soc/amd/genoa/early_fch.c
parent95d78d9e421e627c5c346b4f1f5600998d71a591 (diff)
soc/amd/genoa: Enable uart
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com> Change-Id: I1529657f30b6e228c2e3cd7e0438255522381367 Reviewed-on: https://review.coreboot.org/c/coreboot/+/76507 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/genoa/early_fch.c')
-rw-r--r--src/soc/amd/genoa/early_fch.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/soc/amd/genoa/early_fch.c b/src/soc/amd/genoa/early_fch.c
index 8de43e22e3..e134f49e18 100644
--- a/src/soc/amd/genoa/early_fch.c
+++ b/src/soc/amd/genoa/early_fch.c
@@ -7,6 +7,7 @@
#include <amdblocks/pmlib.h>
#include <amdblocks/uart.h>
#include <soc/southbridge.h>
+#include <soc/uart.h>
/* Before console init */
void fch_pre_init(void)
@@ -14,6 +15,14 @@ void fch_pre_init(void)
fch_enable_cf9_io();
enable_aoac_devices();
+ /*
+ * On reset Range_0 defaults to enabled. We want to start with a clean
+ * slate to not have things unexpectedly enabled.
+ */
+ clear_uart_legacy_config();
+
+ if (CONFIG(AMD_SOC_CONSOLE_UART))
+ set_uart_config(CONFIG_UART_FOR_CONSOLE);
configure_espi_with_mb_hook();
}