From 9b0559cc75723441317fa9c35556a7df42abd6e6 Mon Sep 17 00:00:00 2001 From: Ashish Singhal Date: Thu, 19 Dec 2024 17:55:43 +0000 Subject: [PATCH] ArmPkg: Update Generic Watchdog PCD Type Do not use the PCDs as only fixed when there is an option to use them as dynamic that can be set per SKU. Signed-off-by: Ashish Singhal --- .../Drivers/GenericWatchdogDxe/GenericWatchdog.h | 14 +++++++------- .../GenericWatchdogDxe/GenericWatchdogDxe.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h index b7d6f7e7847e..9bdc4bd25ad9 100644 --- a/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h +++ b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h @@ -14,15 +14,15 @@ #define GENERIC_WATCHDOG_H_ // Refresh Frame: -#define GENERIC_WDOG_REFRESH_REG ((UINTN)FixedPcdGet64 (PcdGenericWatchdogRefreshBase) + 0x000) +#define GENERIC_WDOG_REFRESH_REG ((UINTN)PcdGet64 (PcdGenericWatchdogRefreshBase) + 0x000) // Control Frame: -#define GENERIC_WDOG_CONTROL_STATUS_REG ((UINTN)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x000) -#define GENERIC_WDOG_OFFSET_REG_LOW ((UINTN)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x008) -#define GENERIC_WDOG_OFFSET_REG_HIGH ((UINTN)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x00C) -#define GENERIC_WDOG_COMPARE_VALUE_REG_LOW ((UINTN)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x010) -#define GENERIC_WDOG_COMPARE_VALUE_REG_HIGH ((UINTN)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0x014) -#define GENERIC_WDOG_IID_REG ((UINTN)FixedPcdGet64 (PcdGenericWatchdogControlBase) + 0xFCC) +#define GENERIC_WDOG_CONTROL_STATUS_REG ((UINTN)PcdGet64 (PcdGenericWatchdogControlBase) + 0x000) +#define GENERIC_WDOG_OFFSET_REG_LOW ((UINTN)PcdGet64 (PcdGenericWatchdogControlBase) + 0x008) +#define GENERIC_WDOG_OFFSET_REG_HIGH ((UINTN)PcdGet64 (PcdGenericWatchdogControlBase) + 0x00C) +#define GENERIC_WDOG_COMPARE_VALUE_REG_LOW ((UINTN)PcdGet64 (PcdGenericWatchdogControlBase) + 0x010) +#define GENERIC_WDOG_COMPARE_VALUE_REG_HIGH ((UINTN)PcdGet64 (PcdGenericWatchdogControlBase) + 0x014) +#define GENERIC_WDOG_IID_REG ((UINTN)PcdGet64 (PcdGenericWatchdogControlBase) + 0xFCC) // Values of bit 0 of the Control/Status Register #define GENERIC_WDOG_ENABLED 1 diff --git a/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c index b91e62e1a815..07578e685f82 100644 --- a/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c +++ b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c @@ -375,7 +375,7 @@ GenericWatchdogEntry ( // Install interrupt handler Status = mInterruptProtocol->RegisterInterruptSource ( mInterruptProtocol, - FixedPcdGet32 (PcdGenericWatchdogEl2IntrNum), + PcdGet32 (PcdGenericWatchdogEl2IntrNum), WatchdogInterruptHandler ); if (EFI_ERROR (Status)) { @@ -384,7 +384,7 @@ GenericWatchdogEntry ( Status = mInterruptProtocol->SetTriggerType ( mInterruptProtocol, - FixedPcdGet32 (PcdGenericWatchdogEl2IntrNum), + PcdGet32 (PcdGenericWatchdogEl2IntrNum), EFI_HARDWARE_INTERRUPT2_TRIGGER_EDGE_RISING ); if (EFI_ERROR (Status)) { @@ -421,7 +421,7 @@ GenericWatchdogEntry ( // Unregister the handler mInterruptProtocol->RegisterInterruptSource ( mInterruptProtocol, - FixedPcdGet32 (PcdGenericWatchdogEl2IntrNum), + PcdGet32 (PcdGenericWatchdogEl2IntrNum), NULL ); return Status;