From patchwork Mon Sep 10 17:15:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Horia Geanta X-Patchwork-Id: 10594603 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 96AFA14BD for ; Mon, 10 Sep 2018 17:22:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A99129198 for ; Mon, 10 Sep 2018 17:22:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DE79291C1; Mon, 10 Sep 2018 17:22:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F3ED429198 for ; Mon, 10 Sep 2018 17:22:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=rRBk/4kZK5Kq/J3PGbI4xgX+KtrYO+xmO0ltNHWJfqI=; b=j6MhxTlohH8Dn3 af7zmjXaHZxJqQVnJrjr2QQZXyPDWXZ5B8/HGl+SYBoUrili2J+U7lfDrxofUcyWgijzfIKjQFGx9 7R2Cp2RfFRwT3FgyyKbZ6/77YrSFipjSk4zPZnpE4OM0gn0+S32DNMYbzLVgJp00vwMbdeV6iO3tS nM+ierjltix1LBaQ78c2qaGRKpMGC0Jx7G1zyj8GVqE37FJnB/gGuH81CkyplTKjnZDLg5pNMSlOD 6TQV4luG1OrjlJ29EXsQwrIhcB7VJl7qVu0IC+XuUXpPy9vSu3yBZiasw/TH6UuRRCeVU2ayDYruH PYAJqCtILj8cFEh45AZw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fzPsv-0001hU-Oo; Mon, 10 Sep 2018 17:22:01 +0000 Received: from inva020.nxp.com ([92.121.34.13]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fzPnn-0006c7-71 for linux-arm-kernel@lists.infradead.org; Mon, 10 Sep 2018 17:16:51 +0000 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 1ECDA1A00BB; Mon, 10 Sep 2018 19:16:26 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 126121A003C; Mon, 10 Sep 2018 19:16:26 +0200 (CEST) Received: from enigma.ea.freescale.net (enigma.ea.freescale.net [10.171.81.110]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 87A192060B; Mon, 10 Sep 2018 19:16:25 +0200 (CEST) From: =?utf-8?q?Horia_Geant=C4=83?= To: Herbert Xu , Stuart Yoder , Laurentiu Tudor , Li Yang , Roy Pledge , Catalin Marinas , Will Deacon Subject: [PATCH 00/11] crypto: caam - add DPAA2 (DPSECI) driver Date: Mon, 10 Sep 2018 20:15:39 +0300 Message-Id: <20180910171550.5659-1-horia.geanta@nxp.com> X-Mailer: git-send-email 2.16.2 MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180910_101643_785958_5DB92850 X-CRM114-Status: GOOD ( 13.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, Aymen Sghaier , "David S . Miller" , linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, This patch set adds the CAAM crypto engine driver for DPAA2 (Data Path Acceleration Architecture v2) found on ARMv8-based SoCs like LS1088A, LS2088A, LX2160A. Previously sent RFC can be found here: https://www.mail-archive.com/linux-crypto@vger.kernel.org/msg27290.html Driver consists of: -DPSECI (Data Path SEC Interface) backend - low-level API that allows to manage DPSECI devices (DPAA2 objects) that sit on the Management Complex (MC) fsl-mc bus -algorithms frontend - AEAD, skcipher and ahash algorithms implementation Patches 1-4 are fsl-mc bus and DPIO dependencies. Stuart, Laurentiu, Leo, Roy, please review the patches and let me know if you have anything against going with them through the cryptodev tree. Patches 5-10 are the core of the patch set, adding the driver. For symmetric encryption the new skcipher interface is used. Patch 11 enables driver on arm64. It will be built only if dependency on DPIO (CONFIG_FSL_MC_DPIO) is satisfied. Note: multiple modprobe/rmmod won't work without the following patches [5/7,v7] bus/fsl-mc: support dma configure for devices on fsl-mc bus https://patchwork.kernel.org/patch/10594179 [7/7,v7] arm64: dts: ls208xa: comply with the iommu map binding for fsl_mc https://patchwork.kernel.org/patch/10594171 (for LS1088A a similar DT update is needed) Thanks, Horia Horia Geantă (11): bus: fsl-mc: add support for dpseci device type Revert "staging: fsl-mc/dpio: remove couple of unused functions" soc: fsl: dpio: add frame list format support soc: fsl: dpio: add congestion notification support crypto: caam - add DPAA2-CAAM (DPSECI) backend API crypto: caam - add Queue Interface v2 error codes crypto: caam/qi2 - add DPAA2-CAAM driver crypto: caam/qi2 - add skcipher algorithms crypto: caam - export ahash shared descriptor generation crypto: caam/qi2 - add support for ahash algorithms arm64: defconfig: enable CAAM crypto engine on QorIQ DPAA2 SoCs arch/arm64/configs/defconfig | 1 + drivers/bus/fsl-mc/fsl-mc-bus.c | 5 + drivers/crypto/Makefile | 2 +- drivers/crypto/caam/Kconfig | 55 +- drivers/crypto/caam/Makefile | 10 +- drivers/crypto/caam/caamalg_qi2.c | 5165 +++++++++++++++++++++++++++++++++++ drivers/crypto/caam/caamalg_qi2.h | 223 ++ drivers/crypto/caam/caamhash.c | 79 +- drivers/crypto/caam/caamhash_desc.c | 80 + drivers/crypto/caam/caamhash_desc.h | 21 + drivers/crypto/caam/compat.h | 1 + drivers/crypto/caam/dpseci.c | 426 +++ drivers/crypto/caam/dpseci.h | 333 +++ drivers/crypto/caam/dpseci_cmd.h | 149 + drivers/crypto/caam/error.c | 79 +- drivers/crypto/caam/error.h | 6 +- drivers/crypto/caam/regs.h | 2 + drivers/soc/fsl/dpio/dpio-service.c | 58 + include/linux/fsl/mc.h | 6 + include/soc/fsl/dpaa2-fd.h | 242 ++ include/soc/fsl/dpaa2-global.h | 15 + include/soc/fsl/dpaa2-io.h | 4 + 22 files changed, 6871 insertions(+), 91 deletions(-) create mode 100644 drivers/crypto/caam/caamalg_qi2.c create mode 100644 drivers/crypto/caam/caamalg_qi2.h create mode 100644 drivers/crypto/caam/caamhash_desc.c create mode 100644 drivers/crypto/caam/caamhash_desc.h create mode 100644 drivers/crypto/caam/dpseci.c create mode 100644 drivers/crypto/caam/dpseci.h create mode 100644 drivers/crypto/caam/dpseci_cmd.h