aboutsummaryrefslogtreecommitdiff
path: root/libflash/ecc.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2015-02-23 18:37:09 +0800
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-02-26 16:15:56 +1100
commit46bc7ec7d4857f50908dd1daf914766057b86d7c (patch)
treef851df15df83cb72705cab76f05a951973289ea4 /libflash/ecc.c
parent42167a5feb7627235cbfec059ec66def0ef42191 (diff)
downloadskiboot-46bc7ec7d4857f50908dd1daf914766057b86d7c.zip
skiboot-46bc7ec7d4857f50908dd1daf914766057b86d7c.tar.gz
skiboot-46bc7ec7d4857f50908dd1daf914766057b86d7c.tar.bz2
libflash: Use FL_* logging functions
We don't have prerror / prlog functions when compiling outside of skiboot. Use the FL_* macros instead. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libflash/ecc.c')
-rw-r--r--libflash/ecc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libflash/ecc.c b/libflash/ecc.c
index 9293743..b794e6a 100644
--- a/libflash/ecc.c
+++ b/libflash/ecc.c
@@ -19,6 +19,8 @@
#include <stdint.h>
#include <ecc.h>
+#include "libflash.h"
+
/*
* Matrix used for ECC calculation.
*
@@ -146,7 +148,7 @@ uint8_t eccmemcpy(uint64_t *dst, uint64_t *src, uint32_t len)
if (len & 0x7) {
/* TODO: we could probably handle this */
- prerror("ECC data length must be 8 byte aligned length:%i\n",
+ FL_ERR("ECC data length must be 8 byte aligned length:%i\n",
len);
return UE;
}
@@ -160,13 +162,13 @@ uint8_t eccmemcpy(uint64_t *dst, uint64_t *src, uint32_t len)
badbit = eccverify(*data, *ecc);
if (badbit == UE) {
- prerror("ECC: uncorrectable error: %016lx %02x\n",
+ FL_ERR("ECC: uncorrectable error: %016lx %02x\n",
(long unsigned int)*data, *ecc);
return badbit;
}
*dst = *data;
if (badbit <= UE)
- prlog(PR_INFO, "ECC: correctable error: %i\n", badbit);
+ FL_INF("ECC: correctable error: %i\n", badbit);
if (badbit < 64)
*dst = *data ^ (1ul << (63 - badbit));
dst++;