}
static int catu_enable_hw(struct catu_drvdata *drvdata, enum cs_mode cs_mode,
- void *data)
+ struct coresight_path *path)
{
int rc;
u32 control, mode;
etrdev = coresight_find_input_type(
csdev->pdata, CORESIGHT_DEV_TYPE_SINK, etr_subtype);
if (etrdev) {
- etr_buf = tmc_etr_get_buffer(etrdev, cs_mode, data);
+ etr_buf = tmc_etr_get_buffer(etrdev, cs_mode, path);
if (IS_ERR(etr_buf))
return PTR_ERR(etr_buf);
}
}
static int catu_enable(struct coresight_device *csdev, enum cs_mode mode,
- void *data)
+ struct coresight_path *path)
{
int rc = 0;
struct catu_drvdata *catu_drvdata = csdev_to_catu_drvdata(csdev);
guard(raw_spinlock_irqsave)(&catu_drvdata->spinlock);
if (csdev->refcnt == 0) {
CS_UNLOCK(catu_drvdata->base);
- rc = catu_enable_hw(catu_drvdata, mode, data);
+ rc = catu_enable_hw(catu_drvdata, mode, path);
CS_LOCK(catu_drvdata->base);
}
if (!rc)
return rc;
}
-static int catu_disable(struct coresight_device *csdev, void *__unused)
+static int catu_disable(struct coresight_device *csdev, struct coresight_path *path)
{
int rc = 0;
struct catu_drvdata *catu_drvdata = csdev_to_catu_drvdata(csdev);
}
static int coresight_enable_helper(struct coresight_device *csdev,
- enum cs_mode mode, void *data)
+ enum cs_mode mode,
+ struct coresight_path *path)
{
- return helper_ops(csdev)->enable(csdev, mode, data);
+ return helper_ops(csdev)->enable(csdev, mode, path);
}
-static void coresight_disable_helper(struct coresight_device *csdev, void *data)
+static void coresight_disable_helper(struct coresight_device *csdev,
+ struct coresight_path *path)
{
- helper_ops(csdev)->disable(csdev, data);
+ helper_ops(csdev)->disable(csdev, path);
}
-static void coresight_disable_helpers(struct coresight_device *csdev, void *data)
+static void coresight_disable_helpers(struct coresight_device *csdev,
+ struct coresight_path *path)
{
int i;
struct coresight_device *helper;
for (i = 0; i < csdev->pdata->nr_outconns; ++i) {
helper = csdev->pdata->out_conns[i]->dest_dev;
if (helper && coresight_is_helper(helper))
- coresight_disable_helper(helper, data);
+ coresight_disable_helper(helper, path);
}
}
EXPORT_SYMBOL_GPL(coresight_disable_path);
static int coresight_enable_helpers(struct coresight_device *csdev,
- enum cs_mode mode, void *data)
+ enum cs_mode mode,
+ struct coresight_path *path)
{
int i, ret = 0;
struct coresight_device *helper;
if (!helper || !coresight_is_helper(helper))
continue;
- ret = coresight_enable_helper(helper, mode, data);
+ ret = coresight_enable_helper(helper, mode, path);
if (ret)
return ret;
}
return __ctcu_set_etr_traceid(csdev, traceid, port_num, enable);
}
-static int ctcu_enable(struct coresight_device *csdev, enum cs_mode mode, void *data)
+static int ctcu_enable(struct coresight_device *csdev, enum cs_mode mode,
+ struct coresight_path *path)
{
- struct coresight_path *path = (struct coresight_path *)data;
-
return ctcu_set_etr_traceid(csdev, path, true);
}
-static int ctcu_disable(struct coresight_device *csdev, void *data)
+static int ctcu_disable(struct coresight_device *csdev, struct coresight_path *path)
{
- struct coresight_path *path = (struct coresight_path *)data;
-
return ctcu_set_etr_traceid(csdev, path, false);
}
}
/** cti ect operations **/
-int cti_enable(struct coresight_device *csdev, enum cs_mode mode, void *data)
+int cti_enable(struct coresight_device *csdev, enum cs_mode mode,
+ struct coresight_path *path)
{
struct cti_drvdata *drvdata = csdev_to_cti_drvdata(csdev);
return cti_enable_hw(drvdata);
}
-int cti_disable(struct coresight_device *csdev, void *data)
+int cti_disable(struct coresight_device *csdev, struct coresight_path *path)
{
struct cti_drvdata *drvdata = csdev_to_cti_drvdata(csdev);
const char *assoc_dev_name);
struct cti_trig_con *cti_allocate_trig_con(struct device *dev, int in_sigs,
int out_sigs);
-int cti_enable(struct coresight_device *csdev, enum cs_mode mode, void *data);
-int cti_disable(struct coresight_device *csdev, void *data);
+int cti_enable(struct coresight_device *csdev, enum cs_mode mode,
+ struct coresight_path *path);
+int cti_disable(struct coresight_device *csdev, struct coresight_path *path);
void cti_write_all_hw_regs(struct cti_drvdata *drvdata);
void cti_write_intack(struct device *dev, u32 ackval);
void cti_write_single_reg(struct cti_drvdata *drvdata, int offset, u32 value);
}
struct etr_buf *tmc_etr_get_buffer(struct coresight_device *csdev,
- enum cs_mode mode, void *data)
+ enum cs_mode mode,
+ struct coresight_path *path)
{
- struct coresight_path *path = data;
struct perf_output_handle *handle = path->handle;
struct etr_perf_buffer *etr_perf;
void tmc_etr_set_catu_ops(const struct etr_buf_operations *catu);
void tmc_etr_remove_catu_ops(void);
struct etr_buf *tmc_etr_get_buffer(struct coresight_device *csdev,
- enum cs_mode mode, void *data);
+ enum cs_mode mode,
+ struct coresight_path *path);
extern const struct attribute_group coresight_etr_group;
#endif
*/
struct coresight_ops_helper {
int (*enable)(struct coresight_device *csdev, enum cs_mode mode,
- void *data);
- int (*disable)(struct coresight_device *csdev, void *data);
+ struct coresight_path *path);
+ int (*disable)(struct coresight_device *csdev,
+ struct coresight_path *path);
};