-
由 Konstantin Shlyakhovoy 提交于
RTC stores time and date in several registers. Due to the fact that these registers can't be read instantaneously, there is a chance that reading from counting registers gives an error of one minute, one hour, one day, etc. To address this issue, the RTC has hardware support to copy the RTC counting registers to static shadowed registers. The current implementation does not use this feature, and in a stress test, we can reproduce this error at a rate of around two times per 300000 readings. Fix the implementation to ensure that the right snapshot of time is captured. Signed-off-by: NKonstantin Shlyakhovoy <x0155534@ti.com> Signed-off-by: NNishanth Menon <nm@ti.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Benoit Cousson <b-cousson@ti.com> Cc: linux-omap <linux-omap@vger.kernel.org> Acked-by: NMykola Oleksiienko <x0174904@ti.com> Acked-by: NOleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com> Acked-by: NGraeme Gregory <gg@slimlogic.co.uk> Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
f3ec434c