diff mbox series

[17/19] libpdbg: Drop thread procedures from chipop target

Message ID 20200227010704.145608-18-amitay@ozlabs.org
State Superseded
Headers show
Series Add sbefifo backend | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (8b4611b5d8e7e2279fe4aa80c892fcfe10aa398d)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Amitay Isaacs Feb. 27, 2020, 1:07 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/hwunit.h  |  4 ----
 libpdbg/sbefifo.c | 46 ----------------------------------------------
 2 files changed, 50 deletions(-)
diff mbox series

Patch

diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h
index 3375c71..91cee73 100644
--- a/libpdbg/hwunit.h
+++ b/libpdbg/hwunit.h
@@ -69,10 +69,6 @@  struct chipop {
 	struct pdbg_target target;
 	uint32_t (*ffdc_get)(struct chipop *, const uint8_t **, uint32_t *);
 	int (*istep)(struct chipop *, uint32_t major, uint32_t minor);
-	int (*thread_start)(struct chipop *, uint32_t core_id, uint32_t thread_id);
-	int (*thread_stop)(struct chipop *, uint32_t core_id, uint32_t thread_id);
-	int (*thread_step)(struct chipop *, uint32_t core_id, uint32_t thread_id);
-	int (*thread_sreset)(struct chipop *, uint32_t core_id, uint32_t thread_id);
 };
 #define target_to_chipop(x) container_of(x, struct chipop, target)
 
diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c
index 0231b28..efbf72d 100644
--- a/libpdbg/sbefifo.c
+++ b/libpdbg/sbefifo.c
@@ -179,48 +179,6 @@  static int sbefifo_op_istep(struct chipop *chipop,
 	return sbefifo_istep_execute(sctx, major & 0xff, minor & 0xff);
 }
 
-static int sbefifo_op_control(struct chipop *chipop,
-			      uint32_t core_id, uint32_t thread_id,
-			      uint32_t oper)
-{
-	struct sbefifo *sbefifo = target_to_sbefifo(chipop->target.parent);
-	struct sbefifo_context *sctx = sbefifo->get_sbefifo_context(sbefifo);
-	uint8_t mode = 0;
-
-	/* Enforce special-wakeup for thread stop and sreset */
-	if ((oper & 0xf) == SBEFIFO_INSN_OP_STOP ||
-	    (oper & 0xf) == SBEFIFO_INSN_OP_SRESET)
-		mode = 0x2;
-
-	PR_NOTICE("sbefifo: control c:0x%x, t:0x%x, op:%u mode:%u\n", core_id, thread_id, oper, mode);
-
-	return sbefifo_control_insn(sctx, core_id & 0xff, thread_id & 0xff, oper & 0xff, mode);
-}
-
-static int sbefifo_op_thread_start(struct chipop *chipop,
-				   uint32_t core_id, uint32_t thread_id)
-{
-	return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_START);
-}
-
-static int sbefifo_op_thread_stop(struct chipop *chipop,
-				  uint32_t core_id, uint32_t thread_id)
-{
-	return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_STOP);
-}
-
-static int sbefifo_op_thread_step(struct chipop *chipop,
-				  uint32_t core_id, uint32_t thread_id)
-{
-	return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_STEP);
-}
-
-static int sbefifo_op_thread_sreset(struct chipop *chipop,
-				    uint32_t core_id, uint32_t thread_id)
-{
-	return sbefifo_op_control(chipop, core_id, thread_id, SBEFIFO_INSN_OP_SRESET);
-}
-
 static int sbefifo_pib_read(struct pib *pib, uint64_t addr, uint64_t *val)
 {
 	struct sbefifo *sbefifo = target_to_sbefifo(pib->target.parent);
@@ -403,10 +361,6 @@  static struct chipop sbefifo_chipop = {
 	},
 	.ffdc_get = sbefifo_op_ffdc_get,
 	.istep = sbefifo_op_istep,
-	.thread_start = sbefifo_op_thread_start,
-	.thread_stop = sbefifo_op_thread_stop,
-	.thread_step = sbefifo_op_thread_step,
-	.thread_sreset = sbefifo_op_thread_sreset,
 };
 DECLARE_HW_UNIT(sbefifo_chipop);