[PATCH] rtc: mpfs: Fix alarm register word order

Alexandre Belloni alexandre.belloni at bootlin.com
Tue Oct 20 05:41:15 PDT 2026


On Tue, 20 Oct 2026 00:10:24 +0900, Baek Kyu, Kim wrote:
> mpfs_rtc_readalarm() swaps the low and high words of the alarm time.
> The RTC core reads this value during device registration to initialize
> its alarm timer. This can populate the cached alarm and timer queue
> with an incorrect expiry time, or leave an enabled hardware alarm out
> of the timer queue if the decoded time appears to be in the past.
> 
> Read the low 32 bits from ALARM_LOWER_REG and place the masked high
> 11 bits from ALARM_UPPER_REG in bits 42:32. This matches the layout
> used by mpfs_rtc_setalarm() and the low/high assembly in
> mpfs_rtc_readtime(), so the RTC core imports the programmed alarm
> time correctly during device registration.
> 
> [...]

Applied, thanks!

[1/1] rtc: mpfs: Fix alarm register word order
      https://git.kernel.org/abelloni/c/d691a96370b6

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