diff mbox

[edk2,v2,09/24] ArmVirtPkg: move TimerDxe to FDT client library

Message ID 1460108711-12122-10-git-send-email-ard.biesheuvel@linaro.org
State New
Headers show

Commit Message

Ard Biesheuvel April 8, 2016, 9:44 a.m. UTC
Move to the new dedicated to ArmVirtTimerFdtClientLib to populate the
various timer related PCDs at driver load time rather than relying on
VirtFdtDxe to do it. Since ArmPkg/TimerDxe is the only consumer of these
PCDs, which is the DXE driver ArmVirtTimerFdtClientLib is intended to
complement, this conversion is guaranteed to be safe.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 ArmVirtPkg/ArmVirtQemu.dsc                                               | 5 ++++-
 ArmVirtPkg/ArmVirtQemuKernel.dsc                                         | 5 ++++-
 ArmVirtPkg/ArmVirtXen.dsc                                                | 5 ++++-
 ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf | 3 +++
 4 files changed, 15 insertions(+), 3 deletions(-)

-- 
2.5.0

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Laszlo Ersek April 8, 2016, 3:54 p.m. UTC | #1
On 04/08/16 11:44, Ard Biesheuvel wrote:
> Move to the new dedicated to ArmVirtTimerFdtClientLib to populate the


one "to" too many

> various timer related PCDs at driver load time rather than relying on

> VirtFdtDxe to do it. Since ArmPkg/TimerDxe is the only consumer of these

> PCDs, which is the DXE driver ArmVirtTimerFdtClientLib is intended to

> complement, this conversion is guaranteed to be safe.

> 

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

>  ArmVirtPkg/ArmVirtQemu.dsc                                               | 5 ++++-

>  ArmVirtPkg/ArmVirtQemuKernel.dsc                                         | 5 ++++-

>  ArmVirtPkg/ArmVirtXen.dsc                                                | 5 ++++-

>  ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf | 3 +++

>  4 files changed, 15 insertions(+), 3 deletions(-)

> 

> diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc

> index d0ecea4616a6..7743d912d21c 100644

> --- a/ArmVirtPkg/ArmVirtQemu.dsc

> +++ b/ArmVirtPkg/ArmVirtQemu.dsc

> @@ -313,7 +313,10 @@ [Components.common]

>    MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf

>  

>    ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

> -  ArmPkg/Drivers/TimerDxe/TimerDxe.inf

> +  ArmPkg/Drivers/TimerDxe/TimerDxe.inf {

> +    <LibraryClasses>

> +      NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf

> +  }

>  !if $(SECURE_BOOT_ENABLE) == TRUE

>    ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashAuthenticatedDxe.inf

>  !else

> diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc

> index fde5688c2102..a30557d8c306 100644

> --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc

> +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc

> @@ -291,7 +291,10 @@ [Components.common]

>    MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf

>  

>    ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

> -  ArmPkg/Drivers/TimerDxe/TimerDxe.inf

> +  ArmPkg/Drivers/TimerDxe/TimerDxe.inf {

> +    <LibraryClasses>

> +      NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf

> +  }

>  !if $(SECURE_BOOT_ENABLE) == TRUE

>    ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashAuthenticatedDxe.inf

>  !else

> diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc

> index 9cf51d5554ea..7ea46514dad3 100644

> --- a/ArmVirtPkg/ArmVirtXen.dsc

> +++ b/ArmVirtPkg/ArmVirtXen.dsc

> @@ -202,7 +202,10 @@ [Components.common]

>    MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf

>  

>    ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

> -  ArmPkg/Drivers/TimerDxe/TimerDxe.inf

> +  ArmPkg/Drivers/TimerDxe/TimerDxe.inf {

> +    <LibraryClasses>

> +      NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf

> +  }

>    MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf

>  

>    #

> diff --git a/ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf b/ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf

> index e54c401b305e..040339c882e6 100644

> --- a/ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf

> +++ b/ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf

> @@ -43,3 +43,6 @@ [Pcd]

>    gArmTokenSpaceGuid.PcdArmArchTimerIntrNum

>    gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum

>    gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum

> +

> +[Depex]

> +  gFdtClientProtocolGuid

> 


As I wrote for the previous patch, I think this DepEx hunk belongs there.

With the above fixed up:
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
index d0ecea4616a6..7743d912d21c 100644
--- a/ArmVirtPkg/ArmVirtQemu.dsc
+++ b/ArmVirtPkg/ArmVirtQemu.dsc
@@ -313,7 +313,10 @@  [Components.common]
   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 
   ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
-  ArmPkg/Drivers/TimerDxe/TimerDxe.inf
+  ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
+    <LibraryClasses>
+      NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
+  }
 !if $(SECURE_BOOT_ENABLE) == TRUE
   ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashAuthenticatedDxe.inf
 !else
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc
index fde5688c2102..a30557d8c306 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
+++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
@@ -291,7 +291,10 @@  [Components.common]
   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 
   ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
-  ArmPkg/Drivers/TimerDxe/TimerDxe.inf
+  ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
+    <LibraryClasses>
+      NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
+  }
 !if $(SECURE_BOOT_ENABLE) == TRUE
   ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashAuthenticatedDxe.inf
 !else
diff --git a/ArmVirtPkg/ArmVirtXen.dsc b/ArmVirtPkg/ArmVirtXen.dsc
index 9cf51d5554ea..7ea46514dad3 100644
--- a/ArmVirtPkg/ArmVirtXen.dsc
+++ b/ArmVirtPkg/ArmVirtXen.dsc
@@ -202,7 +202,10 @@  [Components.common]
   MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
 
   ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
-  ArmPkg/Drivers/TimerDxe/TimerDxe.inf
+  ArmPkg/Drivers/TimerDxe/TimerDxe.inf {
+    <LibraryClasses>
+      NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
+  }
   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
 
   #
diff --git a/ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf b/ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
index e54c401b305e..040339c882e6 100644
--- a/ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
+++ b/ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
@@ -43,3 +43,6 @@  [Pcd]
   gArmTokenSpaceGuid.PcdArmArchTimerIntrNum
   gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum
   gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum
+
+[Depex]
+  gFdtClientProtocolGuid