]> git.sur5r.net Git - u-boot/commitdiff
AVR32: Must add NOPs after disabling interrupts for AT32UC3A0512ES
authorOlav Morken <olavmrk@gmail.com>
Fri, 23 Jan 2009 11:56:32 +0000 (12:56 +0100)
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>
Mon, 23 Feb 2009 09:34:24 +0000 (10:34 +0100)
The AT32UC3A0512ES chip has a bug when disabling interrupts. As a
workaround, two NOPs can be inserted.

Signed-off-by: Gunnar Rangoy <gunnar@rangoy.com>
Signed-off-by: Paul Driveklepp <pauldriveklepp@gmail.com>
Signed-off-by: Olav Morken <olavmrk@gmail.com>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
lib_avr32/interrupts.c

index 28df20db01079fe4b84619016f483397b2d6dc04..bbbc490db2361df8e95601a8c721a25ddbbabfc2 100644 (file)
@@ -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);
 }