summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/Drivers/SP805WatchdogDxe
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-01 15:30:01 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-01 15:30:01 +0000
commit5cc45b70c310f853f28b2351f3d93109ff858dcf (patch)
tree22917c5dfa20a9f553c1adda9ce6efc04b722dc7 /ArmPlatformPkg/Drivers/SP805WatchdogDxe
parent7fb54d9d04f52e22f6df16e0035c565c3dce7bd4 (diff)
downloadedk2-platforms-5cc45b70c310f853f28b2351f3d93109ff858dcf.tar.xz
ArmPkg: Move ARM Platform drivers from ArmPkg/Drivers/ to ArmPlatformPkg/Drivers/
The idea is to keep ArmPkg responsible for the ARM architectural modules and ArmPlatformPkg the ARM development platform packages (with their respective drivers). ArmPlatformPkg: Reduce driver dependency on ArmPlatform.h - Move some driver definitions from C-Macro to PCD values - Unify PCD driver namespace git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11956 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Drivers/SP805WatchdogDxe')
-rw-r--r--ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c22
-rw-r--r--ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf16
2 files changed, 20 insertions, 18 deletions
diff --git a/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c b/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c
index 0eb459303f..840f8ede1f 100644
--- a/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c
+++ b/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c
@@ -16,15 +16,15 @@
#include <PiDxe.h>
#include <Library/BaseLib.h>
-#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
+#include <Library/DebugLib.h>
+#include <Library/IoLib.h>
+#include <Library/PcdLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiLib.h>
-#include <Library/IoLib.h>
#include <Protocol/WatchdogTimer.h>
-#include <ArmPlatform.h>
#include <Drivers/SP805Watchdog.h>
/**
@@ -75,18 +75,18 @@ SP805Identify (
)
{
// Check if this is a PrimeCell Peripheral
- if( ( MmioRead8( SP805_WDOG_PCELL_ID0 ) != 0x0D )
- || ( MmioRead8( SP805_WDOG_PCELL_ID1 ) != 0xF0 )
- || ( MmioRead8( SP805_WDOG_PCELL_ID2 ) != 0x05 )
- || ( MmioRead8( SP805_WDOG_PCELL_ID3 ) != 0xB1 ) ) {
+ if ( (MmioRead8 (SP805_WDOG_PCELL_ID0) != 0x0D)
+ || (MmioRead8 (SP805_WDOG_PCELL_ID1) != 0xF0)
+ || (MmioRead8 (SP805_WDOG_PCELL_ID2) != 0x05)
+ || (MmioRead8 (SP805_WDOG_PCELL_ID3) != 0xB1)) {
return EFI_NOT_FOUND;
}
// Check if this PrimeCell Peripheral is the SP805 Watchdog Timer
- if( ( MmioRead8( SP805_WDOG_PERIPH_ID0 ) != 0x05 )
- || ( MmioRead8( SP805_WDOG_PERIPH_ID1 ) != 0x18 )
- || (( MmioRead8( SP805_WDOG_PERIPH_ID2 ) & 0x0000000F) != 0x04 )
- || ( MmioRead8( SP805_WDOG_PERIPH_ID3 ) != 0x00 ) ) {
+ if ( (MmioRead8 (SP805_WDOG_PERIPH_ID0) != 0x05)
+ || (MmioRead8 (SP805_WDOG_PERIPH_ID1) != 0x18)
+ || ((MmioRead8 (SP805_WDOG_PERIPH_ID2) & 0x0000000F) != 0x04)
+ || (MmioRead8 (SP805_WDOG_PERIPH_ID3) != 0x00)) {
return EFI_NOT_FOUND;
}
diff --git a/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf b/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf
index b77320120c..7cacf69f4f 100644
--- a/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf
+++ b/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805WatchdogDxe.inf
@@ -32,19 +32,21 @@
[LibraryClasses]
BaseLib
- UefiRuntimeServicesTableLib
- UefiLib
- UefiBootServicesTableLib
BaseMemoryLib
DebugLib
- UefiDriverEntryPoint
IoLib
+ PcdLib
+ UefiLib
+ UefiBootServicesTableLib
+ UefiDriverEntryPoint
+ UefiRuntimeServicesTableLib
-[Guids]
+[Pcd]
+ gArmPlatformTokenSpaceGuid.PcdSP805WatchdogBase
+ gArmPlatformTokenSpaceGuid.PcdSP805WatchdogClockFrequencyInHz
[Protocols]
gEfiWatchdogTimerArchProtocolGuid
-
[Depex]
-TRUE
+ TRUE