summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Roth <martinroth@google.com>2017-11-12 10:56:43 -0700
committerMartin Roth <martinroth@google.com>2017-12-01 03:29:28 +0000
commit4f92b15c136f4a856cc02e452b2af868b3f8dd3d (patch)
treeda93b5437982730f0636c4fe912afb02e103966c
parent48e44eecc75c71118214a9192f347d256f98da35 (diff)
downloadcoreboot-4f92b15c136f4a856cc02e452b2af868b3f8dd3d.tar.xz
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 <martinroth@google.com> Reviewed-on: https://review.coreboot.org/22440 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r--src/soc/amd/common/def_callouts.c10
1 files changed, 6 insertions, 4 deletions
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 <amdlib.h>
#include <BiosCallOuts.h>
#include "agesawrapper.h"
+#include <reset.h>
#include <soc/southbridge.h>
#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: