summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Rottmann <JRottmann@LiPPERTEmbedded.de>2008-10-22 22:30:17 +0000
committerMarc Jones <marc.jones@amd.com>2008-10-22 22:30:17 +0000
commitc811a1c6aef38f53fadc4d51b17c56116d2baaac (patch)
tree7ee6a00c58dee295ebec187e28b9a57f4e843127
parentf6fa12d89e8b260bae9652406b8a4ce519c783e0 (diff)
downloadcoreboot-c811a1c6aef38f53fadc4d51b17c56116d2baaac.tar.xz
Made await_ide(), which polls for an ide status change, check the status
reg much more often. In my case this reduced the time spent in coreboot by 1.5 sec! The timeout values of course aren't changed, only the granularity. Also, I didn't see any udelay() implementation that looked like it couldn't cope with 10 us delays. (Most are written as for (...) inb(0x80) loops.) Signed-off-by: Jens Rottmann <JRottmann@LiPPERTEmbedded.de> Acked-by: Marc Jones <marc.jones@amd.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3690 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r--src/pc80/ide/ide.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pc80/ide/ide.c b/src/pc80/ide/ide.c
index eab879bc32..a164e9e762 100644
--- a/src/pc80/ide/ide.c
+++ b/src/pc80/ide/ide.c
@@ -29,6 +29,7 @@ static int await_ide(int (*done)(struct controller *ctrl),
struct controller *ctrl, unsigned long timeout)
{
int result;
+ timeout *= 100; /* timeout was ms; finer granularity => reacts faster */
for(;;) {
result = done(ctrl);
if (result) {
@@ -38,7 +39,7 @@ static int await_ide(int (*done)(struct controller *ctrl),
if (timeout-- <= 0) {
break;
}
- udelay(1000); /* Added to avoid spinning GRW */
+ udelay(10); /* Added to avoid spinning GRW */
}
printk_info("IDE time out\n");
return -1;