[edk2] [PATCH 07/19] ArmPlatformPkg: PL111LcdArmVExpressLib: Use FixedPcdGet32

evan.lloyd@arm.com posted 19 patches 7 years, 3 months ago
There is a newer version of this series
[edk2] [PATCH 07/19] ArmPlatformPkg: PL111LcdArmVExpressLib: Use FixedPcdGet32
Posted by evan.lloyd@arm.com 7 years, 3 months ago
From: Girish Pathak <girish.pathak@arm.com>

PcdPL111LcdVideoModeOscId and PcdPL111LcdMaxMode are declared as fixed
PCDs. However code uses PcdGet32 call to get these values.
This change replaces PcdGet32 with FixedPcdGet32.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
---
 ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf | 2 +-
 ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf
index 3fde707c33dbcbd8adbbf18bbba718b823194abc..1a044baf4698aa6bfa5cd6038f01e84f7a633ea9 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf
+++ b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf
@@ -39,6 +39,6 @@ [Protocols]
   gEfiEdidDiscoveredProtocolGuid                # Produced
   gEfiEdidActiveProtocolGuid                    # Produced
 
-[Pcd]
+[FixedPcd]
   gArmVExpressTokenSpaceGuid.PcdPL111LcdMaxMode
   gArmVExpressTokenSpaceGuid.PcdPL111LcdVideoModeOscId
diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c
index b25a1ba93dbfd8f6450dbdf97194c15c30defa20..59006c4cfd771fdd7ca1dab91728d4dafe2fe831 100644
--- a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c
+++ b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c
@@ -277,7 +277,7 @@ LcdPlatformGetMaxMode(VOID)
    */
 
   // Set the maximum mode allowed
-  return (PcdGet32 (PcdPL111LcdMaxMode));
+  return (FixedPcdGet32 (PcdPL111LcdMaxMode));
 }
 
 /** Set the requested display mode.
@@ -310,7 +310,7 @@ LcdPlatformSetMode (
     break;
   case ARM_VE_DAUGHTERBOARD_1_SITE:
     Function = SYS_CFG_OSC_SITE1;
-    OscillatorId = (UINT32)PcdGet32 (PcdPL111LcdVideoModeOscId);
+    OscillatorId = FixedPcdGet32 (PcdPL111LcdVideoModeOscId);
     break;
   default:
     return EFI_UNSUPPORTED;
-- 
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 07/19] ArmPlatformPkg: PL111LcdArmVExpressLib: Use FixedPcdGet32
Posted by Leif Lindholm 7 years, 2 months ago
On Tue, Sep 26, 2017 at 09:15:17PM +0100, evan.lloyd@arm.com wrote:
> From: Girish Pathak <girish.pathak@arm.com>
> 
> PcdPL111LcdVideoModeOscId and PcdPL111LcdMaxMode are declared as fixed
> PCDs. However code uses PcdGet32 call to get these values.
> This change replaces PcdGet32 with FixedPcdGet32.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Girish Pathak <girish.pathak@arm.com>
> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>

Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

> ---
>  ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf | 2 +-
>  ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c      | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf
> index 3fde707c33dbcbd8adbbf18bbba718b823194abc..1a044baf4698aa6bfa5cd6038f01e84f7a633ea9 100644
> --- a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf
> +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpressLib.inf
> @@ -39,6 +39,6 @@ [Protocols]
>    gEfiEdidDiscoveredProtocolGuid                # Produced
>    gEfiEdidActiveProtocolGuid                    # Produced
>  
> -[Pcd]
> +[FixedPcd]
>    gArmVExpressTokenSpaceGuid.PcdPL111LcdMaxMode
>    gArmVExpressTokenSpaceGuid.PcdPL111LcdVideoModeOscId
> diff --git a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c
> index b25a1ba93dbfd8f6450dbdf97194c15c30defa20..59006c4cfd771fdd7ca1dab91728d4dafe2fe831 100644
> --- a/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c
> +++ b/ArmPlatformPkg/ArmVExpressPkg/Library/PL111LcdArmVExpressLib/PL111LcdArmVExpress.c
> @@ -277,7 +277,7 @@ LcdPlatformGetMaxMode(VOID)
>     */
>  
>    // Set the maximum mode allowed
> -  return (PcdGet32 (PcdPL111LcdMaxMode));
> +  return (FixedPcdGet32 (PcdPL111LcdMaxMode));
>  }
>  
>  /** Set the requested display mode.
> @@ -310,7 +310,7 @@ LcdPlatformSetMode (
>      break;
>    case ARM_VE_DAUGHTERBOARD_1_SITE:
>      Function = SYS_CFG_OSC_SITE1;
> -    OscillatorId = (UINT32)PcdGet32 (PcdPL111LcdVideoModeOscId);
> +    OscillatorId = FixedPcdGet32 (PcdPL111LcdVideoModeOscId);
>      break;
>    default:
>      return EFI_UNSUPPORTED;
> -- 
> Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
> 
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel