diff options
author | James Clark <james.clark@arm.com> | 2023-04-25 16:35:39 +0200 |
---|---|---|
committer | Suzuki K Poulose <suzuki.poulose@arm.com> | 2023-06-05 16:46:47 +0200 |
commit | 6148652807ba89b0c9af05ebed3e005b626f90eb (patch) | |
tree | b8455beca23f4c1ecbfb8535e7c98480fc8c1147 /include | |
parent | coresight: Refactor out buffer allocation function for ETR (diff) | |
download | linux-6148652807ba89b0c9af05ebed3e005b626f90eb.tar.xz linux-6148652807ba89b0c9af05ebed3e005b626f90eb.zip |
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')
-rw-r--r-- | include/linux/coresight.h | 11 |
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 */ |