summaryrefslogtreecommitdiff
path: root/src/soc/amd/phoenix/reset.c
diff options
context:
space:
mode:
authorMartin Roth <gaumless@gmail.com>2023-01-04 21:27:06 -0700
committerMartin L Roth <gaumless@gmail.com>2023-01-12 03:13:17 +0000
commit20646cdbe80737e3a931dec70a8279163b2a9d60 (patch)
tree54a14680804d1cb8cbd0d2000dd0b3ec8319945b /src/soc/amd/phoenix/reset.c
parentba2cef5b54938cce17871143ea9bbd3fc6868971 (diff)
soc/amd: Change Morgana codename to Phoenix
Now that the next generation of APUs is officially announced, we can unmask morgana. The chip formerly known as Morgana is actually Phoenix. Surprise! This patch just changes the name across the entire codebase. Note that the fw.cfg file will stay pointing to the 3rdparty/amd_blobs/morgana/psp directory until the amd_blobs_repo is updated. Signed-off-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Change-Id: Ie9492a30ae9ff9cd7e15e0f2d239c32190ad4956 Reviewed-on: https://review.coreboot.org/c/coreboot/+/71731 Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/phoenix/reset.c')
-rw-r--r--src/soc/amd/phoenix/reset.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/soc/amd/phoenix/reset.c b/src/soc/amd/phoenix/reset.c
new file mode 100644
index 0000000000..83bfcee546
--- /dev/null
+++ b/src/soc/amd/phoenix/reset.c
@@ -0,0 +1,29 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+/* TODO: Move to common? */
+
+#include <arch/io.h>
+#include <cf9_reset.h>
+#include <reset.h>
+#include <soc/southbridge.h>
+#include <amdblocks/acpimmio.h>
+#include <amdblocks/reset.h>
+
+void do_cold_reset(void)
+{
+ /* De-assert and then assert all PwrGood signals on CF9 reset. */
+ pm_write16(PWR_RESET_CFG, pm_read16(PWR_RESET_CFG) |
+ TOGGLE_ALL_PWR_GOOD);
+ outb(RST_CPU | SYS_RST, RST_CNT);
+}
+
+void do_warm_reset(void)
+{
+ /* Assert reset signals only. */
+ outb(RST_CPU | SYS_RST, RST_CNT);
+}
+
+void do_board_reset(void)
+{
+ do_cold_reset();
+}