summaryrefslogtreecommitdiff
path: root/ArmPlatformPkg/Drivers/SP805WatchdogDxe
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-01 19:51:48 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-07-01 19:51:48 +0000
commit3723a71a33d88307d96bca4facdce7d0120d922f (patch)
treeb0390fc2e6bcd235d5855f804190220050fdc055 /ArmPlatformPkg/Drivers/SP805WatchdogDxe
parentcb5bf2697d3a79cc4a65c5e9d511123e332d072b (diff)
ArmPlatformPkg: Fix builds
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11964 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Drivers/SP805WatchdogDxe')
-rw-r--r--ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c b/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c
index 840f8ede1..f8faab735 100644
--- a/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c
+++ b/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c
@@ -282,10 +282,10 @@ SP805SetTimerPeriod (
//
// WatchdogTicks = (TimerPeriod * SP805_CLOCK_FREQUENCY) / 20 MHz ;
- Ticks64bit = DivU64x32( MultU64x32( TimerPeriod, SP805_CLOCK_FREQUENCY ), 20000000 );
+ Ticks64bit = DivU64x32(MultU64x32(TimerPeriod, (UINTN)PcdGet32(PcdSP805WatchdogClockFrequencyInHz)), 20000000);
// The registers in the SP805 are only 32 bits
- if( Ticks64bit > SP805_MAX_TICKS ) {
+ if(Ticks64bit > (UINT64)0xFFFFFFFF) {
// We could load the watchdog with the maximum supported value but
// if a smaller value was requested, this could have the watchdog
// triggering before it was intended.