From: Vinod Koul <vkoul@kernel.org>
To: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
Thara Gopinath <thara.gopinath@gmail.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Udit Tiwari <quic_utiwari@quicinc.com>,
Daniel Perez-Zoghbi <dperezzo@quicinc.com>,
Md Sadre Alam <mdalam@qti.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Peter Ujfalusi <peter.ujfalusi@gmail.com>,
Michal Simek <michal.simek@amd.com>,
Frank Li <Frank.Li@kernel.org>,
dmaengine@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-crypto@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, brgl@kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH RFC v11 07/12] crypto: qce - Communicate the base physical address to the dmaengine
Date: Wed, 4 Mar 2026 20:09:46 +0530 [thread overview]
Message-ID: <aahEMjjBRINXL5zC@vaman> (raw)
In-Reply-To: <20260302-qcom-qce-cmd-descr-v11-7-4bf1f5db4802@oss.qualcomm.com>
On 02-03-26, 16:57, Bartosz Golaszewski wrote:
> In order to let the BAM DMA engine know which address is used for
> register I/O, call dmaengine_slave_config() after requesting the RX
> channel and use the config structure to pass that information to the
> dmaengine core. This is done ahead of extending the BAM driver with
> support for pipe locking, which requires performing dummy writes when
> passing the lock/unlock flags alongside the command descriptors.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> ---
> drivers/crypto/qce/core.c | 3 ++-
> drivers/crypto/qce/dma.c | 8 ++++++++
> 2 files changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c
> index 2667fcd67fee826a44080da8f88a3e2abbb9b2cf..f6363d2a1231dcee0176824135389c42bec02153 100644
> --- a/drivers/crypto/qce/core.c
> +++ b/drivers/crypto/qce/core.c
> @@ -211,6 +211,8 @@ static int qce_crypto_probe(struct platform_device *pdev)
> if (IS_ERR(qce->base))
> return PTR_ERR(qce->base);
>
> + qce->base_phys = res->start;
> +
> ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
> if (ret < 0)
> return ret;
> @@ -260,7 +262,6 @@ static int qce_crypto_probe(struct platform_device *pdev)
> qce->dma_size = resource_size(res);
> qce->base_dma = dma_map_resource(dev, res->start, qce->dma_size,
> DMA_BIDIRECTIONAL, 0);
> - qce->base_phys = res->start;
> ret = dma_mapping_error(dev, qce->base_dma);
> if (ret)
> return ret;
> diff --git a/drivers/crypto/qce/dma.c b/drivers/crypto/qce/dma.c
> index ba7a52fd4c6349d59c075c346f75741defeb6034..86f22c9a11f8a9e055c243dd8beaf1ded6f88bb9 100644
> --- a/drivers/crypto/qce/dma.c
> +++ b/drivers/crypto/qce/dma.c
> @@ -109,7 +109,9 @@ void qce_write_dma(struct qce_device *qce, unsigned int offset, u32 val)
> int devm_qce_dma_request(struct qce_device *qce)
> {
> struct qce_dma_data *dma = &qce->dma;
> + struct dma_slave_config cfg = { };
> struct device *dev = qce->dev;
> + int ret;
>
> dma->txchan = devm_dma_request_chan(dev, "tx");
> if (IS_ERR(dma->txchan))
> @@ -121,6 +123,12 @@ int devm_qce_dma_request(struct qce_device *qce)
> return dev_err_probe(dev, PTR_ERR(dma->rxchan),
> "Failed to get RX DMA channel\n");
>
> + cfg.dst_addr = qce->base_phys;
> + cfg.direction = DMA_MEM_TO_DEV;
So is this the address of crypto engine address where dma data is
supposed to be pushed to..?
--
~Vinod
next prev parent reply other threads:[~2026-03-04 14:39 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 15:57 [PATCH RFC v11 00/12] crypto/dmaengine: qce: introduce BAM locking and use DMA for register I/O Bartosz Golaszewski
2026-03-02 15:57 ` [PATCH RFC v11 01/12] crypto: qce - Include algapi.h in the core.h header Bartosz Golaszewski
2026-03-02 15:57 ` [PATCH RFC v11 02/12] crypto: qce - Remove unused ignore_buf Bartosz Golaszewski
2026-03-02 15:57 ` [PATCH RFC v11 03/12] crypto: qce - Simplify arguments of devm_qce_dma_request() Bartosz Golaszewski
2026-03-02 15:57 ` [PATCH RFC v11 04/12] crypto: qce - Use existing devres APIs in devm_qce_dma_request() Bartosz Golaszewski
2026-03-02 15:57 ` [PATCH RFC v11 05/12] crypto: qce - Map crypto memory for DMA Bartosz Golaszewski
2026-03-02 15:57 ` [PATCH RFC v11 06/12] crypto: qce - Add BAM DMA support for crypto register I/O Bartosz Golaszewski
2026-03-02 15:57 ` [PATCH RFC v11 07/12] crypto: qce - Communicate the base physical address to the dmaengine Bartosz Golaszewski
2026-03-04 14:39 ` Vinod Koul [this message]
2026-03-04 15:05 ` Bartosz Golaszewski
2026-03-07 20:35 ` Vinod Koul
2026-03-02 15:57 ` [PATCH RFC v11 08/12] dmaengine: constify struct dma_descriptor_metadata_ops Bartosz Golaszewski
2026-03-02 15:57 ` [PATCH RFC v11 09/12] dmaengine: qcom: bam_dma: convert tasklet to a BH workqueue Bartosz Golaszewski
2026-03-02 15:57 ` [PATCH RFC v11 10/12] dmaengine: qcom: bam_dma: Extend the driver's device match data Bartosz Golaszewski
2026-03-02 15:57 ` [PATCH RFC v11 11/12] dmaengine: qcom: bam_dma: Add pipe_lock_supported flag support Bartosz Golaszewski
2026-03-02 15:57 ` [PATCH RFC v11 12/12] dmaengine: qcom: bam_dma: add support for BAM locking Bartosz Golaszewski
2026-03-04 14:53 ` Vinod Koul
2026-03-04 15:27 ` Bartosz Golaszewski
2026-03-07 20:33 ` Vinod Koul
2026-03-09 17:05 ` Bartosz Golaszewski
2026-03-03 12:43 ` [PATCH RFC v11 00/12] crypto/dmaengine: qce: introduce BAM locking and use DMA for register I/O Manivannan Sadhasivam
2026-03-03 12:56 ` Bartosz Golaszewski
2026-03-05 11:59 ` Stephan Gerhold
2026-03-05 13:10 ` Bartosz Golaszewski
2026-03-05 13:43 ` Stephan Gerhold
2026-03-05 13:54 ` Bartosz Golaszewski
2026-03-05 16:15 ` Stephan Gerhold
2026-03-06 11:07 ` Bartosz Golaszewski
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=aahEMjjBRINXL5zC@vaman \
--to=vkoul@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=bartosz.golaszewski@linaro.org \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=dmaengine@vger.kernel.org \
--cc=dperezzo@quicinc.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=mdalam@qti.qualcomm.com \
--cc=michal.simek@amd.com \
--cc=peter.ujfalusi@gmail.com \
--cc=quic_utiwari@quicinc.com \
--cc=thara.gopinath@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