summaryrefslogtreecommitdiff
path: root/drivers/hwtracing/coresight/coresight-syscfg.h
diff options
context:
space:
mode:
authorMike Leach <mike.leach@linaro.org>2021-08-18 22:40:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-18 23:33:28 +0300
commitf8cce2ff3c04361b8843d8489620fda8880f668b (patch)
tree3e807fb02d130b81ffb5e93590e41ce3a5ec6a3c /drivers/hwtracing/coresight/coresight-syscfg.h
parent94d2bac540762e7517933d365dd6289f54963c97 (diff)
downloadlinux-f8cce2ff3c04361b8843d8489620fda8880f668b.tar.xz
coresight: syscfg: Add API to activate and enable configurations
Configurations are first activated, then when any coresight device is enabled, the active configurations are checked and any matching one is enabled. This patch provides the activation / enable API. Link: https://lore.kernel.org/r/20210723165444.1048-6-mike.leach@linaro.org Signed-off-by: Mike Leach <mike.leach@linaro.org> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20210818194022.379573-6-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-syscfg.h')
-rw-r--r--drivers/hwtracing/coresight/coresight-syscfg.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight-syscfg.h b/drivers/hwtracing/coresight/coresight-syscfg.h
index 5bcae3b374c6..a52775890670 100644
--- a/drivers/hwtracing/coresight/coresight-syscfg.h
+++ b/drivers/hwtracing/coresight/coresight-syscfg.h
@@ -24,12 +24,14 @@
* @csdev_desc_list: List of coresight devices registered with the configuration manager.
* @feat_desc_list: List of feature descriptors to load into registered devices.
* @config_desc_list: List of system configuration descriptors to load into registered devices.
+ * @sys_active_cnt: Total number of active config descriptor references.
*/
struct cscfg_manager {
struct device dev;
struct list_head csdev_desc_list;
struct list_head feat_desc_list;
struct list_head config_desc_list;
+ atomic_t sys_active_cnt;
};
/* get reference to dev in cscfg_manager */
@@ -61,5 +63,11 @@ int cscfg_load_config_sets(struct cscfg_config_desc **cfg_descs,
int cscfg_register_csdev(struct coresight_device *csdev, u32 match_flags,
struct cscfg_csdev_feat_ops *ops);
void cscfg_unregister_csdev(struct coresight_device *csdev);
+int cscfg_activate_config(unsigned long cfg_hash);
+void cscfg_deactivate_config(unsigned long cfg_hash);
+void cscfg_csdev_reset_feats(struct coresight_device *csdev);
+int cscfg_csdev_enable_active_config(struct coresight_device *csdev,
+ unsigned long cfg_hash, int preset);
+void cscfg_csdev_disable_active_config(struct coresight_device *csdev);
#endif /* CORESIGHT_SYSCFG_H */