]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c
ArmPkg: Move ARM Platform drivers from ArmPkg/Drivers/ to ArmPlatformPkg/Drivers/
[mirror_edk2.git] / ArmPlatformPkg / Drivers / SP805WatchdogDxe / SP805Watchdog.c
index 0eb459303f2eb956fc8d8c000a50d5aa20387eab..840f8ede1fabf1f0e8b1a98eab65a6c9bfea7a65 100644 (file)
 #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;
   }