[Pdbg] [PATCH 2/5] libpdbg: Add a function to get root of the device tree
Amitay Isaacs
amitay at ozlabs.org
Thu Aug 16 15:57:53 AEST 2018
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
libpdbg/libpdbg.h | 1 +
libpdbg/target.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
index f0bca0c..a5a52b3 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -91,6 +91,7 @@ char *pdbg_target_class_name(struct pdbg_target *target);
char *pdbg_target_name(struct pdbg_target *target);
void *pdbg_target_priv(struct pdbg_target *target);
void pdbg_target_priv_set(struct pdbg_target *target, void *priv);
+struct pdbg_target *pdbg_target_root(void);
/* Procedures */
int fsi_read(struct pdbg_target *target, uint32_t addr, uint32_t *val);
diff --git a/libpdbg/target.c b/libpdbg/target.c
index be3b845..1d308cc 100644
--- a/libpdbg/target.c
+++ b/libpdbg/target.c
@@ -413,3 +413,8 @@ void pdbg_target_priv_set(struct pdbg_target *target, void *priv)
{
target->priv = priv;
}
+
+struct pdbg_target *pdbg_target_root(void)
+{
+ return dt_root;
+}
--
2.17.1
More information about the Pdbg
mailing list