All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: Simon Glass <sjg@chromium.org>, egyszeregy@freemail.hu
Cc: u-boot@lists.denx.de, love.kumar@amd.com
Subject: Re: [PATCH v2] zynqmp: Save "bootseq" environment variable in decimal format
Date: Thu, 6 Feb 2025 13:36:28 +0100	[thread overview]
Message-ID: <bc424b60-7f3f-41f2-b357-f86c55579de0@amd.com> (raw)
In-Reply-To: <CAFLszThdhXWbKtaptExYEVm4Y_FaBPjx=LGHidGazX0-+0MH3w@mail.gmail.com>



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



      reply	other threads:[~2025-02-06 12:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc424b60-7f3f-41f2-b357-f86c55579de0@amd.com \
    --to=michal.simek@amd.com \
    --cc=egyszeregy@freemail.hu \
    --cc=love.kumar@amd.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.