diff options
author | Stephen Warren <swarren@nvidia.com> | 2013-05-14 08:02:56 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-06-04 16:06:32 -0400 |
commit | 99bd544ee76af3302b8421eaaddfe61f56915fc6 (patch) | |
tree | b51cfc8a6fb220492c499b9f9bacf93064367548 /common | |
parent | df637fa6da6e0f6b1d14d84f1afdd729bc2e2d1a (diff) | |
download | u-boot-imx-99bd544ee76af3302b8421eaaddfe61f56915fc6.zip u-boot-imx-99bd544ee76af3302b8421eaaddfe61f56915fc6.tar.gz u-boot-imx-99bd544ee76af3302b8421eaaddfe61f56915fc6.tar.bz2 |
fdt: allow bootdelay to be specified via device tree
This can be useful to force bootcmd to execute as soon as U-Boot has
started.
My use-case is: An SoC-specific tool pushes U-Boot into RAM, along with
an image to be written to device boot flash, with the DT config property
"bootcmd" set to contain a command to write that image to flash. In this
scenario, we don't want to allow any stale bootdelay value taken from
the current flash content to affect how long it takes before the
flashing process starts.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/main.c b/common/main.c index f6b9dc2..56da214 100644 --- a/common/main.c +++ b/common/main.c @@ -358,6 +358,11 @@ static void process_boot_delay(void) s = getenv ("bootdelay"); bootdelay = s ? (int)simple_strtol(s, NULL, 10) : CONFIG_BOOTDELAY; +#ifdef CONFIG_OF_CONTROL + bootdelay = fdtdec_get_config_int(gd->fdt_blob, "bootdelay", + bootdelay); +#endif + debug ("### main_loop entered: bootdelay=%d\n\n", bootdelay); #if defined(CONFIG_MENU_SHOW) |