Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8291202rwl; Tue, 10 Jan 2023 11:24:06 -0800 (PST) X-Google-Smtp-Source: AMrXdXsaA8F8BKZHydJkFwegC2qtQn+aH8Sd83mxfnwVkoc3PCtRK/sk3ZNEr6DqTLo3t5l8KSDn X-Received: by 2002:a17:903:181:b0:193:3154:625c with SMTP id z1-20020a170903018100b001933154625cmr10576604plg.35.1673378645842; Tue, 10 Jan 2023 11:24:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673378645; cv=none; d=google.com; s=arc-20160816; b=x7wqCi/QiSYZvACJ2xqza24UHFSuMwYV9uvDbGoEshIjCMrMhIUXC9kGNL4AeJVvl2 r4oDBUsCBcBZ38g3anYjnAQ/HOCyc6Gjx4roKdqJI/F5yX2XnS94tSD92Mwiwl2NY3w7 IY5EbYl3uVPQwKYhA0Zpbdz6X6RMgSXysO4+iAIOrW4iqloi2YrLUmIt14Yx902tLweM iIDxRHcbXjSjs8HVIF2IaP8cN3FU0WM2Xu0gGNS1ODPq20l8S1EZo3cOKR1/s8xNHKlE ZqijmU6kYoobZr4DJeC+wW4jhnDlzS5ymQqhTa79aFE72T3NgoAGNq9m0hG5cUztHMAO F5hA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=/o0PiJuOvWG4Quan3s3nxBl5R0QTcNbdsB/Kd9BP1AQ=; b=CCQWFlvnMNVFeJHjFzgFHpftf5wnWGs9c+y++HiMsnsG4j5OJRDjLdqCWtbo+ZBjOz 3onEz+wFxxIKydo3bTKeR6ewa0p5gScsvvc7DvJQMyVlkZjNXR98Rsoke5Wb6mF7oNUE Fh4avAlb+Lc38qTn2sa91KLbKnWbfiXWOvOLtD74PmPFfCWLNe1uiaWb5iG2qN8tDt+O BfCifrvjedPFIQ0e+JgcI1Rrx9kct9XpuEFMEtDvgRBo1SJpVk1xGVHdMH1u3PEGRTI0 p+oxd4t2b0kDVtqQDlFTRlddgSBzhe/xA0US3a7WzxSDMXLg+hXWHDltIokmTiBMZIDD bPBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QvzRMTn4; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x21-20020a17090300d500b00189697e2433si11027666plc.537.2023.01.10.11.23.52; Tue, 10 Jan 2023 11:24:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-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=@linaro.org header.s=google header.b=QvzRMTn4; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234307AbjAJTTs (ORCPT + 99 others); Tue, 10 Jan 2023 14:19:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239768AbjAJTTh (ORCPT ); Tue, 10 Jan 2023 14:19:37 -0500 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7581253280 for ; Tue, 10 Jan 2023 11:19:35 -0800 (PST) Received: by mail-lf1-x134.google.com with SMTP id bu8so20015292lfb.4 for ; Tue, 10 Jan 2023 11:19:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=/o0PiJuOvWG4Quan3s3nxBl5R0QTcNbdsB/Kd9BP1AQ=; b=QvzRMTn4hye8yVLEuaUkyDFux8Hpv0eajm0LJm8GMTintGJx+1ujiclNrF/I6qEjJU dOs8yppVqBnHrv1mx2QAR6aePZxGxJxGTx1kMx2/NuONqaB3kaoyEgb1/R1O0cbmlqq2 MtLTJ3vRqkxhzKkZS8c4etDgliJhzAXncvhubP6lkn11eNlyzHzV9gmIXnGoraF0dHuE omYXoRbzy0s3gLJEsdyKhI5BjryhaKblv09V7MQ+nrfi2jDCG0iIUbVEDetBsJBm5W8i txmuARCMDcCayPSmkKW00ELukdHIX40msCknwZCd3F92GI1fHpYKdcagynhNhw837Tvo MXFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/o0PiJuOvWG4Quan3s3nxBl5R0QTcNbdsB/Kd9BP1AQ=; b=zS79lHrqL9P1tcOG9dI/36cWC3ZxyeAOKjMd3wX8pwoeMjMJ64PgZvvlUmDcr1dNcW +9iPBt9cqLFJbkfRQhw6WIRATREFSYA9asDTSRSAJmxbLZUlfCiQUOl7d16B41ll50RJ WgLw2ieAgaxraA5UkYDQd45sPTyPlztSGYpPuhIyDM+vVT9tvyoHUQRmM39CT9jV28yo uSb78VpGQUgsMj0LAFP/Q3ESZQ7ckDDweKkF6O5Ux0fDXPGM0d8yoGJSoJbNdt2oe119 kIE3Nq7NmaLfDkwo6LKCuMkRx2H6+t5JG3XQUnxDyPtw7wrxrzxGGxa/B7xmDSar1IcN j0tQ== X-Gm-Message-State: AFqh2ko9fSbw6rNv4ENqxipJkcBgurtOJxsh+5PkTn0d9H80ugQGCM2U HL/JygsWBUvwtNMYfYuhTROnTg== X-Received: by 2002:a05:6512:693:b0:4cc:96fc:7b5d with SMTP id t19-20020a056512069300b004cc96fc7b5dmr78374lfe.52.1673378373701; Tue, 10 Jan 2023 11:19:33 -0800 (PST) Received: from Fecusia.local (c-05d8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.216.5]) by smtp.gmail.com with ESMTPSA id x28-20020a056512131c00b004b549ad99adsm2297725lfu.304.2023.01.10.11.19.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 11:19:33 -0800 (PST) From: Linus Walleij Subject: [PATCH v2 0/6] crypto: stm32 hash - reuse for Ux500 Date: Tue, 10 Jan 2023 20:19:12 +0100 Message-Id: <20221227-ux500-stm32-hash-v2-0-bc443bc44ca4@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIADC6vWMC/32OQQ6CMBREr0K6tqb9IIgr72FYlPKhTbQl/ZVAC He3oGuXbzIvMysjDBaJ3bKVBZwsWe8SwClj2ig3ILddYgYCQAJU/D1fhOAUXzlwo8jwGhHKa15A DT1LWqsIeRuU02YXv/2IFH+SDsu498aAvZ2P6UeT2FiKPizHk0nu6Z/RSXLB2zKvlC50p4S8P61 TwZ99GFizbdsHIyAPqtkAAAA= To: Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue , Lionel Debieve Cc: linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij X-Mailer: b4 0.11.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 By taking some small portions of the Ux500 HASH driver and adding to the STM32 driver, it turns out we can support both platforms with the more modern STM32 driver. The STM32 driver is more modern and compact thanks to using things like the crypto engine. We add a polled mode since the Ux500 does not have any interrupt. Incidentally, this could perhaps be re-used to implement synchronous mode, if this is desireable. To: Herbert Xu To: "David S. Miller" To: Rob Herring To: Krzysztof Kozlowski To: Maxime Coquelin To: Alexandre Torgue To: Lionel Debieve Cc: linux-crypto@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Linus Walleij --- Changes in v2: - Use an else-clause in the DT bindings. - Fix up issues pointed out by Lionel in the driver extension. - Dropped the patch converting dma_mode to a bool after Lionel explained how this works. - Link to v1: https://lore.kernel.org/r/20221227-ux500-stm32-hash-v1-0-b637ac4cda01@linaro.org --- Linus Walleij (6): dt-bindings: crypto: Let STM32 define Ux500 HASH crypto: stm32/hash: Simplify code crypto: stm32/hash: Use existing busy poll function crypto: stm32/hash: Wait for idle before final CPU xmit crypto: stm32/hash: Support Ux500 hash crypto: ux500/hash - delete driver .../devicetree/bindings/crypto/st,stm32-hash.yaml | 23 +- drivers/crypto/Kconfig | 10 - drivers/crypto/Makefile | 1 - drivers/crypto/stm32/stm32-hash.c | 243 ++- drivers/crypto/ux500/Kconfig | 22 - drivers/crypto/ux500/Makefile | 7 - drivers/crypto/ux500/hash/Makefile | 11 - drivers/crypto/ux500/hash/hash_alg.h | 398 ---- drivers/crypto/ux500/hash/hash_core.c | 1966 -------------------- 9 files changed, 227 insertions(+), 2454 deletions(-) --- base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2 change-id: 20221227-ux500-stm32-hash-9ee26834292f Best regards, -- Linus Walleij