mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Markus Schneider-Pargmann (TI)" <msp@baylibre.com>
To: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
	 Tony Lindgren <tony@atomide.com>, Daniel Mack <zonque@gmail.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Julien Panis <jpanis@baylibre.com>, "Mendez, Judith" <jm@ti.com>,
	 "Francis, Sebin" <sebin.francis@ti.com>,
	 "Markus Schneider-Pargmann (TI)" <msp@baylibre.com>,
	stable@vger.kernel.org
Subject: [PATCH 1/4] dmaengine: ti: cppi41: Use td_queue to restore DMA_TDFDQ
Date: Tue, 03 Nov 2026 20:37:28 +0100	[thread overview]
Message-ID: <20261103-v7-3-topic-am335lpm-cppi41-v1-1-d7213446c5f5@baylibre.com> (raw)
In-Reply-To: <20261103-v7-3-topic-am335lpm-cppi41-v1-0-d7213446c5f5@baylibre.com>

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@vger.kernel.org
Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
---
 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


  reply	other threads:[~2026-11-03 19:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 19:37 [PATCH 0/4] dmaengine: ti: cppi41: Fix suspend/resume issues Markus Schneider-Pargmann (TI)
2026-11-03 19:37 ` Markus Schneider-Pargmann (TI) [this message]
2026-11-03 19:37 ` [PATCH 2/4] dmaengine: ti: cppi41: Fix register access in suspend_late Markus Schneider-Pargmann (TI)
2026-11-03 19:37 ` [PATCH 3/4] dmaengine: ti: cppi41: Restore QMGR_MEMCTRL in resume Markus Schneider-Pargmann (TI)
2026-11-03 19:37 ` [PATCH 4/4] dmaengine: ti: cppi41: Share register setup with resume Markus Schneider-Pargmann (TI)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261103-v7-3-topic-am335lpm-cppi41-v1-1-d7213446c5f5@baylibre.com \
    --to=msp@baylibre.com \
    --cc=Frank.Li@kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=jm@ti.com \
    --cc=jpanis@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sebin.francis@ti.com \
    --cc=stable@vger.kernel.org \
    --cc=tony@atomide.com \
    --cc=vkoul@kernel.org \
    --cc=zonque@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®