From patchwork Tue Dec 21 13:02:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 76290 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id B3503B70A4 for ; Wed, 22 Dec 2010 00:02:59 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D136D2817C; Tue, 21 Dec 2010 14:02:57 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yA1uIJeC1c+4; Tue, 21 Dec 2010 14:02:57 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1860C28161; Tue, 21 Dec 2010 14:02:56 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2A06C28161 for ; Tue, 21 Dec 2010 14:02:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id O6Xmuzav8IJ1 for ; Tue, 21 Dec 2010 14:02:50 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-bw0-f46.google.com (mail-bw0-f46.google.com [209.85.214.46]) by theia.denx.de (Postfix) with ESMTP id 07A8428156 for ; Tue, 21 Dec 2010 14:02:48 +0100 (CET) Received: by bwz15 with SMTP id 15so4508946bwz.33 for ; Tue, 21 Dec 2010 05:02:48 -0800 (PST) Received: by 10.204.82.96 with SMTP id a32mr4562397bkl.179.1292936568198; Tue, 21 Dec 2010 05:02:48 -0800 (PST) Received: from localhost ([178.23.216.97]) by mx.google.com with ESMTPS id q18sm4225848bka.3.2010.12.21.05.02.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 21 Dec 2010 05:02:47 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de Date: Tue, 21 Dec 2010 14:02:45 +0100 Message-Id: <1292936565-24677-1-git-send-email-monstr@monstr.eu> X-Mailer: git-send-email 1.5.5.1 Subject: [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Signed-off-by: Michal Simek Acked-by: Wolfgang Denk Acked-by: Wolfgang Denk --- 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