linux-mips
[Top] [All Lists]

Re: [PATCH 08/14] MIPS: lantiq: clear all irqs properly on boot

To: John Crispin <blogic@openwrt.org>
Subject: Re: [PATCH 08/14] MIPS: lantiq: clear all irqs properly on boot
From: Sergei Shtylyov <sshtylyov@mvista.com>
Date: Tue, 01 May 2012 03:01:39 +0400
Cc: Ralf Baechle <ralf@linux-mips.org>, "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
In-reply-to: <1335785589-32532-8-git-send-email-blogic@openwrt.org>
References: <1335785589-32532-1-git-send-email-blogic@openwrt.org> <1335785589-32532-8-git-send-email-blogic@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120420 Thunderbird/12.0
Hello.

On 30-04-2012 15:33, John Crispin wrote:

Due to a wrongly placed bracket,

   I don't see a bracket in old code at all.

the irq modules were not properly reset on
boot.

Signed-off-by: John Crispin<blogic@openwrt.org>
---
  arch/mips/lantiq/irq.c |   11 ++++++-----
  1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c
index d673731..b6b1c72 100644
--- a/arch/mips/lantiq/irq.c
+++ b/arch/mips/lantiq/irq.c
@@ -271,12 +271,13 @@ void __init arch_init_irq(void)
        if (!ltq_eiu_membase)
                panic("Failed to remap eiu memory");

-       /* make sure all irqs are turned off by default */
-       for (i = 0; i<  5; i++)
+       /* turn off all irqs by default */
+       for (i = 0; i<  5; i++) {
+               /* make sure all irqs are turned off by default */
                ltq_icu_w32(0, LTQ_ICU_IM0_IER + (i * LTQ_ICU_OFFSET));
-
-       /* clear all possibly pending interrupts */
-       ltq_icu_w32(~0, LTQ_ICU_IM0_ISR + (i * LTQ_ICU_OFFSET));
+               /* clear all possibly pending interrupts */
+               ltq_icu_w32(~0, LTQ_ICU_IM0_ISR + (i * LTQ_ICU_OFFSET));
+       }

        mips_cpu_irq_init();

WBR, Sergei

<Prev in Thread] Current Thread [Next in Thread>