]> git.sur5r.net Git - u-boot/commitdiff
microblaze: Disabling interrupt should return 1 if was enabled
authorMichal Simek <monstr@monstr.eu>
Tue, 21 Dec 2010 07:30:39 +0000 (08:30 +0100)
committerMichal Simek <monstr@monstr.eu>
Mon, 10 Jan 2011 07:52:32 +0000 (08:52 +0100)
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>
arch/microblaze/cpu/interrupts.c

index e9d53c1afde638696067627325037b726a5a401b..5a1321128a40e99d0f51306f153f71b295439863 100644 (file)
@@ -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