aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeelesh Gupta <neelegup@linux.vnet.ibm.com>2015-01-19 11:42:59 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-01-22 15:52:14 +1100
commit190941549d2e1458ce60676b0082e85d471794d9 (patch)
tree84f7197a929d687a007a881ef343492ef3f798ab
parent2e534bfaf79c89508a9c624afbc1f97e75bfb852 (diff)
downloadskiboot-190941549d2e1458ce60676b0082e85d471794d9.zip
skiboot-190941549d2e1458ce60676b0082e85d471794d9.tar.gz
skiboot-190941549d2e1458ce60676b0082e85d471794d9.tar.bz2
rtc: rtc tod state need to be updated on success
The OPAL rtc read interface currently fails as the tod state is not getting updated in the callback. The patch fixes this issue. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hw/fsp/fsp-rtc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/fsp/fsp-rtc.c b/hw/fsp/fsp-rtc.c
index f60d2f3..b83bb2e 100644
--- a/hw/fsp/fsp-rtc.c
+++ b/hw/fsp/fsp-rtc.c
@@ -158,6 +158,7 @@ static void fsp_rtc_process_read(struct fsp_msg *read_resp)
case FSP_STATUS_SUCCESS:
/* Save the read RTC value in our cache */
+ rtc_tod_state = RTC_TOD_VALID;
datetime_to_tm(read_resp->data.words[0],
(u64) read_resp->data.words[1] << 32, &tm);
rtc_cache_update(&tm);