From: Peter Ujfalusi Date: Tue, 13 Apr 2021 09:15:58 +0000 (+0530) Subject: crypto: sa2ul - Support for per channel coherency X-Git-Tag: v5.13-rc1~200^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8a4529d4598467577b847a8ace14ecc479e4f64;p=thirdparty%2Fkernel%2Flinux.git crypto: sa2ul - Support for per channel coherency On AM64 the DMA channel for sa2ul can be configured to be coherent or non coherent via DT binding. Use the dmaengine_get_device_for_dma_api() to get the device pointer which should be used for with the dma_api to use matching dma_ops for the channel coherency/non coherency. Signed-off-by: Peter Ujfalusi Signed-off-by: Vaibhav Gupta Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c index b0f0502a5bb0f..7b991b77fb12f 100644 --- a/drivers/crypto/sa2ul.c +++ b/drivers/crypto/sa2ul.c @@ -1106,7 +1106,7 @@ static int sa_run(struct sa_req *req) else dma_rx = pdata->dma_rx1; - ddev = dma_rx->device->dev; + ddev = dmaengine_get_dma_device(pdata->dma_tx); rxd->ddev = ddev; memcpy(cmdl, sa_ctx->cmdl, sa_ctx->cmdl_size);