[PATCH 0/4] Add support for multi-port output on the funnel
From: Tao Zhang
Date: Thu Mar 21 2024 - 04:33:21 EST
Funnel can support multi-port output in our hardware design. Since original
funnels only support a single output connection, the code needs to be
modified to support this new feature. The following is a typical topology
diagram of multi-port output of the funnels.
|---------| |---------| |---------| |---------| |---------|
| TPDM0 | | TPDM1 | | TPDM2 | | TPDM3 | | TPDM4 |
|---------| |---------| |---------| |---------| |---------|
| | | | |
| | | | |
| | | | |
|-----| |-----| |-----| |-----| |
| | | | |
| | | | |
[0]| |[1] [0]| |[1] |
\-------------/ \-------------/ \-------------/
\ FUNNEL0 / \ FUNNEL1 / \ FUNNEL2 /
----------- ----------- -----------
[0]| |[1] [0]| |[1] |
| |---------- | | |
| | | | |
|-------| | |------- | | |--------- |
| | | | |
| | | | |
[0]| |[1] |[2] |[3] |[4]
\ ---------------------------------------------------/
\ TPDA0 /
\ /
------------------------------------------------
For example, TPDM0 and TPDM1 are connected to the [0] and [1] input ports
of the funnel respectively, and output from the [0] and [1] output ports.
In this way, when data is output from the Funnel's output port, it needs
to know the source component corresponding to this output port. Our
solution is to add a property named "label" in the devicetree to mark the
source corresponding to the output port.
After introducing this new feature, another new problem also needs to be
solved. For example, TPDA driver will search for all the TPDMs on a input
port. In the topology diagram above, when TPDA searches for TPDM from the
input port[0], it will find TPDM0 and TPDM1. Our solution is to add a new
property named "qcom,tpda-input-port" to mark the input port number of the
TPDA in the devicetree.
Tao Zhang (4):
dt-bindings: arm: qcom,coresight-funnel: Add label for multi-ouput
coresight: Add support for multiple output ports on the funnel
dt-bindings: arm: qcom,coresight-tpdm: Mark tpda input port number
coresight-tpda: Add support multi-port input on TPDA
.../arm/arm,coresight-dynamic-funnel.yaml | 34 +++++++-
.../bindings/arm/qcom,coresight-tpdm.yaml | 8 ++
drivers/hwtracing/coresight/coresight-core.c | 81 ++++++++++++++++---
.../hwtracing/coresight/coresight-platform.c | 5 ++
drivers/hwtracing/coresight/coresight-tpda.c | 27 ++++++-
include/linux/coresight.h | 2 +
6 files changed, 139 insertions(+), 18 deletions(-)
--
2.17.1