+++ /dev/null
-/** @file\r
- Do a generic Cold Reset for OMAP3550 and BeagleBoard specific Warm reset\r
-\r
- Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
- Copyright (c) 2017, Linaro Ltd. All rights reserved.<BR>\r
- Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
-\r
- SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-\r
-#include <Uefi.h>\r
-\r
-#include <Library/IoLib.h>\r
-#include <Library/ResetSystemLib.h>\r
-\r
-#include <Omap3530/Omap3530.h>\r
-\r
-/**\r
- This function causes a system-wide reset (cold reset), in which\r
- all circuitry within the system returns to its initial state. This type of\r
- reset is asynchronous to system operation and operates without regard to\r
- cycle boundaries.\r
-\r
- If this function returns, it means that the system does not support cold\r
- reset.\r
-**/\r
-VOID\r
-EFIAPI\r
-ResetCold (\r
- VOID\r
- )\r
-{\r
- //Perform cold reset of the system.\r
- MmioOr32 (PRM_RSTCTRL, RST_DPLL3);\r
- while ((MmioRead32(PRM_RSTST) & GLOBAL_COLD_RST) != 0x1);\r
-}\r
-\r
-/**\r
- This function causes a system-wide initialization (warm reset), in which all\r
- processors are set to their initial state. Pending cycles are not corrupted.\r
-\r
- If this function returns, it means that the system does not support warm\r
- reset.\r
-**/\r
-VOID\r
-EFIAPI\r
-ResetWarm (\r
- VOID\r
- )\r
-{\r
- ResetCold ();\r
-}\r
-\r
-/**\r
- This function causes the system to enter a power state equivalent\r
- to the ACPI G2/S5 or G3 states.\r
-\r
- If this function returns, it means that the system does not support shut down\r
- reset.\r
-**/\r
-VOID\r
-EFIAPI\r
-ResetShutdown (\r
- VOID\r
- )\r
-{\r
- // not implemented\r
-}\r
-\r
-/**\r
- This function causes the system to enter S3 and then wake up immediately.\r
-\r
- If this function returns, it means that the system does not support S3\r
- feature.\r
-**/\r
-VOID\r
-EFIAPI\r
-EnterS3WithImmediateWake (\r
- VOID\r
- )\r
-{\r
- // not implemented\r
-}\r
-\r
-/**\r
- This function causes a systemwide reset. The exact type of the reset is\r
- defined by the EFI_GUID that follows the Null-terminated Unicode string passed\r
- into ResetData. If the platform does not recognize the EFI_GUID in ResetData\r
- the platform must pick a supported reset type to perform.The platform may\r
- optionally log the parameters from any non-normal reset that occurs.\r
-\r
- @param[in] DataSize The size, in bytes, of ResetData.\r
- @param[in] ResetData The data buffer starts with a Null-terminated string,\r
- followed by the EFI_GUID.\r
-**/\r
-VOID\r
-EFIAPI\r
-ResetPlatformSpecific (\r
- IN UINTN DataSize,\r
- IN VOID *ResetData\r
- )\r
-{\r
- ResetCold ();\r
-}\r
-\r
-/**\r
- The ResetSystem function resets the entire platform.\r
-\r
- @param[in] ResetType The type of reset to perform.\r
- @param[in] ResetStatus The status code for the reset.\r
- @param[in] DataSize The size, in bytes, of ResetData.\r
- @param[in] ResetData For a ResetType of EfiResetCold, EfiResetWarm, or EfiResetShutdown\r
- the data buffer starts with a Null-terminated string, optionally\r
- followed by additional binary data. The string is a description\r
- that the caller may use to further indicate the reason for the\r
- system reset.\r
-**/\r
-VOID\r
-EFIAPI\r
-ResetSystem (\r
- IN EFI_RESET_TYPE ResetType,\r
- IN EFI_STATUS ResetStatus,\r
- IN UINTN DataSize,\r
- IN VOID *ResetData OPTIONAL\r
- )\r
-{\r
- switch (ResetType) {\r
- case EfiResetWarm:\r
- ResetWarm ();\r
- break;\r
-\r
- case EfiResetCold:\r
- ResetCold ();\r
- break;\r
-\r
- case EfiResetShutdown:\r
- ResetShutdown ();\r
- return;\r
-\r
- case EfiResetPlatformSpecific:\r
- ResetPlatformSpecific (DataSize, ResetData);\r
- return;\r
-\r
- default:\r
- return;\r
- }\r
-}\r