Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4300773rwb; Mon, 21 Nov 2022 06:12:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf5e7bxX1WKIHhFTVLamIe+ONvDhSxS2ANI828POw+TWFFPPQ/yn0BPsJU/6S0c6w7aNBVUJ X-Received: by 2002:a63:1055:0:b0:46e:f011:9548 with SMTP id 21-20020a631055000000b0046ef0119548mr3870671pgq.553.1669039931089; Mon, 21 Nov 2022 06:12:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669039931; cv=none; d=google.com; s=arc-20160816; b=qSAmddsM/lweEmVOje4rRFq6XUCcMNPyAdsuSwd2Wu1npc4Qiiyb6pydtzyKVVpetw VazRVttmea34e4JU722Au4XIkJxBdyysG5IQ/NP2nXZe+JiIHjbqzsBpI+7QSsOt9lj+ QKzvpRgOf/kMRtPWY/ITobNXs83vTeutrmcroTU6OhaOhe+7S+uXTLruLRNjUndiss1k CDeo630YM/g1nfEjcc3pe4lHdV2tmDDOVOfZadd13mBzB8V/Y0w3sTyQwVHwYRyPu9jI mmyY74E+6Cx0l3kmImNbejBmxGNi6218dWAxm8w2qNE5sD6jIkelCuoR8+qw8pGIPx+v gRxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=IWOZXSWadpIbDXCwQsI8zutVdTS+C5TkqaxcBi/y1dg=; b=Yji9vvfbRXUCaPHcndR6kM9Tb0y7pM9qP3qYUYWKYBtr6aaBmDL6ETfB+P3BDYaMfA Y05yMxfNshKrvBnczANpsVu3pq+anKcWO8f7byOECMWAhOSqmMBrWMOhySMtnepJDcbb ZfgqcI2i3nfWvi/JcfiThpIHRG0bEPV5haH0en5Sugs0PCauWSSD/088yUfqeYzjgTxi It0I94xTj4WgdwFXWo87ZZjxeA2UK1ByN6IBiBWFq6Mb2jZUpY8rK+RD8GV5ByecVVHS 9sPIb7nMfc7f6aJpmn4cSQiICcZP4qFECHTyNAfOG2fPIvkWiaTn4jRdhJ8n2GGQuy5Q fAGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="m/1O1bJE"; 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 d23-20020a63d717000000b0046f729604f6si11563956pgg.174.2022.11.21.06.11.45; Mon, 21 Nov 2022 06:12:11 -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="m/1O1bJE"; 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 S229758AbiKUOLR (ORCPT + 99 others); Mon, 21 Nov 2022 09:11:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229639AbiKUOK4 (ORCPT ); Mon, 21 Nov 2022 09:10:56 -0500 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF74A11163 for ; Mon, 21 Nov 2022 06:07:54 -0800 (PST) Received: by mail-yb1-xb2f.google.com with SMTP id z192so13723552yba.0 for ; Mon, 21 Nov 2022 06:07:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IWOZXSWadpIbDXCwQsI8zutVdTS+C5TkqaxcBi/y1dg=; b=m/1O1bJEHXsx6J9Mujw+gsd9g+z98hk92EVKBqEk3sHE1ScqSQZbnSxhZ11v8OOIZU PPDQFLV15YEBsPnWtkgUZVnvGEgAO1xxYCfl22clmWNiU2eq8oA0b/UqU0pHHzVNGp3O psvzrwPrnBYsgk0l2wlkayXynDsrKHwJVGJnVntPqWM+tqaB5b9FDGUYVJhlO5CvPv8e c4ydE43cgaxgsQYKYO78fh4oT4EG1zfkhtUFei4WahCRErL8kQN2Pmt0OYDnw4fVEl7Y /eLV1C51AOk5lnV6tOLSB5WoU9QQFFyF9x0ecZyEkIk2JrEVsSMDJsWzsyjuJ/2PET65 50ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IWOZXSWadpIbDXCwQsI8zutVdTS+C5TkqaxcBi/y1dg=; b=MFI+Dd5dQz349xkU45WU37Y0ArHjfCrNZzqV4Kx1YepjLqn1YdostCEBUPtJ70ZNru DFK4UGIe5olUA88Uk+lxJwTlpDLpJzFDjDMb9sq/T0JRUvh6Y1CF/AWN4UUG6UM4K0Hy d943Mxi7C0dtlqn9jc3cfxFCMvAgNbczNwPNTL2D4nOD7lBkC8RfM4a7q35e791ee/Qe CrQqTTCSGg4VFZ2HmNgkA/PkLtTaiAUThpPtYvRzpVmsFLkLnyIf7F4iNImGH35hz5Y6 45MHU79okE6wgMXwxxqAX7Fm3RWNShG87C/ecsHU/8MS35GEuVGtySh4iexOukesgXMP goBQ== X-Gm-Message-State: ANoB5pl6X5zt1S4WC6ATAQsaYHZ/fDaY55LOv08NfDzMYTSdyTN+mOYy GVeGvYf79QPvw7rf4CsKFfrPZbMT9PVcZOK7HjocdA== X-Received: by 2002:a25:734a:0:b0:6dc:324a:7561 with SMTP id o71-20020a25734a000000b006dc324a7561mr17155400ybc.52.1669039673956; Mon, 21 Nov 2022 06:07:53 -0800 (PST) MIME-Version: 1.0 References: <20221119221219.1232541-1-linus.walleij@linaro.org> <20221119221219.1232541-4-linus.walleij@linaro.org> <8f55596e-12e3-8968-ebe5-e90be38ca5cb@foss.st.com> In-Reply-To: <8f55596e-12e3-8968-ebe5-e90be38ca5cb@foss.st.com> From: Linus Walleij Date: Mon, 21 Nov 2022 15:07:42 +0100 Message-ID: Subject: Re: [PATCH v1 3/4] crypto: stm32/cryp - enable for use with Ux500 To: Lionel DEBIEVE Cc: linux-crypto@vger.kernel.org, Herbert Xu , "David S . Miller" , phone-devel@vger.kernel.org, Stefan Hansson , Maxime Coquelin , Alexandre Torgue Content-Type: text/plain; charset="UTF-8" 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=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-crypto@vger.kernel.org On Mon, Nov 21, 2022 at 2:35 PM Lionel DEBIEVE wrote: > + writel_relaxed(readl_relaxed(cryp->regs + CRYP_CR) | CR_KEYRDEN, cryp->regs + CRYP_CR); > > Why are you still using CRYP_CR here, would it be better to use cryp->caps->cr to keep compatibility? I noticed that the first two registers were not moved in the memory map so I just kept CR and SR as hard defines. It could be argued that the code will be containing one less memory reference and addition so it is more efficient, but it's so little so I am fine to change it to an offset in the caps if you prefer it to be uniform. Yours, Linus Walleij