From: Olav Morken Date: Fri, 23 Jan 2009 11:56:32 +0000 (+0100) Subject: AVR32: Must add NOPs after disabling interrupts for AT32UC3A0512ES X-Git-Tag: v2009.06-rc1~145^2^2~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b423f94063bf04e92047ff85c7e53441eb3b712b;p=oweals%2Fu-boot.git AVR32: Must add NOPs after disabling interrupts for AT32UC3A0512ES The AT32UC3A0512ES chip has a bug when disabling interrupts. As a workaround, two NOPs can be inserted. Signed-off-by: Gunnar Rangoy Signed-off-by: Paul Driveklepp Signed-off-by: Olav Morken Signed-off-by: Haavard Skinnemoen --- diff --git a/lib_avr32/interrupts.c b/lib_avr32/interrupts.c index 28df20db01..bbbc490db2 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); }