public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Vitor Soares <ivitro@gmail.com>
To: Francesco Dolcini <francesco@dolcini.it>, festevam@gmail.com
Cc: Francesco Dolcini <francesco.dolcini@toradex.com>,
	Tom Rini <trini@konsulko.com>,
	Vitor Soares <vitor.soares@toradex.com>,
	 u-boot@lists.denx.de, emanuele.ghidoli@toradex.com
Subject: Re: [PATCH v2] toradex: tdx-cfg-block: rework modules pid4 handling
Date: Mon, 25 Nov 2024 11:19:40 +0000	[thread overview]
Message-ID: <ba3564322dee243dcb033eacc48ba5466995d281.camel@gmail.com> (raw)
In-Reply-To: <Z0RV5sl7uMzFXvW9@gaggiata.pivistrello.it>

On Mon, 2024-11-25 at 11:48 +0100, Francesco Dolcini wrote:
> +Fabio
> 
> since he is the one normally picking patches from board/toradex/.
> 
> On Fri, Nov 22, 2024 at 06:27:22PM +0000, Vitor Soares wrote:
> > From: Vitor Soares <vitor.soares@toradex.com>
> > 
> > The module pid4 currently corresponds to the index of the toradex_module
> > array. If a new pid4 is introduced that does not follow the sequence of
> > the previous entries, it will create a gap in the array.
> > 
> > To address this, embed pid4 within the toradex_som structure and
> > implement a function to retrieve the index corresponding to pid4.
> > 
> > Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
> > ---
> > v1->v2:
> >   - Fix incorrect PID4 print when creating config block in interactive mode.
> > 
> >  board/toradex/common/tdx-cfg-block.c | 207 ++++++++++++++-------------
> >  board/toradex/common/tdx-cfg-block.h |   2 +
> >  board/toradex/common/tdx-common.c    |   4 +-
> >  3 files changed, 116 insertions(+), 97 deletions(-)
> > 
> 
> ...
> 
> > diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-
> > common.c
> > index a6b45cdab810..dd2d4b27cea7 100644
> > --- a/board/toradex/common/tdx-common.c
> > +++ b/board/toradex/common/tdx-common.c
> > @@ -194,10 +194,12 @@ static int tdx_get_str(struct udevice *dev, int id,
> > size_t size, char *val)
> >  
> >         switch (id) {
> >         case SYSINFO_ID_BOARD_MODEL:
> > +               int idx = get_toradex_modules_idx(tdx_hw_tag.prodid);
> > +
> 
> this is not something you are generally allowed to do in C, not sure which C
> variant U-Boot wants, but I would avoid it.

My mistake, I will send a V3 addressing it.


Best regards,
Vitor Soares

      reply	other threads:[~2024-11-25 13:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22 18:27 [PATCH v2] toradex: tdx-cfg-block: rework modules pid4 handling Vitor Soares
2024-11-25 10:48 ` Francesco Dolcini
2024-11-25 11:19   ` Vitor Soares [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=ba3564322dee243dcb033eacc48ba5466995d281.camel@gmail.com \
    --to=ivitro@gmail.com \
    --cc=emanuele.ghidoli@toradex.com \
    --cc=festevam@gmail.com \
    --cc=francesco.dolcini@toradex.com \
    --cc=francesco@dolcini.it \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=vitor.soares@toradex.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox