src: Make use of 'CEIL_DIV(a, b)' macro across tree

The objective here is to tighten coreboot up a bit by not repeating
common helpers. This makes the code base more consistent and
unified/tight.

Change-Id: Ia163eae68b4a84a00ed118125e70308fab1cea0c
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/6215
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Edward O'Callaghan
2014-07-08 01:53:24 +10:00
parent c805e62f9d
commit 7116ac8037
12 changed files with 43 additions and 56 deletions

View File

@@ -78,7 +78,7 @@ static unsigned long long calibrate_tsc(void)
if (end.lo <= CALIBRATE_DIVISOR)
goto bad_ctc;
return (end.lo + CALIBRATE_DIVISOR -1)/CALIBRATE_DIVISOR;
return CEIL_DIV(end.lo, CALIBRATE_DIVISOR);
}
/*