[PATCH 1/5] crypto: omap-aes: change in prevention of OCP bus error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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);
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux