diff options
author | Alistair Popple <alistair@popple.id.au> | 2014-11-13 17:16:01 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-12-02 18:38:04 +1100 |
commit | eaf4cd02d38946a701f2174b9b8d44156e006eaf (patch) | |
tree | d3fa5ffc5ce7c4a18460801193064c568689530f /core/pel.c | |
parent | 5819941efc10da9ddf9ce18f6249385eeebcaa6b (diff) | |
download | skiboot-eaf4cd02d38946a701f2174b9b8d44156e006eaf.zip skiboot-eaf4cd02d38946a701f2174b9b8d44156e006eaf.tar.gz skiboot-eaf4cd02d38946a701f2174b9b8d44156e006eaf.tar.bz2 |
rtc: Add a generic rtc cache
Some of the generic skiboot code needs access to the rtc (for example
the pel logging code). Currently this is accessed via a call to fsp
specific code which implements an rtc cache. Obviously this wont work
on systems without a fsp.
This patch makes the rtc cache generic so that we can get the time on
other platforms (assuming they have some kind of rtc).
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/pel.c')
-rw-r--r-- | core/pel.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -3,6 +3,7 @@ #include <device.h> #include <fsp.h> #include <pel.h> +#include <rtc.h> /* Create MTMS section for sapphire log */ static void create_mtms_section(struct errorlog *elog_data, @@ -56,7 +57,7 @@ static void create_extended_header_section(struct errorlog *elog_data, memset(extdhdr->opal_subsys_version, 0x00, sizeof(extdhdr->opal_subsys_version)); - fsp_rtc_get_cached_tod(&extdhdr->extended_header_date, &extd_time); + rtc_cache_get_datetime(&extdhdr->extended_header_date, &extd_time); extdhdr->extended_header_time = extd_time >> 32; extdhdr->opal_symid_len = 0; @@ -159,7 +160,7 @@ static void create_private_header_section(struct errorlog *elog_data, privhdr->v6header.component_id = elog_data->component_id; privhdr->plid = elog_data->plid; - fsp_rtc_get_cached_tod(&privhdr->create_date, &ctime); + rtc_cache_get_datetime(&privhdr->create_date, &ctime); privhdr->create_time = ctime >> 32; privhdr->section_count = 5; |