From: dmukhin@ford.com
To: Simon Glass <sjg@chromium.org>
Cc: dmukhin@ford.com, u-boot@lists.denx.de, trini@konsulko.com
Subject: Re: [PATCH v1 1/4] reset: Allow per-board reset type
Date: Wed, 27 May 2026 12:56:51 -0700 [thread overview]
Message-ID: <ahdMg5oAFcD/zaZ0@kraken> (raw)
In-Reply-To: <CAFLszThsj6qU6t=D9vecX=2doi17g2CzPwBK1+-pjaEmezVykg@mail.gmail.com>
Hi Simon,
Thanks for reviews!
On Mon, May 25, 2026 at 09:28:30AM -0600, Simon Glass wrote:
> Hi Denis,
>
> On 2026-05-22T01:23:09, None <dmukhin@ford.com> wrote:
> > reset: Allow per-board reset type
> >
> > Some prototype boards may not have (temporarily) all required reset
> > types supported (e.g. only warm reset supported).
> >
> > Add board_sysreset_default() to obtain board-specific default reset
> > type to enable reset command on such boards.
> >
> > Signed-off-by: Denis Mukhin <dmukhin@ford.com>
> >
> > drivers/sysreset/sysreset-uclass.c | 7 ++++++-
> > include/sysreset.h | 7 +++++++
> > 2 files changed, 13 insertions(+), 1 deletion(-)
>
> > diff --git a/drivers/sysreset/sysreset-uclass.c b/drivers/sysreset/sysreset-uclass.c
> > @@ -150,9 +150,14 @@ void reset_cpu(void)
> > }
> >
> > #if IS_ENABLED(CONFIG_SYSRESET_CMD_RESET)
> > +__weak enum sysreset_t board_sysreset_default(void)
> > +{
> > + return SYSRESET_COLD;
> > +}
> > +
>
> I'm not convinced a weak board hook is right here. Since the value is
> a compile-time constant per board, a Kconfig choice
> (SYSRESET_CMD_DEFAULT_COLD / _WARM) would be cleaner: no per-board C,
> visible from defconfig, and no new ABI for the sake of prototypes.
> What do you think?
TBH, I did weak symbol only to minimize the diff: this way the change
is isolated to sysreset-uclass.c.
I agree, Kconfig is a cleaner way, will fix that in v2.
>
> The cover letter says cold reset must still be enabled for the
> production variant. If the board gets proper cold-reset support before
> shipping, the override really only wants to live in the prototype's
> board code - a Kconfig option makes that lifecycle obvious.
>
> We could perhaps go in a different direction and use a sysinfo driver
> to specify the default, but that seems like overkill.
>
> Regards,
> Simon
Thanks,
Denis
next prev parent reply other threads:[~2026-05-27 19:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 1:23 [PATCH v1 0/4] reset: add board reset type dmukhin
2026-05-22 1:23 ` [PATCH v1 1/4] reset: Allow per-board " dmukhin
2026-05-25 15:28 ` Simon Glass
2026-05-27 19:56 ` dmukhin [this message]
2026-05-22 1:23 ` [PATCH v1 2/4] reset: Add explicit cold reset support dmukhin
2026-05-25 15:19 ` Simon Glass
2026-05-22 1:23 ` [PATCH v1 3/4] reset: Print reset type on diagnostic console dmukhin
2026-05-25 15:20 ` Simon Glass
2026-05-22 1:23 ` [PATCH v1 4/4] reset: x86: Use cpu_hlt() in pch_sysreset_power_off() dmukhin
2026-05-25 15:23 ` Simon Glass
2026-05-25 15:25 ` [v1,0/4] reset: add board reset type Simon Glass
2026-05-27 19:59 ` dmukhin
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=ahdMg5oAFcD/zaZ0@kraken \
--to=dmukhin@ford.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--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.