From: Marc Olberding <molberding@nvidia.com>
To: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: joel@jms.id.au, openbmc@lists.ozlabs.org, eajames@linux.ibm.com
Subject: Re: [PATCH u-boot v2 1/2] drivers: spi: Add support for disabling FMC_WDT2 for aspeed
Date: Tue, 16 Dec 2025 17:15:01 -0800 [thread overview]
Message-ID: <aUIEFWIUWoMlbEMC@molberding.nvidia.com> (raw)
In-Reply-To: <cc4141d2b1636c99c8f25b378f34ca214289a51a.camel@codeconstruct.com.au>
On Wed, Dec 17, 2025 at 09:53:33AM +1030, Andrew Jeffery wrote:
> On Tue, 2025-12-02 at 15:52 -0800, Marc Olberding wrote:
> > Adds support for disabling the ast2600 FMC_WDT2 through
> > a device tree entry in the fmc node.
> > Set `aspeed,watchdog-disable` in your device tree to have
> > the driver disable it.
> >
> > Signed-off-by: Marc Olberding <molberding@nvidia.com>
> > ---
> > drivers/spi/aspeed_spi.c | 19 +++++++++++++++----
> > 1 file changed, 15 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/spi/aspeed_spi.c b/drivers/spi/aspeed_spi.c
> > index 54520122f1c48c8b2052b4b1e47445a9b990d25e..de954e477aa15e6d1be042a2aee47f5a501178da 100644
> > --- a/drivers/spi/aspeed_spi.c
> > +++ b/drivers/spi/aspeed_spi.c
> > @@ -30,14 +30,16 @@ struct aspeed_spi_regs {
> > /* 0x30 .. 0x38 Segment Address */
> > u32 _reserved1[5]; /* .. */
> > u32 soft_rst_cmd_ctrl; /* 0x50 Auto Soft-Reset Command Control */
> > - u32 _reserved2[11]; /* .. */
> > + u32 _reserved2[4]; /* .. */
> > + u32 wdt2_ctrl; /* 0x64 FMC_WDT2 control */
> > + u32 _reserved3[6]; /* .. */
>
> Ugh (passing commentary, not your fault).
>
Yeah this sucks, if you have a better idea, let me know.
> > /*
> > * Set safe default settings for each device. These will be
> > * tuned after the SPI flash devices are probed.
> > @@ -1907,6 +1914,10 @@ static int aspeed_spi_probe(struct udevice *bus)
> > * SPI controllers
> > */
> > priv->is_fmc = dev_get_driver_data(bus);
> > + if (device_is_compatible(bus, "aspeed,ast2600-fmc") &&
> > + dev_read_bool(bus, "aspeed,watchdog-disable"))
> > + priv->disable_wdt = true;
>
> We're not setting it to false, just declaring it above, which means if
> this branch isn't taken then its value is undefined.
>
> Perhaps initialise it to false by default.
Ah, I figured that priv would've been callocd by the driver framework
before being passed to probe.
I'll change this to
priv->disable_wdt = <boolean expression>
in the next rev. Thanks.
> > +
>
> Unnecessary new-line?
>
> >
> > ret = aspeed_spi_controller_init(priv);
> > if (ret)
ack, will fix.
Thanks for the review.
next prev parent reply other threads:[~2025-12-17 1:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 23:52 [PATCH u-boot v2 0/2] aspeed: Add support for MSX4 Marc Olberding
2025-12-02 23:52 ` [PATCH u-boot v2 1/2] drivers: spi: Add support for disabling FMC_WDT2 for aspeed Marc Olberding
2025-12-16 23:23 ` Andrew Jeffery
2025-12-17 1:15 ` Marc Olberding [this message]
2025-12-17 1:18 ` Andrew Jeffery
2025-12-17 1:21 ` Andrew Jeffery
2025-12-17 1:24 ` Marc Olberding
2026-01-02 21:24 ` Иван Михайлов
2026-01-06 0:05 ` Marc Olberding
2026-01-06 14:52 ` Ivan Mikhaylov
2026-01-06 17:21 ` Marc Olberding
2026-01-12 1:12 ` Andrew Jeffery
2026-01-13 20:55 ` Ivan Mikhaylov
2026-02-10 1:19 ` Andrew Jeffery
2025-12-02 23:52 ` [PATCH u-boot v2 2/2] arch: arm: dts: Add dts for the nvidia msx4 board Marc Olberding
2025-12-17 0:05 ` Andrew Jeffery
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=aUIEFWIUWoMlbEMC@molberding.nvidia.com \
--to=molberding@nvidia.com \
--cc=andrew@codeconstruct.com.au \
--cc=eajames@linux.ibm.com \
--cc=joel@jms.id.au \
--cc=openbmc@lists.ozlabs.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