diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-03 09:33:35 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-06-03 09:33:35 +0000 |
commit | ce9cc403bdd8f8d7f8aeebdac40485bf8e0d7be6 (patch) | |
tree | 15c193ef2b04d71b9c579e9a677d37edd281ec18 /ArmPlatformPkg/Drivers | |
parent | 23792dea0ca521e8696c7994e9cc6d04581f0b2c (diff) | |
download | edk2-platforms-ce9cc403bdd8f8d7f8aeebdac40485bf8e0d7be6.tar.xz |
ArmPlatformPkg/SP804Timer: Introduce gArmPlatformTokenSpaceGuid.PcdSP804FrequencyInMHz
This PCD defines the speed of the SP804 timer. The default value is 1MHz.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11745 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Drivers')
-rw-r--r-- | ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c | 1 | ||||
-rw-r--r-- | ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c b/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c index c7fb50dd0e..7e47891981 100644 --- a/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c +++ b/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804Timer.c @@ -218,6 +218,7 @@ TimerDriverSetTimerPeriod ( } else { // Convert TimerPeriod into 1MHz clock counts (us units = 100ns units / 10) TimerTicks = DivU64x32 (TimerPeriod, 10); + TimerTicks = MultU64x32 (TimerTicks, PcdGet32(PcdSP804FrequencyInMHz)); // if it's larger than 32-bits, pin to highest value if (TimerTicks > 0xffffffff) { diff --git a/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf b/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf index 5b65f26499..a1765cc78c 100644 --- a/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf +++ b/ArmPlatformPkg/Drivers/SP804TimerDxe/SP804TimerDxe.inf @@ -48,6 +48,7 @@ gHardwareInterruptProtocolGuid [Pcd.common] + gArmPlatformTokenSpaceGuid.PcdSP804FrequencyInMHz gEmbeddedTokenSpaceGuid.PcdTimerPeriod [Depex] |