/** @file\r
*\r
-* Copyright (c) 2013-2017, ARM Limited. All rights reserved.\r
+* Copyright (c) 2013-2018, ARM Limited. All rights reserved.\r
*\r
* This program and the accompanying materials\r
* are licensed and made available under the terms and conditions of the BSD\r
\r
EFI_HARDWARE_INTERRUPT2_PROTOCOL *mInterruptProtocol;\r
\r
-EFI_STATUS\r
+VOID\r
WatchdogWriteOffsetRegister (\r
UINT32 Value\r
)\r
{\r
- return MmioWrite32 (GENERIC_WDOG_OFFSET_REG, Value);\r
+ MmioWrite32 (GENERIC_WDOG_OFFSET_REG, Value);\r
}\r
\r
-EFI_STATUS\r
+VOID\r
WatchdogWriteCompareRegister (\r
UINT64 Value\r
)\r
{\r
- return MmioWrite64 (GENERIC_WDOG_COMPARE_VALUE_REG, Value);\r
+ MmioWrite64 (GENERIC_WDOG_COMPARE_VALUE_REG, Value);\r
}\r
\r
-EFI_STATUS\r
+VOID\r
WatchdogEnable (\r
VOID\r
)\r
{\r
- return MmioWrite32 (GENERIC_WDOG_CONTROL_STATUS_REG, GENERIC_WDOG_ENABLED);\r
+ MmioWrite32 (GENERIC_WDOG_CONTROL_STATUS_REG, GENERIC_WDOG_ENABLED);\r
}\r
\r
-EFI_STATUS\r
+VOID\r
WatchdogDisable (\r
VOID\r
)\r
{\r
- return MmioWrite32 (GENERIC_WDOG_CONTROL_STATUS_REG, GENERIC_WDOG_DISABLED);\r
+ MmioWrite32 (GENERIC_WDOG_CONTROL_STATUS_REG, GENERIC_WDOG_DISABLED);\r
}\r
\r
/** On exiting boot services we must make sure the Watchdog Timer\r
then the watchdog timer is disabled.\r
\r
@retval EFI_SUCCESS The watchdog timer has been programmed to fire\r
- in Time 100ns units.\r
- @retval EFI_DEVICE_ERROR A watchdog timer could not be programmed due\r
- to a device error.\r
+ in TimerPeriod 100ns units.\r
\r
**/\r
EFI_STATUS\r
)\r
{\r
UINTN SystemCount;\r
- EFI_STATUS Status;\r
\r
// if TimerPeriod is 0, this is a request to stop the watchdog.\r
if (TimerPeriod == 0) {\r
mNumTimerTicks = 0;\r
- return WatchdogDisable ();\r
+ WatchdogDisable ();\r
+ return EFI_SUCCESS;\r
}\r
\r
// Work out how many timer ticks will equate to TimerPeriod\r
because enabling the watchdog causes an "explicit refresh", which\r
clobbers the compare register (WCV). In order to make sure this doesn't\r
trigger an interrupt, set the offset to max. */\r
- Status = WatchdogWriteOffsetRegister (MAX_UINT32);\r
- if (EFI_ERROR (Status)) {\r
- return Status;\r
- }\r
+ WatchdogWriteOffsetRegister (MAX_UINT32);\r
WatchdogEnable ();\r
SystemCount = ArmGenericTimerGetSystemCount ();\r
- Status = WatchdogWriteCompareRegister (SystemCount + mNumTimerTicks);\r
+ WatchdogWriteCompareRegister (SystemCount + mNumTimerTicks);\r
} else {\r
- Status = WatchdogWriteOffsetRegister ((UINT32)mNumTimerTicks);\r
+ WatchdogWriteOffsetRegister ((UINT32)mNumTimerTicks);\r
WatchdogEnable ();\r
}\r
\r
- return Status;\r
+ return EFI_SUCCESS;\r
}\r
\r
/**\r