From 4f92b15c136f4a856cc02e452b2af868b3f8dd3d Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Sun, 12 Nov 2017 10:56:43 -0700 Subject: amd/stoneyridge: Update def_callouts.c to reset using reset.c Convert functionality to use coreboot-centric functions and defined values. This change should have no functional effect. BUG=b:62241048 TEST=Build Gardenia; Build & boot Kahlee. Change-Id: I62ae50af05d3ac770560368245c4ae81cf9c4395 Signed-off-by: Martin Roth Reviewed-on: https://review.coreboot.org/22440 Tested-by: build bot (Jenkins) Reviewed-by: Marshall Dawson Reviewed-by: Aaron Durbin --- src/soc/amd/common/def_callouts.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/soc/amd') diff --git a/src/soc/amd/common/def_callouts.c b/src/soc/amd/common/def_callouts.c index e8d404e465..4e42e9ee8f 100644 --- a/src/soc/amd/common/def_callouts.c +++ b/src/soc/amd/common/def_callouts.c @@ -18,6 +18,7 @@ #include #include #include "agesawrapper.h" +#include #include #if ENV_BOOTBLOCK @@ -100,7 +101,6 @@ AGESA_STATUS agesa_EmptyIdsInitData(UINT32 Func, UINTN Data, VOID *ConfigPtr) AGESA_STATUS agesa_Reset(UINT32 Func, UINTN Data, VOID *ConfigPtr) { AGESA_STATUS Status; - UINT8 Value; UINTN ResetType; AMD_CONFIG_PARAMS *StdHeader; @@ -114,11 +114,13 @@ AGESA_STATUS agesa_Reset(UINT32 Func, UINTN Data, VOID *ConfigPtr) */ switch (ResetType) { case WARM_RESET_WHENEVER: - case COLD_RESET_WHENEVER: case WARM_RESET_IMMEDIATELY: + do_soft_reset(); + break; + + case COLD_RESET_WHENEVER: case COLD_RESET_IMMEDIATELY: - Value = 0x06; - LibAmdIoWrite(AccessWidth8, SYS_RESET, &Value, StdHeader); + do_hard_reset(); break; default: -- cgit v1.2.3