OSDN Git Service

crypto: sa2ul - Support for per channel coherency
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Tue, 13 Apr 2021 09:15:58 +0000 (14:45 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 22 Apr 2021 07:31:30 +0000 (17:31 +1000)
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 <peter.ujfalusi@ti.com>
Signed-off-by: Vaibhav Gupta <v_gupta@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/sa2ul.c

index b0f0502..7b991b7 100644 (file)
@@ -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);