summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/block
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2021-02-09 01:07:00 +0100
committerFelix Held <felix-coreboot@felixheld.de>2021-02-10 01:31:39 +0000
commit063fc1747aec2fb9f32756a800a89c5b9beeb0f8 (patch)
treed31f5956253ed21a1133069cc6996e6edd023da7 /src/soc/amd/common/block
parent1a973434c57fb11478c37ac9fb0b72b4ff0c919c (diff)
soc/amd: Move global_smi_enable to common/blocks/smi/smi_util
Change-Id: I4410772a8d3f2dedbb96601d87efb23b14e5f438 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/42989 Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/common/block')
-rw-r--r--src/soc/amd/common/block/smi/smi_util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/smi/smi_util.c b/src/soc/amd/common/block/smi/smi_util.c
index dcf0c84b0a..1e4561d7a5 100644
--- a/src/soc/amd/common/block/smi/smi_util.c
+++ b/src/soc/amd/common/block/smi/smi_util.c
@@ -56,6 +56,15 @@ void configure_gevent_smi(uint8_t gevent, uint8_t mode, uint8_t level)
smi_write32(SMI_REG_SMITRIG0, reg32);
}
+/** Set the EOS bit and enable SMI generation from southbridge */
+void global_smi_enable(void)
+{
+ uint32_t reg = smi_read32(SMI_REG_SMITRIG0);
+ reg &= ~SMITRG0_SMIENB; /* Enable SMI generation */
+ reg |= SMITRG0_EOS; /* Set EOS bit */
+ smi_write32(SMI_REG_SMITRIG0, reg);
+}
+
void soc_route_sci(uint8_t event)
{
smi_write8(SMI_SCI_MAP(event), event);