linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: festevam@gmail.com (Fabio Estevam)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: dts: imx7s: Pass the 'fsl,sec-era' property
Date: Fri, 4 May 2018 13:31:52 -0300	[thread overview]
Message-ID: <CAOMZO5AVjFCad4PC20X5PqMuKGJQ2cOSBnqbGw+ngYCODL2vmQ@mail.gmail.com> (raw)
In-Reply-To: <20180504071926.GT3443@dragon>

Hi Shawn,

On Fri, May 4, 2018 at 4:19 AM, Shawn Guo <shawnguo@kernel.org> wrote:

> The property is documented as optional in the bindings.  Missing the
> property shouldn't cause any fatal error, I guess.

The CAAM drivers uses the era information in many places:

drivers/crypto/caam/caamalg.c:  if (ctrlpriv->era >= 6) {
drivers/crypto/caam/caamalg.c:  if (ctrlpriv->era < 3)
drivers/crypto/caam/caamalg.c:  if (priv->era >= 6 && uses_dkp)
drivers/crypto/caam/caamalg_desc.c:     if (era < 6) {
drivers/crypto/caam/caamalg_desc.c:     /* Class 2 operation */
drivers/crypto/caam/caamalg_desc.c:     if (era < 6) {
drivers/crypto/caam/caamalg_desc.c:     /* Class 2 operation */
drivers/crypto/caam/caamalg_desc.c:     if (era < 6) {

If the era information is not provided the value of -524 (-ENOTSUPP)
will be used, so all the above logic will not operate correctly.

I have sent a patch that allows the era information to be retrieved
via CAAM registers:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/crypto/caam/ctrl.c?h=next-20180424&id=654f2b937b389295581bcb4aa26011a63db7bc8f

but this will only land in 4.18.

In order to avoid i.MX7 to report the incorrect era information in
4.17 I suggest that this patch should be applied for 4.17-rc.

Also, the other i.mx SoCs pass the fsl,sec-era in their dts.

Thanks

  reply	other threads:[~2018-05-04 16:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-24 20:25 [PATCH] ARM: dts: imx7s: Pass the 'fsl,sec-era' property Fabio Estevam
2018-05-04  7:19 ` Shawn Guo
2018-05-04 16:31   ` Fabio Estevam [this message]
2018-05-07  1:17     ` Shawn Guo
2018-05-07  1:51       ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOMZO5AVjFCad4PC20X5PqMuKGJQ2cOSBnqbGw+ngYCODL2vmQ@mail.gmail.com \
    --to=festevam@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).