ArmPlatformPkg/ArmJunoPkg: Move the watchdog generic driver to ArmPkg/Drivers

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron <Ronald.Cron@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16512 6f19259b-4bc3-4df7-8a09-765794883524
diff --git a/ArmPkg/ArmPkg.dec b/ArmPkg/ArmPkg.dec
index e5e7c0a..d7a4826 100644
--- a/ArmPkg/ArmPkg.dec
+++ b/ArmPkg/ArmPkg.dec
@@ -229,6 +229,14 @@
   gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum|27|UINT32|0x00000041

 

   #

+  # ARM Generic Watchdog

+  #

+

+  gArmTokenSpaceGuid.PcdGenericWatchdogControlBase|0x2A440000|UINT32|0x00000007

+  gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase|0x2A450000|UINT32|0x00000008

+  gArmTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum|93|UINT32|0x00000009

+

+  #

   # ARM Generic Interrupt Controller

   #

   gArmTokenSpaceGuid.PcdGicDistributorBase|0|UINT32|0x0000000C

diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc
index d8f59c3..5d9eb17 100644
--- a/ArmPkg/ArmPkg.dsc
+++ b/ArmPkg/ArmPkg.dsc
@@ -122,6 +122,7 @@
   ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

   ArmPkg/Drivers/ArmGic/ArmGicLib.inf

   ArmPkg/Drivers/ArmGic/ArmGicSecLib.inf

+  ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf

   ArmPkg/Drivers/TimerDxe/TimerDxe.inf

 

   ArmPkg/Library/ArmGenericTimerPhyCounterLib/ArmGenericTimerPhyCounterLib.inf

diff --git a/ArmPlatformPkg/ArmJunoPkg/Include/Drivers/GenericWatchdog.h b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h
similarity index 100%
rename from ArmPlatformPkg/ArmJunoPkg/Include/Drivers/GenericWatchdog.h
rename to ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h
diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c
similarity index 99%
rename from ArmPlatformPkg/ArmJunoPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c
rename to ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c
index 827d27e..ba09227 100644
--- a/ArmPlatformPkg/ArmJunoPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c
+++ b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c
@@ -27,7 +27,7 @@
 #include <Protocol/WatchdogTimer.h>

 #include <Protocol/HardwareInterrupt.h>

 

-#include <Drivers/GenericWatchdog.h>

+#include "GenericWatchdog.h"

 

 // The number of 100ns periods (the unit of time passed to these functions)

 // in a second

diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf
similarity index 85%
rename from ArmPlatformPkg/ArmJunoPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf
rename to ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf
index 82f226f..fece14c 100644
--- a/ArmPlatformPkg/ArmJunoPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf
+++ b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf
@@ -27,7 +27,6 @@
   EmbeddedPkg/EmbeddedPkg.dec

   ArmPkg/ArmPkg.dec

   ArmPlatformPkg/ArmPlatformPkg.dec

-  ArmPlatformPkg/ArmJunoPkg/ArmJuno.dec

 

 [LibraryClasses]

   ArmGenericTimerCounterLib

@@ -41,10 +40,10 @@
   UefiDriverEntryPoint

   UefiRuntimeServicesTableLib

 

-[FixedPcd]

-  gArmJunoTokenSpaceGuid.PcdGenericWatchdogControlBase

-  gArmJunoTokenSpaceGuid.PcdGenericWatchdogRefreshBase

-  gArmJunoTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum

+[Pcd.common]

+  gArmTokenSpaceGuid.PcdGenericWatchdogControlBase

+  gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase

+  gArmTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum

 

 [Protocols]

   gEfiWatchdogTimerArchProtocolGuid

diff --git a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dec b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dec
index 7270f7c..051ffbb 100644
--- a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dec
+++ b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dec
@@ -32,9 +32,5 @@
   gArmJunoTokenSpaceGuid    =  { 0xa1147a20, 0x3144, 0x4f8d, { 0x82, 0x95, 0xb4, 0x83, 0x11, 0xc8, 0xe4, 0xa4 } }

 

 [PcdsFixedAtBuild.common]

-  gArmJunoTokenSpaceGuid.PcdGenericWatchdogControlBase|0x2A440000|UINT32|0x00000001

-  gArmJunoTokenSpaceGuid.PcdGenericWatchdogRefreshBase|0x2A450000|UINT32|0x00000002

-  gArmJunoTokenSpaceGuid.PcdGenericWatchdogEl2IntrNum|93|UINT32|0x00000003

-

   gArmJunoTokenSpaceGuid.PcdSynopsysUsbOhciBaseAddress|0x7FFB0000|UINT32|0x00000004

   gArmJunoTokenSpaceGuid.PcdSynopsysUsbEhciBaseAddress|0x7FFC0000|UINT32|0x00000005

diff --git a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
index 3d35c2c..c962856 100644
--- a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
+++ b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.dsc
@@ -201,7 +201,7 @@
   ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

   ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf

   ArmPkg/Drivers/TimerDxe/TimerDxe.inf

-  ArmPlatformPkg/ArmJunoPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf

+  ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf

 

   #

   # Semi-hosting filesystem

diff --git a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf
index 66d4da7..34b190d 100644
--- a/ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf
+++ b/ArmPlatformPkg/ArmJunoPkg/ArmJuno.fdf
@@ -115,7 +115,7 @@
 

   INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

   INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf

-  INF ArmPlatformPkg/ArmJunoPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf

+  INF ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf

 

   # NOR Flash driver

   INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf