summaryrefslogtreecommitdiffstats
path: root/hw/fake-rtc.c
Commit message (Collapse)AuthorAgeFilesLines
* hw/fake-rtc: Add support for emulated rtc clockVaibhav Jain2015-10-071-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>
* Remove redundant includes of opal-api.hMichael Ellerman2015-04-011-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>
* sparse: fake_ymd and fake_hmsm can be staticCédric Le Goater2015-02-261-2/+2
| | | | | Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Move skiboot internal things from opal.h to opal-api.hStewart Smith2015-02-061-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>
* hw/fake-rtc.c now uses prlog(PR_TRACE instead of DBG macroStewart Smith2014-10-081-5/+3
| | | | | | Only two possible printouts, so probably fine for debug level. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Add fake RTC to generic platformmillerjo@us.ibm.com2014-08-081-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>
OpenPOWER on IntegriCloud