summaryrefslogtreecommitdiff
path: root/src/soc/amd
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd')
-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
-rw-r--r--src/soc/amd/picasso/reset.c11
4 files changed, 20 insertions, 11 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();
+}
diff --git a/src/soc/amd/picasso/reset.c b/src/soc/amd/picasso/reset.c
index e16223a50e..89b5b809d6 100644
--- a/src/soc/amd/picasso/reset.c
+++ b/src/soc/amd/picasso/reset.c
@@ -1,15 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/io.h>
-#include <console/console.h>
#include <cf9_reset.h>
#include <reset.h>
#include <soc/reset.h>
#include <soc/southbridge.h>
#include <amdblocks/acpimmio.h>
#include <amdblocks/reset.h>
-#include <fsp/util.h>
-#include <assert.h>
void set_warm_reset_flag(void)
{
@@ -44,11 +41,3 @@ void do_board_reset(void)
/* TODO: Would a warm_reset() suffice? */
do_cold_reset();
}
-
-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();
-}