lkml.org 
[lkml]   [2022]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v4 2/2] watchdog: Add watchdog driver for Sunplus SP7021
Date
> -----Original Message-----
> From: Guenter Roeck [mailto:groeck7@gmail.com] On Behalf Of Guenter Roeck
> Sent: Sunday, January 2, 2022 11:00 PM
> To: xt.hu[胡先韬] <xt.hu@cqplus1.com>
> Cc: wim@linux-watchdog.org; p.zabel@pengutronix.de; linux-kernel@vger.kernel.org;
> linux-watchdog@vger.kernel.org; robh+dt@kernel.org; devicetree@vger.kernel.org; Wells Lu 呂芳騰
> <wells.lu@sunplus.com>; qinjian[覃健] <qinjian@cqplus1.com>
> Subject: Re: [PATCH v4 2/2] watchdog: Add watchdog driver for Sunplus SP7021
>
> On Wed, Dec 29, 2021 at 01:43:08PM +0800, Xiantao Hu wrote:
> > Sunplus SP7021 requires watchdog timer support.
> > Add watchdog driver to enable this.
> >
> > Signed-off-by: Xiantao Hu <xt.hu@cqplus1.com>
> > ---
> > Changes in v4
> > - Drop the unused varible struct resource *wdt_res.
> > - Drop the operations related to address 0x9c000274.
> > Put it in bootloader before entry kernel boot in v3.
> >
> >...
> > +{
> > + wdev->timeout = timeout;
> > + sp_wdt_ping(wdev);
>
> This is exactly what the calling code does if there is no set_timeout
> function, so you can just drop this function,
>

OK. I will drop it.

> > ...
> > +
> > + err = clk_prepare_enable(priv->clk);
> > + if (err) {
> > + dev_err(dev, "Clock can't be enabled correctly\n");
> > + return err;
> > + }
> > +
> > + /* The timer and watchdog shared the STC reset */
> > + priv->rstc = devm_reset_control_get_shared(dev, NULL);
> > + if (!IS_ERR(priv->rstc))
> > + reset_control_deassert(priv->rstc);
> > +
> > + err = devm_add_action_or_reset(dev, sp_reset_control_assert,
> > + priv->rstc);
> > + if (err)
> > + return err;
> > +
>
> devm_add_action_or_reset() above should only be called if
> devm_reset_control_get_shared succeeds.
>

OK. I will modify it.

> > + err = devm_add_action_or_reset(dev, sp_clk_disable_unprepare,
> > + priv->clk);
>
> This should be called immediately after clk_prepare_enable().
>

OK. I will modify it.

> > + if (err)
> > + return err;
> > ...
\
 
 \ /
  Last update: 2022-01-04 03:49    [W:0.092 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site