[PATCH 1/4] dmaengine: ti: cppi41: Use td_queue to restore DMA_TDFDQ

From: Markus Schneider-Pargmann (TI)

Date: Tue Nov 03 2026 - 14:38:34 EST


In init_cppi41() td_queue.submit is used to setup DMA_TDFDQ. In
suspend/resume the same value is read, stored and restored.

To get rid of the suspend register access, use td_queue.submit in resume
as well to restore the value.

Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Markus Schneider-Pargmann (TI) <msp@xxxxxxxxxxxx>
---
drivers/dma/ti/cppi41.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/dma/ti/cppi41.c b/drivers/dma/ti/cppi41.c
index 88756dccd62c..458d20b12462 100644
--- a/drivers/dma/ti/cppi41.c
+++ b/drivers/dma/ti/cppi41.c
@@ -146,9 +146,6 @@ struct cppi41_dd {
struct list_head pending; /* Pending queued transfers */
spinlock_t lock; /* Lock for pending list */

- /* context for suspend/resume */
- unsigned int dma_tdfdq;
-
bool is_suspended;
};

@@ -1174,7 +1171,6 @@ static int __maybe_unused cppi41_suspend(struct device *dev)
{
struct cppi41_dd *cdd = dev_get_drvdata(dev);

- cdd->dma_tdfdq = cppi_readl(cdd->ctrl_mem + DMA_TDFDQ);
disable_sched(cdd);

return 0;
@@ -1195,7 +1191,7 @@ static int __maybe_unused cppi41_resume(struct device *dev)

init_sched(cdd);

- cppi_writel(cdd->dma_tdfdq, cdd->ctrl_mem + DMA_TDFDQ);
+ cppi_writel(cdd->td_queue.submit, cdd->ctrl_mem + DMA_TDFDQ);
cppi_writel(cdd->scratch_phys, cdd->qmgr_mem + QMGR_LRAM0_BASE);
cppi_writel(QMGR_SCRATCH_SIZE, cdd->qmgr_mem + QMGR_LRAM_SIZE);
cppi_writel(0, cdd->qmgr_mem + QMGR_LRAM1_BASE);

--
2.55.0