From: Jon Hunter <jonathanh@nvidia.com>
To: Laxman Dewangan <ldewangan@nvidia.com>,
Vinod Koul <vinod.koul@intel.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Thierry Reding <thierry.reding@gmail.com>,
Alexandre Courbot <gnurou@gmail.com>
Cc: <dmaengine@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Jon Hunter <jonathanh@nvidia.com>
Subject: [PATCH 3/6] dmaengine: tegra-apb: Save and restore word count
Date: Fri, 16 Oct 2015 09:25:54 +0100 [thread overview]
Message-ID: <1444983957-18691-4-git-send-email-jonathanh@nvidia.com> (raw)
In-Reply-To: <1444983957-18691-1-git-send-email-jonathanh@nvidia.com>
Newer tegra devices have a separate word count register per channel that
contains the number of words to be transferred. This register is not
saved or restored by the suspend/resume helpers for these newer devices
and so ensure that it is.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
drivers/dma/tegra20-apb-dma.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index cf546671f83d..06063d370272 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -1544,6 +1544,9 @@ static int tegra_dma_pm_suspend(struct device *dev)
ch_reg->apb_ptr = tdc_read(tdc, TEGRA_APBDMA_CHAN_APBPTR);
ch_reg->ahb_seq = tdc_read(tdc, TEGRA_APBDMA_CHAN_AHBSEQ);
ch_reg->apb_seq = tdc_read(tdc, TEGRA_APBDMA_CHAN_APBSEQ);
+ if (tdma->chip_data->support_separate_wcount_reg)
+ ch_reg->wcount = tdc_read(tdc,
+ TEGRA_APBDMA_CHAN_WCOUNT);
}
/* Disable clock */
@@ -1569,6 +1572,9 @@ static int tegra_dma_pm_resume(struct device *dev)
struct tegra_dma_channel *tdc = &tdma->channels[i];
struct tegra_dma_channel_regs *ch_reg = &tdc->channel_reg;
+ if (tdma->chip_data->support_separate_wcount_reg)
+ tdc_write(tdc, TEGRA_APBDMA_CHAN_WCOUNT,
+ ch_reg->wcount);
tdc_write(tdc, TEGRA_APBDMA_CHAN_APBSEQ, ch_reg->apb_seq);
tdc_write(tdc, TEGRA_APBDMA_CHAN_APBPTR, ch_reg->apb_ptr);
tdc_write(tdc, TEGRA_APBDMA_CHAN_AHBSEQ, ch_reg->ahb_seq);
--
2.1.4
next prev parent reply other threads:[~2015-10-16 8:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 8:25 [PATCH 0/6] dmaengine: tegra-apb: Various updates Jon Hunter
2015-10-16 8:25 ` [PATCH 1/6] dmaengine: tegra-apb: Correct runtime-pm usage Jon Hunter
2015-10-28 7:03 ` Vinod Koul
2015-10-28 13:32 ` Jon Hunter
2015-10-29 1:57 ` Vinod Koul
2015-11-03 16:23 ` Jon Hunter
2015-11-03 21:25 ` Kevin Hilman
2015-11-04 8:34 ` Vinod Koul
2015-11-04 16:59 ` Kevin Hilman
2015-11-05 2:15 ` Rafael J. Wysocki
2015-11-05 12:17 ` Vinod Koul
2015-10-16 8:25 ` [PATCH 2/6] dmaengine: tegra-apb: Use dev_get_drvdata() Jon Hunter
2015-10-16 8:25 ` Jon Hunter [this message]
2015-10-16 8:25 ` [PATCH 4/6] dmaengine: tegra-apb: Only save channel state for those in use Jon Hunter
2015-10-16 8:25 ` [PATCH 5/6] dmaengine: tegra-apb: Update driver to use GFP_NOWAIT Jon Hunter
2015-10-16 8:25 ` [PATCH 6/6] dmaengine: tegra-apb: Disable interrupts on removal Jon Hunter
2015-10-16 8:53 ` Lars-Peter Clausen
2015-10-16 9:29 ` Jon Hunter
2015-10-16 10:40 ` Lars-Peter Clausen
2015-10-16 10:57 ` Jon Hunter
2015-10-28 6:53 ` Vinod Koul
2015-10-28 13:34 ` Jon Hunter
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=1444983957-18691-4-git-send-email-jonathanh@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=dmaengine@vger.kernel.org \
--cc=gnurou@gmail.com \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=thierry.reding@gmail.com \
--cc=vinod.koul@intel.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;
as well as URLs for NNTP newsgroup(s).