Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp164413iof; Mon, 6 Jun 2022 00:18:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLUEYm4DuzizKz6Ln3I3eboAW7sRit37IO+HAOMj6NXUUqRRzUPNHFArmRebyFXzzygnQN X-Received: by 2002:a17:903:44c:b0:164:113:a433 with SMTP id iw12-20020a170903044c00b001640113a433mr22485205plb.163.1654499936829; Mon, 06 Jun 2022 00:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654499936; cv=none; d=google.com; s=arc-20160816; b=F1ss1O29c+4jILU4e6ZJ0/UqcK7lJtpzdi82vB/7HlbH7i/65jH1+cfSdTVwxpfVhI 8tolJY8EkgrOEDqqDF1bKSOrtHKJnBpAEPRFeNUmnv1S0yp631q+l8vy2Ibq7YDFfcV2 X9d+rrAiEq+1GexfgIkW9Eq8roI315IZyWl+17UeqIm/5AkSEACyNS9PF/fLF3O4ftMV uVSZvLYoswCol2m+KQHSjLMmqAYtwqaKMc3yR/Ua71it/MRnxgJ5a8+GJc5G51ZJRHBH tXYjMKO7JVP9xeCvuiRt4boD27+S214ER1DcycXOEMX9SMzwTp/oLjGjCsBsYLnLHdYb rf6A== 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 :message-id:date:subject:cc:to:from; bh=wLQFe7cg/Ib5aEaS8N4TKX9GE9A9rPwVCGNKpF1r2IU=; b=iR9kxQZQ5Yrx2Yt7lKzrOg7yV/5R0Cc6l2930k/Ig59OOkAeaopCIhEqy7Ux60Q7kj gmNDukfN1M8R4AjvYeMCLhyXf85iTXBUa3JlrtgAaUgoGWodpYGEfENWsx8nGdwTLSVR OW3qMv2l7Qg0BSTR1LXWxRD7jMKRjjSKlOGPnJG8Bl9K6n1Ley+42lPzR5lqA1fr9lQY DA3WusApIEFVarJt/LZaxyM74DfSEBaZztPkae1a2T4mEqT6l4NhS3TZK5+MEemNtLHj 6dD8pSh+47/vxWIq3POtSXceeKmshiNUwQTZ9NY8CxRrkJKp8OsjCzhYxwJ23HpO3juG XIMw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id mh6-20020a17090b4ac600b001e867df6c7fsi7897320pjb.171.2022.06.06.00.18.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 00:18:56 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 34F8ED772E; Sun, 5 Jun 2022 23:49:54 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230122AbiFFGtx (ORCPT + 99 others); Mon, 6 Jun 2022 02:49:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230127AbiFFGtw (ORCPT ); Mon, 6 Jun 2022 02:49:52 -0400 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F9471148 for ; Sun, 5 Jun 2022 23:49:49 -0700 (PDT) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 2566YuTK035312; Mon, 6 Jun 2022 14:34:56 +0800 (GMT-8) (envelope-from neal_liu@aspeedtech.com) Received: from localhost.localdomain (192.168.10.10) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 6 Jun 2022 14:49:40 +0800 From: Neal Liu To: Herbert Xu , "David S . Miller" , Rob Herring , Krzysztof Kozlowski , Joel Stanley , "Andrew Jeffery" , Johnny Huang CC: , , , , , Subject: [PATCH v2 0/5] Add Aspeed crypto driver for hardware acceleration Date: Mon, 6 Jun 2022 14:49:30 +0800 Message-ID: <20220606064935.1458903-1-neal_liu@aspeedtech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.10.10] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 2566YuTK035312 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Aspeed Hash and Crypto Engine (HACE) is designed to accelerate the throughput of hash data digest, encryption and decryption. These patches aim to add Aspeed hash & crypto driver support. The hash & crypto driver also pass the run-time self tests that take place at algorithm registration. Tested-by below configs: - CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set - CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y - CONFIG_DMA_API_DEBUG=y - CONFIG_DMA_API_DEBUG_SG=y Change since v1: - Add more error handlers, including DMA memory allocate/free, DMA map/unmap, clock enable/disable, etc. - Fix check dma_map error for config DMA_API_DEBUG - Fix dt-binding doc & dts node naming Neal Liu (5): crypto: aspeed: Add HACE hash driver dt-bindings: clock: Add AST2600 HACE reset definition ARM: dts: aspeed: Add HACE device controller node dt-bindings: crypto: add documentation for aspeed hace crypto: aspeed: add HACE crypto driver .../bindings/crypto/aspeed,ast2500-hace.yaml | 53 + MAINTAINERS | 7 + arch/arm/boot/dts/aspeed-g6.dtsi | 8 + drivers/crypto/Kconfig | 1 + drivers/crypto/Makefile | 1 + drivers/crypto/aspeed/Kconfig | 38 + drivers/crypto/aspeed/Makefile | 8 + drivers/crypto/aspeed/aspeed-hace-crypto.c | 1028 ++++++++++++ drivers/crypto/aspeed/aspeed-hace-hash.c | 1409 +++++++++++++++++ drivers/crypto/aspeed/aspeed-hace.c | 350 ++++ drivers/crypto/aspeed/aspeed-hace.h | 292 ++++ include/dt-bindings/clock/ast2600-clock.h | 1 + 12 files changed, 3196 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/aspeed,ast2500-hace.yaml create mode 100644 drivers/crypto/aspeed/Kconfig create mode 100644 drivers/crypto/aspeed/Makefile create mode 100644 drivers/crypto/aspeed/aspeed-hace-crypto.c create mode 100644 drivers/crypto/aspeed/aspeed-hace-hash.c create mode 100644 drivers/crypto/aspeed/aspeed-hace.c create mode 100644 drivers/crypto/aspeed/aspeed-hace.h -- 2.25.1