On 2/6/25 13:30, Simon Glass wrote:
Hi Benjamin,

On Tue, 4 Feb 2025 at 13:56, <egyszer...@freemail.hu> wrote:

From: Benjamin Szőke <egyszer...@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 <egyszer...@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


Reply via email to