summaryrefslogtreecommitdiff
path: root/include/linux/coresight.h
diff options
context:
space:
mode:
authorJames Clark <james.clark@arm.com>2023-04-25 15:35:39 +0100
committerSuzuki K Poulose <suzuki.poulose@arm.com>2023-06-05 15:46:47 +0100
commit6148652807ba89b0c9af05ebed3e005b626f90eb (patch)
treeb8455beca23f4c1ecbfb8535e7c98480fc8c1147 /include/linux/coresight.h
parent296b01fd106e787d4463974a7f42d286a5df08cd (diff)
coresight: Enable and disable helper devices adjacent to the path
Currently CATU is the only helper device, and its enable and disable calls are hard coded. To allow more helper devices to be added in a generic way, remove these hard coded calls and just enable and disable all helper devices. This has to apply to helpers adjacent to the path, because they will never be in the path. CATU was already discovered in this way, so there is no change there. One change that is needed is for CATU to call back into ETR to allocate the buffer. Because the enable call was previously hard coded, it was done at a point where the buffer was already allocated, but this is no longer the case. Reviewed-by: Mike Leach <mike.leach@linaro.org> Signed-off-by: James Clark <james.clark@arm.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20230425143542.2305069-13-james.clark@arm.com
Diffstat (limited to 'include/linux/coresight.h')
-rw-r--r--include/linux/coresight.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/coresight.h b/include/linux/coresight.h
index b97edd24f3ec..61dfbab5fa98 100644
--- a/include/linux/coresight.h
+++ b/include/linux/coresight.h
@@ -375,7 +375,8 @@ struct coresight_ops_source {
* @disable : Disable the device
*/
struct coresight_ops_helper {
- int (*enable)(struct coresight_device *csdev, void *data);
+ int (*enable)(struct coresight_device *csdev, enum cs_mode mode,
+ void *data);
int (*disable)(struct coresight_device *csdev, void *data);
};
@@ -646,5 +647,13 @@ coresight_add_out_conn(struct device *dev,
struct coresight_platform_data *pdata,
const struct coresight_connection *new_conn);
int coresight_add_in_conn(struct coresight_connection *conn);
+struct coresight_device *
+coresight_find_input_type(struct coresight_platform_data *pdata,
+ enum coresight_dev_type type,
+ union coresight_dev_subtype subtype);
+struct coresight_device *
+coresight_find_output_type(struct coresight_platform_data *pdata,
+ enum coresight_dev_type type,
+ union coresight_dev_subtype subtype);
#endif /* _LINUX_COREISGHT_H */