From patchwork Sat Nov 15 11:53:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 5311651 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 842B89F2ED for ; Sat, 15 Nov 2014 11:56:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A55C420136 for ; Sat, 15 Nov 2014 11:56:42 +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 C9B472011B for ; Sat, 15 Nov 2014 11:56:41 +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 1XpbwF-0002Dq-Kc; Sat, 15 Nov 2014 11:54:47 +0000 Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xpbw1-00025n-8p for linux-arm-kernel@lists.infradead.org; Sat, 15 Nov 2014 11:54:34 +0000 Received: by mail-wi0-f178.google.com with SMTP id em10so169608wid.11 for ; Sat, 15 Nov 2014 03:54:09 -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=pWsKD03fqqVcEqaVbU1B9vOo8D6JbEaYQUFkrtEWjdI=; b=uq7LJE7N2Duh/ZmaRxPBxC9o7zWYdDKwu84GzqSh4LRh9TJbU+GYLYvuz9pgGk9H4S A84v6idfqickgbI3DMhEI4TcMyzYOd3N9w6aqFeDROP2hRB7NetUwALcQW1B2Mu5+h31 /EQZ7djHIq3+yZm26HnsOgRt53Eq5xyJX3QLzvbOwxQkHgaGhzc/pCyWv5VgowbIGVSp sBRuKJ9i3L/6tW1BZkT20s5pitJPaZlyB6sUynEdA84KGk7AFF91KEkYeVjDV/6NE++J jOU6DAjGW/OTY43GDxeHX84AQ7sQtAmnv9TtgYI73jZqiqalZk7JYSPKTjskLvbHrR/X G5hQ== X-Received: by 10.180.9.196 with SMTP id c4mr15742064wib.66.1416052449758; Sat, 15 Nov 2014 03:54:09 -0800 (PST) Received: from fangorn.rup.mentorg.com (nat-min.mentorg.com. [139.181.32.34]) by mx.google.com with ESMTPSA id iz19sm320959wic.8.2014.11.15.03.54.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 15 Nov 2014 03:54:08 -0800 (PST) From: Dmitry Eremin-Solenikov To: Russell King Subject: [PATCH 1/6] ARM: sa1100: switch to MULTI_IRQ_HANDLER Date: Sat, 15 Nov 2014 14:53:47 +0300 Message-Id: <1416052432-26192-2-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1416052432-26192-1-git-send-email-dbaryshkov@gmail.com> References: <1416052432-26192-1-git-send-email-dbaryshkov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141115_035433_482083_8401DBEE X-CRM114-Status: GOOD ( 12.64 ) X-Spam-Score: -0.8 (/) Cc: Linus Walleij , Arnd Bergmann , 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..9a3bdf1 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, 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(); }