[Pdbg] [PATCH] libpdbg: Drop target status check from fsi_(read|write)
Amitay Isaacs
amitay at ozlabs.org
Tue Aug 11 18:10:07 AEST 2020
FSI devices use fsi_(read|write) during probe, so the target status is
not yet set and there is no way to reliably know if the access is from
within the library or not.
Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
libpdbg/target.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/libpdbg/target.c b/libpdbg/target.c
index 69f8b24..8a7d1a6 100644
--- a/libpdbg/target.c
+++ b/libpdbg/target.c
@@ -277,10 +277,6 @@ int fsi_read(struct pdbg_target *fsi_dt, uint32_t addr, uint32_t *data)
uint64_t addr64 = addr;
fsi_dt = get_class_target_addr(fsi_dt, "fsi", &addr64);
-
- if (pdbg_target_status(fsi_dt) != PDBG_TARGET_ENABLED)
- return -1;
-
fsi = target_to_fsi(fsi_dt);
if (!fsi->read) {
@@ -301,10 +297,6 @@ int fsi_write(struct pdbg_target *fsi_dt, uint32_t addr, uint32_t data)
uint64_t addr64 = addr;
fsi_dt = get_class_target_addr(fsi_dt, "fsi", &addr64);
-
- if (pdbg_target_status(fsi_dt) != PDBG_TARGET_ENABLED)
- return -1;
-
fsi = target_to_fsi(fsi_dt);
if (!fsi->write) {
--
2.26.2
More information about the Pdbg
mailing list