summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/coldfire/system-target.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/firmware/target/coldfire/system-target.h b/firmware/target/coldfire/system-target.h
index 97d096f0e8..c707843af5 100644
--- a/firmware/target/coldfire/system-target.h
+++ b/firmware/target/coldfire/system-target.h
@@ -71,9 +71,10 @@ static inline int set_irq_level(int level)
{
int oldlevel;
/* Read the old level and set the new one */
- asm volatile ("move.w %%sr,%0\n"
- "or.l #0x2000,%1\n"
- "move.w %1,%%sr\n" : "=d" (oldlevel), "+d" (level) : );
+ asm volatile ("move.w %%sr, %0 \n"
+ "bset.l #13, %1 \n" /* Keep supervisor state set */
+ "move.w %1, %%sr \n"
+ : "=d"(oldlevel), "+d"(level));
return oldlevel;
}