* [PATCH] xilinx: zynqmp: Save multiboot as variable
@ 2021-10-21 6:59 Michal Simek
2021-10-21 14:23 ` Oleksandr Suvorov
0 siblings, 1 reply; 3+ messages in thread
From: Michal Simek @ 2021-10-21 6:59 UTC (permalink / raw)
To: u-boot, git
Cc: Jorge Ramirez-Ortiz, Michal Simek, Mike Looijmans, Simon Glass,
T Karthik Reddy
Save multiboot register as u-boot variable. And use it as primary source
for composing dfu_alt_info for capsule update. If variable is not defined
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
board/xilinx/zynqmp/zynqmp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index ed6c287df221..5fce74d6085a 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -658,6 +658,8 @@ int board_late_init(void)
if (ret)
return ret;
+ env_set_hex("multiboot", multi_boot());
+
bootmode = zynqmp_get_bootmode();
puts("Bootmode: ");
@@ -863,7 +865,7 @@ void set_dfu_alt_info(char *interface, char *devstr)
memset(buf, 0, sizeof(buf));
- multiboot = multi_boot();
+ multiboot = env_get_hex("multiboot", multi_boot());
debug("Multiboot: %d\n", multiboot);
switch (zynqmp_get_bootmode()) {
--
2.33.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xilinx: zynqmp: Save multiboot as variable
2021-10-21 6:59 [PATCH] xilinx: zynqmp: Save multiboot as variable Michal Simek
@ 2021-10-21 14:23 ` Oleksandr Suvorov
2021-10-25 8:11 ` Michal Simek
0 siblings, 1 reply; 3+ messages in thread
From: Oleksandr Suvorov @ 2021-10-21 14:23 UTC (permalink / raw)
To: Michal Simek
Cc: U-Boot-Denx, git, Jorge Ramirez-Ortiz, Michal Simek,
Mike Looijmans, Simon Glass, T Karthik Reddy
On Thu, Oct 21, 2021 at 9:59 AM Michal Simek <michal.simek@xilinx.com> wrote:
>
> Save multiboot register as u-boot variable. And use it as primary source
> for composing dfu_alt_info for capsule update. If variable is not defined
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
> board/xilinx/zynqmp/zynqmp.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
> index ed6c287df221..5fce74d6085a 100644
> --- a/board/xilinx/zynqmp/zynqmp.c
> +++ b/board/xilinx/zynqmp/zynqmp.c
> @@ -658,6 +658,8 @@ int board_late_init(void)
> if (ret)
> return ret;
>
> + env_set_hex("multiboot", multi_boot());
multi_boot() can return error -EINVAL. Probably it would be better to
handle this
before setting the env variable?
> +
> bootmode = zynqmp_get_bootmode();
>
> puts("Bootmode: ");
> @@ -863,7 +865,7 @@ void set_dfu_alt_info(char *interface, char *devstr)
>
> memset(buf, 0, sizeof(buf));
>
> - multiboot = multi_boot();
> + multiboot = env_get_hex("multiboot", multi_boot());
> debug("Multiboot: %d\n", multiboot);
>
> switch (zynqmp_get_bootmode()) {
> --
> 2.33.1
>
--
Best regards,
Oleksandr Suvorov
Software Engineer
T: +380 63 8489656
E: oleksandr.suvorov@foundries.io
W: www.foundries.io
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xilinx: zynqmp: Save multiboot as variable
2021-10-21 14:23 ` Oleksandr Suvorov
@ 2021-10-25 8:11 ` Michal Simek
0 siblings, 0 replies; 3+ messages in thread
From: Michal Simek @ 2021-10-25 8:11 UTC (permalink / raw)
To: Oleksandr Suvorov, Michal Simek
Cc: U-Boot-Denx, git, Jorge Ramirez-Ortiz, Michal Simek,
Mike Looijmans, Simon Glass, T Karthik Reddy
On 10/21/21 16:23, Oleksandr Suvorov wrote:
> On Thu, Oct 21, 2021 at 9:59 AM Michal Simek <michal.simek@xilinx.com> wrote:
>>
>> Save multiboot register as u-boot variable. And use it as primary source
>> for composing dfu_alt_info for capsule update. If variable is not defined
>>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
>> ---
>>
>> board/xilinx/zynqmp/zynqmp.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
>> index ed6c287df221..5fce74d6085a 100644
>> --- a/board/xilinx/zynqmp/zynqmp.c
>> +++ b/board/xilinx/zynqmp/zynqmp.c
>> @@ -658,6 +658,8 @@ int board_late_init(void)
>> if (ret)
>> return ret;
>>
>> + env_set_hex("multiboot", multi_boot());
>
> multi_boot() can return error -EINVAL. Probably it would be better to
> handle this
> before setting the env variable?
Sent v2 to fix this.
Thanks,
Michal
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-25 8:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 6:59 [PATCH] xilinx: zynqmp: Save multiboot as variable Michal Simek
2021-10-21 14:23 ` Oleksandr Suvorov
2021-10-25 8:11 ` Michal Simek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.