All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Rajesh Gumasta <rgumasta@nvidia.com>,
	ldewangan@nvidia.com, jonathanh@nvidia.com, vkoul@kernel.org,
	dan.j.williams@intel.com, thierry.reding@gmail.com,
	p.zabel@pengutronix.de, dmaengine@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: kyarlagadda@nvidia.com, Pavan Kunapuli <pkunapuli@nvidia.com>
Subject: Re: [Patch v2 2/4] dmaengine: tegra: Add Tegra GPC DMA driver
Date: Thu, 6 Aug 2020 16:46:14 +0300	[thread overview]
Message-ID: <bc7d0d9d-ac7f-b720-64f5-63e0c76e6786@gmail.com> (raw)
In-Reply-To: <1596699006-9934-3-git-send-email-rgumasta@nvidia.com>

06.08.2020 10:30, Rajesh Gumasta пишет:
...
> +/*
> + * Save and restore csr and channel register on pm_suspend
> + * and pm_resume respectively
> + */
> +static int __maybe_unused tegra_dma_pm_suspend(struct device *dev)
> +{
> +	struct tegra_dma *tdma = dev_get_drvdata(dev);
> +	int i;
> +
> +	for (i = 0; i < tdma->chip_data->nr_channels; i++) {
> +		struct tegra_dma_channel *tdc = &tdma->channels[i];
> +		struct tegra_dma_channel_regs *ch_reg = &tdc->channel_reg;
> +
> +		ch_reg->csr = tdc_read(tdc, TEGRA_GPCDMA_CHAN_CSR);
> +		ch_reg->src_ptr = tdc_read(tdc, TEGRA_GPCDMA_CHAN_SRC_PTR);
> +		ch_reg->dst_ptr = tdc_read(tdc, TEGRA_GPCDMA_CHAN_DST_PTR);
> +		ch_reg->high_addr_ptr = tdc_read(tdc,
> +						 TEGRA_GPCDMA_CHAN_HIGH_ADDR_PTR);
> +		ch_reg->mc_seq = tdc_read(tdc, TEGRA_GPCDMA_CHAN_MCSEQ);
> +		ch_reg->mmio_seq = tdc_read(tdc, TEGRA_GPCDMA_CHAN_MMIOSEQ);
> +		ch_reg->wcount = tdc_read(tdc, TEGRA_GPCDMA_CHAN_WCOUNT);
> +	}
> +	return 0;
> +}
> +
> +static int __maybe_unused tegra_dma_pm_resume(struct device *dev)
> +{
> +	struct tegra_dma *tdma = dev_get_drvdata(dev);
> +	int i;
> +
> +	for (i = 0; i < tdma->chip_data->nr_channels; i++) {
> +		struct tegra_dma_channel *tdc = &tdma->channels[i];
> +		struct tegra_dma_channel_regs *ch_reg = &tdc->channel_reg;
> +
> +		tdc_write(tdc, TEGRA_GPCDMA_CHAN_WCOUNT, ch_reg->wcount);
> +		tdc_write(tdc, TEGRA_GPCDMA_CHAN_DST_PTR, ch_reg->dst_ptr);
> +		tdc_write(tdc, TEGRA_GPCDMA_CHAN_SRC_PTR, ch_reg->src_ptr);
> +		tdc_write(tdc, TEGRA_GPCDMA_CHAN_HIGH_ADDR_PTR,
> +			  ch_reg->high_addr_ptr);
> +		tdc_write(tdc, TEGRA_GPCDMA_CHAN_MMIOSEQ, ch_reg->mmio_seq);
> +		tdc_write(tdc, TEGRA_GPCDMA_CHAN_MCSEQ, ch_reg->mc_seq);
> +		tdc_write(tdc, TEGRA_GPCDMA_CHAN_CSR,
> +			  (ch_reg->csr & ~TEGRA_GPCDMA_CSR_ENB));
> +	}
> +	return 0;
> +}
> +
> +static const struct __maybe_unused dev_pm_ops tegra_dma_dev_pm_ops = {
> +	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(tegra_dma_pm_suspend, tegra_dma_pm_resume)
> +};

Please explain why this is needed. All DMA should be stopped (not
paused) on system's suspend, shouldn't it?

  reply	other threads:[~2020-08-06 17:24 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-06  7:30 [Patch v2 0/4] Add Nvidia Tegra GPC-DMA driver Rajesh Gumasta
2020-08-06  7:30 ` [Patch v2 1/4] dt-bindings: dma: Add DT binding document Rajesh Gumasta
2020-08-06  7:30 ` [Patch v2 2/4] dmaengine: tegra: Add Tegra GPC DMA driver Rajesh Gumasta
2020-08-06 13:46   ` Dmitry Osipenko [this message]
2020-08-06 13:56     ` Rajesh Gumasta
2020-08-06 14:22       ` Dmitry Osipenko
2020-08-06 14:49   ` Dmitry Osipenko
2020-08-06 15:02   ` Dmitry Osipenko
2020-08-07 16:03   ` Jon Hunter
2020-08-07 16:23   ` Jon Hunter
2020-08-06  7:30 ` [Patch v2 3/4] arm64: configs: enable tegra gpc dma Rajesh Gumasta
2020-08-06  7:30 ` [Patch v2 4/4] arm64: tegra: Add GPCDMA node in dt Rajesh Gumasta
2020-08-07 16:26   ` Jon Hunter
2021-01-14 10:11 ` [Patch v2 0/4] Add Nvidia Tegra GPC-DMA driver Jon Hunter
2021-01-15  5:56   ` Vinod Koul
2021-01-15 13:21     ` Jon Hunter
2021-01-15 13:42       ` Rajesh Gumasta
2021-08-27  6:04         ` [PATCH v3 " Akhil R
2021-08-27  6:04           ` [PATCH v3 1/4] dt-bindings: dmaengine: Add doc for tegra gpcdma Akhil R
2021-09-02 10:42             ` Jon Hunter
2021-08-27  6:04           ` [PATCH v3 2/4] dmaengine: tegra: Add tegra gpcdma driver Akhil R
2021-08-27 17:23             ` kernel test robot
2021-08-27 17:23               ` kernel test robot
2021-08-28 11:29             ` kernel test robot
2021-08-28 11:29               ` kernel test robot
2021-09-01 20:56             ` Jon Hunter
2021-09-02 10:57               ` Jon Hunter
2021-09-02 10:17             ` Jon Hunter
2021-08-27  6:04           ` [PATCH v3 3/4] arm64: defconfig: tegra: Enable GPCDMA Akhil R
2021-09-02 11:35             ` Jon Hunter
2021-08-27  6:04           ` [PATCH v3 4/4] arm64: tegra: Add GPCDMA node for tegra186 and tegra194 Akhil R
2021-09-02 10:36             ` Jon Hunter
2021-09-08 14:32           ` [PATCH v4 0/4] Add Nvidia Tegra GPC-DMA driver Akhil R
2021-09-08 14:32             ` [PATCH v4 1/4] dt-bindings: dmaengine: Add doc for tegra gpcdma Akhil R
2021-09-08 16:44               ` Jon Hunter
2021-09-15  8:08                 ` Akhil R
2021-09-08 14:32             ` [PATCH v4 2/4] dmaengine: tegra: Add tegra gpcdma driver Akhil R
2021-09-08 14:32             ` [PATCH v4 3/4] arm64: defconfig: tegra: Enable GPCDMA Akhil R
2021-09-08 14:32             ` [PATCH v4 4/4] arm64: tegra: Add GPCDMA node for tegra186 and tegra194 Akhil R
2021-09-08 16:45               ` Jon Hunter
2021-09-08 16:44             ` [PATCH v4 0/4] Add Nvidia Tegra GPC-DMA driver Jon Hunter
2021-09-13  4:08               ` Akhil R
2021-09-16 12:18             ` [PATCH v5 " Akhil R
2021-09-16 12:18               ` [PATCH v5 1/4] dt-bindings: dmaengine: Add doc for tegra gpcdma Akhil R
2021-09-16 14:30                 ` Jon Hunter
2021-09-16 12:18               ` [PATCH v5 2/4] dmaengine: tegra: Add tegra gpcdma driver Akhil R
2021-09-16 12:18               ` [PATCH v5 3/4] arm64: defconfig: tegra: Enable GPCDMA Akhil R
2021-09-16 12:18               ` [PATCH v5 4/4] arm64: tegra: Add GPCDMA node for tegra186 and tegra194 Akhil R
2021-09-16 14:33                 ` 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=bc7d0d9d-ac7f-b720-64f5-63e0c76e6786@gmail.com \
    --to=digetx@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=kyarlagadda@nvidia.com \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pkunapuli@nvidia.com \
    --cc=rgumasta@nvidia.com \
    --cc=thierry.reding@gmail.com \
    --cc=vkoul@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.