diff mbox series

libpdbg: Drop target status check from fsi_(read|write)

Message ID 20200811081007.138447-1-amitay@ozlabs.org
State Accepted
Headers show
Series libpdbg: Drop target status check from fsi_(read|write) | expand

Commit Message

Amitay Isaacs Aug. 11, 2020, 8:10 a.m. UTC
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@ozlabs.org>
---
 libpdbg/target.c | 8 --------
 1 file changed, 8 deletions(-)
diff mbox series

Patch

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) {