From patchwork Mon Mar 8 20:20:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Gupta X-Patchwork-Id: 395504 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2019351jai; Mon, 8 Mar 2021 12:24:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJz83vp4/17lU1mu8WXWOo+++P6xvvnDQq47aSivABgmoTpWIrapFvemOjc0lCIl9kPYouUm X-Received: by 2002:a50:e702:: with SMTP id a2mr358820edn.3.1615235074394; Mon, 08 Mar 2021 12:24:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615235074; cv=none; d=google.com; s=arc-20160816; b=sQr3qQoMDxLLF6YZnN2HFDHAs699Hvc/HPvZR2WzVQDZJtSYcVcTSngQ0rqKXn/uAR k5VXp5IUdXb/OqxzMvWMG+I6kl10HYjg4idH/Zfx+nnkgcgPvyIu+9HUJAY6ghf2buNt rlzCa9IG7dalJuNaOgC1h0cZXq1Yw1Ga2PpcR/LQVjFlUZAE1HGmn7jKVPawOsK0gi7C 4dJCFR/sfFnZ0Dr2P0jcLj5Y6cBzy8bRhv3xPKZHsjHIvoHbE44EZ728OdusV0aLh3qa o3Pl1V1g2ecaAA6ATS9Zh7x7ZsEI3mNaQSpI9lq8iyOUBnaoQ3hlCKu4+Qvjrd92pDWV JrBA== 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=NY+SRxkmVFnQhXa7tDDd1xj2d9pbYJvTZogTeGI38/4=; b=bDvH/pA2f2SoGIJ5nQjYCd+vJ6lDNcjqhUPEg+kUaBpJwSqWemrlwOui2/+ftkbFdj x1dWh/ONOGvXE+txfotXYtD2nWQN32TLhW/bTvC3eJftZVNayw83ToFU7ElctY0F/QRj K+bZ/s84cmTP1MnucrPpYzzbMuQHa+TFMjtdci6xZhlQ5P8ag8aU54pgNxCRPxaDSdRx oBZYsKY1Peq9Q5mURK8yN+e3wr0Zv89U/5ebivSJWdKAM7AhDyoIhk78XUSOlt7pzHpC sZ2imyEAkEJXDaVg/c0Qd2Hw1u2GDBEEV/d62nqp9qA01mjYPP2hqT+3oJvgW7jHagih +i1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OGWygv78; 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.34; Mon, 08 Mar 2021 12:24:34 -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=OGWygv78; 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 S229821AbhCHUYB (ORCPT + 2 others); Mon, 8 Mar 2021 15:24:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbhCHUX3 (ORCPT ); Mon, 8 Mar 2021 15:23:29 -0500 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 696C2C06174A; Mon, 8 Mar 2021 12:23:29 -0800 (PST) Received: by mail-pl1-x62f.google.com with SMTP id e2so160928pld.9; Mon, 08 Mar 2021 12:23:29 -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=NY+SRxkmVFnQhXa7tDDd1xj2d9pbYJvTZogTeGI38/4=; b=OGWygv78UnGPpMx0di7jB7JLVcLaoBI+VaVZIuCCuI6iZe/O+IE+fQNIKBE/OgM6Y0 vuVUcgA2zkZYMJqz/dT6SCqJyoTd6raQNPc/oOWwhpRz5aeAvmjuEuSKbt2688ZmljEn u4v2aggbGTUaqpAvYiA+IMRgeKQeLTyULsGjzrRc1tWt2IydQoT8H7DyItq3XN9O9CFm uc40ojE9Gf2Q8hRSGw//na8rZ7XE+W672AvaZlta0zTZ/LabRr1Z3Cvea48Emld6ko2z TUS+eaD4mKhf0374ICtj16c94BvtI/wArscpfGAIy4fEhMckAzmJZZfQYTugPWEj9CHf BQww== 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=NY+SRxkmVFnQhXa7tDDd1xj2d9pbYJvTZogTeGI38/4=; b=QDpVC7JfSmQAKFBIc7DoU21XzajDCbtNJAc44b/eENgpOeDdkuFLGBWVwaRV0XtZwA +czPy04RKqJI7jyIpdgPjCmdDvt/1cQzHXSmAgAyMocjKt/0HrjF0tlbowFcbG2gPaQ0 WmJdFr1Bysrxrrkuv/DqNP5/Dy8exUeQhZG32mE2Gpm1deQPFZfA4vMLyvH8JGVv86bK a2dMEZq8NKTVObUjFLeG9tfbdFeH7/soIaGo5ITlog88cA4C3Ml26dvhE7ZPwYXHPFew 4IsUbw2wEHjb07+XMsJr1hYf2mBkT/pMJY+iSC2iRzCKhd6UdJMA12SJePnehm1g0fo8 y8qQ== X-Gm-Message-State: AOAM5302TwtDtiA/ZscXOPnfzRQ7dqXkqJxyhZOT2Uy4Hg3F62NEeCpz HXYyqwkC8aIncRxNuBUWLBw= X-Received: by 2002:a17:90a:e542:: with SMTP id ei2mr664000pjb.134.1615235009060; Mon, 08 Mar 2021 12:23:29 -0800 (PST) Received: from varodek.localdomain ([223.233.103.31]) by smtp.gmail.com with ESMTPSA id m3sm10262962pgk.47.2021.03.08.12.23.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Mar 2021 12:23:28 -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 1/3] dt-bindings: crypto: ti, sa2ul: Add new compatible for AM64 Date: Tue, 9 Mar 2021 01:50:03 +0530 Message-Id: <20210308202005.243228-2-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 Add the AM64 version of sa2ul to the compatible list. [v_gupta@ti.com: Conditional dma-coherent requirement, clocks] Signed-off-by: Peter Ujfalusi Signed-off-by: Vaibhav Gupta --- .../devicetree/bindings/crypto/ti,sa2ul.yaml | 40 +++++++++++++++---- 1 file changed, 33 insertions(+), 7 deletions(-) -- 2.30.1 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml b/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml index 1d48ac712b23..6eb9acd564c2 100644 --- a/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml +++ b/Documentation/devicetree/bindings/crypto/ti,sa2ul.yaml @@ -14,6 +14,7 @@ properties: enum: - ti,j721e-sa2ul - ti,am654-sa2ul + - ti,am64-sa2ul reg: maxItems: 1 @@ -45,19 +46,44 @@ properties: description: Address translation for the possible RNG child node for SA2UL + clocks: + items: + - description: Clock used by PKA + - description: Main Input Clock + - description: Clock used by rng + + clock-names: + items: + - const: pka_in_clk + - const: x1_clk + - const: x2_clk + patternProperties: "^rng@[a-f0-9]+$": type: object description: Child RNG node for SA2UL -required: - - compatible - - reg - - power-domains - - dmas - - dma-names - - dma-coherent +if: + properties: + compatible: + const: ti,am64-sa2ul +then: + required: + - compatible + - reg + - power-domains + - dmas + - dma-names + +else: + required: + - compatible + - reg + - power-domains + - dmas + - dma-names + - dma-coherent additionalProperties: false 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);