summaryrefslogtreecommitdiff
path: root/lib_avr32
diff options
context:
space:
mode:
authorOlav Morken <olavmrk@gmail.com>2009-01-23 12:56:32 +0100
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2009-02-23 10:34:24 +0100
commitb423f94063bf04e92047ff85c7e53441eb3b712b (patch)
treebbc30cb28552c85c2a83b43b6404a8cfb246dd29 /lib_avr32
parentf5f652fa91aa69db8117d211af1b4fe09f2edd3b (diff)
downloadu-boot-imx-b423f94063bf04e92047ff85c7e53441eb3b712b.zip
u-boot-imx-b423f94063bf04e92047ff85c7e53441eb3b712b.tar.gz
u-boot-imx-b423f94063bf04e92047ff85c7e53441eb3b712b.tar.bz2
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 <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>
Diffstat (limited to 'lib_avr32')
-rw-r--r--lib_avr32/interrupts.c7
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);
}