summaryrefslogtreecommitdiffstats
path: root/sys/boot
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2006-04-21 13:58:51 +0000
committerimp <imp@FreeBSD.org>2006-04-21 13:58:51 +0000
commit12209e78beabe7813db4a4639012d6accc7a00a3 (patch)
tree2ea8c71fa5d62e16cca1bec4896d8676fe53285e /sys/boot
parent67b9c508f82798d9469e40cd4a1b50b9c2d73af5 (diff)
downloadFreeBSD-src-12209e78beabe7813db4a4639012d6accc7a00a3.zip
FreeBSD-src-12209e78beabe7813db4a4639012d6accc7a00a3.tar.gz
MFp4:
Make getc(0) polling (this has the happy side effect of saving 8 bytes in the generated code).
Diffstat (limited to 'sys/boot')
-rw-r--r--sys/boot/arm/at91/libat91/getc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/boot/arm/at91/libat91/getc.c b/sys/boot/arm/at91/libat91/getc.c
index c86183b..e0a43b9 100644
--- a/sys/boot/arm/at91/libat91/getc.c
+++ b/sys/boot/arm/at91/libat91/getc.c
@@ -53,10 +53,10 @@ getc(int seconds)
thisSecond = GetSeconds();
seconds = thisSecond + seconds;
- while (thisSecond <= seconds) {
+ do {
if ((pUSART->US_CSR & AT91C_US_RXRDY))
return (pUSART->US_RHR & 0xFF);
thisSecond = GetSeconds();
- }
+ } while (thisSecond < seconds);
return (-1);
}
OpenPOWER on IntegriCloud