Lines Matching refs:csdev

16 static int tmc_set_etf_buffer(struct coresight_device *csdev,
40 int rc = coresight_claim_device(drvdata->csdev); in tmc_etb_enable_hw()
91 coresight_disclaim_device(drvdata->csdev); in tmc_etb_disable_hw()
112 int rc = coresight_claim_device(drvdata->csdev); in tmc_etf_enable_hw()
123 struct coresight_device *csdev = drvdata->csdev; in tmc_etf_disable_hw() local
129 coresight_disclaim_device_unlocked(csdev); in tmc_etf_disable_hw()
151 static int tmc_enable_etf_sink_sysfs(struct coresight_device *csdev) in tmc_enable_etf_sink_sysfs() argument
157 struct tmc_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in tmc_enable_etf_sink_sysfs()
187 atomic_inc(csdev->refcnt); in tmc_enable_etf_sink_sysfs()
210 atomic_inc(csdev->refcnt); in tmc_enable_etf_sink_sysfs()
225 static int tmc_enable_etf_sink_perf(struct coresight_device *csdev, void *data) in tmc_enable_etf_sink_perf() argument
230 struct tmc_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in tmc_enable_etf_sink_perf()
256 ret = tmc_set_etf_buffer(csdev, handle); in tmc_enable_etf_sink_perf()
265 atomic_inc(csdev->refcnt); in tmc_enable_etf_sink_perf()
274 atomic_inc(csdev->refcnt); in tmc_enable_etf_sink_perf()
282 static int tmc_enable_etf_sink(struct coresight_device *csdev, in tmc_enable_etf_sink() argument
289 ret = tmc_enable_etf_sink_sysfs(csdev); in tmc_enable_etf_sink()
292 ret = tmc_enable_etf_sink_perf(csdev, data); in tmc_enable_etf_sink()
303 dev_dbg(&csdev->dev, "TMC-ETB/ETF enabled\n"); in tmc_enable_etf_sink()
307 static int tmc_disable_etf_sink(struct coresight_device *csdev) in tmc_disable_etf_sink() argument
310 struct tmc_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in tmc_disable_etf_sink()
319 if (atomic_dec_return(csdev->refcnt)) { in tmc_disable_etf_sink()
333 dev_dbg(&csdev->dev, "TMC-ETB/ETF disabled\n"); in tmc_disable_etf_sink()
337 static int tmc_enable_etf_link(struct coresight_device *csdev, in tmc_enable_etf_link() argument
342 struct tmc_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in tmc_enable_etf_link()
351 if (atomic_read(&csdev->refcnt[0]) == 0) { in tmc_enable_etf_link()
359 atomic_inc(&csdev->refcnt[0]); in tmc_enable_etf_link()
363 dev_dbg(&csdev->dev, "TMC-ETF enabled\n"); in tmc_enable_etf_link()
367 static void tmc_disable_etf_link(struct coresight_device *csdev, in tmc_disable_etf_link() argument
371 struct tmc_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in tmc_disable_etf_link()
380 if (atomic_dec_return(&csdev->refcnt[0]) == 0) { in tmc_disable_etf_link()
388 dev_dbg(&csdev->dev, "TMC-ETF disabled\n"); in tmc_disable_etf_link()
391 static void *tmc_alloc_etf_buffer(struct coresight_device *csdev, in tmc_alloc_etf_buffer() argument
420 static int tmc_set_etf_buffer(struct coresight_device *csdev, in tmc_set_etf_buffer() argument
444 static unsigned long tmc_update_etf_buffer(struct coresight_device *csdev, in tmc_update_etf_buffer() argument
456 struct tmc_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in tmc_update_etf_buffer()
468 if (atomic_read(csdev->refcnt) != 1) in tmc_update_etf_buffer()