[PATCH v1] rtc: mpfs: fix counter upload completion condition
Alexandre Belloni
alexandre.belloni at bootlin.com
Wed Jun 24 14:15:43 PDT 2026
On Wed, 13 May 2026 18:55:55 +0100, Conor Dooley wrote:
> The condition that needs to be checked for upload completion is the
> UPLOAD bit in the completion register going low. The original iterations
> of this driver used a do-while and this was converted to a
> read_poll_timeout() during upstreaming without the condition being
> inverted as it should have been.
>
> I suspect that this went unnoticed until now because a) the first read
> was done when the bit was still set, immediately completing the
> read_poll_timeout() and b) because the RTC doesn't hold time when power
> is removed from the SoC reducing its utility (I for one keep it
> disabled). If my first suspicion was true when the driver was
> upstreamed, it's not true any longer though, hence the detection of the
> problem.
>
> [...]
Applied, thanks!
[1/1] rtc: mpfs: fix counter upload completion condition
https://git.kernel.org/abelloni/c/9792ff8afa90
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the linux-riscv
mailing list