Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48537 )
Change subject: soc/amd/picasso: move chipset_handle_reset to common ......................................................................
soc/amd/picasso: move chipset_handle_reset to common
The FSP integration code needs this function to be present. It's not supposed to be called, but if it is, it'll print an error and call the SoC's cold reset function.
Change-Id: I15f2622d9d9d0f22e3cf8e6283b578f5933b1a9f Signed-off-by: Felix Held felix-coreboot@felixheld.de Reviewed-on: https://review.coreboot.org/c/coreboot/+/48537 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Marshall Dawson marshalldawson3rd@gmail.com --- M src/soc/amd/common/Makefile.inc A src/soc/amd/common/fsp/Makefile.inc A src/soc/amd/common/fsp/fsp_reset.c M src/soc/amd/picasso/reset.c 4 files changed, 20 insertions(+), 11 deletions(-)
Approvals: build bot (Jenkins): Verified Marshall Dawson: Looks good to me, approved
diff --git a/src/soc/amd/common/Makefile.inc b/src/soc/amd/common/Makefile.inc index 418539b..4f1052d 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 0000000..5523876 --- /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 0000000..62480bf --- /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 e16223a..89b5b80 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 @@ /* 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(); -}