mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
rtc: goldfish: Enable interrupt in set_alarm() when necessary
[ Upstream commit 22f8d5a1bf230cf8567a4121fc3789babb46336d ] When use goldfish rtc, the "hwclock" command fails with "select() to /dev/rtc to wait for clock tick timed out". This is because "hwclock" need the set_alarm() hook to enable interrupt when alrm->enabled is true. This operation is missing in goldfish rtc (but other rtc drivers, such as cmos rtc, enable interrupt here), so add it. Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Jiaxun Yang <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
85ad0d5f3d
commit
f948f1d022
1 changed files with 1 additions and 0 deletions
|
|
@ -73,6 +73,7 @@ static int goldfish_rtc_set_alarm(struct device *dev,
|
|||
rtc_alarm64 = rtc_tm_to_time64(&alrm->time) * NSEC_PER_SEC;
|
||||
writel((rtc_alarm64 >> 32), base + TIMER_ALARM_HIGH);
|
||||
writel(rtc_alarm64, base + TIMER_ALARM_LOW);
|
||||
writel(1, base + TIMER_IRQ_ENABLED);
|
||||
} else {
|
||||
/*
|
||||
* if this function was called with enabled=0
|
||||
|
|
|
|||
Loading…
Reference in a new issue