Author: mjones Date: 2008-10-23 00:30:17 +0200 (Thu, 23 Oct 2008) New Revision: 3690
Modified: trunk/coreboot-v2/src/pc80/ide/ide.c Log: 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
Modified: trunk/coreboot-v2/src/pc80/ide/ide.c =================================================================== --- trunk/coreboot-v2/src/pc80/ide/ide.c 2008-10-22 22:26:09 UTC (rev 3689) +++ trunk/coreboot-v2/src/pc80/ide/ide.c 2008-10-22 22:30:17 UTC (rev 3690) @@ -29,6 +29,7 @@ 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 @@ 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;