[v2,2/4] libpdbg: Drop sbe_chipop api for generic chip-op
diff mbox series

Message ID 20190821060817.31012-3-amitay@ozlabs.org
State Accepted
Headers show
Series
  • Add libsbefifo
Related show

Checks

Context Check Description
snowpatch_ozlabs/build-multiarch success Test build-multiarch on branch master
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (e005e0863a44f04c931b09804f258fb1c0b6f14c)

Commit Message

Amitay Isaacs Aug. 21, 2019, 6:08 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/hwunit.h  |  1 -
 libpdbg/libpdbg.h |  1 -
 libpdbg/sbefifo.c | 33 ---------------------------------
 libpdbg/target.c  | 11 -----------
 4 files changed, 46 deletions(-)

Patch
diff mbox series

diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h
index a359af0..ad3795a 100644
--- a/libpdbg/hwunit.h
+++ b/libpdbg/hwunit.h
@@ -72,7 +72,6 @@  struct sbefifo {
 	int (*thread_stop)(struct sbefifo *, uint32_t core_id, uint32_t thread_id);
 	int (*thread_step)(struct sbefifo *, uint32_t core_id, uint32_t thread_id);
 	int (*thread_sreset)(struct sbefifo *, uint32_t core_id, uint32_t thread_id);
-	int (*chipop)(struct sbefifo *, uint32_t *, uint32_t, uint8_t **, uint32_t *, uint32_t *);
 	uint32_t (*ffdc_get)(struct sbefifo *, const uint8_t **, uint32_t *);
 	int fd;
 	uint32_t status;
diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
index e752681..235ff85 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -244,7 +244,6 @@  int opb_read(struct pdbg_target *target, uint32_t addr, uint32_t *data);
 int opb_write(struct pdbg_target *target, uint32_t addr, uint32_t data);
 
 int sbe_istep(struct pdbg_target *target, uint32_t major, uint32_t minor);
-int sbe_chipop(struct pdbg_target *target, uint32_t *msg, uint32_t msg_len, uint8_t **out, uint32_t *out_len, uint32_t *status);
 uint32_t sbe_ffdc_get(struct pdbg_target *target, const uint8_t **ffdc, uint32_t *ffdc_len);
 
 typedef void (*pdbg_progress_tick_t)(uint64_t cur, uint64_t end);
diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c
index 5c63512..fb3203f 100644
--- a/libpdbg/sbefifo.c
+++ b/libpdbg/sbefifo.c
@@ -447,38 +447,6 @@  static int sbefifo_op_thread_sreset(struct sbefifo *sbefifo,
 	return sbefifo_op_control(sbefifo, core_id, thread_id, SBEFIFO_INSN_OP_SRESET);
 }
 
-static int sbefifo_op_chipop(struct sbefifo *sbefifo,
-			     uint32_t *msg, uint32_t msg_len,
-			     uint8_t **out, uint32_t *out_len, uint32_t *status)
-{
-	uint32_t len, cmd, op;
-	int rc;
-
-	assert(msg_len > 3);
-
-	len = be32toh(msg[0]);
-	cmd = be32toh(msg[1]);
-	op = be32toh(msg[2]);
-
-	PR_NOTICE("sbefifo: chipop command=%u, op=%u\n", cmd, op);
-
-	if (len != msg_len) {
-		PR_ERROR("sbefifo: chipop: Invalid msg length, expected %u, got %u\n",
-			 len, msg_len);
-		return -1;
-	}
-
-	/* Limit the expected data to 64K */
-	if (*out_len > 0x10000)
-		*out_len = 0x10000;
-
-	rc = sbefifo_op(sbefifo, msg, msg_len, cmd, out, out_len, status);
-	if (rc)
-		return rc;
-
-	return 0;
-}
-
 static int sbefifo_probe(struct pdbg_target *target)
 {
 	struct sbefifo *sf = target_to_sbefifo(target);
@@ -519,7 +487,6 @@  struct sbefifo kernel_sbefifo = {
 	.thread_stop = sbefifo_op_thread_stop,
 	.thread_step = sbefifo_op_thread_step,
 	.thread_sreset = sbefifo_op_thread_sreset,
-	.chipop = sbefifo_op_chipop,
 	.ffdc_get = sbefifo_ffdc_get,
 	.fd = -1,
 };
diff --git a/libpdbg/target.c b/libpdbg/target.c
index 5808d02..da24ba0 100644
--- a/libpdbg/target.c
+++ b/libpdbg/target.c
@@ -301,17 +301,6 @@  int sbe_istep(struct pdbg_target *target, uint32_t major, uint32_t minor)
 	return sbefifo->istep(sbefifo, major, minor);
 }
 
-int sbe_chipop(struct pdbg_target *target, uint32_t *msg, uint32_t msg_len, uint8_t **out, uint32_t *out_len, uint32_t *status)
-{
-	struct sbefifo *sbefifo;
-
-	sbefifo = pib_to_sbefifo(target);
-	if (!sbefifo)
-		return -1;
-
-	return sbefifo->chipop(sbefifo, msg, msg_len, out, out_len, status);
-}
-
 uint32_t sbe_ffdc_get(struct pdbg_target *target, const uint8_t **ffdc, uint32_t *ffdc_len)
 {
 	struct sbefifo *sbefifo;