Loading drivers/hwtracing/coresight/coresight-byte-cntr.c +1 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include <linux/of_irq.h> #include <linux/moduleparam.h> #include <linux/delay.h> #include <linux/uaccess.h> #include "coresight-byte-cntr.h" #include "coresight-priv.h" Loading drivers/hwtracing/coresight/coresight-tmc-etr.c +4 −6 Original line number Diff line number Diff line Loading @@ -362,7 +362,7 @@ int tmc_etr_bam_init(struct amba_device *adev, return sps_register_bam_device(&bamdata->props, &bamdata->handle); } static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev, u32 mode) static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev) { int ret = 0; bool used = false; Loading Loading @@ -390,11 +390,9 @@ static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev, u32 mode) * enabling tmc; the new selection will be honored from * next tmc enable session. */ if (drvdata->size != drvdata->mem_size || drvdata->memtype != drvdata->mem_type) { if (drvdata->size != drvdata->mem_size) { tmc_etr_free_mem(drvdata); drvdata->size = drvdata->mem_size; drvdata->memtype = drvdata->mem_type; } ret = tmc_etr_alloc_mem(drvdata); Loading Loading @@ -449,7 +447,7 @@ static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev, u32 mode) if (drvdata->out_mode == TMC_ETR_OUT_MODE_MEM) tmc_etr_enable_hw(drvdata); drvdata->enable = true; 828 drvdata->enable = true; drvdata->sticky_enable = true; out: spin_unlock_irqrestore(&drvdata->spinlock, flags); Loading Loading @@ -524,7 +522,7 @@ static void tmc_disable_etr_sink(struct coresight_device *csdev) } /* Disable the TMC only if it needs to */ if (val != CS_MODE_DISABLED) { if (drvdata->mode != CS_MODE_DISABLED) { if (drvdata->out_mode == TMC_ETR_OUT_MODE_USB) { __tmc_etr_disable_to_bam(drvdata); spin_unlock_irqrestore(&drvdata->spinlock, flags); Loading drivers/hwtracing/coresight/coresight-tmc.c +0 −37 Original line number Diff line number Diff line Loading @@ -421,43 +421,6 @@ static ssize_t available_out_modes_show(struct device *dev, } static DEVICE_ATTR_RO(available_out_modes); static ssize_t mem_type_show(struct device *dev, struct device_attribute *attr, char *buf) { struct tmc_drvdata *drvdata = dev_get_drvdata(dev->parent); return scnprintf(buf, PAGE_SIZE, "%s\n", str_tmc_etr_mem_type[drvdata->mem_type]); } static ssize_t mem_type_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) { struct tmc_drvdata *drvdata = dev_get_drvdata(dev->parent); char str[10] = ""; if (strlen(buf) >= 10) return -EINVAL; if (sscanf(buf, "%10s", str) != 1) return -EINVAL; mutex_lock(&drvdata->mem_lock); if (!strcmp(str, str_tmc_etr_mem_type[TMC_ETR_MEM_TYPE_CONTIG])) drvdata->mem_type = TMC_ETR_MEM_TYPE_CONTIG; else if (!strcmp(str, str_tmc_etr_mem_type[TMC_ETR_MEM_TYPE_SG])) drvdata->mem_type = TMC_ETR_MEM_TYPE_SG; else size = -EINVAL; mutex_unlock(&drvdata->mem_lock); return size; } static DEVICE_ATTR_RW(mem_type); static ssize_t block_size_show(struct device *dev, struct device_attribute *attr, char *buf) Loading drivers/hwtracing/coresight/coresight-tmc.h +2 −3 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include <linux/of_address.h> #include <linux/amba/bus.h> #include <linux/usb_bam.h> #include <linux/msm-sps.h> #include <linux/usb/usb_qdss.h> #include <linux/coresight-cti.h> Loading Loading @@ -210,14 +211,12 @@ struct tmc_drvdata { u32 mem_size; u32 trigger_cntr; u32 etr_caps; enum tmc_etr_mem_type mem_type; enum tmc_etr_mem_type memtype; u32 delta_bottom; int sg_blk_num; enum tmc_etr_out_mode out_mode; struct usb_qdss_ch *usbch; struct tmc_etr_bam_data *bamdata; bool sticky_enable; bool enable_to_bam; struct coresight_cti *cti_flush; struct coresight_cti *cti_reset; struct byte_cntr *byte_cntr; Loading Loading
drivers/hwtracing/coresight/coresight-byte-cntr.c +1 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ #include <linux/of_irq.h> #include <linux/moduleparam.h> #include <linux/delay.h> #include <linux/uaccess.h> #include "coresight-byte-cntr.h" #include "coresight-priv.h" Loading
drivers/hwtracing/coresight/coresight-tmc-etr.c +4 −6 Original line number Diff line number Diff line Loading @@ -362,7 +362,7 @@ int tmc_etr_bam_init(struct amba_device *adev, return sps_register_bam_device(&bamdata->props, &bamdata->handle); } static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev, u32 mode) static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev) { int ret = 0; bool used = false; Loading Loading @@ -390,11 +390,9 @@ static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev, u32 mode) * enabling tmc; the new selection will be honored from * next tmc enable session. */ if (drvdata->size != drvdata->mem_size || drvdata->memtype != drvdata->mem_type) { if (drvdata->size != drvdata->mem_size) { tmc_etr_free_mem(drvdata); drvdata->size = drvdata->mem_size; drvdata->memtype = drvdata->mem_type; } ret = tmc_etr_alloc_mem(drvdata); Loading Loading @@ -449,7 +447,7 @@ static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev, u32 mode) if (drvdata->out_mode == TMC_ETR_OUT_MODE_MEM) tmc_etr_enable_hw(drvdata); drvdata->enable = true; 828 drvdata->enable = true; drvdata->sticky_enable = true; out: spin_unlock_irqrestore(&drvdata->spinlock, flags); Loading Loading @@ -524,7 +522,7 @@ static void tmc_disable_etr_sink(struct coresight_device *csdev) } /* Disable the TMC only if it needs to */ if (val != CS_MODE_DISABLED) { if (drvdata->mode != CS_MODE_DISABLED) { if (drvdata->out_mode == TMC_ETR_OUT_MODE_USB) { __tmc_etr_disable_to_bam(drvdata); spin_unlock_irqrestore(&drvdata->spinlock, flags); Loading
drivers/hwtracing/coresight/coresight-tmc.c +0 −37 Original line number Diff line number Diff line Loading @@ -421,43 +421,6 @@ static ssize_t available_out_modes_show(struct device *dev, } static DEVICE_ATTR_RO(available_out_modes); static ssize_t mem_type_show(struct device *dev, struct device_attribute *attr, char *buf) { struct tmc_drvdata *drvdata = dev_get_drvdata(dev->parent); return scnprintf(buf, PAGE_SIZE, "%s\n", str_tmc_etr_mem_type[drvdata->mem_type]); } static ssize_t mem_type_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) { struct tmc_drvdata *drvdata = dev_get_drvdata(dev->parent); char str[10] = ""; if (strlen(buf) >= 10) return -EINVAL; if (sscanf(buf, "%10s", str) != 1) return -EINVAL; mutex_lock(&drvdata->mem_lock); if (!strcmp(str, str_tmc_etr_mem_type[TMC_ETR_MEM_TYPE_CONTIG])) drvdata->mem_type = TMC_ETR_MEM_TYPE_CONTIG; else if (!strcmp(str, str_tmc_etr_mem_type[TMC_ETR_MEM_TYPE_SG])) drvdata->mem_type = TMC_ETR_MEM_TYPE_SG; else size = -EINVAL; mutex_unlock(&drvdata->mem_lock); return size; } static DEVICE_ATTR_RW(mem_type); static ssize_t block_size_show(struct device *dev, struct device_attribute *attr, char *buf) Loading
drivers/hwtracing/coresight/coresight-tmc.h +2 −3 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include <linux/of_address.h> #include <linux/amba/bus.h> #include <linux/usb_bam.h> #include <linux/msm-sps.h> #include <linux/usb/usb_qdss.h> #include <linux/coresight-cti.h> Loading Loading @@ -210,14 +211,12 @@ struct tmc_drvdata { u32 mem_size; u32 trigger_cntr; u32 etr_caps; enum tmc_etr_mem_type mem_type; enum tmc_etr_mem_type memtype; u32 delta_bottom; int sg_blk_num; enum tmc_etr_out_mode out_mode; struct usb_qdss_ch *usbch; struct tmc_etr_bam_data *bamdata; bool sticky_enable; bool enable_to_bam; struct coresight_cti *cti_flush; struct coresight_cti *cti_reset; struct byte_cntr *byte_cntr; Loading