Skip to content

Commit de4e3db

Browse files
claudiubezneageertu
authored andcommitted
clk: renesas: r9a08g045: Mark the watchdog and always-on PM domains as IRQ safe
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 <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent ddcc2f6 commit de4e3db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/clk/renesas/r9a08g045-cpg.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ static const struct rzg2l_cpg_pm_domain_init_data r9a08g045_pm_domains[] = {
267267
/* Keep always-on domain on the first position for proper domains registration. */
268268
DEF_PD("always-on", R9A08G045_PD_ALWAYS_ON,
269269
DEF_REG_CONF(0, 0),
270-
GENPD_FLAG_ALWAYS_ON),
270+
GENPD_FLAG_ALWAYS_ON | GENPD_FLAG_IRQ_SAFE),
271271
DEF_PD("gic", R9A08G045_PD_GIC,
272272
DEF_REG_CONF(CPG_BUS_ACPU_MSTOP, BIT(3)),
273273
GENPD_FLAG_ALWAYS_ON),
@@ -278,7 +278,8 @@ static const struct rzg2l_cpg_pm_domain_init_data r9a08g045_pm_domains[] = {
278278
DEF_REG_CONF(CPG_BUS_REG1_MSTOP, GENMASK(3, 0)),
279279
GENPD_FLAG_ALWAYS_ON),
280280
DEF_PD("wdt0", R9A08G045_PD_WDT0,
281-
DEF_REG_CONF(CPG_BUS_REG0_MSTOP, BIT(0)), 0),
281+
DEF_REG_CONF(CPG_BUS_REG0_MSTOP, BIT(0)),
282+
GENPD_FLAG_IRQ_SAFE),
282283
DEF_PD("sdhi0", R9A08G045_PD_SDHI0,
283284
DEF_REG_CONF(CPG_BUS_PERI_COM_MSTOP, BIT(0)), 0),
284285
DEF_PD("sdhi1", R9A08G045_PD_SDHI1,

0 commit comments

Comments
 (0)