[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c15e156f-fd11-4d38-98c0-f89b78044407@oss.qualcomm.com>
Date: Mon, 1 Dec 2025 14:03:31 +0100
From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
To: Bartosz Golaszewski <brgl@...ev.pl>, Vinod Koul <vkoul@...nel.org>,
Jonathan Corbet <corbet@....net>,
Thara Gopinath <thara.gopinath@...il.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
Udit Tiwari <quic_utiwari@...cinc.com>,
Daniel Perez-Zoghbi <dperezzo@...cinc.com>,
Md Sadre Alam <mdalam@....qualcomm.com>,
Dmitry Baryshkov <lumag@...nel.org>
Cc: dmaengine@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-crypto@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH v9 10/11] crypto: qce - Add support for BAM locking
On 11/28/25 12:44 PM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
>
> Implement the infrastructure for using the new DMA controller lock/unlock
> feature of the BAM driver. No functional change for now.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> ---
> drivers/crypto/qce/common.c | 18 ++++++++++++++++++
> drivers/crypto/qce/dma.c | 39 ++++++++++++++++++++++++++++++++++-----
> drivers/crypto/qce/dma.h | 4 ++++
> 3 files changed, 56 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/crypto/qce/common.c b/drivers/crypto/qce/common.c
> index 04253a8d33409a2a51db527435d09ae85a7880af..74756c222fed6d0298eb6c957ed15b8b7083b72f 100644
> --- a/drivers/crypto/qce/common.c
> +++ b/drivers/crypto/qce/common.c
> @@ -593,3 +593,21 @@ void qce_get_version(struct qce_device *qce, u32 *major, u32 *minor, u32 *step)
> *minor = (val & CORE_MINOR_REV_MASK) >> CORE_MINOR_REV_SHIFT;
> *step = (val & CORE_STEP_REV_MASK) >> CORE_STEP_REV_SHIFT;
> }
> +
> +int qce_bam_lock(struct qce_device *qce)
> +{
> + qce_clear_bam_transaction(qce);
> + /* Dummy write to acquire the lock on the BAM pipe. */
> + qce_write(qce, REG_AUTH_SEG_CFG, 0);
This works because qce_bam_lock() isn't used in a place where the state
of this register matters which isn't obvious.. but I'm not sure there's
a much better one to use in its place
Wonder if we could use the VERSION one (base+0x0) - although it's supposed
to be read-only, but at the same time I don't think that matters much for
the BAM engine
Konrad
Powered by blists - more mailing lists