All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Bartosz Golaszewski <brgl@kernel.org>
Cc: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
	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,
	Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH RFC v11 07/12] crypto: qce - Communicate the base physical address to the dmaengine
Date: Sun, 8 Mar 2026 02:05:14 +0530	[thread overview]
Message-ID: <aayMAlkJNxp9h4KO@vaman> (raw)
In-Reply-To: <CAMRc=Md2G7k7DGMZv2Du75ososQtsAutw2WwwAQ3WL8pC_-LmQ@mail.gmail.com>

On 04-03-26, 16:05, Bartosz Golaszewski wrote:
> On Wed, Mar 4, 2026 at 3:39 PM Vinod Koul <vkoul@kernel.org> wrote:
> >
> > 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>
> > > ---
> > >
> > >       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..?
> 
> No. In case I wasn't clear enough in the cover letter: this is the
> address of the *crypto engine* register which we use as a scratchpad
> for the dummy write when issuing the lock/unlock command. Mani
> suggested under the cover letter to use the descriptor metadata for
> that.

This is overloading of address field. If we go this was I would add a
comment in code explaining this and why in the setup the engine does not
need peripheral address. Meta data sounds okay as well.

-- 
~Vinod

  reply	other threads:[~2026-03-07 20:35 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
2026-03-04 15:05     ` Bartosz Golaszewski
2026-03-07 20:35       ` Vinod Koul [this message]
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=aayMAlkJNxp9h4KO@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 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.