From: Claudiu Beznea <claudiu.beznea@tuxon.dev>
To: Prabhakar <prabhakar.csengg@gmail.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>,
Geert Uytterhoeven <geert+renesas@glider.be>
Cc: linux-rtc@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Biju Das <biju.das.jz@bp.renesas.com>,
Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH 1/5] rtc: renesas-rtca3: Fix PIE clear polling condition in alarm setup error path
Date: Tue, 2 Jun 2026 11:31:51 +0300 [thread overview]
Message-ID: <7f6fe294-582d-4668-aa77-ad9ab47cce2e@tuxon.dev> (raw)
In-Reply-To: <20260506164914.3987293-2-prabhakar.mahadev-lad.rj@bp.renesas.com>
Hi, Prabhakar,
On 5/6/26 19:49, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> In rtca3_set_alarm(), the setup_failed path attempts to disable the
> Periodic Interrupt Enable (PIE) bit and wait until it is cleared.
> However, the polling condition passed to readb_poll_timeout_atomic()
> uses an incorrect expression:
>
> !(tmp & ~RTCA3_RCR1_PIE)
>
> As ~RTCA3_RCR1_PIE evaluates to a mask of all bits except PIE, the
> condition effectively waits for all non-PIE bits to become zero, which
> is unrelated to the intended operation and is unlikely to ever be true.
> This causes the poll to time out unnecessarily.
>
> Fix the condition to check for the PIE bit itself being cleared:
>
> !(tmp & RTCA3_RCR1_PIE)
>
> This correctly waits until PIE is deasserted after being cleared.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com> # on RZ/G3S
I think it also deserves a Fixes tag?
Thank you,
Claudiu
next prev parent reply other threads:[~2026-06-02 8:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 16:49 [PATCH 0/5] rtc: renesas-rtca3: Various fixes and improvements Prabhakar
2026-05-06 16:49 ` [PATCH 1/5] rtc: renesas-rtca3: Fix PIE clear polling condition in alarm setup error path Prabhakar
2026-06-02 8:31 ` Claudiu Beznea [this message]
2026-06-02 19:16 ` Lad, Prabhakar
2026-05-06 16:49 ` [PATCH 2/5] rtc: renesas-rtca3: Check RADJ poll result during initial setup Prabhakar
2026-06-02 8:32 ` Claudiu Beznea
2026-05-06 16:49 ` [PATCH 3/5] rtc: renesas-rtca3: Fix incorrect error message for reset assert Prabhakar
2026-06-02 8:32 ` Claudiu Beznea
2026-05-06 16:49 ` [PATCH 4/5] rtc: renesas-rtca3: Fix typo in rtca3_ppb_per_cycle documentation Prabhakar
2026-06-02 8:32 ` Claudiu Beznea
2026-05-06 16:49 ` [PATCH 5/5] rtc: renesas-rtca3: Factor out year decoding helper Prabhakar
2026-06-02 8:32 ` Claudiu Beznea
2026-05-29 21:35 ` [PATCH 0/5] rtc: renesas-rtca3: Various fixes and improvements Lad, Prabhakar
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=7f6fe294-582d-4668-aa77-ad9ab47cce2e@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=alexandre.belloni@bootlin.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=fabrizio.castro.jz@renesas.com \
--cc=geert+renesas@glider.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=prabhakar.csengg@gmail.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
/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®