public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled
@ 2010-12-21 13:02 Michal Simek
  2010-12-21 13:26 ` Sergei Shtylyov
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Michal Simek @ 2010-12-21 13:02 UTC (permalink / raw)
  To: u-boot

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>
---
 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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-01-09 21:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-21 13:02 [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled Michal Simek
2010-12-21 13:26 ` Sergei Shtylyov
2010-12-21 13:49 ` Wolfgang Denk
2010-12-21 14:45   ` 于会
2010-12-21 15:10     ` [U-Boot] Porting Questions - was: " Wolfgang Denk
2011-01-09 21:27 ` [U-Boot] " Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox