aboutsummaryrefslogtreecommitdiff
path: root/hw/fake-rtc.c
AgeCommit message (Collapse)AuthorFilesLines
2017-09-05hw/fake-rtc: Remove space before tab in commentJoel Stanley1-1/+1
Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Michael Neuling <mikey@neuling.org> Reviewed-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-10-07hw/fake-rtc: Add support for emulated rtc clockVaibhav Jain1-9/+50
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 whose date-time values are calculated from the difference of current timebase and its value when the initial epoch was assigned. The initial epoch is set from the values at "ibm,fake-rtc" memory region. Acked-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-04-01Remove redundant includes of opal-api.hMichael Ellerman1-1/+0
Now that opal.h includes opal-api.h, there are a bunch of files that include both but don't need to. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-26sparse: fake_ymd and fake_hmsm can be staticCédric Le Goater1-2/+2
Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-02-06Move skiboot internal things from opal.h to opal-api.hStewart Smith1-0/+1
This is probably not the best collection of things in the world, but it means that opal.h is much closer to being directly usable by an OS. This triggers a bunch of #include fixes throughout the tree. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-10-08hw/fake-rtc.c now uses prlog(PR_TRACE instead of DBG macroStewart Smith1-5/+3
Only two possible printouts, so probably fine for debug level. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2014-08-08Add fake RTC to generic platformmillerjo@us.ibm.com1-0/+69
Adds a fake RTC that can be initialized via a named reserve in the device tree that may, at some point, be on NVRAM. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>