2020-10-01 08:46:38

by Roja Rani Yarubandi

[permalink] [raw]
Subject: [PATCH V5 0/3] Implement Shutdown callback for geni-i2c

- As per Stephen's comments prepared separate patches for rx/tx
transfer cleanup and shutdown callback

Roja Rani Yarubandi (3):
soc: qcom: geni: Remove "iova" check
i2c: i2c-qcom-geni: Store DMA mapping data in geni_i2c_dev struct
i2c: i2c-qcom-geni: Add shutdown callback for i2c

drivers/i2c/busses/i2c-qcom-geni.c | 101 ++++++++++++++++++++++++-----
drivers/soc/qcom/qcom-geni-se.c | 4 +-
2 files changed, 87 insertions(+), 18 deletions(-)

--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation


2020-10-01 08:47:00

by Roja Rani Yarubandi

[permalink] [raw]
Subject: [PATCH V5 1/3] soc: qcom: geni: Remove "iova" check

Remove "iova" check from geni_se_tx_dma_unprep and geni_se_rx_dma_unprep
fucntions as invalidating with dma_mapping_error() is enough.

Signed-off-by: Roja Rani Yarubandi <[email protected]>
---
Changes in V5:
- This is newly added patch in V5. As per Stephen's comments separted
this patch from shutdown callback patch.

drivers/soc/qcom/qcom-geni-se.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
index d0e4f520cff8..0216b38c1e9a 100644
--- a/drivers/soc/qcom/qcom-geni-se.c
+++ b/drivers/soc/qcom/qcom-geni-se.c
@@ -705,7 +705,7 @@ void geni_se_tx_dma_unprep(struct geni_se *se, dma_addr_t iova, size_t len)
{
struct geni_wrapper *wrapper = se->wrapper;

- if (iova && !dma_mapping_error(wrapper->dev, iova))
+ if (!dma_mapping_error(wrapper->dev, iova))
dma_unmap_single(wrapper->dev, iova, len, DMA_TO_DEVICE);
}
EXPORT_SYMBOL(geni_se_tx_dma_unprep);
@@ -722,7 +722,7 @@ void geni_se_rx_dma_unprep(struct geni_se *se, dma_addr_t iova, size_t len)
{
struct geni_wrapper *wrapper = se->wrapper;

- if (iova && !dma_mapping_error(wrapper->dev, iova))
+ if (!dma_mapping_error(wrapper->dev, iova))
dma_unmap_single(wrapper->dev, iova, len, DMA_FROM_DEVICE);
}
EXPORT_SYMBOL(geni_se_rx_dma_unprep);
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

2020-10-02 21:52:46

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH V5 1/3] soc: qcom: geni: Remove "iova" check

Quoting Roja Rani Yarubandi (2020-10-01 01:44:23)
> Remove "iova" check from geni_se_tx_dma_unprep and geni_se_rx_dma_unprep
> fucntions as invalidating with dma_mapping_error() is enough.

s/fucntions/functions/

also

s/invalidating/checking/

>
> Signed-off-by: Roja Rani Yarubandi <[email protected]>
> ---

Reviewed-by: Stephen Boyd <[email protected]>

2020-10-08 15:54:11

by Wolfram Sang

[permalink] [raw]
Subject: Re: [PATCH V5 1/3] soc: qcom: geni: Remove "iova" check

On Thu, Oct 01, 2020 at 02:14:23PM +0530, Roja Rani Yarubandi wrote:
> Remove "iova" check from geni_se_tx_dma_unprep and geni_se_rx_dma_unprep
> fucntions as invalidating with dma_mapping_error() is enough.
>
> Signed-off-by: Roja Rani Yarubandi <[email protected]>

Applied to for-next, thanks!

The other patches need updates, it seems.


Attachments:
(No filename) (355.00 B)
signature.asc (849.00 B)
Download all attachments