Loading Documentation/devicetree/bindings/coresight/coresight.txt +2 −1 Original line number Diff line number Diff line Loading @@ -160,7 +160,8 @@ Optional properties: interrupts specified in the 'interrupts' property. - qcom,nidnt : indicates NIDnT serial wire debug support present. Used for tpiu component - qcom,sg-enable : indicates whether scatter gather feature is supported for TMC ETR configuration. Examples: 1. Sinks Loading drivers/coresight/coresight-tmc.c +14 −3 Original line number Diff line number Diff line Loading @@ -186,6 +186,7 @@ struct tmc_drvdata { char *byte_cntr_node; uint32_t mem_size; bool sticky_enable; bool sg_enable; enum tmc_etr_mem_type mem_type; }; Loading Loading @@ -1465,10 +1466,16 @@ static ssize_t tmc_etr_store_mem_type(struct device *dev, if (sscanf(buf, "%s", str) != 1) return -EINVAL; if (!strcmp(str, "contig")) mutex_lock(&drvdata->usb_lock); if (!strcmp(str, "contig")) { drvdata->mem_type = TMC_ETR_MEM_TYPE_CONTIG; else if (!strcmp(str, "sg")) } else if (!strcmp(str, "sg") && drvdata->sg_enable) { drvdata->mem_type = TMC_ETR_MEM_TYPE_SG; } else { mutex_unlock(&drvdata->usb_lock); return -EINVAL; } mutex_unlock(&drvdata->usb_lock); return size; } Loading Loading @@ -1768,10 +1775,14 @@ static int tmc_probe(struct platform_device *pdev) if (drvdata->config_type == TMC_CONFIG_TYPE_ETR) { drvdata->out_mode = TMC_ETR_OUT_MODE_MEM; if (pdev->dev.of_node) if (pdev->dev.of_node) { drvdata->sg_enable = of_property_read_bool (pdev->dev.of_node, "qcom,sg-enable"); drvdata->byte_cntr_present = !of_property_read_bool (pdev->dev.of_node, "qcom,byte-cntr-absent"); } ret = tmc_etr_byte_cntr_init(pdev, drvdata); if (ret) goto err0; Loading Loading
Documentation/devicetree/bindings/coresight/coresight.txt +2 −1 Original line number Diff line number Diff line Loading @@ -160,7 +160,8 @@ Optional properties: interrupts specified in the 'interrupts' property. - qcom,nidnt : indicates NIDnT serial wire debug support present. Used for tpiu component - qcom,sg-enable : indicates whether scatter gather feature is supported for TMC ETR configuration. Examples: 1. Sinks Loading
drivers/coresight/coresight-tmc.c +14 −3 Original line number Diff line number Diff line Loading @@ -186,6 +186,7 @@ struct tmc_drvdata { char *byte_cntr_node; uint32_t mem_size; bool sticky_enable; bool sg_enable; enum tmc_etr_mem_type mem_type; }; Loading Loading @@ -1465,10 +1466,16 @@ static ssize_t tmc_etr_store_mem_type(struct device *dev, if (sscanf(buf, "%s", str) != 1) return -EINVAL; if (!strcmp(str, "contig")) mutex_lock(&drvdata->usb_lock); if (!strcmp(str, "contig")) { drvdata->mem_type = TMC_ETR_MEM_TYPE_CONTIG; else if (!strcmp(str, "sg")) } else if (!strcmp(str, "sg") && drvdata->sg_enable) { drvdata->mem_type = TMC_ETR_MEM_TYPE_SG; } else { mutex_unlock(&drvdata->usb_lock); return -EINVAL; } mutex_unlock(&drvdata->usb_lock); return size; } Loading Loading @@ -1768,10 +1775,14 @@ static int tmc_probe(struct platform_device *pdev) if (drvdata->config_type == TMC_CONFIG_TYPE_ETR) { drvdata->out_mode = TMC_ETR_OUT_MODE_MEM; if (pdev->dev.of_node) if (pdev->dev.of_node) { drvdata->sg_enable = of_property_read_bool (pdev->dev.of_node, "qcom,sg-enable"); drvdata->byte_cntr_present = !of_property_read_bool (pdev->dev.of_node, "qcom,byte-cntr-absent"); } ret = tmc_etr_byte_cntr_init(pdev, drvdata); if (ret) goto err0; Loading