aboutsummaryrefslogtreecommitdiff
path: root/core/pel.c
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2014-11-13 17:16:01 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2014-12-02 18:38:04 +1100
commiteaf4cd02d38946a701f2174b9b8d44156e006eaf (patch)
treed3fa5ffc5ce7c4a18460801193064c568689530f /core/pel.c
parent5819941efc10da9ddf9ce18f6249385eeebcaa6b (diff)
downloadskiboot-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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/pel.c b/core/pel.c
index 5cbb3f1..faa622b 100644
--- a/core/pel.c
+++ b/core/pel.c
@@ -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;