Dealing with HW related matters in tmc_read_prepare/unprepare
becomes convoluted when many cases need to be handled distinctively.
As such moving processing related to HW setup to individual driver
files and keep the core driver generic.
Signed-off-by: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>
---
drivers/hwtracing/coresight/coresight-tmc-etf.c | 68 ++++++++++++++++++++++++-
drivers/hwtracing/coresight/coresight-tmc-etr.c | 50 +++++++++++++++++-
drivers/hwtracing/coresight/coresight-tmc.c | 55 ++++----------------
drivers/hwtracing/coresight/coresight-tmc.h | 8 +--
4 files changed, 131 insertions(+), 50 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c
index 467d19221f7b..789384be81b6 100644
--- a/drivers/hwtracing/coresight/coresight-tmc-etf.c
+++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c
@@ -71,7 +71,7 @@ static void tmc_etb_dump_hw(struct tmc_drvdata *drvdata)
}
}
-void tmc_etb_disable_hw(struct tmc_drvdata *drvdata)
+static void tmc_etb_disable_hw(struct tmc_drvdata *drvdata)
{
CS_UNLOCK(drvdata->base);
@@ -202,3 +202,69 @@ const struct coresight_ops tmc_etf_cs_ops = {
.sink_ops = &tmc_etf_sink_ops,
.link_ops = &tmc_etf_link_ops,
};
+
+int tmc_read_prepare_etf(struct tmc_drvdata *drvdata)
+int tmc_read_unprepare_etf(struct tmc_drvdata *drvdata)