Re: [PATCH] board_f: Make printing reset information optional

Tom Rini <[email protected]>
Newsgroups gmane.comp.boot-loaders.u-boot
Message-ID <20260808193518.GE394392__47702.8734561586$1786217737$gmane$org@bill-the-cat>
On Sat, Aug 08, 2026 at 11:24:46AM -0600, Simon Glass wrote:
> Hi Alexey,
> 
> On 2026-07-30T08:39:27, Alexey Charkov <[email protected]> wrote:
> > board_f: Make printing reset information optional
> >
> > Current code tries to print information about the reset method whenever
> > sysreset support is enabled. This causes the core to try to bind the
> > sysreset device in board_init_f, even if the driver doesn't support
> > reset status reporting, causing pure waste on some platforms (e.g. on
> > Rockchip RK3576 it increases the boot time by ~0.4s even though the driver
> > doesn't support reset status reporting).
> >
> > Make the printing of reset information optional, so that it can be
> > enabled only on platforms where it is supported and useful.
> >
> > Only four sysreset drivers actually implement the get_status() op, so
> > default the new symbol to y wherever one of them can be in use to avoid
> > regressing those platforms:
> 
> >
> >  - sysreset_sandbox
> >  - sysreset_mpc83xx
> >  - sysreset_psci, whose weak stub get_status() is only overridden by i.MX9;
> >  - the pca9450 PMIC sysreset child driver.
> 
> This would age better if each driver implementing get_status() opted
> in from its own Kconfig with 'imply SYSRESET_PRINT_RESETINFO', so the
> next addition or removal doesn't have to touch this Kconfig too. What
> do you think?
> 
> >
> >  - sysreset_sandbox
> >  - sysreset_mpc83xx
> >  - sysreset_psci, whose weak stub get_status() is only overridden by i.MX9;
> >  - the pca9450 PMIC sysreset child driver.
> > [...]
> >
> > common/board_f.c         |  4 ++--
> >  drivers/sysreset/Kconfig | 14 ++++++++++++++
> >  2 files changed, 16 insertions(+), 2 deletions(-)
> 
> > diff --git a/drivers/sysreset/Kconfig b/drivers/sysreset/Kconfig
> > @@ -43,6 +43,20 @@ config VPL_SYSRESET
> > +config SYSRESET_PRINT_RESETINFO
> > +     bool "Print reset information during boot"
> > +     default y if SANDBOX
> > +     default y if SYSRESET_MPC83XX
> > +     default y if SYSRESET_PSCI && ARCH_IMX9
> > +     default y if DM_PMIC_PCA9450
> 
> If you don't want the imply approach, please note in the help text
> that any board adding a new get_status() implementation must flip this
> on, otherwise the print will silently disappear on their next
> defconfig regeneration.

That's a bit of a non-sense comment.

-- 
Tom
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQTzzqh0PWDgGS+bTHor4qD1Cr/kCgUCaneE9QAKCRAr4qD1Cr/k
CuxyAP9g9/iwf95/eBCxxxpWxFQE6QjFLDyr7wxtj8w2xy3OZwEA7fLS85NJgXLd
ocWP1NAIv6AtimlIXNYWbodwLPRCuQM=
=tZTD
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.