From patchwork Tue Jun 6 07:11:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangfl X-Patchwork-Id: 10335 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp3213991vqr; Tue, 6 Jun 2023 00:42:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7KDTtOEUAnDDC6CgJgJxzP2C7ehrAU21knlPA6op9RV7N+tHW65n8rjudbB4uZuOYjQEZc X-Received: by 2002:a05:6a20:7d9f:b0:111:3998:7dd0 with SMTP id v31-20020a056a207d9f00b0011139987dd0mr2399261pzj.17.1686037366271; Tue, 06 Jun 2023 00:42:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686037366; cv=none; d=google.com; s=arc-20160816; b=dKxMN6R5b0zbVOi3KC8EogOezox12OtIFlGTAaGSzju4V6uwgYUi1HOnqflFhOz6j4 MLX1SpOWfLq3bSwgvaO+13PkhXcUZNMcnqAGvULC337Sxxet0y4nwhVXl7Z1pFXynm0R VhH5XTqpt3zNj/ZrwN6ep2FLme3pe/AdcMh47iqz3dnaLl/qKx3E/FtPhp0oYsxx9zym kcJ7q9YINhYat+7Ie9PaiNxOInlTPLsYPFqbp42tdGeKghQB1/H7LjFMlGMErYrUbalo pPLP9eVo84Ei4Z7ZK+9kkNyjAequuM7c3SP6eWmxoQzCy87ny8goih6W1fs70BLrwH8U YD1g== 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:dkim-signature; bh=xi9E9SO98JEhVRc3ceJK1WNia9dtNCms5uByHfdXEZY=; b=mmrimyUKcrnd1ES4WUyP1MoS3jK1SSZ7HeqjykvXBqhSkjgXE8PJvQGo0cKYxUhCrJ B+WlNAJeR4NJG2AuG0DRWKjAQP7F/Ip1oFs/ovl6OztAq0vsYBmP1BZOZGKtVCxZUpQz 7x3VYD7uz8MrXfl5gClJRNMrGhpqI+qj4Al2NIbuAU9Ap0UX9Rfq8dEqMtgLAdrCpXkR bD/LUgkVgmHDZ8JnAg2aSRMyGDyiuE9yBbxa5Ve6gOOyf5JF8zEk+NM2JzMzwujp9UEP s3ZsQ1JU2JbMx0PCwGDndS1Wk75BaRtQZyGcW6yhhZSrnS2U37K1jhcNYeoMjJ5mdcwU 8ZTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=fxn3f2Kf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x71-20020a63864a000000b0052c8d4d0d1esi7048522pgd.364.2023.06.06.00.42.33; Tue, 06 Jun 2023 00:42:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=fxn3f2Kf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S235984AbjFFHMU (ORCPT + 99 others); Tue, 6 Jun 2023 03:12:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235856AbjFFHMB (ORCPT ); Tue, 6 Jun 2023 03:12:01 -0400 Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C099FE5A; Tue, 6 Jun 2023 00:12:00 -0700 (PDT) Received: by mail-pf1-x42a.google.com with SMTP id d2e1a72fcca58-650c89c7e4fso5878604b3a.0; Tue, 06 Jun 2023 00:12:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686035520; x=1688627520; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=xi9E9SO98JEhVRc3ceJK1WNia9dtNCms5uByHfdXEZY=; b=fxn3f2KfczVPjr0NrdvAlW8AevRF2ix0N8SObLJcPKN+bV9SX0L5hl6zP20gEXVTHG ev9c/XHKlLid+3wYR6UgcXSRJpGOFpTHcKhHjhAh275uaAwSEEORdFynDSixBcvBKpiW 5I9EmrY5nySLEMY/P5jcFtYxYk0eUb2mk7k+bNFQ3Qt6ZYgdJRIfWJMSbW7eI4oWbcDS q+i1Gfz9m2V9o9dg8sWi7dG89G+FCHB2hDfv9XgaHocalh5tDt3o50m8ibcCRCz32pzB 2TtFHMNnTowdI60YTLjqkDXEbt+6ZW03iqFE8KACDrd/jtaHbwGT59FaPGnDhvg5P3Z+ vK8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686035520; x=1688627520; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xi9E9SO98JEhVRc3ceJK1WNia9dtNCms5uByHfdXEZY=; b=hzA3rAuyAbxhGkW3Y8l+7FfnJ1ArpdP/BUgBoC+a3NRlHW8rZCFDsgJDXzYFoJViIc RiwZA5VBLnm8ry7HbUW5aCX4U3BzzbYFGnSZCGylwkTDJt/QCJjiqf+KeaDj7yOmmEkY Kd7y4Rid3nGYLjShzb5zBod5fXiqlc48/nM9ewqkzx90TLkDkkXaZ/Be2/h6QVugh3I3 6sm8EBS49pYYvtWFyszqe4SeWEU6Rc1lhQGvvQy/7RwtLRAOD5wooVTf+N1RJgNPIMT0 40+/GY2VoWYvMpZGRKA702Xuef9vjouIEIhLfX64NdOvmT2DY5QYnUHV44TQ9QvBGHMC 2dSQ== X-Gm-Message-State: AC+VfDygg+mOrDA5m+BLNJb8+3x0L6xmbu6FwX3W6jSZwqHDadgxoK+k of58UynT0hyX53IcXerZFE4Y1j5vQbkogMkx X-Received: by 2002:a05:6a00:1ad1:b0:652:fbee:84df with SMTP id f17-20020a056a001ad100b00652fbee84dfmr1486168pfv.0.1686035519962; Tue, 06 Jun 2023 00:11:59 -0700 (PDT) Received: from d.home.yangfl.dn42 ([104.28.213.202]) by smtp.gmail.com with ESMTPSA id f25-20020aa782d9000000b0064d74808738sm6127247pfn.214.2023.06.06.00.11.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jun 2023 00:11:59 -0700 (PDT) From: David Yang To: linux-crypto@vger.kernel.org Cc: David Yang , Weili Qian , Zhou Wang , Herbert Xu , "David S. Miller" , Philipp Zabel , linux-kernel@vger.kernel.org Subject: [PATCH v4 0/2] crypto: hisilicon - Add HiSilicon ADVCA Subsystem Date: Tue, 6 Jun 2023 15:11:10 +0800 Message-Id: <20230606071128.375567-1-mmyangfl@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767938206459801265?= X-GMAIL-MSGID: =?utf-8?q?1767938317338997428?= HiSilicon ADVCA Subsystem contains various cryptographic devices, including symmetric key ciphers, hash functions, RSA algorithms, as well as key ladder and OTP memory. This series adds symmetric key cipher and SHA algorithm family driver. This series is based on Hi3798Mv100. v2: sorry, I accidentally skipped v1. v3: * use devm_reset_control_get_optional_exclusive * disable clocks if init failed * put device reset when removal * implement import function for sha device * fix typo reported by test bot v4: fix sparse warnings David Yang (2): crypto: hisilicon - Add HiSilicon ADVCA Subsystem crypto: hisilicon/advca - Add SHA support drivers/crypto/hisilicon/Kconfig | 11 + drivers/crypto/hisilicon/Makefile | 1 + drivers/crypto/hisilicon/advca/Makefile | 2 + .../crypto/hisilicon/advca/hisi-advca-muc.c | 1530 +++++++++++++++++ .../crypto/hisilicon/advca/hisi-advca-sha.c | 659 +++++++ 5 files changed, 2203 insertions(+) create mode 100644 drivers/crypto/hisilicon/advca/Makefile create mode 100644 drivers/crypto/hisilicon/advca/hisi-advca-muc.c create mode 100644 drivers/crypto/hisilicon/advca/hisi-advca-sha.c base-commit: f8dba31b0a826e691949cd4fdfa5c30defaac8c5