summaryrefslogtreecommitdiff
path: root/src/soc/amd/morgana/smu.c
diff options
context:
space:
mode:
authorMartin Roth <martin.roth@amd.corp-partner.google.com>2022-10-06 15:57:21 -0600
committerMartin Roth <martin.roth@amd.corp-partner.google.com>2022-10-10 21:48:30 +0000
commit1a3de8e5bcc5c83934fa2a690e125b843e8b01ab (patch)
tree0df3332114bde60848c018a9b5de245a9568ba4a /src/soc/amd/morgana/smu.c
parent134908381f2b25063558f2ce1414fa70243c9c55 (diff)
soc/amd/morgana: Add initial commit for new SoC
This is an initial framework for the Morgana SoC. TODOs have been added to the files for both customization and commonization. Signed-off-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Change-Id: If92e129db10d41595e1dc18a7c1dfe99d57790cc Reviewed-on: https://review.coreboot.org/c/coreboot/+/68195 Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/morgana/smu.c')
-rw-r--r--src/soc/amd/morgana/smu.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/soc/amd/morgana/smu.c b/src/soc/amd/morgana/smu.c
new file mode 100644
index 0000000000..d8cd081bad
--- /dev/null
+++ b/src/soc/amd/morgana/smu.c
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <console/console.h>
+#include <amdblocks/smu.h>
+#include <soc/smu.h>
+
+/* TODO: can this be made common? */
+
+/*
+ * Request the SMU to put system into S3, S4, or S5. On entry, SlpTyp determines S-State and
+ * SlpTypeEn gets set by the SMU. Function does not return if successful.
+ */
+void smu_sx_entry(void)
+{
+ struct smu_payload msg = { 0 }; /* Unused for SMC_MSG_S3ENTRY */
+
+ printk(BIOS_DEBUG, "SMU: Put system into S3/S4/S5\n");
+ send_smu_message(SMC_MSG_S3ENTRY, &msg);
+}