[Skiboot] [RFC] hw/fake-rtc: Add support for emulated rtc clock

Benjamin Herrenschmidt benh at au1.ibm.com
Tue Sep 8 06:56:36 AEST 2015


On Mon, 2015-09-07 at 14:34 +0530, Vaibhav Jain wrote:
> This patch adds support for an emulated rtc clock over existing fake
> rtc
> implementation for generic platform (e.g BML). Presently a fake rtc
> clock is initialized when reserved region named 'ibm,fake-rtc' is
> present in the boot device tree. This mem-region points to the
> initial
> value of bcd coded date-time values. However as this region is in
> system
> memory hence its not updated with time. This results in an error from
> hwclock tool which tries to detect a change in system clock and then
> complains "Timed out waiting for time change."
> 
> The patch overcomes this issue by emulating an rtc clock that's
> driven
> by a periodically scheduled timer. The initial epoch is set from the
> values at "ibm,fake-rtc" memory region. It then creates the periodic
> timer and on each tick the rtc counter is incremented.

Why ? Why not deduce the RTC clock from the timebase ? We already have
code to do that, don't we ?

Cheers,
Ben.



More information about the Skiboot mailing list