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>
This commit is contained in:
Michal Simek 2010-12-21 08:30:39 +01:00
parent 89c95f0cd3
commit 68e99e54e9
1 changed files with 4 additions and 1 deletions

View 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