* increase tolerance checking as we store kHz vs 10kHz units

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42874 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexander von Gluck IV 2011-10-17 19:19:13 +00:00
parent 05a2fee650
commit 96eb5a46fd

View File

@ -244,11 +244,11 @@ pll_compute(pll_info *pll)
}
uint32 tmp = (referenceFrequency * pll->feedbackDiv)
/ (pll->postDiv * pll->referenceDiv);
tmp = (tmp * 10000) / targetClock;
tmp = (tmp * 100000) / targetClock;
if (tmp > (10000 + MAX_TOLERANCE))
if (tmp > (100000 + (MAX_TOLERANCE * 10)))
pll->referenceDiv++;
else if (tmp >= (10000 - MAX_TOLERANCE))
else if (tmp >= (100000 - (MAX_TOLERANCE * 10)))
break;
else
pll->referenceDiv++;