mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
rtc: renesas-rtca3: Check RADJ poll result during initial setup
In rtca3_initial_setup(), the driver clears the RTCA3_RADJ register and waits for it to reach zero using readb_poll_timeout(). Check the return value of readb_poll_timeout() and propagate the error if the poll fails. 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 Link: https://patch.msgid.link/20260602192559.1791344-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
7e342d87aa
commit
fafb016d08
|
|
@ -634,6 +634,8 @@ static int rtca3_initial_setup(struct clk *clk, struct rtca3_priv *priv)
|
|||
writeb(0, priv->base + RTCA3_RADJ);
|
||||
ret = readb_poll_timeout(priv->base + RTCA3_RADJ, tmp, !tmp, 10,
|
||||
RTCA3_DEFAULT_TIMEOUT_US);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Start the RTC and enable automatic time error adjustment. */
|
||||
mask = RTCA3_RCR2_START | RTCA3_RCR2_AADJE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user