From patchwork Sun Dec 15 04:28:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 3349911 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A7709C0D4A for ; Sun, 15 Dec 2013 04:29:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E20512068F for ; Sun, 15 Dec 2013 04:29:37 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E44ED2068E for ; Sun, 15 Dec 2013 04:29:36 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vs3KL-0004x5-Od; Sun, 15 Dec 2013 04:29:14 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vs3KI-0001hk-AL; Sun, 15 Dec 2013 04:29:10 +0000 Received: from mail-ea0-x22b.google.com ([2a00:1450:4013:c01::22b]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vs3K1-0001e0-2Z for linux-arm-kernel@lists.infradead.org; Sun, 15 Dec 2013 04:28:53 +0000 Received: by mail-ea0-f171.google.com with SMTP id h10so1576844eak.30 for ; Sat, 14 Dec 2013 20:28:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=8c5T+t32DnpHFBUdokCWM2DHljOUUoaUZDLI3k+aaqE=; b=EpTvB49AmQITpy+1XJgt5QXy70Is62EcaYvMMjvtS/xbS8ktc12oXOF/megzAKyjgF Y7InqD72ZOm+PQOR3da7vbpxoT9aUcsA1yim9aMGlMAlCGiFu5CYClkSP5NAxC2WdKZX cx7nO3uS7aV+IkNU+JbGpy0xE5guL/fML7DQlfvuOTDoYTOzYDusqKPmI07Pofhw/EE+ Gm269USIJWO0PP7J5+DOmPyzlfrFed0rqInxJrWiWyWwmisH5oa8mhXTny+RSEzjTap2 oGeokX9AQ9A1m6qTovheKysfZ+eltLmootl0UscGpyyAQzN65syhrDsVM/CwWAVAZfXo 8WAg== X-Received: by 10.14.4.67 with SMTP id 43mr10108508eei.70.1387081710193; Sat, 14 Dec 2013 20:28:30 -0800 (PST) Received: from fangorn.rup.mentorg.com (nat-min.mentorg.com. [139.181.32.34]) by mx.google.com with ESMTPSA id n1sm25702696eep.20.2013.12.14.20.28.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 14 Dec 2013 20:28:29 -0800 (PST) From: Dmitry Eremin-Solenikov To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 01/10] ARM: sa1100: switch to MULTI_IRQ_HANDLER Date: Sun, 15 Dec 2013 08:28:08 +0400 Message-Id: <1387081697-21841-2-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: <1387081697-21841-1-git-send-email-dbaryshkov@gmail.com> References: <1387081697-21841-1-git-send-email-dbaryshkov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131214_232853_241355_1AD7E2B4 X-CRM114-Status: GOOD ( 12.83 ) X-Spam-Score: -2.0 (--) Cc: Linus Walleij , Russell King , Dmitry Artamonow X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add sa1100_handle_irq implementating handle_irq for sa1100 platform. It is more or less a translation of old assembly code from assembler to plain C. Alsi install this irq handler from sa1100_init_irq(). Signed-off-by: Dmitry Eremin-Solenikov --- arch/arm/Kconfig | 1 + arch/arm/mach-sa1100/irq.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index c1f1a7e..14e907e 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -693,6 +693,7 @@ config ARCH_SA1100 select GENERIC_CLOCKEVENTS select HAVE_IDE select ISA + select MULTI_IRQ_HANDLER select NEED_MACH_MEMORY_H select SPARSE_IRQ help diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c index 2124f1fc..68e8f9d 100644 --- a/arch/arm/mach-sa1100/irq.c +++ b/arch/arm/mach-sa1100/irq.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "generic.h" @@ -291,6 +292,23 @@ static int __init sa1100irq_init_devicefs(void) device_initcall(sa1100irq_init_devicefs); +static asmlinkage void __exception_irq_entry +sa1100_handle_irq(struct pt_regs *regs) +{ + uint32_t icip, icmr, mask; + + do { + icip = (ICIP); + icmr = (ICMR); + mask = icip & icmr; + + if (mask == 0) + break; + + handle_IRQ(fls(mask) - 1, regs); + } while (1); +} + void __init sa1100_init_irq(void) { unsigned int irq; @@ -338,5 +356,7 @@ void __init sa1100_init_irq(void) irq_set_chip(IRQ_GPIO11_27, &sa1100_normal_chip); irq_set_chained_handler(IRQ_GPIO11_27, sa1100_high_gpio_handler); + set_handle_irq(sa1100_handle_irq); + sa1100_init_gpio(); }