forked from rubenslte/android_kernel_samsung_msm8226
coresight: enable flush-on-flushin for periodic flush to usb
Periodic flushing for ETR to USB uses ETR flush-on-FLUSHIN external input. Hence, enable flush-on-FLUSHIN by default when enabling ETR to USB transfers and work around the manual flush failure by skipping it during ETR to USB disable. Adjust the periodic flush threshold to the maximum value in order to reduce the overhead when there is no data to be transferred. CRs-Fixed: 461885 Change-Id: Ie3a1bbc80e017f187af56fcfdfb52297ba9aa72d Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
This commit is contained in:
@@ -94,7 +94,7 @@ void msm_qdss_csr_enable_bam_to_usb(void)
|
||||
csr_writel(drvdata, usbbamctrl, CSR_USBBAMCTRL);
|
||||
|
||||
usbflshctrl = csr_readl(drvdata, CSR_USBFLSHCTRL);
|
||||
usbflshctrl = (usbflshctrl & ~0x3FFFC) | (0x1000 << 2);
|
||||
usbflshctrl = (usbflshctrl & ~0x3FFFC) | (0xFFFF << 2);
|
||||
csr_writel(drvdata, usbflshctrl, CSR_USBFLSHCTRL);
|
||||
usbflshctrl |= 0x2;
|
||||
csr_writel(drvdata, usbflshctrl, CSR_USBFLSHCTRL);
|
||||
|
||||
@@ -275,7 +275,8 @@ static void __tmc_etr_enable_to_bam(struct tmc_drvdata *drvdata)
|
||||
tmc_writel(drvdata, (uint32_t)bamdata->data_fifo.phys_base, TMC_DBALO);
|
||||
tmc_writel(drvdata, (((uint64_t)bamdata->data_fifo.phys_base) >> 32)
|
||||
& 0xFF, TMC_DBAHI);
|
||||
tmc_writel(drvdata, 0x103, TMC_FFCR);
|
||||
/* Set FOnFlIn for periodic flush */
|
||||
tmc_writel(drvdata, 0x133, TMC_FFCR);
|
||||
tmc_writel(drvdata, drvdata->trigger_cntr, TMC_TRG);
|
||||
__tmc_enable(drvdata);
|
||||
|
||||
@@ -341,7 +342,6 @@ static void __tmc_etr_disable_to_bam(struct tmc_drvdata *drvdata)
|
||||
TMC_UNLOCK(drvdata);
|
||||
|
||||
tmc_wait_for_flush(drvdata);
|
||||
tmc_flush_and_stop(drvdata);
|
||||
__tmc_disable(drvdata);
|
||||
|
||||
TMC_LOCK(drvdata);
|
||||
|
||||
Reference in New Issue
Block a user