diff options
author | Quinn Jensen <quinn.jensen@freescale.com> | 2007-10-24 21:22:17 -0600 |
---|---|---|
committer | Quinn Jensen <quinn.jensen@freescale.com> | 2007-10-24 21:22:17 -0600 |
commit | 7eeec8642b84086fcff550f1d1d8f24a55ad5fc3 (patch) | |
tree | 8d39929f951abf663a1ac81f1c40cd85bfd1c413 /init | |
parent | 40b728a43e3aba1a810ea3a8332e90a606e99807 (diff) |
Backport to 2.6.22.6 of MMC/SD/SDIO updates in 2.6.23-rc3
Backport of MMC/SD/SDIO updates from the linux 2.6.23-rc3 kernel to the
2.6.22.6 kernel. This patch created from mmc diffs between linus git
2.6.22 and 2.6.23-rc3. Sources are available from kernel.org.
http://www.bitshrine.org/gpp/linux-2.6.22-mx-Backport-to-2.6.22.6-of-MMC-SD-SDIO-update.patch
Diffstat (limited to 'init')
-rw-r--r-- | init/do_mounts.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c index 46fe407fb03e..4efa1e5385e3 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -25,6 +25,7 @@ int __initdata rd_doload; /* 1 = load RAM disk, 0 = don't load */ int root_mountflags = MS_RDONLY | MS_SILENT; char * __initdata root_device_name; static char __initdata saved_root_name[64]; +static int __initdata root_wait; dev_t ROOT_DEV; @@ -216,6 +217,16 @@ static int __init root_dev_setup(char *line) __setup("root=", root_dev_setup); +static int __init rootwait_setup(char *str) +{ + if (*str) + return 0; + root_wait = 1; + return 1; +} + +__setup("rootwait", rootwait_setup); + static char * __initdata root_mount_data; static int __init root_data_setup(char *str) { @@ -438,11 +449,20 @@ void __init prepare_namespace(void) root_device_name += 5; } - is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; - if (initrd_load()) goto out; + /* wait for any asynchronous scanning to complete */ + if ((ROOT_DEV == 0) && root_wait) { + printk(KERN_INFO "Waiting for root device %s...\n", + saved_root_name); + while (driver_probe_done() != 0 || + (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0) + msleep(100); + } + + is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; + if (is_floppy && rd_doload && rd_load_disk(0)) ROOT_DEV = Root_RAM0; |