[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8fb9af47-b675-4fbf-bf66-5a273dd20261@oss.qualcomm.com>
Date: Fri, 25 Oct 2024 20:48:56 +0200
From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
To: Mukesh Kumar Savaliya <quic_msavaliy@...cinc.com>,
konrad.dybcio@...aro.org, andersson@...nel.org, andi.shyti@...nel.org,
linux-arm-msm@...r.kernel.org, dmaengine@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
conor+dt@...nel.org, agross@...nel.org, devicetree@...r.kernel.org,
vkoul@...nel.org, linux@...blig.org, dan.carpenter@...aro.org,
Frank.Li@....com, konradybcio@...nel.org, bryan.odonoghue@...aro.org,
krzk+dt@...nel.org, robh@...nel.org
Subject: Re: [PATCH v3 2/4] dma: gpi: Add Lock and Unlock TRE support to
access SE exclusively
On 27.09.2024 8:31 AM, Mukesh Kumar Savaliya wrote:
> GSI DMA provides specific TREs namely Lock and Unlock TRE, which
> provides mutual exclusive access to SE from any of the subsystem
> (E.g. Apps, TZ, ADSP etc). Lock prevents other subsystems from
> concurrently performing DMA transfers and avoids disturbance to
> data path. Basically for shared SE usecase, lock the SE for
> particular subsystem, complete the transfer, unlock the SE.
>
> Apply Lock TRE for the first transfer of shared SE and Apply Unlock
> TRE for the last transfer.
>
> Also change MAX_TRE macro to 5 from 3 because of the two additional TREs.
>
> TRE = Transfer Ring Element, refers to the queued descriptor.
> SE = Serial Engine
> SS = Subsystems (Apps processor, TZ, ADSP, Modem)
>
> Signed-off-by: Mukesh Kumar Savaliya <quic_msavaliy@...cinc.com>
> ---
> drivers/dma/qcom/gpi.c | 37 +++++++++++++++++++++++++++++++-
> include/linux/dma/qcom-gpi-dma.h | 6 ++++++
> 2 files changed, 42 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c
> index 52a7c8f2498f..120d91234442 100644
> --- a/drivers/dma/qcom/gpi.c
> +++ b/drivers/dma/qcom/gpi.c
> @@ -2,6 +2,7 @@
> /*
> * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
> * Copyright (c) 2020, Linaro Limited
> + * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
> */
>
> #include <dt-bindings/dma/qcom-gpi.h>
> @@ -65,6 +66,14 @@
> /* DMA TRE */
> #define TRE_DMA_LEN GENMASK(23, 0)
>
> +/* Lock TRE */
> +#define TRE_I2C_LOCK BIT(0)
> +#define TRE_MINOR_TYPE GENMASK(19, 16)
> +#define TRE_MAJOR_TYPE GENMASK(23, 20)
Is this solely I2C specific?
Konrad
Powered by blists - more mailing lists