[Skiboot] [PATCH 2/2] rtc: rtc tod state need to be updated on success
Jeremy Kerr
jk at ozlabs.org
Tue Jan 20 11:15:29 AEDT 2015
Hi Neelesh & Alistair,
> 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 at linux.vnet.ibm.com>
> ---
> hw/fsp/fsp-rtc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> 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);
We seem to have this state in the rtc core code too
(rtc_tod_cache.valid) - do we need both?
Cheers,
Jeremy
More information about the Skiboot
mailing list