summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorAnurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>2016-04-20 21:17:35 +0530
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2016-05-20 12:33:51 +0200
commitb62c3a1158c0abc98e03c68934fa7ee6ca10dd49 (patch)
tree2142a220dfe34610e95b13ff8385aef341a356d3 /security
parent01dc6992b3e888e7bf17691e4e86c9cc33e8f8b5 (diff)
downloadlinux-b62c3a1158c0abc98e03c68934fa7ee6ca10dd49.tar.gz
linux-b62c3a1158c0abc98e03c68934fa7ee6ca10dd49.tar.bz2
linux-b62c3a1158c0abc98e03c68934fa7ee6ca10dd49.zip
rtc: zynqmp: Update seconds time programming logic
We program RTC time using SET_TIME_WRITE register and read the RTC current time using CURRENT_TIME register. When we set the time by writing into SET_TIME_WRITE Register and immediately try to read the rtc time from CURRENT_TIME register, the previous old value is returned instead of the new loaded time. This is because RTC takes nearly 1 sec to update the new loaded value into the CURRENT_TIME register. This behaviour is expected in our RTC IP. This patch updates the driver to read the current time from SET_TIME_WRITE register instead of CURRENT_TIME when rtc time is requested within an 1sec period after setting the RTC time. Doing so will ensure the correct time is given to the user. Since there is a delay of 1sec in updating the CURRENT_TIME we are loading set time +1sec while programming the SET_TIME_WRITE register, doing this will give correct time without any delay when read from CURRENT_TIME. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions