public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 6/8] fdt: cmd_fdt: Call fdt_chosen() from "fdt boardsetup"
@ 2012-09-26  9:11 Stefan Roese
  2012-09-26 13:36 ` Kumar Gala
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Roese @ 2012-09-26  9:11 UTC (permalink / raw)
  To: u-boot

By calling fdt_chosen(), the chosen node will be updated /
created by the "fdt boardsetup" command. This is useful for
setting of the kernel commandline via the "bootargs"
env variable.

With this change, the "fdt boardsetup" can be used to prepare
the DT blob for SPL booting. The patched DT blob can be saved
to flash and can be used by the SPL U-Boot version directly
for Linux booting.

Signed-off-by: Stefan Roese <sr@denx.de>
---

 common/cmd_fdt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
index e2225c4..d688334 100644
--- a/common/cmd_fdt.c
+++ b/common/cmd_fdt.c
@@ -425,8 +425,10 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 	}
 #ifdef CONFIG_OF_BOARD_SETUP
 	/* Call the board-specific fixup routine */
-	else if (strncmp(argv[1], "boa", 3) == 0)
+	else if (strncmp(argv[1], "boa", 3) == 0) {
 		ft_board_setup(working_fdt, gd->bd);
+		fdt_chosen(working_fdt, 1);
+	}
 #endif
 	/* Create a chosen node */
 	else if (argv[1][0] == 'c') {
-- 
1.7.12.1

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

* [U-Boot] [PATCH v3 6/8] fdt: cmd_fdt: Call fdt_chosen() from "fdt boardsetup"
  2012-09-26  9:11 [U-Boot] [PATCH v3 6/8] fdt: cmd_fdt: Call fdt_chosen() from "fdt boardsetup" Stefan Roese
@ 2012-09-26 13:36 ` Kumar Gala
  2012-09-26 14:20   ` Stefan Roese
  0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2012-09-26 13:36 UTC (permalink / raw)
  To: u-boot


On Sep 26, 2012, at 4:11 AM, Stefan Roese wrote:

> By calling fdt_chosen(), the chosen node will be updated /
> created by the "fdt boardsetup" command. This is useful for
> setting of the kernel commandline via the "bootargs"
> env variable.
> 
> With this change, the "fdt boardsetup" can be used to prepare
> the DT blob for SPL booting. The patched DT blob can be saved
> to flash and can be used by the SPL U-Boot version directly
> for Linux booting.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> ---
> 
> common/cmd_fdt.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)

There are possibly some workflows this breaks.  I can't remember if for AMP boot we need to do something between ft_board_setup() and fdt_chosen()

- k

> 
> diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
> index e2225c4..d688334 100644
> --- a/common/cmd_fdt.c
> +++ b/common/cmd_fdt.c
> @@ -425,8 +425,10 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
> 	}
> #ifdef CONFIG_OF_BOARD_SETUP
> 	/* Call the board-specific fixup routine */
> -	else if (strncmp(argv[1], "boa", 3) == 0)
> +	else if (strncmp(argv[1], "boa", 3) == 0) {
> 		ft_board_setup(working_fdt, gd->bd);
> +		fdt_chosen(working_fdt, 1);
> +	}
> #endif
> 	/* Create a chosen node */
> 	else if (argv[1][0] == 'c') {
> -- 
> 1.7.12.1
> 
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

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

* [U-Boot] [PATCH v3 6/8] fdt: cmd_fdt: Call fdt_chosen() from "fdt boardsetup"
  2012-09-26 13:36 ` Kumar Gala
@ 2012-09-26 14:20   ` Stefan Roese
  2012-09-27 20:28     ` Kumar Gala
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Roese @ 2012-09-26 14:20 UTC (permalink / raw)
  To: u-boot

Hi Kumar,

On 09/26/2012 03:36 PM, Kumar Gala wrote:
>> By calling fdt_chosen(), the chosen node will be updated /
>> created by the "fdt boardsetup" command. This is useful for
>> setting of the kernel commandline via the "bootargs"
>> env variable.
>>
>> With this change, the "fdt boardsetup" can be used to prepare
>> the DT blob for SPL booting. The patched DT blob can be saved
>> to flash and can be used by the SPL U-Boot version directly
>> for Linux booting.
>>
>> Signed-off-by: Stefan Roese <sr@denx.de>
>> ---
>>
>> common/cmd_fdt.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
> 
> There are possibly some workflows this breaks.  I can't remember
> if for AMP boot we need to do something between ft_board_setup()
> and fdt_chosen()

Could you please elaborate what exactly you fear here? Is this a NACK
for this patch?

Thanks,
Stefan

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

* [U-Boot] [PATCH v3 6/8] fdt: cmd_fdt: Call fdt_chosen() from "fdt boardsetup"
  2012-09-26 14:20   ` Stefan Roese
@ 2012-09-27 20:28     ` Kumar Gala
  2012-09-27 20:43       ` McClintock Matthew-B29882
  0 siblings, 1 reply; 8+ messages in thread
From: Kumar Gala @ 2012-09-27 20:28 UTC (permalink / raw)
  To: u-boot


On Sep 26, 2012, at 9:20 AM, Stefan Roese wrote:

> Hi Kumar,
> 
> On 09/26/2012 03:36 PM, Kumar Gala wrote:
>>> By calling fdt_chosen(), the chosen node will be updated /
>>> created by the "fdt boardsetup" command. This is useful for
>>> setting of the kernel commandline via the "bootargs"
>>> env variable.
>>> 
>>> With this change, the "fdt boardsetup" can be used to prepare
>>> the DT blob for SPL booting. The patched DT blob can be saved
>>> to flash and can be used by the SPL U-Boot version directly
>>> for Linux booting.
>>> 
>>> Signed-off-by: Stefan Roese <sr@denx.de>
>>> ---
>>> 
>>> common/cmd_fdt.c | 4 +++-
>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>> 
>> There are possibly some workflows this breaks.  I can't remember
>> if for AMP boot we need to do something between ft_board_setup()
>> and fdt_chosen()
> 
> Could you please elaborate what exactly you fear here? Is this a NACK
> for this patch?

Possibly.  I've got to find our docs on how we do 2-core AMP booting sequence w/regards to device tree.

- k

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

* [U-Boot] [PATCH v3 6/8] fdt: cmd_fdt: Call fdt_chosen() from "fdt boardsetup"
  2012-09-27 20:28     ` Kumar Gala
@ 2012-09-27 20:43       ` McClintock Matthew-B29882
  2012-10-02 10:26         ` Stefan Roese
  0 siblings, 1 reply; 8+ messages in thread
From: McClintock Matthew-B29882 @ 2012-09-27 20:43 UTC (permalink / raw)
  To: u-boot

On Thu, Sep 27, 2012 at 3:28 PM, Kumar Gala <galak@kernel.crashing.org> wrote:
>
> On Sep 26, 2012, at 9:20 AM, Stefan Roese wrote:
>
>> Hi Kumar,
>>
>> On 09/26/2012 03:36 PM, Kumar Gala wrote:
>>>> By calling fdt_chosen(), the chosen node will be updated /
>>>> created by the "fdt boardsetup" command. This is useful for
>>>> setting of the kernel commandline via the "bootargs"
>>>> env variable.
>>>>
>>>> With this change, the "fdt boardsetup" can be used to prepare
>>>> the DT blob for SPL booting. The patched DT blob can be saved
>>>> to flash and can be used by the SPL U-Boot version directly
>>>> for Linux booting.
>>>>
>>>> Signed-off-by: Stefan Roese <sr@denx.de>
>>>> ---
>>>>
>>>> common/cmd_fdt.c | 4 +++-
>>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> There are possibly some workflows this breaks.  I can't remember
>>> if for AMP boot we need to do something between ft_board_setup()
>>> and fdt_chosen()
>>
>> Could you please elaborate what exactly you fear here? Is this a NACK
>> for this patch?
>
> Possibly.  I've got to find our docs on how we do 2-core AMP booting sequence w/regards to device tree.

See if this works:

http://www.freescale.com/infocenter/index.jsp?topic=%2FQORIQSDK%2F2151493.html

-M

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

* [U-Boot] [PATCH v3 6/8] fdt: cmd_fdt: Call fdt_chosen() from "fdt boardsetup"
  2012-09-27 20:43       ` McClintock Matthew-B29882
@ 2012-10-02 10:26         ` Stefan Roese
  2012-10-03  0:57           ` McClintock Matthew-B29882
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Roese @ 2012-10-02 10:26 UTC (permalink / raw)
  To: u-boot

On 09/27/2012 10:43 PM, McClintock Matthew-B29882 wrote:
>>>>> By calling fdt_chosen(), the chosen node will be updated /
>>>>> created by the "fdt boardsetup" command. This is useful for
>>>>> setting of the kernel commandline via the "bootargs"
>>>>> env variable.
>>>>>
>>>>> With this change, the "fdt boardsetup" can be used to prepare
>>>>> the DT blob for SPL booting. The patched DT blob can be saved
>>>>> to flash and can be used by the SPL U-Boot version directly
>>>>> for Linux booting.
>>>>>
>>>>> Signed-off-by: Stefan Roese <sr@denx.de>
>>>>> ---
>>>>>
>>>>> common/cmd_fdt.c | 4 +++-
>>>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>>
>>>> There are possibly some workflows this breaks.  I can't remember
>>>> if for AMP boot we need to do something between ft_board_setup()
>>>> and fdt_chosen()
>>>
>>> Could you please elaborate what exactly you fear here? Is this a NACK
>>> for this patch?
>>
>> Possibly.  I've got to find our docs on how we do 2-core AMP booting sequence w/regards to device tree.
> 
> See if this works:
> 
> http://www.freescale.com/infocenter/index.jsp?topic=%2FQORIQSDK%2F2151493.html

Kumar, did you find the time to check/test this? I would really like to
know if this patch is okay with you.

Thanks,
Stefan

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

* [U-Boot] [PATCH v3 6/8] fdt: cmd_fdt: Call fdt_chosen() from "fdt boardsetup"
  2012-10-02 10:26         ` Stefan Roese
@ 2012-10-03  0:57           ` McClintock Matthew-B29882
  2012-10-04  7:43             ` Stefan Roese
  0 siblings, 1 reply; 8+ messages in thread
From: McClintock Matthew-B29882 @ 2012-10-03  0:57 UTC (permalink / raw)
  To: u-boot

On Tue, Oct 2, 2012 at 5:26 AM, Stefan Roese <sr@denx.de> wrote:
> On 09/27/2012 10:43 PM, McClintock Matthew-B29882 wrote:
>>>>>> By calling fdt_chosen(), the chosen node will be updated /
>>>>>> created by the "fdt boardsetup" command. This is useful for
>>>>>> setting of the kernel commandline via the "bootargs"
>>>>>> env variable.
>>>>>>
>>>>>> With this change, the "fdt boardsetup" can be used to prepare
>>>>>> the DT blob for SPL booting. The patched DT blob can be saved
>>>>>> to flash and can be used by the SPL U-Boot version directly
>>>>>> for Linux booting.
>>>>>>
>>>>>> Signed-off-by: Stefan Roese <sr@denx.de>
>>>>>> ---
>>>>>>
>>>>>> common/cmd_fdt.c | 4 +++-
>>>>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>>>
>>>>> There are possibly some workflows this breaks.  I can't remember
>>>>> if for AMP boot we need to do something between ft_board_setup()
>>>>> and fdt_chosen()
>>>>
>>>> Could you please elaborate what exactly you fear here? Is this a NACK
>>>> for this patch?
>>>
>>> Possibly.  I've got to find our docs on how we do 2-core AMP booting sequence w/regards to device tree.
>>
>> See if this works:
>>
>> http://www.freescale.com/infocenter/index.jsp?topic=%2FQORIQSDK%2F2151493.html
>
> Kumar, did you find the time to check/test this? I would really like to
> know if this patch is okay with you.

This should be fine. You are calling fdt_chosen(), but we can still
run 'fdt chosen $initrd_start $initrd_end' after 'fdt boardsetup'. A
quick glance at fdt_chosen() suggest it can be run multiple times
without error.

You might add a comment in the U_BOOT_CMD that mentions boardsetup calls chosen.

-M

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

* [U-Boot] [PATCH v3 6/8] fdt: cmd_fdt: Call fdt_chosen() from "fdt boardsetup"
  2012-10-03  0:57           ` McClintock Matthew-B29882
@ 2012-10-04  7:43             ` Stefan Roese
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Roese @ 2012-10-04  7:43 UTC (permalink / raw)
  To: u-boot

Hi Matthew,

On 10/03/2012 02:57 AM, McClintock Matthew-B29882 wrote:
> On Tue, Oct 2, 2012 at 5:26 AM, Stefan Roese <sr@denx.de> wrote:
>> On 09/27/2012 10:43 PM, McClintock Matthew-B29882 wrote:
>>>>>>> By calling fdt_chosen(), the chosen node will be updated /
>>>>>>> created by the "fdt boardsetup" command. This is useful for
>>>>>>> setting of the kernel commandline via the "bootargs"
>>>>>>> env variable.
>>>>>>>
>>>>>>> With this change, the "fdt boardsetup" can be used to prepare
>>>>>>> the DT blob for SPL booting. The patched DT blob can be saved
>>>>>>> to flash and can be used by the SPL U-Boot version directly
>>>>>>> for Linux booting.
>>>>>>>
>>>>>>> Signed-off-by: Stefan Roese <sr@denx.de>
>>>>>>> ---
>>>>>>>
>>>>>>> common/cmd_fdt.c | 4 +++-
>>>>>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>>>>
>>>>>> There are possibly some workflows this breaks.  I can't remember
>>>>>> if for AMP boot we need to do something between ft_board_setup()
>>>>>> and fdt_chosen()
>>>>>
>>>>> Could you please elaborate what exactly you fear here? Is this a NACK
>>>>> for this patch?
>>>>
>>>> Possibly.  I've got to find our docs on how we do 2-core AMP booting sequence w/regards to device tree.
>>>
>>> See if this works:
>>>
>>> http://www.freescale.com/infocenter/index.jsp?topic=%2FQORIQSDK%2F2151493.html
>>
>> Kumar, did you find the time to check/test this? I would really like to
>> know if this patch is okay with you.
> 
> This should be fine. You are calling fdt_chosen(), but we can still
> run 'fdt chosen $initrd_start $initrd_end' after 'fdt boardsetup'. A
> quick glance at fdt_chosen() suggest it can be run multiple times
> without error.
> 
> You might add a comment in the U_BOOT_CMD that mentions boardsetup
> calls chosen.

Now I see that I don't need this patch at all. I can call "fdt chosen"
after calling "fdt boardsetup" and everything is fine.

So lets drop this patch completely. Sorry for the noise.

Thanks,
Stefan

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

end of thread, other threads:[~2012-10-04  7:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-26  9:11 [U-Boot] [PATCH v3 6/8] fdt: cmd_fdt: Call fdt_chosen() from "fdt boardsetup" Stefan Roese
2012-09-26 13:36 ` Kumar Gala
2012-09-26 14:20   ` Stefan Roese
2012-09-27 20:28     ` Kumar Gala
2012-09-27 20:43       ` McClintock Matthew-B29882
2012-10-02 10:26         ` Stefan Roese
2012-10-03  0:57           ` McClintock Matthew-B29882
2012-10-04  7:43             ` Stefan Roese

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