2 Do a generic Cold Reset for OMAP3550 and BeagleBoard specific Warm reset
4 Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
5 Copyright (c) 2017, Linaro Ltd. All rights reserved.<BR>
6 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
15 #include <Library/IoLib.h>
16 #include <Library/ResetSystemLib.h>
18 #include <Omap3530/Omap3530.h>
21 This function causes a system-wide reset (cold reset), in which
22 all circuitry within the system returns to its initial state. This type of
23 reset is asynchronous to system operation and operates without regard to
26 If this function returns, it means that the system does not support cold
35 //Perform cold reset of the system.
36 MmioOr32 (PRM_RSTCTRL
, RST_DPLL3
);
37 while ((MmioRead32(PRM_RSTST
) & GLOBAL_COLD_RST
) != 0x1);
41 This function causes a system-wide initialization (warm reset), in which all
42 processors are set to their initial state. Pending cycles are not corrupted.
44 If this function returns, it means that the system does not support warm
57 This function causes the system to enter a power state equivalent
58 to the ACPI G2/S5 or G3 states.
60 If this function returns, it means that the system does not support shut down
73 This function causes the system to enter S3 and then wake up immediately.
75 If this function returns, it means that the system does not support S3
80 EnterS3WithImmediateWake (
88 This function causes a systemwide reset. The exact type of the reset is
89 defined by the EFI_GUID that follows the Null-terminated Unicode string passed
90 into ResetData. If the platform does not recognize the EFI_GUID in ResetData
91 the platform must pick a supported reset type to perform.The platform may
92 optionally log the parameters from any non-normal reset that occurs.
94 @param[in] DataSize The size, in bytes, of ResetData.
95 @param[in] ResetData The data buffer starts with a Null-terminated string,
96 followed by the EFI_GUID.
100 ResetPlatformSpecific (
109 The ResetSystem function resets the entire platform.
111 @param[in] ResetType The type of reset to perform.
112 @param[in] ResetStatus The status code for the reset.
113 @param[in] DataSize The size, in bytes, of ResetData.
114 @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown
115 the data buffer starts with a Null-terminated string, optionally
116 followed by additional binary data. The string is a description
117 that the caller may use to further indicate the reason for the
123 IN EFI_RESET_TYPE ResetType
,
124 IN EFI_STATUS ResetStatus
,
126 IN VOID
*ResetData OPTIONAL
138 case EfiResetShutdown
:
142 case EfiResetPlatformSpecific
:
143 ResetPlatformSpecific (DataSize
, ResetData
);