diff options
author | John Stultz <john.stultz@linaro.org> | 2011-03-30 01:00:27 (GMT) |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2011-03-30 01:44:05 (GMT) |
commit | f6d5b33125c4fa63c16f7f54c533338c9695d82c (patch) | |
tree | 2aabfeb48759bf6122c100f6977c8d7ff80e0c0d /firmware | |
parent | 0ce790e7d736cedc563e1fb4e998babf5a4dbc3d (diff) | |
download | linux-fsl-qoriq-f6d5b33125c4fa63c16f7f54c533338c9695d82c.tar.xz |
RTC: Fix early irqs caused by calling rtc_set_alarm too early
When we register an rtc device at boot, we read the alarm value
in hardware and set the rtc device's aie_timer to that value.
The initial method to do this was to simply call rtc_set_alarm()
with the value read from hardware. However, this may cause problems
as rtc_set_alarm may enable interupts, and the RTC alarm might fire,
which can cause invalid pointer dereferencing since the RTC registration
is not complete.
This patch solves the issue by initializing the rtc_device.aie_timer
y hand via rtc_initialize_alarm(). This avoids any calls to the RTC
hardware which might enable interrupts too early.
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Alessandro Zummo <a.zummo@towertech.it>
Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'firmware')
0 files changed, 0 insertions, 0 deletions