flashrom: Debug print actual time base calculated by myusec_calibrate_delay()

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3569 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Peter Stuge 2008-09-07 03:14:27 +00:00
parent f044f282ea
commit 05e0feece9
1 changed files with 7 additions and 1 deletions

View File

@ -55,6 +55,12 @@ void myusec_calibrate_delay()
// compute one microsecond. That will be count / time // compute one microsecond. That will be count / time
micro = count / timeusec; micro = count / timeusec;
printf_debug("%ldM loops per second. ", (unsigned long)micro); gettimeofday(&start, 0);
myusec_delay(100);
gettimeofday(&end, 0);
timeusec = 1000000 * (end.tv_sec - start.tv_sec) +
(end.tv_usec - start.tv_usec);
printf_debug("%ldM loops per second, 100 myus = %ld us. ",
(unsigned long)micro, timeusec);
printf("OK.\n"); printf("OK.\n");
} }