[U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled

Michal Simek monstr at monstr.eu
Tue Dec 21 14:02:45 CET 2010


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 at xilinx.com>
Signed-off-by: Michal Simek <monstr at monstr.eu>
---
 arch/microblaze/cpu/interrupts.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c
index e9d53c1..054e09f 100644
--- a/arch/microblaze/cpu/interrupts.c
+++ b/arch/microblaze/cpu/interrupts.c
@@ -41,8 +41,10 @@ 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
-- 
1.5.5.6



More information about the U-Boot mailing list