public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] fdt: allow bootdelay to be specified via device tree
@ 2013-05-14 18:02 Stephen Warren
  2013-05-14 19:08 ` Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stephen Warren @ 2013-05-14 18:02 UTC (permalink / raw)
  To: u-boot

From: Stephen Warren <swarren@nvidia.com>

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>
---
 common/main.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/common/main.c b/common/main.c
index 953ef29..6bfd9f0 100644
--- a/common/main.c
+++ b/common/main.c
@@ -429,6 +429,11 @@ void main_loop (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)
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] fdt: allow bootdelay to be specified via device tree
  2013-05-14 18:02 [U-Boot] [PATCH] fdt: allow bootdelay to be specified via device tree Stephen Warren
@ 2013-05-14 19:08 ` Simon Glass
  2013-06-02  5:24 ` Stephen Warren
  2013-06-05 12:34 ` [U-Boot] " Tom Rini
  2 siblings, 0 replies; 7+ messages in thread
From: Simon Glass @ 2013-05-14 19:08 UTC (permalink / raw)
  To: u-boot

Hi Stephen,

On Tue, May 14, 2013 at 11:02 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> From: Stephen Warren <swarren@nvidia.com>
>
> 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>

Nice idea.

Acked-by: Simon Glass <sjg@chromium.org>

Regards,
Simon

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] fdt: allow bootdelay to be specified via device tree
  2013-05-14 18:02 [U-Boot] [PATCH] fdt: allow bootdelay to be specified via device tree Stephen Warren
  2013-05-14 19:08 ` Simon Glass
@ 2013-06-02  5:24 ` Stephen Warren
  2013-06-02 12:44   ` Gerald Van Baren
  2013-06-05 12:34 ` [U-Boot] " Tom Rini
  2 siblings, 1 reply; 7+ messages in thread
From: Stephen Warren @ 2013-06-02  5:24 UTC (permalink / raw)
  To: u-boot

On 05/14/2013 12:02 PM, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> 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.

Jerry, does this patch look OK, or do you have comments on it? Thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] fdt: allow bootdelay to be specified via device tree
  2013-06-02  5:24 ` Stephen Warren
@ 2013-06-02 12:44   ` Gerald Van Baren
  2013-06-03 15:05     ` Stephen Warren
  0 siblings, 1 reply; 7+ messages in thread
From: Gerald Van Baren @ 2013-06-02 12:44 UTC (permalink / raw)
  To: u-boot

Hi Stephen,

On 06/02/2013 01:24 AM, Stephen Warren wrote:
> On 05/14/2013 12:02 PM, Stephen Warren wrote:
>> From: Stephen Warren <swarren@nvidia.com>
>>
>> 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.
>
> Jerry, does this patch look OK, or do you have comments on it? Thanks.

I'm good with the patch.

Acked-by: Gerald Van Baren <vanbaren@cideas.com>

Thanks,
gvb

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] fdt: allow bootdelay to be specified via device tree
  2013-06-02 12:44   ` Gerald Van Baren
@ 2013-06-03 15:05     ` Stephen Warren
  2013-06-03 16:34       ` Jerry Van Baren
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Warren @ 2013-06-03 15:05 UTC (permalink / raw)
  To: u-boot

On 06/02/2013 06:44 AM, Gerald Van Baren wrote:
> Hi Stephen,
> 
> On 06/02/2013 01:24 AM, Stephen Warren wrote:
>> On 05/14/2013 12:02 PM, Stephen Warren wrote:
>>> From: Stephen Warren <swarren@nvidia.com>
>>>
>>> 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.
>>
>> Jerry, does this patch look OK, or do you have comments on it? Thanks.
> 
> I'm good with the patch.
> 
> Acked-by: Gerald Van Baren <vanbaren@cideas.com>

Oh, I'm not sure who you're expecting to apply this then; I assume since
it was a DT-related feature it'd be applied to your DT tree. Are you
expecting Tom Rini to apply it to the main U-Boot repo?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] [PATCH] fdt: allow bootdelay to be specified via device tree
  2013-06-03 15:05     ` Stephen Warren
@ 2013-06-03 16:34       ` Jerry Van Baren
  0 siblings, 0 replies; 7+ messages in thread
From: Jerry Van Baren @ 2013-06-03 16:34 UTC (permalink / raw)
  To: u-boot

On 06/03/2013 11:05 AM, Stephen Warren wrote:
> On 06/02/2013 06:44 AM, Gerald Van Baren wrote:
>> Hi Stephen,
>>
>> On 06/02/2013 01:24 AM, Stephen Warren wrote:
>>> On 05/14/2013 12:02 PM, Stephen Warren wrote:
>>>> From: Stephen Warren <swarren@nvidia.com>
>>>>
>>>> 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.
>>>
>>> Jerry, does this patch look OK, or do you have comments on it? Thanks.
>>
>> I'm good with the patch.
>>
>> Acked-by: Gerald Van Baren <vanbaren@cideas.com>
>
> Oh, I'm not sure who you're expecting to apply this then; I assume since
> it was a DT-related feature it'd be applied to your DT tree. Are you
> expecting Tom Rini to apply it to the main U-Boot repo?

Ahh, one of those fuzzy gray areas... the patch is to main.c, I mostly 
focus on files in the libfdt subdirectory.  I can apply it via the FDT repo.

Tom Rini, do you have any preference?

The merge window closed May 11 and the original patch was emailed on May 
14... is it a candidate to go into the July 15 release?  It is a simple 
patch arguably fixing a bug, but it did miss the window.

Thanks,
gvb

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [U-Boot] fdt: allow bootdelay to be specified via device tree
  2013-05-14 18:02 [U-Boot] [PATCH] fdt: allow bootdelay to be specified via device tree Stephen Warren
  2013-05-14 19:08 ` Simon Glass
  2013-06-02  5:24 ` Stephen Warren
@ 2013-06-05 12:34 ` Tom Rini
  2 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2013-06-05 12:34 UTC (permalink / raw)
  To: u-boot

On Tue, May 14, 2013 at 08:02:56AM -0000, Stephen Warren wrote:

> From: Stephen Warren <swarren@nvidia.com>
> 
> 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>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130605/7077863d/attachment.pgp>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-06-05 12:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-14 18:02 [U-Boot] [PATCH] fdt: allow bootdelay to be specified via device tree Stephen Warren
2013-05-14 19:08 ` Simon Glass
2013-06-02  5:24 ` Stephen Warren
2013-06-02 12:44   ` Gerald Van Baren
2013-06-03 15:05     ` Stephen Warren
2013-06-03 16:34       ` Jerry Van Baren
2013-06-05 12:34 ` [U-Boot] " Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox