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 <ashishsingha@nvidia.com>
This commit is contained in:
Ashish Singhal 2024-12-19 17:55:43 +00:00 committed by mergify[bot]
parent 4971459ab2
commit c52dddf1eb
2 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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 @@ UnregisterHandler:
// Unregister the handler
mInterruptProtocol->RegisterInterruptSource (
mInterruptProtocol,
FixedPcdGet32 (PcdGenericWatchdogEl2IntrNum),
PcdGet32 (PcdGenericWatchdogEl2IntrNum),
NULL
);
return Status;