diff options
author | Greg Watson <jarrah@users.sourceforge.net> | 2004-03-17 22:35:52 +0000 |
---|---|---|
committer | Greg Watson <jarrah@users.sourceforge.net> | 2004-03-17 22:35:52 +0000 |
commit | 317cde826df9bea683fda5cc4207d3bb10c6bb54 (patch) | |
tree | 357cd745eb955cc227d8dec9dfdbe43986b717bd | |
parent | 115bd0549bfca99a49e5d929820af605dab715b1 (diff) |
added spin-up delay
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1429 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r-- | src/stream/fs/blockdev.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/stream/fs/blockdev.c b/src/stream/fs/blockdev.c index 336f435a25..aa818dd496 100644 --- a/src/stream/fs/blockdev.c +++ b/src/stream/fs/blockdev.c @@ -2,6 +2,7 @@ #include <fs/fs.h> #include <arch/io.h> #include <string.h> +#include <delay.h> #include <pc80/ide.h> #include <arch/byteorder.h> @@ -229,7 +230,7 @@ static int parse_device_name(const char *name, int *type, int *drive, int devopen(const char *name, int *reopen) { - int type, drive, part; + int type, drive, part, i; uint64_t offset, length; uint32_t disk_size = 0; @@ -258,6 +259,15 @@ int devopen(const char *name, int *reopen) switch (type) { case DISK_IDE: + printk_debug ("Trying polled ide\n"); + printk_debug ("Waiting for ide disks to spin up\n"); + printk_notice ("This is a hard coded delay and longer than necessary.\n"); + for (i = 0; i < 2; i++) { + printk_notice ("."); + delay(1); + } + printk_info ("\n"); + if (ide_probe(drive) != 0) { printk_debug("failed to open ide\n"); return 0; |