Loading Documentation/devicetree/bindings/coresight/coresight.txt +2 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,8 @@ Optional properties: interrupts specified in the 'interrupts' property. - qcom,sg-enable : indicates whether scatter gather feature is supported for TMC ETR configuration. - qcom,force-reg-dump : boolean, indicate whether TMC register need to be dumped. Used for TMC component - qcom,nidntsw : boolean, indicating NIDnT software debug or trace support present. Used for tpiu component - qcom,nidnthw : boolean, indicating NIDnT hardware sensing support present. Loading drivers/coresight/coresight-tmc.c +15 −1 Original line number Diff line number Diff line Loading @@ -206,6 +206,8 @@ struct tmc_drvdata { char *byte_cntr_node; uint32_t mem_size; bool sticky_enable; bool force_reg_dump; bool dump_reg; bool sg_enable; enum tmc_etr_mem_type mem_type; enum tmc_etr_mem_type memtype; Loading @@ -215,6 +217,7 @@ struct tmc_drvdata { struct notifier_block jtag_save_blk; }; static void __tmc_reg_dump(struct tmc_drvdata *drvdata); static void tmc_wait_for_flush(struct tmc_drvdata *drvdata) { int count; Loading Loading @@ -909,6 +912,11 @@ static int tmc_enable(struct tmc_drvdata *drvdata, enum tmc_mode mode) __tmc_etf_enable(drvdata); } drvdata->enable = true; if (drvdata->force_reg_dump) { drvdata->dump_reg = true; __tmc_reg_dump(drvdata); drvdata->dump_reg = false; } /* * sticky_enable prevents users from reading tmc dev node before Loading Loading @@ -951,7 +959,9 @@ static void __tmc_reg_dump(struct tmc_drvdata *drvdata) char *reg_hdr; uint32_t *reg_buf; if (!drvdata->reg_buf || !drvdata->aborting) if (!drvdata->reg_buf) return; else if (!drvdata->aborting && !drvdata->dump_reg) return; reg_hdr = drvdata->reg_buf - PAGE_SIZE; Loading Loading @@ -2379,6 +2389,10 @@ static int tmc_probe(struct platform_device *pdev) if (ret) return ret; drvdata->force_reg_dump = of_property_read_bool (pdev->dev.of_node, "qcom,force-reg-dump"); devid = tmc_readl(drvdata, CORESIGHT_DEVID); drvdata->config_type = BMVAL(devid, 6, 7); Loading Loading
Documentation/devicetree/bindings/coresight/coresight.txt +2 −0 Original line number Diff line number Diff line Loading @@ -167,6 +167,8 @@ Optional properties: interrupts specified in the 'interrupts' property. - qcom,sg-enable : indicates whether scatter gather feature is supported for TMC ETR configuration. - qcom,force-reg-dump : boolean, indicate whether TMC register need to be dumped. Used for TMC component - qcom,nidntsw : boolean, indicating NIDnT software debug or trace support present. Used for tpiu component - qcom,nidnthw : boolean, indicating NIDnT hardware sensing support present. Loading
drivers/coresight/coresight-tmc.c +15 −1 Original line number Diff line number Diff line Loading @@ -206,6 +206,8 @@ struct tmc_drvdata { char *byte_cntr_node; uint32_t mem_size; bool sticky_enable; bool force_reg_dump; bool dump_reg; bool sg_enable; enum tmc_etr_mem_type mem_type; enum tmc_etr_mem_type memtype; Loading @@ -215,6 +217,7 @@ struct tmc_drvdata { struct notifier_block jtag_save_blk; }; static void __tmc_reg_dump(struct tmc_drvdata *drvdata); static void tmc_wait_for_flush(struct tmc_drvdata *drvdata) { int count; Loading Loading @@ -909,6 +912,11 @@ static int tmc_enable(struct tmc_drvdata *drvdata, enum tmc_mode mode) __tmc_etf_enable(drvdata); } drvdata->enable = true; if (drvdata->force_reg_dump) { drvdata->dump_reg = true; __tmc_reg_dump(drvdata); drvdata->dump_reg = false; } /* * sticky_enable prevents users from reading tmc dev node before Loading Loading @@ -951,7 +959,9 @@ static void __tmc_reg_dump(struct tmc_drvdata *drvdata) char *reg_hdr; uint32_t *reg_buf; if (!drvdata->reg_buf || !drvdata->aborting) if (!drvdata->reg_buf) return; else if (!drvdata->aborting && !drvdata->dump_reg) return; reg_hdr = drvdata->reg_buf - PAGE_SIZE; Loading Loading @@ -2379,6 +2389,10 @@ static int tmc_probe(struct platform_device *pdev) if (ret) return ret; drvdata->force_reg_dump = of_property_read_bool (pdev->dev.of_node, "qcom,force-reg-dump"); devid = tmc_readl(drvdata, CORESIGHT_DEVID); drvdata->config_type = BMVAL(devid, 6, 7); Loading