From: Biju Das <biju.das.jz@bp.renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Claudiu.Beznea <claudiu.beznea@tuxon.dev>
Cc: "mturquette@baylibre.com" <mturquette@baylibre.com>,
"sboyd@kernel.org" <sboyd@kernel.org>,
"wim@linux-watchdog.org" <wim@linux-watchdog.org>,
"linux@roeck-us.net" <linux@roeck-us.net>,
"ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: RE: [PATCH v2 2/3] clk: renesas: r9a08g045: Mark the watchdog and always-on PM domains as IRQ safe
Date: Thu, 29 Aug 2024 15:58:47 +0000 [thread overview]
Message-ID: <TY3PR01MB11346BBAEB9DBB9C6A969DEC386962@TY3PR01MB11346.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CAMuHMdUcstyRDfaQ0Y=1NHgBYuRWjC0vuJj2j8USCTsEE1qKVA@mail.gmail.com>
Hi Geert,
> -----Original Message-----
> From: Geert Uytterhoeven <geert@linux-m68k.org>
> Sent: Thursday, August 29, 2024 1:45 PM
> Subject: Re: [PATCH v2 2/3] clk: renesas: r9a08g045: Mark the watchdog and always-on PM domains as IRQ
> safe
>
> Hi Claudiu,
>
> On Wed, Aug 28, 2024 at 4:06 PM Claudiu <claudiu.beznea@tuxon.dev> wrote:
> > From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> >
> > If the watchdog is part of a dedicated power domain (as it may be on
> > RZ/G3S) the watchdog PM domain need to be powered on in the watchdog
> > restart handler. Currently, only the clocks are enabled in the
> > watchdog restart handler. To be able to also power on the PM domain we
> > need to call pm_runtime_resume_and_get() on the watchdog restart
> > handler, mark the watchdog device as IRQ safe and register the
> > watchdog PM domain with GENPD_FLAG_IRQ_SAFE.
> >
> > Register watchdog PM domain as IRQ safe. Along with it the always-on
> > PM domain (parent of the watchdog domain) was marked as IRQ safe.
> >
> > Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> > ---
> >
> > Changes in v2:
> > - changed patch title; it was "clk: renesas: rzg2l-cpg: Mark
> > watchdog and always-on PM domains as IRQ safe"
>
> Thanks for the update!
>
> > --- a/drivers/clk/renesas/r9a08g045-cpg.c
> > +++ b/drivers/clk/renesas/r9a08g045-cpg.c
> > @@ -259,7 +259,7 @@ static const struct rzg2l_cpg_pm_domain_init_data r9a08g045_pm_domains[] = {
> > /* Keep always-on domain on the first position for proper domains registration. */
> > DEF_PD("always-on", R9A08G045_PD_ALWAYS_ON,
> > DEF_REG_CONF(0, 0),
> > - GENPD_FLAG_ALWAYS_ON),
> > + GENPD_FLAG_ALWAYS_ON |
> > + GENPD_FLAG_IRQ_SAFE),
> > DEF_PD("gic", R9A08G045_PD_GIC,
> > DEF_REG_CONF(CPG_BUS_ACPU_MSTOP, BIT(3)),
> > GENPD_FLAG_ALWAYS_ON), @@ -270,7
> > +270,8 @@ static const struct rzg2l_cpg_pm_domain_init_data r9a08g045_pm_domains[] = {
> > DEF_REG_CONF(CPG_BUS_REG1_MSTOP, GENMASK(3, 0)),
> > GENPD_FLAG_ALWAYS_ON),
> > DEF_PD("wdt0", R9A08G045_PD_WDT0,
> > - DEF_REG_CONF(CPG_BUS_REG0_MSTOP, BIT(0)), 0),
> > + DEF_REG_CONF(CPG_BUS_REG0_MSTOP, BIT(0)),
> > + GENPD_FLAG_IRQ_SAFE),
> > DEF_PD("sdhi0", R9A08G045_PD_SDHI0,
> > DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(0)), 0),
> > DEF_PD("sdhi1", R9A08G045_PD_SDHI1,
>
> Can't you just do this for all domains (e.g. in rzg2l_cpg_pd_setup()), instead of limiting this to the
> wdt0 and always-on domains?
Not sure, that will make all PM calls for all domains with interrupt disabled??
Cheers,
Biju
next prev parent reply other threads:[~2024-08-29 15:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 14:05 [PATCH v2 0/3] watchdog: rzg2l_wdt: Enable properly the watchdog clocks and power domain Claudiu
2024-08-28 14:06 ` [PATCH v2 1/3] clk: renesas: rzg2l-cpg: Use GENPD_FLAG_* flags instead of local ones Claudiu
2024-08-29 12:32 ` Geert Uytterhoeven
2024-08-30 7:46 ` claudiu beznea
2024-08-30 8:06 ` Geert Uytterhoeven
2024-08-30 14:07 ` claudiu beznea
2024-08-30 14:26 ` Geert Uytterhoeven
2024-08-30 14:41 ` claudiu beznea
2024-08-28 14:06 ` [PATCH v2 2/3] clk: renesas: r9a08g045: Mark the watchdog and always-on PM domains as IRQ safe Claudiu
2024-08-29 12:45 ` Geert Uytterhoeven
2024-08-29 15:58 ` Biju Das [this message]
2024-08-30 7:51 ` claudiu beznea
2024-08-28 14:06 ` [PATCH v2 3/3] watchdog: rzg2l_wdt: Power on the watchdog domain in the restart handler Claudiu
2024-08-29 14:46 ` Ulf Hansson
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=TY3PR01MB11346BBAEB9DBB9C6A969DEC386962@TY3PR01MB11346.jpnprd01.prod.outlook.com \
--to=biju.das.jz@bp.renesas.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=geert@linux-m68k.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=wim@linux-watchdog.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
all inboxes | Powered by JetHome®