diff options
author | Michal Simek <monstr@monstr.eu> | 2010-12-21 08:30:39 +0100 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2011-01-10 08:52:32 +0100 |
commit | 68e99e54e9e3e0c1b3b45929dc94c26932b851d5 (patch) | |
tree | 6e2a55393cba9dd30def08135fd6adfe8936e7cd | |
parent | 89c95f0cd3f8140f3b8a82a22a6a144c148d09c6 (diff) |
microblaze: Disabling interrupt should return 1 if was enabled
Microblaze implement enable/disable interrupts through MSR
that's why disable_interrupts function should return 1 when interrupt
was enabled. Return 0 when interrupt was disabled.
Signed-off-by: John Linn <john.linn@xilinx.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
Acked-by: Wolfgang Denk <wd@denx.de>
-rw-r--r-- | arch/microblaze/cpu/interrupts.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c index e9d53c1afd..5a1321128a 100644 --- a/arch/microblaze/cpu/interrupts.c +++ b/arch/microblaze/cpu/interrupts.c @@ -41,8 +41,11 @@ void enable_interrupts (void) int disable_interrupts (void) { + unsigned int msr; + + MFS(msr, rmsr); MSRCLR(0x2); - return 0; + return (msr & 0x2) != 0; } #ifdef CONFIG_SYS_INTC_0 |