* [PATCH v2] zynqmp: Save "bootseq" environment variable in decimal format
@ 2025-02-04 20:56 egyszeregy
2025-02-06 12:30 ` Simon Glass
0 siblings, 1 reply; 3+ messages in thread
From: egyszeregy @ 2025-02-04 20:56 UTC (permalink / raw)
To: u-boot; +Cc: michal.simek, love.kumar, Benjamin Szőke
From: Benjamin Szőke <egyszeregy@freemail.hu>
In U-Boot, most of mmc releated commands uses decimal value in arguments, like
"mmc dev ${bootseq}" or "bootargs=root=/dev/mmcblk${bootseq}p2". In order to
improve compatibilities, export "bootseq" number to environment variable in
decimal format instead of hex.
Signed-off-by: Benjamin Szőke <egyszeregy@freemail.hu>
---
board/xilinx/zynqmp/zynqmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 8cdd9d8600..820fb252a3 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -488,7 +488,7 @@ static int boot_targets_setup(void)
if (bootseq >= 0) {
bootseq_len = snprintf(NULL, 0, "%i", bootseq);
debug("Bootseq len: %x\n", bootseq_len);
- env_set_hex("bootseq", bootseq);
+ env_set_ulong("bootseq", (unsigned long)bootseq);
}
/*
--
2.47.1.windows.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] zynqmp: Save "bootseq" environment variable in decimal format
2025-02-04 20:56 [PATCH v2] zynqmp: Save "bootseq" environment variable in decimal format egyszeregy
@ 2025-02-06 12:30 ` Simon Glass
2025-02-06 12:36 ` Michal Simek
0 siblings, 1 reply; 3+ messages in thread
From: Simon Glass @ 2025-02-06 12:30 UTC (permalink / raw)
To: egyszeregy; +Cc: u-boot, michal.simek, love.kumar
Hi Benjamin,
On Tue, 4 Feb 2025 at 13:56, <egyszeregy@freemail.hu> wrote:
>
> From: Benjamin Szőke <egyszeregy@freemail.hu>
>
> In U-Boot, most of mmc releated commands uses decimal value in arguments, like
> "mmc dev ${bootseq}" or "bootargs=root=/dev/mmcblk${bootseq}p2". In order to
> improve compatibilities, export "bootseq" number to environment variable in
> decimal format instead of hex.
>
> Signed-off-by: Benjamin Szőke <egyszeregy@freemail.hu>
> ---
> board/xilinx/zynqmp/zynqmp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
> index 8cdd9d8600..820fb252a3 100644
> --- a/board/xilinx/zynqmp/zynqmp.c
> +++ b/board/xilinx/zynqmp/zynqmp.c
> @@ -488,7 +488,7 @@ static int boot_targets_setup(void)
> if (bootseq >= 0) {
> bootseq_len = snprintf(NULL, 0, "%i", bootseq);
> debug("Bootseq len: %x\n", bootseq_len);
> - env_set_hex("bootseq", bootseq);
> + env_set_ulong("bootseq", (unsigned long)bootseq);
> }
>
> /*
> --
> 2.47.1.windows.2
>
Actually I think the 'mmc dev' command is the one that needs fixing,
as U-Boot uses hex. Probably there are seldom that many devices so the
issue doesn't arise. Anyway, I see that this is a zynq thing so I will
leave this to Michal.
Regards,
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] zynqmp: Save "bootseq" environment variable in decimal format
2025-02-06 12:30 ` Simon Glass
@ 2025-02-06 12:36 ` Michal Simek
0 siblings, 0 replies; 3+ messages in thread
From: Michal Simek @ 2025-02-06 12:36 UTC (permalink / raw)
To: Simon Glass, egyszeregy; +Cc: u-boot, love.kumar
On 2/6/25 13:30, Simon Glass wrote:
> Hi Benjamin,
>
> On Tue, 4 Feb 2025 at 13:56, <egyszeregy@freemail.hu> wrote:
>>
>> From: Benjamin Szőke <egyszeregy@freemail.hu>
>>
>> In U-Boot, most of mmc releated commands uses decimal value in arguments, like
>> "mmc dev ${bootseq}" or "bootargs=root=/dev/mmcblk${bootseq}p2". In order to
>> improve compatibilities, export "bootseq" number to environment variable in
>> decimal format instead of hex.
>>
>> Signed-off-by: Benjamin Szőke <egyszeregy@freemail.hu>
>> ---
>> board/xilinx/zynqmp/zynqmp.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
>> index 8cdd9d8600..820fb252a3 100644
>> --- a/board/xilinx/zynqmp/zynqmp.c
>> +++ b/board/xilinx/zynqmp/zynqmp.c
>> @@ -488,7 +488,7 @@ static int boot_targets_setup(void)
>> if (bootseq >= 0) {
>> bootseq_len = snprintf(NULL, 0, "%i", bootseq);
>> debug("Bootseq len: %x\n", bootseq_len);
>> - env_set_hex("bootseq", bootseq);
>> + env_set_ulong("bootseq", (unsigned long)bootseq);
>> }
>>
>> /*
>> --
>> 2.47.1.windows.2
>>
>
> Actually I think the 'mmc dev' command is the one that needs fixing,
> as U-Boot uses hex.
Not everywhere which is the issue.
> Probably there are seldom that many devices so the
> issue doesn't arise. Anyway, I see that this is a zynq thing so I will
> leave this to Michal.
Issue is not coming up because none is wiring more then 10 sdhci controllers on
our boards. That's why transition from hex to dec is correct thing to do here.
Thanks,
Michal
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-06 12:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-04 20:56 [PATCH v2] zynqmp: Save "bootseq" environment variable in decimal format egyszeregy
2025-02-06 12:30 ` Simon Glass
2025-02-06 12:36 ` 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.