Skip to content

Commit 5865d25

Browse files
bijudasgeertu
authored andcommitted
clk: renesas: r9a0{7g04[34],8g045}: Add critical reset entries
The RZ/G2L SoC family requires DMA resets to be deasserted for routing some peripheral interrupts to the CPU. Asserting these resets after boot would silently break interrupt delivery with no driver to restore them. Mark the DMA resets as critical by adding them to the crit_resets table in the SoC-specific rzg2l_cpg_info for r9a07g043, r9a07g044, and r9a08g045, preventing __rzg2l_cpg_assert() from asserting them and ensuring they are deasserted during probe and resume. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://patch.msgid.link/20260324114329.268249-4-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent 3d70074 commit 5865d25

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

drivers/clk/renesas/r9a07g043-cpg.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,11 @@ static const unsigned int r9a07g043_crit_mod_clks[] __initconst = {
379379
MOD_CLK_BASE + R9A07G043_DMAC_ACLK,
380380
};
381381

382+
static const unsigned int r9a07g043_crit_resets[] = {
383+
R9A07G043_DMAC_ARESETN,
384+
R9A07G043_DMAC_RST_ASYNC,
385+
};
386+
382387
#ifdef CONFIG_ARM64
383388
static const unsigned int r9a07g043_no_pm_mod_clks[] = {
384389
MOD_CLK_BASE + R9A07G043_CRU_SYSCLK,
@@ -420,5 +425,9 @@ const struct rzg2l_cpg_info r9a07g043_cpg_info = {
420425
.num_resets = R9A07G043_IAX45_RESETN + 1, /* Last reset ID + 1 */
421426
#endif
422427

428+
/* Critical Resets */
429+
.crit_resets = r9a07g043_crit_resets,
430+
.num_crit_resets = ARRAY_SIZE(r9a07g043_crit_resets),
431+
423432
.has_clk_mon_regs = true,
424433
};

drivers/clk/renesas/r9a07g044-cpg.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,11 @@ static const unsigned int r9a07g044_crit_mod_clks[] __initconst = {
489489
MOD_CLK_BASE + R9A07G044_DMAC_ACLK,
490490
};
491491

492+
static const unsigned int r9a07g044_crit_resets[] = {
493+
R9A07G044_DMAC_ARESETN,
494+
R9A07G044_DMAC_RST_ASYNC,
495+
};
496+
492497
static const unsigned int r9a07g044_no_pm_mod_clks[] = {
493498
MOD_CLK_BASE + R9A07G044_CRU_SYSCLK,
494499
MOD_CLK_BASE + R9A07G044_CRU_VCLK,
@@ -519,6 +524,10 @@ const struct rzg2l_cpg_info r9a07g044_cpg_info = {
519524
.resets = r9a07g044_resets,
520525
.num_resets = R9A07G044_TSU_PRESETN + 1, /* Last reset ID + 1 */
521526

527+
/* Critical Resets */
528+
.crit_resets = r9a07g044_crit_resets,
529+
.num_crit_resets = ARRAY_SIZE(r9a07g044_crit_resets),
530+
522531
.has_clk_mon_regs = true,
523532
};
524533
#endif
@@ -548,6 +557,10 @@ const struct rzg2l_cpg_info r9a07g054_cpg_info = {
548557
.resets = r9a07g044_resets,
549558
.num_resets = R9A07G054_STPAI_ARESETN + 1, /* Last reset ID + 1 */
550559

560+
/* Critical Resets */
561+
.crit_resets = r9a07g044_crit_resets,
562+
.num_crit_resets = ARRAY_SIZE(r9a07g044_crit_resets),
563+
551564
.has_clk_mon_regs = true,
552565
};
553566
#endif

drivers/clk/renesas/r9a08g045-cpg.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,11 @@ static const unsigned int r9a08g045_crit_mod_clks[] __initconst = {
361361
MOD_CLK_BASE + R9A08G045_VBAT_BCLK,
362362
};
363363

364+
static const unsigned int r9a08g045_crit_resets[] = {
365+
R9A08G045_DMAC_ARESETN,
366+
R9A08G045_DMAC_RST_ASYNC,
367+
};
368+
364369
static const unsigned int r9a08g045_no_pm_mod_clks[] = {
365370
MOD_CLK_BASE + R9A08G045_PCI_CLKL1PM,
366371
};
@@ -389,5 +394,9 @@ const struct rzg2l_cpg_info r9a08g045_cpg_info = {
389394
.resets = r9a08g045_resets,
390395
.num_resets = R9A08G045_VBAT_BRESETN + 1, /* Last reset ID + 1 */
391396

397+
/* Critical Resets */
398+
.crit_resets = r9a08g045_crit_resets,
399+
.num_crit_resets = ARRAY_SIZE(r9a08g045_crit_resets),
400+
392401
.has_clk_mon_regs = true,
393402
};

0 commit comments

Comments
 (0)