diff options
author | Ashish Singhal <ashishsingha@nvidia.com> | 2024-12-19 17:55:43 +0000 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-12-23 12:07:43 +0000 |
commit | c52dddf1eb9abd8e721ba4cc6bdab3f5f45b4256 (patch) | |
tree | a9fe07d89eaf66107ce73720115a289849ec7a63 | |
parent | 4971459ab2c5e231a4b765e6fda57fc6d2869c53 (diff) | |
download | edk2-c52dddf1eb9abd8e721ba4cc6bdab3f5f45b4256.tar.gz |
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>
-rw-r--r-- | ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdog.h | 14 | ||||
-rw-r--r-- | ArmPkg/Drivers/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 b7d6f7e784..9bdc4bd25a 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 b91e62e1a8..07578e685f 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 @@ UnregisterHandler: // Unregister the handler
mInterruptProtocol->RegisterInterruptSource (
mInterruptProtocol,
- FixedPcdGet32 (PcdGenericWatchdogEl2IntrNum),
+ PcdGet32 (PcdGenericWatchdogEl2IntrNum),
NULL
);
return Status;
|