Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a81cf5fb authored by Tao,Zhang's avatar Tao,Zhang Committed by Gerrit - the friendly Code Review server
Browse files

coresight: tmc: Set flush cti for both etr and etb



Set flush cti for both etr and etb. Set FlushandStop bit to default
value of FFCR in enablement function. Config the correct trigger number
of flush and reset cti for both etr and etb.

Change-Id: Idee3802e5a69aca521a6259f9936ddb8361a87d4
Signed-off-by: default avatarTao,Zhang <taozha@codeaurora.org>
parent a7e0337c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ static void tmc_etb_enable_hw(struct tmc_drvdata *drvdata)
	writel_relaxed(TMC_MODE_CIRCULAR_BUFFER, drvdata->base + TMC_MODE);
	writel_relaxed(TMC_FFCR_EN_FMT | TMC_FFCR_EN_TI |
		       TMC_FFCR_FON_FLIN | TMC_FFCR_FON_TRIG_EVT |
		       TMC_FFCR_TRIGON_TRIGIN,
		       TMC_FFCR_TRIGON_TRIGIN | TMC_FFCR_STOP_ON_FLUSH,
		       drvdata->base + TMC_FFCR);

	writel_relaxed(drvdata->trigger_cntr, drvdata->base + TMC_TRG);
+3 −3
Original line number Diff line number Diff line
@@ -976,7 +976,7 @@ void tmc_etr_enable_hw(struct tmc_drvdata *drvdata)

	writel_relaxed(TMC_FFCR_EN_FMT | TMC_FFCR_EN_TI |
		       TMC_FFCR_FON_FLIN | TMC_FFCR_FON_TRIG_EVT |
		       TMC_FFCR_TRIGON_TRIGIN,
		       TMC_FFCR_TRIGON_TRIGIN | TMC_FFCR_STOP_ON_FLUSH,
		       drvdata->base + TMC_FFCR);
	writel_relaxed(drvdata->trigger_cntr, drvdata->base + TMC_TRG);
	tmc_enable_hw(drvdata);
@@ -1355,7 +1355,7 @@ static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev)
				return -ENOMEM;
			}
			coresight_cti_map_trigout(drvdata->cti_flush, 3, 0);
			coresight_cti_map_trigin(drvdata->cti_reset, 2, 0);
			coresight_cti_map_trigin(drvdata->cti_reset, 0, 0);
		} else if (drvdata->byte_cntr->sw_usb) {
			if (!drvdata->etr_buf) {
				free_buf = new_buf =
@@ -1365,7 +1365,7 @@ static int tmc_enable_etr_sink_sysfs(struct coresight_device *csdev)
				}
			}
			coresight_cti_map_trigout(drvdata->cti_flush, 3, 0);
			coresight_cti_map_trigin(drvdata->cti_reset, 2, 0);
			coresight_cti_map_trigin(drvdata->cti_reset, 0, 0);

			drvdata->usbch = usb_qdss_open("qdss_mdm",
						drvdata->byte_cntr,