Lines Matching refs:csdev
86 struct coresight_device *csdev; member
97 static int etb_set_buffer(struct coresight_device *csdev,
135 int rc = coresight_claim_device(drvdata->csdev); in etb_enable_hw()
144 static int etb_enable_sysfs(struct coresight_device *csdev) in etb_enable_sysfs() argument
148 struct etb_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in etb_enable_sysfs()
166 atomic_inc(csdev->refcnt); in etb_enable_sysfs()
172 static int etb_enable_perf(struct coresight_device *csdev, void *data) in etb_enable_perf() argument
177 struct etb_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in etb_enable_perf()
202 atomic_inc(csdev->refcnt); in etb_enable_perf()
211 ret = etb_set_buffer(csdev, handle); in etb_enable_perf()
220 atomic_inc(csdev->refcnt); in etb_enable_perf()
228 static int etb_enable(struct coresight_device *csdev, u32 mode, void *data) in etb_enable() argument
234 ret = etb_enable_sysfs(csdev); in etb_enable()
237 ret = etb_enable_perf(csdev, data); in etb_enable()
247 dev_dbg(&csdev->dev, "ETB enabled\n"); in etb_enable()
254 struct device *dev = &drvdata->csdev->dev; in __etb_disable_hw()
255 struct csdev_access *csa = &drvdata->csdev->access; in __etb_disable_hw()
291 struct device *dev = &drvdata->csdev->dev; in etb_dump_hw()
348 coresight_disclaim_device(drvdata->csdev); in etb_disable_hw()
351 static int etb_disable(struct coresight_device *csdev) in etb_disable() argument
353 struct etb_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in etb_disable()
358 if (atomic_dec_return(csdev->refcnt)) { in etb_disable()
371 dev_dbg(&csdev->dev, "ETB disabled\n"); in etb_disable()
375 static void *etb_alloc_buffer(struct coresight_device *csdev, in etb_alloc_buffer() argument
403 static int etb_set_buffer(struct coresight_device *csdev, in etb_set_buffer() argument
427 static unsigned long etb_update_buffer(struct coresight_device *csdev, in etb_update_buffer() argument
439 struct etb_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); in etb_update_buffer()
449 if (atomic_read(csdev->refcnt) != 1) in etb_update_buffer()
465 dev_err(&csdev->dev, in etb_update_buffer()
598 dev_dbg(&drvdata->csdev->dev, "ETB dumped\n"); in etb_dump()
609 dev_dbg(&drvdata->csdev->dev, "%s: successfully opened\n", __func__); in etb_open()
619 struct device *dev = &drvdata->csdev->dev; in etb_read()
646 dev_dbg(&drvdata->csdev->dev, "%s: released\n", __func__); in etb_release()
788 drvdata->csdev = coresight_register(&desc); in etb_probe()
789 if (IS_ERR(drvdata->csdev)) in etb_probe()
790 return PTR_ERR(drvdata->csdev); in etb_probe()
803 coresight_unregister(drvdata->csdev); in etb_probe()
817 coresight_unregister(drvdata->csdev); in etb_remove()