[Pdbg] [PATCH 2/5] adu: Add read/write methods for adu target
Amitay Isaacs
amitay at ozlabs.org
Mon Jan 7 15:30:17 AEDT 2019
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
libpdbg/adu.c | 4 ++++
libpdbg/target.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/libpdbg/adu.c b/libpdbg/adu.c
index b2e80ee..bc01625 100644
--- a/libpdbg/adu.c
+++ b/libpdbg/adu.c
@@ -570,6 +570,8 @@ static struct adu p8_adu = {
},
.getmem = p8_adu_getmem,
.putmem = p8_adu_putmem,
+ .read = adu_read,
+ .write = adu_write,
};
DECLARE_HW_UNIT(p8_adu);
@@ -581,5 +583,7 @@ static struct adu p9_adu = {
},
.getmem = p9_adu_getmem,
.putmem = p9_adu_putmem,
+ .read = adu_read,
+ .write = adu_write,
};
DECLARE_HW_UNIT(p9_adu);
diff --git a/libpdbg/target.h b/libpdbg/target.h
index 16ae304..eb8d564 100644
--- a/libpdbg/target.h
+++ b/libpdbg/target.h
@@ -109,6 +109,8 @@ struct adu {
struct pdbg_target target;
int (*getmem)(struct adu *, uint64_t, uint64_t *, int, uint8_t);
int (*putmem)(struct adu *, uint64_t, uint64_t, int, int, uint8_t);
+ int (*read)(struct adu *, uint64_t, uint8_t *, uint64_t, uint8_t, bool);
+ int (*write)(struct adu *, uint64_t, uint8_t *, uint64_t, uint8_t, bool);
};
#define target_to_adu(x) container_of(x, struct adu, target)
--
2.20.1
More information about the Pdbg
mailing list