Hi Mike,
On 09/01/2019 22:54, Mike Leach wrote:
Adds Embedded Cross Trigger (ECT) type and CTI sub-type to CoreSight enums in main coresight headers.
Adds in new global functions for CTI drivers.
Signed-off-by: Mike Leach mike.leach@linaro.org
include/linux/coresight.h | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)
diff --git a/include/linux/coresight.h b/include/linux/coresight.h index 46c67a764877..6f85ac0cec55 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -41,6 +41,7 @@ enum coresight_dev_type { CORESIGHT_DEV_TYPE_LINKSINK, CORESIGHT_DEV_TYPE_SOURCE, CORESIGHT_DEV_TYPE_HELPER,
- CORESIGHT_DEV_TYPE_ECT, };
enum coresight_dev_subtype_sink { @@ -68,6 +69,12 @@ enum coresight_dev_subtype_helper { CORESIGHT_DEV_SUBTYPE_HELPER_CATU, }; +/* Embedded Cross Trigger (ECT) sub-types */ +enum coresight_dev_subtype_ect {
- CORESIGHT_DEV_SUBTYPE_ECT_NONE,
- CORESIGHT_DEV_SUBTYPE_ECT_CTI,
+};
I haven't looked at the following patches, but I will ask anyway.
Do we really need a CTI type ? Could this be a HELPER_TYPE and a new sub-type of the HELPER ? (Just like we do the CATU) ?
/**
- union coresight_dev_subtype - further characterisation of a type
- @sink_subtype: type of sink this component is, as defined
@@ -78,6 +85,8 @@ enum coresight_dev_subtype_helper {
by @coresight_dev_subtype_source.
- @helper_subtype: type of helper this component is, as defined
by @coresight_dev_subtype_helper.
- @ect_subtype: type of cross trigger this component is, as
*/ union coresight_dev_subtype { /* We have some devices which acts as LINK and SINK */
define by @coresight_dev_subtype_ect
@@ -87,6 +96,7 @@ union coresight_dev_subtype { }; enum coresight_dev_subtype_source source_subtype; enum coresight_dev_subtype_helper helper_subtype;
- enum coresight_dev_subtype_ect ect_subtype; };
/** @@ -156,6 +166,8 @@ struct coresight_connection {
- @activated: 'true' only if a _sink_ has been activated. A sink can be activated but not yet enabled. Enabling for a _sink_ happens when a source has been selected for that it.
- @ect_dev: Associated cross trigger device. Not part of the trace data
*/ struct coresight_device { struct coresight_connection *conns;
path or connections.
@@ -169,6 +181,7 @@ struct coresight_device { bool orphan; bool enable; /* true only if configured as part of a path */ bool activated; /* true only if a sink is part of a path */
- struct coresight_device *ect_dev;
Could we use a "dummy" connection to represent the ECTI, just like we do for CATU ? We could always find the ECT from the conns by matching the type && subtype.
And the bonus is that the ECTI will be enabled automatically when the component is enabled (just like we do for CATU).
Cheers Suzuki