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

Simon Glass <[email protected]>
Newsgroups org.u-boot-project.lists.u-boot
Message-ID <CAFLszTis8DL=VVUOKhCijxkKif62=ypMW0e_OdO2_WF3Q21t7w@mail.gmail.com>
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.

Regards,
Simon
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.