From patchwork Mon Mar 8 20:20:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Gupta X-Patchwork-Id: 395505 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2019381jai; Mon, 8 Mar 2021 12:24:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwcTR6rhCgARXRLwZtrGwS+wtWqUvwkNAS5NRkGuyBI/CaOPBq+fwGVK3AIZAxTEl3MqMJB X-Received: by 2002:a17:906:e2d4:: with SMTP id gr20mr16909578ejb.432.1615235075698; Mon, 08 Mar 2021 12:24:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615235075; cv=none; d=google.com; s=arc-20160816; b=DdffKvkBdEybjvLHAaiEUw1lha9SmcdRgbTOXeuSmo7AKyX19eeAOhmys3SvB9DN2I knx6/udOYY29920vLK6Gul0FRN73NGRTkYPqdlxxDGUXjFW+G4DpV2qyMVMG4ZTzLZjw e9d2XRG61zC9oEZohDeu5LY86wMDFDmjrHPRre80DHVyO+rUO3TePhemZdzA1KKtIuPK xUuixHST6fAPnlUCI5yVMNgox58mcujdUU4Woaebkx43yA/GUsUkMSVbfHnz8QcAFjFb JBcWZhmIrCkkDtkKpAPObblV5vuc83h5jrEOiEuSQIspvHbe0r8WK13j8sFVRTvPEZLI 9i8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xzUW1+fN5LNzr5gYKSWpNlwj+hZH5hSn4gpB0V8MSR0=; b=lm3oRl14q/QmHMbm5Y7jK+WNGdOqbZXuJUecwWSxIXCYTYh911tGeUV/gs4tSmG61f w3+cSst3eEsDjNlX2ngX6414qIrOu0/EmNp3a+e5YIg6Gohbamiz3fTx1umDVwtuQbHc zCZJnKZVIbsBu/u6Fd/1VYJJsN/ZgHAHEYEeu6HOXBXK3pkifT6cdM/TVEuaFoC0Cm1i R6/rWniIt18p4nHQxbxhsCZt24ZjWKx5EuTqcnMg7jIhAJR8TUgBWzLhDxgeuOP2tvHN yyUE4TsgNhVMpC++nEdxVv2ibwx02pCnoH6hhVhI14sEHoRHDoeZTw6+7/RHqdYByvSi 5BjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UIorIW8M; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l25si8600668eds.122.2021.03.08.12.24.35; Mon, 08 Mar 2021 12:24:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UIorIW8M; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230143AbhCHUYC (ORCPT + 2 others); Mon, 8 Mar 2021 15:24:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229938AbhCHUXd (ORCPT ); Mon, 8 Mar 2021 15:23:33 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B28DBC06174A; Mon, 8 Mar 2021 12:23:33 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id kr3-20020a17090b4903b02900c096fc01deso3817513pjb.4; Mon, 08 Mar 2021 12:23:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xzUW1+fN5LNzr5gYKSWpNlwj+hZH5hSn4gpB0V8MSR0=; b=UIorIW8MGS2Kx15nBWjrAC+z86uZlIYRgtfZ50uBRnWwCNEGsTi5D1fJe4PCGIZm9p xQVZIauMdhR74OfKVZCP5xs9MiF7juUuYiVFpwm9mHPhb4/jbFS3swVDZB+G+Rd9MLj5 7GuuqK24u4YaqlN0VbZtGy53dJ3jhF0sq444TyT7loqk2Cbj0mS03bBd5NEdjoFXy5U3 zdE4DpbBw3+4ZclLLgV7mxBkQo918V3cfRP3mgLSQPmLP7JU5NYQTo0PnYOzeLzARLay GKcNdjdXgWqmAvZ8rVLzW5D0MU2E9b07TGnya1vyxyVekIlP3HQWOqIVPjLEsSdcjcpl 8pHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xzUW1+fN5LNzr5gYKSWpNlwj+hZH5hSn4gpB0V8MSR0=; b=np4hdI4fZoHOYVnCMpjzCmvpJH67WMJDdTPNa+8xVnUKu/6YwhZ896CqmVV1c/DsUG q4VwgsaJSMTLcNiNSZ3Mo5Ms1mUArdfWLLBPIrVCj61lqtBzaMd1BWjvFtvoIyg+2J8j /J7eOSxfJX4fLGKX3S6XpYdcOwxnsDkHO26hODv9WCNJ83kQzFRAIU3pvXgvtbe6fBrP M23I/9qtN0IczHz1UW61UaEzfJ364yph2cEM5bUGQYNudylRhGNT3nViBhFWQUH/Wfv6 BToPYorYJz7gNwy81yqMfGwOXuvelxfVD+2RsT9wry2jAsAVTzt3sGY+1LGR78r7V+W0 BJBw== X-Gm-Message-State: AOAM5325854ThhrVGVQSmWNFnk7KY6XzhqAT9VeJ/TtrtaAWujF4HRrM rOV68dCvOxrXVvrgJFrnkgc= X-Received: by 2002:a17:90b:3884:: with SMTP id mu4mr680050pjb.128.1615235013352; Mon, 08 Mar 2021 12:23:33 -0800 (PST) Received: from varodek.localdomain ([223.233.103.31]) by smtp.gmail.com with ESMTPSA id m3sm10262962pgk.47.2021.03.08.12.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 12:23:33 -0800 (PST) From: Vaibhav Gupta To: Herbert Xu , "David S. Miller" , Rob Herring Cc: Kishon Vijay Abraham , Sekhar Nori , Lokesh Vutla , Praneeth Bajjuri , Gowtham Tammana , linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Ujfalusi , Vaibhav Gupta Subject: [PATCH v1 2/3] crypto: sa2ul: Support for per channel coherency Date: Tue, 9 Mar 2021 01:50:04 +0530 Message-Id: <20210308202005.243228-3-vaibhavgupta40@gmail.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210308202005.243228-1-vaibhavgupta40@gmail.com> References: <20210308202005.243228-1-vaibhavgupta40@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Peter Ujfalusi 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 --- drivers/crypto/sa2ul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.30.1 diff --git a/drivers/crypto/sa2ul.c b/drivers/crypto/sa2ul.c index f300b0a5958a..6107bfea862d 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);