aboutsummaryrefslogtreecommitdiff
path: root/src/soc/amd
diff options
context:
space:
mode:
authorMartin Roth <martinroth@chromium.org>2021-06-25 15:09:43 -0600
committerMartin Roth <martinroth@google.com>2021-06-28 15:57:26 +0000
commitfe58977e6fe2501e2ae50ce9a6bd1790e47eadb8 (patch)
tree8df72465a225c9548c21032104a7d700bbf2b6d3 /src/soc/amd
parent5a3b07d168e574448db3985288551bbb458d31bb (diff)
soc/amd/cezanne: Add call to mb to configure eSPI requirements
When initializing espi early, there may be mainboard requirements to configure the bus properly. This allows the mainboard to do that. BUG=192100564 TEST=Build along with next patch, eSPI works on guybrush Change-Id: Icc02877a09b8f8ed20fd1b04f3cee0509f1a85c5 Signed-off-by: Martin Roth <martinroth@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/55863 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nikolai Vyssotski <nikolai.vyssotski@amd.corp-partner.google.com> Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com> Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/soc/amd')
-rw-r--r--src/soc/amd/cezanne/early_fch.c1
-rw-r--r--src/soc/amd/common/block/include/amdblocks/espi.h3
-rw-r--r--src/soc/amd/common/block/lpc/espi_util.c4
3 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/amd/cezanne/early_fch.c b/src/soc/amd/cezanne/early_fch.c
index d76afc8174..5d268bcbab 100644
--- a/src/soc/amd/cezanne/early_fch.c
+++ b/src/soc/amd/cezanne/early_fch.c
@@ -35,6 +35,7 @@ static void reset_i2c_peripherals(void)
/* Initialize port80h routing early if needed */
void configure_port80_routing_early(void)
{
+ mb_set_up_early_espi();
if (CONFIG(SOC_AMD_COMMON_BLOCK_USE_ESPI))
espi_setup();
}
diff --git a/src/soc/amd/common/block/include/amdblocks/espi.h b/src/soc/amd/common/block/include/amdblocks/espi.h
index 5d758354c5..9a563f9e36 100644
--- a/src/soc/amd/common/block/include/amdblocks/espi.h
+++ b/src/soc/amd/common/block/include/amdblocks/espi.h
@@ -128,4 +128,7 @@ void espi_update_static_bar(uintptr_t bar);
*/
int espi_setup(void);
+/* Run mainboard configuration needed to set up eSPI */
+void mb_set_up_early_espi(void);
+
#endif /* AMD_BLOCK_ESPI_H */
diff --git a/src/soc/amd/common/block/lpc/espi_util.c b/src/soc/amd/common/block/lpc/espi_util.c
index b724408022..e698c8cc48 100644
--- a/src/soc/amd/common/block/lpc/espi_util.c
+++ b/src/soc/amd/common/block/lpc/espi_util.c
@@ -17,6 +17,10 @@ void espi_update_static_bar(uintptr_t bar)
espi_bar = bar;
}
+__weak void mb_set_up_early_espi(void)
+{
+}
+
static uintptr_t espi_get_bar(void)
{
if (ENV_X86 && !espi_bar)