Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Yu-Chun Lin" <eleanor.lin@realtek.com>
Cc: devicetree@vger.kernel.org, mfd@lists.linux.dev, robh@kernel.org,
	conor+dt@kernel.org, lee@kernel.org
Subject: Re: [PATCH v5 6/8] irqchip/realtek-rtd1319d: Add driver for Realtek RTD1319D and RTD1325 SoCs
Date: Sun, 18 Oct 2026 16:15:19 +0000	[thread overview]
Message-ID: <sashiko-outbox-176271@kernel.org> (raw)
In-Reply-To: <20261018160653.3940371-7-eleanor.lin@realtek.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] irqchip/realtek-rtd1319d: unreachable DRTC IRQs excluded from subset masks
--

commit e59f4cebdbdec34b9436dc4ae09a46cfa2ab3770
Author: James Tai <james.tai@realtek.com>

irqchip/realtek-rtd1319d: Add driver for Realtek RTD1319D and RTD1325 SoCs

This commit adds support for the ISO and MISC interrupt controllers on Realtek
DHC RTD1319D and RTD1325 SoCs.

> diff --git a/drivers/irqchip/irq-realtek-rtd1319d.c b/drivers/irqchip/irq-realtek-rtd1319d.c
> new file mode 100644
> index 0000000000000..4bac12c02cbe2
> --- /dev/null
> +++ b/drivers/irqchip/irq-realtek-rtd1319d.c
> @@ -0,0 +1,197 @@

[ ... ]

> +#define ISO_NMI_WDT_MASK	0x08008090
> +#define ISO_NORMAL_MASK		0xf7ff7f6e
> +#define MISC_NORMAL_MASK	0xffe0ded6
> +#define MISC_UART1_MASK		0x00000028
> +#define MISC_UART2_MASK		0x00002100

[ ... ]

> +enum rtd1319d_misc_isr_bits {
> +	RTD1319D_MISC_ISR_UR1_SHIFT		= 3,
> +	RTD1319D_MISC_ISR_TC5_SHIFT		= 4,
> +	RTD1319D_MISC_ISR_UR1_TO_SHIFT		= 5,
> +	RTD1319D_MISC_ISR_TC0_SHIFT		= 6,
> +	RTD1319D_MISC_ISR_TC1_SHIFT		= 7,
> +	RTD1319D_MISC_ISR_UR2_SHIFT		= 8,
> +	RTD1319D_MISC_ISR_UR2_TO_SHIFT		= 13,
> +	RTD1319D_MISC_ISR_I2C5_SHIFT		= 14,
> +	RTD1319D_MISC_ISR_I2C4_SHIFT		= 15,
> +	RTD1319D_MISC_ISR_DRTC_HSEC_SHIFT	= 16,
> +	RTD1319D_MISC_ISR_DRTC_MIN_SHIFT	= 17,
> +	RTD1319D_MISC_ISR_DRTC_HOUR_SHIFT	= 18,
> +	RTD1319D_MISC_ISR_DRTC_DATE_SHIFT	= 19,
> +	RTD1319D_MISC_ISR_DRTC_ALARM_SHIFT	= 20,
> +	RTD1319D_MISC_ISR_I2C3_SHIFT		= 23,
> +	RTD1319D_MISC_ISR_SC0_SHIFT		= 24,
> +	RTD1319D_MISC_ISR_SC1_SHIFT		= 25,
> +	RTD1319D_MISC_ISR_SPI_SHIFT		= 27,
> +	RTD1319D_MISC_ISR_FAN_SHIFT		= 29,
> +};
> +
> +static const u32 rtd1319d_misc_isr_to_scpu_int_en_mask[32] = {
> +	[RTD1319D_MISC_ISR_UR1_SHIFT]		= BIT(3),
> +	[RTD1319D_MISC_ISR_UR1_TO_SHIFT]	= BIT(5),
> +	[RTD1319D_MISC_ISR_UR2_TO_SHIFT]	= BIT(6),
> +	[RTD1319D_MISC_ISR_UR2_SHIFT]		= BIT(7),
> +	[RTD1319D_MISC_ISR_I2C5_SHIFT]		= BIT(14),
> +	[RTD1319D_MISC_ISR_I2C4_SHIFT]		= BIT(15),
> +	[RTD1319D_MISC_ISR_DRTC_HSEC_SHIFT]	= BIT(16),
> +	[RTD1319D_MISC_ISR_DRTC_MIN_SHIFT]	= BIT(17),
> +	[RTD1319D_MISC_ISR_DRTC_HOUR_SHIFT]	= BIT(18),
> +	[RTD1319D_MISC_ISR_DRTC_DATE_SHIFT]	= BIT(19),
> +	[RTD1319D_MISC_ISR_DRTC_ALARM_SHIFT]	= BIT(20),
> +	[RTD1319D_MISC_ISR_SC0_SHIFT]		= BIT(24),
> +	[RTD1319D_MISC_ISR_SC1_SHIFT]		= BIT(25),
> +	[RTD1319D_MISC_ISR_SPI_SHIFT]		= BIT(27),
> +	[RTD1319D_MISC_ISR_I2C3_SHIFT]		= BIT(28),
> +	[RTD1319D_MISC_ISR_FAN_SHIFT]		= BIT(29),
> +};

[ ... ]

> +static const struct realtek_intc_mask rtd1319d_intc_misc_cfgs[] = {
> +	{ MISC_NORMAL_MASK, },
> +	{ MISC_UART1_MASK, },
> +	{ MISC_UART2_MASK, },
> +};

[Severity: Medium]
Are the DRTC interrupts (bits 16..20) intentionally excluded from
rtd1319d_intc_misc_cfgs[], or is a subset mask missing for them?

rtd1319d_misc_isr_to_scpu_int_en_mask[] defines enable masks for
RTD1319D_MISC_ISR_DRTC_HSEC_SHIFT through RTD1319D_MISC_ISR_DRTC_ALARM_SHIFT,
so realtek_intc_unmask_irq() will set BIT(16)..BIT(20) in MISC_ISR_EN_OFFSET
when a consumer enables one of those interrupts.

However, MISC_NORMAL_MASK (0xffe0ded6) clears bits 16..20 (0x001f0000), and
neither MISC_UART1_MASK (0x00000028) nor MISC_UART2_MASK (0x00002100)
includes them. When a DRTC interrupt fires, realtek_intc_dispatch() filters
MISC_ISR_OFFSET by subset_data->subset_mask->ints_mask across
rtd1319d_intc_misc_cfgs[], so none of the subset handlers will dispatch or
clear those pending bits.

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261018160653.3940371-1-eleanor.lin@realtek.com?part=6

  reply	other threads:[~2026-10-18 16:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-18 16:06 [PATCH v5 0/8] Initial support for the Realtek interrupt controller Yu-Chun Lin
2026-10-18 16:06 ` [PATCH v5 1/8] dt-bindings: interrupt-controller: Add support for Realtek DHC SoCs Yu-Chun Lin
2026-10-18 16:06 ` [PATCH v5 2/8] dt-bindings: mfd: realtek,rtd1xxx: Add new SoCs Yu-Chun Lin
2026-10-19  9:11   ` Krzysztof Kozlowski
2026-10-18 16:06 ` [PATCH v5 3/8] dt-bindings: mfd: realtek,rtd1xxx: Add interrupt controller child node Yu-Chun Lin
2026-10-19  9:13   ` Krzysztof Kozlowski
2026-10-18 16:06 ` [PATCH v5 4/8] irqchip/realtek-intc-common: Add basic support for Realtek DHC SoCs Yu-Chun Lin
2026-10-18 16:28   ` sashiko-bot
2026-10-18 16:06 ` [PATCH v5 5/8] irqchip/realtek-rtd1319: Add driver for Realtek DHC RTD1319 SoC Yu-Chun Lin
2026-10-18 16:06 ` [PATCH v5 6/8] irqchip/realtek-rtd1319d: Add driver for Realtek RTD1319D and RTD1325 SoCs Yu-Chun Lin
2026-10-18 16:15   ` sashiko-bot [this message]
2026-10-18 16:06 ` [PATCH v5 7/8] irqchip/realtek-rtd1619b: Add driver for Realtek DHC RTD1619B SoC Yu-Chun Lin
2026-10-18 16:06 ` [PATCH v5 8/8] irqchip/realtek-rtd1625: Add driver for Realtek DHC rtd1625 SoC Yu-Chun Lin
2026-10-18 16:15   ` sashiko-bot

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=sashiko-outbox-176271@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eleanor.lin@realtek.com \
    --cc=lee@kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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