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
This commit is contained in:
oliviermartin
2011-06-03 09:33:35 +00:00
parent 23792dea0c
commit ce9cc403bd
5 changed files with 32 additions and 11 deletions

View File

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