mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-23 13:44:33 +02:00
ArmPlatformPkg/SP805WatchdogDxe: Removed late initialization capability from the watchdog
The watchdog driver is a UEFI architectural driver. The watchdog controller is always going to be intialized. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13137 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
8dd9e159b9
commit
e28e0ad9d7
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011, ARM Limited. All rights reserved.
|
* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are licensed and made available under the terms and conditions of the BSD License
|
* are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -29,8 +29,6 @@
|
|||||||
|
|
||||||
EFI_EVENT EfiExitBootServicesEvent = (EFI_EVENT)NULL;
|
EFI_EVENT EfiExitBootServicesEvent = (EFI_EVENT)NULL;
|
||||||
|
|
||||||
BOOLEAN mSP805Initialized = FALSE;
|
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
SP805Identify (
|
SP805Identify (
|
||||||
VOID
|
VOID
|
||||||
@ -217,14 +215,6 @@ SP805SetTimerPeriod (
|
|||||||
EFI_STATUS Status = EFI_SUCCESS;
|
EFI_STATUS Status = EFI_SUCCESS;
|
||||||
UINT64 Ticks64bit;
|
UINT64 Ticks64bit;
|
||||||
|
|
||||||
// Initialize the hardware if not already done
|
|
||||||
if( !mSP805Initialized ) {
|
|
||||||
Status = SP805Initialize();
|
|
||||||
if (EFI_ERROR(Status)) {
|
|
||||||
goto EXIT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SP805Unlock();
|
SP805Unlock();
|
||||||
|
|
||||||
if( TimerPeriod == 0 ) {
|
if( TimerPeriod == 0 ) {
|
||||||
@ -298,14 +288,6 @@ SP805GetTimerPeriod (
|
|||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the hardware if not already done
|
|
||||||
if( !mSP805Initialized ) {
|
|
||||||
Status = SP805Initialize();
|
|
||||||
if (EFI_ERROR(Status)) {
|
|
||||||
goto EXIT;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if the watchdog is stopped
|
// Check if the watchdog is stopped
|
||||||
if ( (MmioRead32(SP805_WDOG_CONTROL_REG) & SP805_WDOG_CTRL_INTEN) == 0 ) {
|
if ( (MmioRead32(SP805_WDOG_CONTROL_REG) & SP805_WDOG_CTRL_INTEN) == 0 ) {
|
||||||
// It is stopped, so return zero.
|
// It is stopped, so return zero.
|
||||||
@ -372,11 +354,14 @@ EFI_WATCHDOG_TIMER_ARCH_PROTOCOL gWatchdogTimer = {
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
EFIAPI
|
||||||
SP805Initialize (
|
SP805Initialize (
|
||||||
VOID
|
IN EFI_HANDLE ImageHandle,
|
||||||
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
EFI_HANDLE Handle;
|
||||||
|
|
||||||
// Check if the SP805 hardware watchdog module exists on board
|
// Check if the SP805 hardware watchdog module exists on board
|
||||||
Status = SP805Identify();
|
Status = SP805Identify();
|
||||||
@ -399,22 +384,6 @@ SP805Initialize (
|
|||||||
// Prohibit any rogue access to SP805 registers
|
// Prohibit any rogue access to SP805 registers
|
||||||
SP805Lock();
|
SP805Lock();
|
||||||
|
|
||||||
mSP805Initialized = TRUE;
|
|
||||||
|
|
||||||
EXIT:
|
|
||||||
return Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
SP805InstallProtocol (
|
|
||||||
IN EFI_HANDLE ImageHandle,
|
|
||||||
IN EFI_SYSTEM_TABLE *SystemTable
|
|
||||||
)
|
|
||||||
{
|
|
||||||
EFI_STATUS Status;
|
|
||||||
EFI_HANDLE Handle;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Make sure the Watchdog Timer Architectural Protocol has not been installed in the system yet.
|
// Make sure the Watchdog Timer Architectural Protocol has not been installed in the system yet.
|
||||||
// This will avoid conflicts with the universal watchdog
|
// This will avoid conflicts with the universal watchdog
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/** @file
|
/** @file
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011, ARM Limited. All rights reserved.
|
* Copyright (c) 2011-2012, ARM Limited. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are licensed and made available under the terms and conditions of the BSD License
|
* are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -19,7 +19,7 @@
|
|||||||
MODULE_TYPE = DXE_DRIVER
|
MODULE_TYPE = DXE_DRIVER
|
||||||
VERSION_STRING = 1.0
|
VERSION_STRING = 1.0
|
||||||
|
|
||||||
ENTRY_POINT = SP805InstallProtocol
|
ENTRY_POINT = SP805Initialize
|
||||||
|
|
||||||
[Sources.common]
|
[Sources.common]
|
||||||
SP805Watchdog.c
|
SP805Watchdog.c
|
||||||
|
Loading…
x
Reference in New Issue
Block a user