summaryrefslogtreecommitdiff
path: root/src/soc/amd/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r--src/soc/amd/common/Makefile.inc1
-rw-r--r--src/soc/amd/common/fsp/Makefile.inc4
-rw-r--r--src/soc/amd/common/fsp/fsp_reset.c15
3 files changed, 20 insertions, 0 deletions
diff --git a/src/soc/amd/common/Makefile.inc b/src/soc/amd/common/Makefile.inc
index 418539bca7..4f1052dcaf 100644
--- a/src/soc/amd/common/Makefile.inc
+++ b/src/soc/amd/common/Makefile.inc
@@ -1,4 +1,5 @@
ifeq ($(CONFIG_SOC_AMD_COMMON),y)
subdirs-y += block
+subdirs-y += fsp
subdirs-y += vboot
endif
diff --git a/src/soc/amd/common/fsp/Makefile.inc b/src/soc/amd/common/fsp/Makefile.inc
new file mode 100644
index 0000000000..5523876a7e
--- /dev/null
+++ b/src/soc/amd/common/fsp/Makefile.inc
@@ -0,0 +1,4 @@
+ifeq ($(CONFIG_PLATFORM_USES_FSP2_0),y)
+romstage-y += fsp_reset.c
+ramstage-y += fsp_reset.c
+endif # CONFIG_PLATFORM_USES_FSP2_0
diff --git a/src/soc/amd/common/fsp/fsp_reset.c b/src/soc/amd/common/fsp/fsp_reset.c
new file mode 100644
index 0000000000..62480bf319
--- /dev/null
+++ b/src/soc/amd/common/fsp/fsp_reset.c
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <amdblocks/reset.h>
+#include <assert.h>
+#include <console/console.h>
+#include <fsp/util.h>
+#include <stdint.h>
+
+void chipset_handle_reset(uint32_t status)
+{
+ printk(BIOS_ERR, "Error: unexpected call to %s(0x%08x). Doing cold reset.\n",
+ __func__, status);
+ BUG();
+ do_cold_reset();
+}