Re: [PATCH v2] dmaengine: qcom: bam_dma: Avoid writing unavailable register

From: Md Sadre Alam
Date: Mon Dec 09 2024 - 00:29:50 EST




On 12/5/2024 5:58 PM, Bryan O'Donoghue wrote:
On 05/12/2024 12:00, Md Sadre Alam wrote:

The commit log:

Avoid writing unavailable register in BAM-Lite mode.
BAM_DESC_CNT_TRSHLD register is unavailable in BAM-Lite
mode. Its only available in BAM-NDP mode. So avoid writing

and the action taken in the code:

+    if (bdev->bam_revision >= BAM_LITE && bdev->bam_revision < BAM_NDP)
+        writel_relaxed(DEFAULT_CNT_THRSHLD,

Really don't match up. You've said in your commit log BAM_DESC_CNT_TRSHLD is unavailable to the LITE module but, then you say if (bam_revision >= BAM_LITE...)

How can checking if the revision == BAM_LITE match up with the stated objective in your commit log => _not_ writing to DEFAULT_CNT_THRSHLD in lite mode ... ?
Thank you for pointing that out. I'll address this in the next revision.

---
bod