summaryrefslogtreecommitdiffstats
path: root/udelay.c
diff options
context:
space:
mode:
authorOllie Lho <ollie@sis.com.tw>2004-03-20 16:46:10 +0000
committerOllie Lho <ollie@sis.com.tw>2004-03-20 16:46:10 +0000
commit761bf1bdb7268f8818dd22b15e944365afdf1459 (patch)
treeecbd632c87d64c6651f84a705ce4c3861108069d /udelay.c
parent73eca80d9b28bfc38fa4b8d2ef9c580840133a38 (diff)
downloadast2050-flashrom-761bf1bdb7268f8818dd22b15e944365afdf1459.zip
ast2050-flashrom-761bf1bdb7268f8818dd22b15e944365afdf1459.tar.gz
Consolidate more jedec standard code
Corresponding to flashrom svn r15 and coreboot v2 svn r1457.
Diffstat (limited to 'udelay.c')
-rw-r--r--udelay.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/udelay.c b/udelay.c
index ad2fb4e..30b8dde 100644
--- a/udelay.c
+++ b/udelay.c
@@ -7,8 +7,7 @@ unsigned long micro = 1;
void myusec_delay(int time)
{
volatile unsigned long i;
- for (i = 0; i < time * micro; i++)
- ;
+ for (i = 0; i < time * micro; i++);
}
void myusec_calibrate_delay()
@@ -23,10 +22,10 @@ void myusec_calibrate_delay()
gettimeofday(&start, 0);
myusec_delay(count);
gettimeofday(&end, 0);
- timeusec = 1000000 * (end.tv_sec - start.tv_sec ) +
- (end.tv_usec - start.tv_usec);
+ timeusec = 1000000 * (end.tv_sec - start.tv_sec) +
+ (end.tv_usec - start.tv_usec);
count *= 2;
- if (timeusec < 1000000/4)
+ if (timeusec < 1000000 / 4)
continue;
ok = 1;
}
@@ -34,5 +33,5 @@ void myusec_calibrate_delay()
// compute one microsecond. That will be count / time
micro = count / timeusec;
- fprintf(stderr, "%ldM loops per second\n", (unsigned long)micro);
+ fprintf(stderr, "%ldM loops per second\n", (unsigned long) micro);
}
OpenPOWER on IntegriCloud