U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Francesco Dolcini <francesco@dolcini.it>
To: Mehmet Fide <mehmet.fide@gmail.com>
Cc: u-boot@lists.u-boot-project.org,
	Francesco Dolcini <francesco.dolcini@toradex.com>,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>
Subject: Re: [PATCH] toradex: select EVENT for TDX_CFG_BLOCK
Date: Wed, 12 Aug 2026 07:50:39 +0200	[thread overview]
Message-ID: <20260812055021.GA7756@francesco-nb> (raw)
In-Reply-To: <20260807112545.1883789-1-mehmet.fide@gmail.com>

On Fri, Aug 07, 2026 at 01:25:45PM +0200, Mehmet Fide wrote:
> From: Mehmet Fide <mehmet.fide@screeningeagle.com>
> 
> The Toradex config block is read by settings_r(), which is reachable
> only as an event spy:
> 
>   EVENT_SPY_SIMPLE(EVT_SETTINGS_R, settings_r);
> 
> board_r.c does call INITCALL_EVT(EVT_SETTINGS_R) unconditionally, but
> with CONFIG_EVENT disabled event_notify_null() is an empty inline, so
> the spy is never reached and settings_r() never runs. Nothing else
> selects EVENT for colibri_vf, and CONFIG_EVENT has no prompt, so a
> defconfig cannot turn it on by itself.
> 
> The effect is that serial#, ethaddr and eth1addr are never populated
> from the config block. serial# in turn is what fdt_root() copies into
> the device tree as "serial-number", so Linux loses
> /proc/device-tree/serial-number along with anything deriving a MAC
> address or a device identity from it. The failure is quiet: a module
> whose saved environment predates the conversion to the event framework
> keeps the old values and looks healthy until the environment is
> rewritten.
> 
> Verified on a Colibri VF50. Before the change "printenv serial#"
> reports "not defined" and no "MISSING TORADEX CONFIG BLOCK" is
> printed, which is the signature of the spy never running. After it the
> banner shows
> 
>   Model: Toradex 0013 Colibri VF50 128MB IT V1.2B
>   Serial#: 03135809
> 
> and Linux finds /proc/device-tree/serial-number again.
> 
> TDX_CFG_BLOCK cannot work without the spy, so select what it needs.
> 
> Signed-off-by: Mehmet Fide <mehmet.fide@screeningeagle.com>

Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>


      parent reply	other threads:[~2026-08-12  5:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07 11:25 [PATCH] toradex: select EVENT for TDX_CFG_BLOCK Mehmet Fide
2026-08-07 17:34 ` Tom Rini
2026-08-12  5:50 ` Francesco Dolcini [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=20260812055021.GA7756@francesco-nb \
    --to=francesco@dolcini.it \
    --cc=francesco.dolcini@toradex.com \
    --cc=marcel.ziswiler@toradex.com \
    --cc=mehmet.fide@gmail.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.u-boot-project.org \
    /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