linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
Cc: herbert@gondor.hengli.com.au, linux-crypto@vger.kernel.org,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/5] crypto: omap-aes: change in prevention of OCP bus error
Date: Tue, 16 Nov 2010 09:13:55 -0800	[thread overview]
Message-ID: <20101116171355.GR9264@atomide.com> (raw)
In-Reply-To: <78e86640037f10904b37250f0c578c6e0ca2c256.1289409924.git.dmitry.kasatkin@nokia.com>

Hi,

* Dmitry Kasatkin <dmitry.kasatkin@nokia.com> [101110 09:18]:
> Suggested to use udelay() instead of nop as on the higher
> core frequencies it might not be enough time.
> 
> Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@nokia.com>
> ---
>  drivers/crypto/omap-aes.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
> index 799ca51..9d65611 100644
> --- a/drivers/crypto/omap-aes.c
> +++ b/drivers/crypto/omap-aes.c
> @@ -26,6 +26,7 @@
>  #include <linux/io.h>
>  #include <linux/crypto.h>
>  #include <linux/interrupt.h>
> +#include <linux/delay.h>
>  #include <crypto/scatterwalk.h>
>  #include <crypto/aes.h>
>  
> @@ -187,11 +188,12 @@ static int omap_aes_hw_init(struct omap_aes_dev *dd)
>  		omap_aes_write_mask(dd, AES_REG_MASK, AES_REG_MASK_SOFTRESET,
>  					AES_REG_MASK_SOFTRESET);
>  		/*
> -		 * prevent OCP bus error (SRESP) in case an access to the module
> -		 * is performed while the module is coming out of soft reset
> +		 * prevent OCP bus error (SRESP) on OMAP3630 in case an access
> +		 * to the module is performed while the module is
> +		 * coming out of soft reset
>  		 */
> -		__asm__ __volatile__("nop");
> -		__asm__ __volatile__("nop");
> +		if (cpu_is_omap3630())
> +			udelay(1);
>  
>  		err = omap_aes_wait(dd, AES_REG_SYSSTATUS,
>  				AES_REG_SYSSTATUS_RESETDONE);

Please don't add more cpu_is_omapxxxx tests into drivers, those
will be limited to arch/arm/*omap*/ platform init code soonish.
The drivers should be generic.

Instead, check the crypto hardware version during init. If that
does not work, pass u32 flags in the platform data and define
OMAP_AES_SOFT_RESET_ERROR bit.

Regards,

Tony

  reply	other threads:[~2010-11-16 17:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-10 17:26 [PATCH 0/5] omap-aes off mode and error handling fixes Dmitry Kasatkin
2010-11-10 17:26 ` [PATCH 1/5] crypto: omap-aes: change in prevention of OCP bus error Dmitry Kasatkin
2010-11-16 17:13   ` Tony Lindgren [this message]
2010-11-10 17:26 ` [PATCH 2/5] omap-aes: DMA initialization fixes for OMAP off mode Dmitry Kasatkin
2010-11-10 17:48   ` Felipe Balbi
2010-11-10 17:26 ` [PATCH 3/5] omap-aes: redundant locking is removed Dmitry Kasatkin
2010-11-10 17:26 ` [PATCH 4/5] omap-aes: error handling implementation improved Dmitry Kasatkin
2010-11-10 17:26 ` [PATCH 5/5] omap-aes: unnecessary code removed Dmitry Kasatkin

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=20101116171355.GR9264@atomide.com \
    --to=tony@atomide.com \
    --cc=dmitry.kasatkin@nokia.com \
    --cc=herbert@gondor.hengli.com.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-omap@vger.kernel.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).