[Pdbg] [PATCH 07/18] libpdbg: Start using pdbg logging api
Amitay Isaacs
amitay at ozlabs.org
Wed May 16 16:17:25 AEST 2018
From: Amitay Isaacs <amitay at gmail.com>
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
---
libpdbg/adu.c | 1 +
libpdbg/bmcfsi.c | 3 ++-
libpdbg/cfam.c | 4 +---
libpdbg/device.c | 3 +--
libpdbg/i2c.c | 1 +
libpdbg/p8chip.c | 1 +
libpdbg/p9chip.c | 1 +
libpdbg/target.c | 4 +---
8 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/libpdbg/adu.c b/libpdbg/adu.c
index 612d70a..cb8159e 100644
--- a/libpdbg/adu.c
+++ b/libpdbg/adu.c
@@ -20,6 +20,7 @@
#include "operations.h"
#include "bitutils.h"
+#include "debug.h"
/* P8 ADU SCOM Register Definitions */
#define P8_ALTD_CONTROL_REG 0x0
diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c
index 8f270df..b57e029 100644
--- a/libpdbg/bmcfsi.c
+++ b/libpdbg/bmcfsi.c
@@ -29,6 +29,7 @@
#include "operations.h"
#include "device.h"
#include "target.h"
+#include "debug.h"
#define GPIO_BASE 0x1e780000
#define GPIO_DATA 0x0
@@ -311,7 +312,7 @@ static enum fsi_result fsi_read_resp(uint64_t *result, int len)
}
if (crc != 0) {
- fprintf(stderr, "CRC error: 0x%" PRIx64 "\n", resp);
+ PR_ERROR("CRC error: 0x%" PRIx64 "\n", resp);
return FSI_MERR_C;
}
diff --git a/libpdbg/cfam.c b/libpdbg/cfam.c
index 41586d6..ec79d75 100644
--- a/libpdbg/cfam.c
+++ b/libpdbg/cfam.c
@@ -22,9 +22,7 @@
#include "target.h"
#include "bitutils.h"
#include "operations.h"
-
-#undef PR_DEBUG
-#define PR_DEBUG(...)
+#include "debug.h"
#define FSI_DATA0_REG 0x0
#define FSI_DATA1_REG 0x1
diff --git a/libpdbg/device.c b/libpdbg/device.c
index 7d294f3..7ee4884 100644
--- a/libpdbg/device.c
+++ b/libpdbg/device.c
@@ -24,8 +24,7 @@
#include <ccan/str/str.h>
#include <endian.h>
-#undef PR_DEBUG
-#define PR_DEBUG(...)
+#include "debug.h"
#define zalloc(size) calloc(1, size)
#define prerror printf
diff --git a/libpdbg/i2c.c b/libpdbg/i2c.c
index 9a5c9dd..b1580e1 100644
--- a/libpdbg/i2c.c
+++ b/libpdbg/i2c.c
@@ -25,6 +25,7 @@
#include "bitutils.h"
#include "operations.h"
+#include "debug.h"
struct i2c_data {
int addr;
diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c
index 6cae663..864de29 100644
--- a/libpdbg/p8chip.c
+++ b/libpdbg/p8chip.c
@@ -24,6 +24,7 @@
#include "target.h"
#include "operations.h"
#include "bitutils.h"
+#include "debug.h"
#define RAS_STATUS_TIMEOUT 100
diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c
index d9fcf5f..eb23942 100644
--- a/libpdbg/p9chip.c
+++ b/libpdbg/p9chip.c
@@ -23,6 +23,7 @@
#include "target.h"
#include "operations.h"
#include "bitutils.h"
+#include "debug.h"
/*
* NOTE!
diff --git a/libpdbg/target.c b/libpdbg/target.c
index bf5fb08..911d26f 100644
--- a/libpdbg/target.c
+++ b/libpdbg/target.c
@@ -8,9 +8,7 @@
#include "target.h"
#include "device.h"
#include "operations.h"
-
-#undef PR_DEBUG
-#define PR_DEBUG(...)
+#include "debug.h"
struct list_head empty_list = LIST_HEAD_INIT(empty_list);
struct list_head target_classes = LIST_HEAD_INIT(target_classes);
--
2.17.0
More information about the Pdbg
mailing list