linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "cloudy.linux" <cloudy.linux@gmail.com>
To: Phil Sutter <phil.sutter@viprinet.com>
Cc: linux-crypto@vger.kernel.org, Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH 2/4] mv_cesa: no need to write to that FPGA_INT_STATUS field
Date: Mon, 28 May 2012 09:58:32 +0800	[thread overview]
Message-ID: <4FC2DBC8.2070805@gmail.com> (raw)
In-Reply-To: <1337954089-12702-2-git-send-email-phil.sutter@viprinet.com>

On 2012-5-25 21:54, Phil Sutter wrote:
> Also drop the whole definition, since it's unused otherwise.
>
> Signed-off-by: Phil Sutter<phil.sutter@viprinet.com>
> ---
>   drivers/crypto/mv_cesa.c |    1 -
>   drivers/crypto/mv_cesa.h |    7 -------
>   2 files changed, 0 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c
> index 8327bed..4a1f872 100644
> --- a/drivers/crypto/mv_cesa.c
> +++ b/drivers/crypto/mv_cesa.c
> @@ -908,7 +908,6 @@ irqreturn_t crypto_int(int irq, void *priv)
>   		       "got an interrupt but no pending timer?\n");
>   	}
>   	val&= ~SEC_INT_ACCEL0_DONE;
> -	writel(val, cpg->reg + FPGA_INT_STATUS);
>   	writel(val, cpg->reg + SEC_ACCEL_INT_STATUS);
>   	BUG_ON(cpg->eng_st != ENGINE_BUSY);
>   	cpg->eng_st = ENGINE_W_DEQUEUE;
> diff --git a/drivers/crypto/mv_cesa.h b/drivers/crypto/mv_cesa.h
> index 08fcb11..81ce109 100644
> --- a/drivers/crypto/mv_cesa.h
> +++ b/drivers/crypto/mv_cesa.h
> @@ -29,13 +29,6 @@
>   #define SEC_ST_ACT_0		(1<<  0)
>   #define SEC_ST_ACT_1		(1<<  1)
>
> -/*
> - * FPGA_INT_STATUS looks like a FPGA leftover and is documented only in Errata
> - * 4.12. It looks like that it was part of an IRQ-controller in FPGA and
> - * someone forgot to remove  it while switching to the core and moving to
> - * SEC_ACCEL_INT_STATUS.
> - */
> -#define FPGA_INT_STATUS		0xdd68
>   #define SEC_ACCEL_INT_STATUS	0xde20
>   #define SEC_INT_AUTH_DONE	(1<<  0)
>   #define SEC_INT_DES_E_DONE	(1<<  1)

According to the functional errata of 88F5182, the FPGA_INT_STATUS is 
needed (at least for 88F5182-A1/A2). Here is the quote from that errata:

4.12	Clearing the Cryptographic Engines and Security Accelerator 
Interrupt Cause Register
	Type:		Guideline
	Ref#:		GL-CESA-100
	Relevant for:	88F5182-A1/A2

Description:
Writing 0 to bits[6:0] of the Crytographic Engines ...  Interrupt Cause 
register (offset 0x9DE20) has no effect.

Steps to be performed by the designer
Before writing 0 to any of the bits[6:0] of the Cryptographic Engines .. 
Interrupt Cause register, the software must write 0 to the corresponding 
bit of the internal register at offset 0x9DD68.
Writing to offset 0x9DD68 is not possible when any of the Security 
Accelerators' sessions are active. Therefore, the software must verify 
that no channel is active before clearing any of those interrupts.

  reply	other threads:[~2012-05-28  1:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-25 13:54 [PATCH 1/4] mv_cesa: add an expiry timer in case anything goes wrong Phil Sutter
2012-05-25 13:54 ` [PATCH 2/4] mv_cesa: no need to write to that FPGA_INT_STATUS field Phil Sutter
2012-05-28  1:58   ` cloudy.linux [this message]
2012-05-29 11:45     ` Phil Sutter
2012-06-12 10:03       ` Herbert Xu
2012-05-25 13:54 ` [PATCH 3/4] mv_cesa: initialise the interrupt status field to zero Phil Sutter
2012-05-25 13:54 ` [PATCH 4/4] mv_cesa: fix for hash finalisation with data Phil Sutter

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=4FC2DBC8.2070805@gmail.com \
    --to=cloudy.linux@gmail.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=phil.sutter@viprinet.com \
    /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).