[U-Boot] [PATCH v2 7/9] AVR32: Must add NOPs after disabling interrupts for AT32UC3A0512ES

Gunnar Rangoy gunnar at rangoy.com
Fri Jan 23 12:56:32 CET 2009


From: Olav Morken <olavmrk at gmail.com>

The AT32UC3A0512ES chip has a bug when disabling interrupts. As a
workaround, two NOPs can be inserted.

Signed-off-by: Gunnar Rangoy <gunnar at rangoy.com>
Signed-off-by: Paul Driveklepp <pauldriveklepp at gmail.com>
Signed-off-by: Olav Morken <olavmrk at gmail.com>
---
 lib_avr32/interrupts.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/lib_avr32/interrupts.c b/lib_avr32/interrupts.c
index 28df20d..bbbc490 100644
--- a/lib_avr32/interrupts.c
+++ b/lib_avr32/interrupts.c
@@ -35,5 +35,12 @@ int disable_interrupts(void)
 	sr = sysreg_read(SR);
 	asm volatile("ssrf	%0" : : "n"(SYSREG_GM_OFFSET));
 
+#ifdef CONFIG_AT32UC3A0xxx
+	/* Two NOPs are required after masking interrupts on the
+	 * AT32UC3A0512ES. See errata 41.4.5.5. */
+	asm("nop");
+	asm("nop");
+#endif
+
 	return !SYSREG_BFEXT(GM, sr);
 }
-- 
1.6.0.4



More information about the U-Boot mailing list