From patchwork Tue Nov 25 19:09:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 5382311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E8EB09F39D for ; Tue, 25 Nov 2014 19:13:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4971720108 for ; Tue, 25 Nov 2014 19:13:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (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 3F0B9201C0 for ; Tue, 25 Nov 2014 19:13:38 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XtLW1-0005e3-Mx; Tue, 25 Nov 2014 19:11:09 +0000 Received: from mail-wi0-x22e.google.com ([2a00:1450:400c:c05::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XtLVo-0005Y2-UF for linux-arm-kernel@lists.infradead.org; Tue, 25 Nov 2014 19:10:57 +0000 Received: by mail-wi0-f174.google.com with SMTP id h11so10213794wiw.1 for ; Tue, 25 Nov 2014 11:10:34 -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=dBGbwmTfyecsLJ83m+yDMKJSiVhUMWzlgqYGg+NCquM=; b=zd7O0SztK3upskHwMD0kh9rlXuvPLtc5ZGDUWKZmqomrwyM2AhJgFUW29t00jRLEed TzOMAUJciWbzWxSJm4fYN3l9owYQTJljkL+DGc619IYxN7/pCd+tn2NJMuXebjsg+cs2 d/2fmv1EKJMLFPG+bdoYnt3/NMA0F7Sd7+LvvJXPeGCQ0SSb9o2EBH5Ivjrjn7DBktKO w66ILK5eNBSZPVmr4DG42BUEYbjqeRhCNq/ehV0/uJEl2oKUGO67hhr2fNed1QGELPKw c5F1BotX4p1wZ837z1UlJVOJh8R2LHmBBVYVuUJZ2ppxzsHQnY6/tIcmYoLIG3lfZWpd dttA== X-Received: by 10.181.9.99 with SMTP id dr3mr33985239wid.78.1416942634763; Tue, 25 Nov 2014 11:10:34 -0800 (PST) Received: from fangorn.rup.mentorg.com (nat-min.mentorg.com. [139.181.32.34]) by mx.google.com with ESMTPSA id ud1sm3131966wjc.7.2014.11.25.11.10.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 25 Nov 2014 11:10:30 -0800 (PST) From: Dmitry Eremin-Solenikov To: Russell King Subject: [PATCH v2 1/8] ARM: sa1100: switch to MULTI_IRQ_HANDLER Date: Tue, 25 Nov 2014 22:09:45 +0300 Message-Id: <1416942592-23059-2-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1416942592-23059-1-git-send-email-dbaryshkov@gmail.com> References: <1416942592-23059-1-git-send-email-dbaryshkov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141125_111057_179197_E2BA3978 X-CRM114-Status: GOOD ( 13.48 ) X-Spam-Score: -0.8 (/) Cc: Linus Walleij , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-2.5 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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. Also 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 89c4b5c..2f3f132 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -703,6 +703,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..4a1bd5e 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(ffs(mask) - 1 + IRQ_GPIO0, 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(); }