From patchwork Tue Jan 1 21:59:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 1922371 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 462383FF0F for ; Tue, 1 Jan 2013 22:03:13 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tq9sZ-0003ld-6Q; Tue, 01 Jan 2013 22:00:11 +0000 Received: from gloria.sntech.de ([95.129.55.99]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Tq9sT-0003iQ-33 for linux-arm-kernel@lists.infradead.org; Tue, 01 Jan 2013 22:00:06 +0000 Received: from 178-25-111-105-dynip.superkabel.de ([178.25.111.105] helo=marty.localnet) by gloria.sntech.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1Tq9sO-0000tN-5K; Tue, 01 Jan 2013 23:00:00 +0100 From: Heiko =?utf-8?q?St=C3=BCbner?= To: Kukjin Kim Subject: [PATCH v2 11/11] ARM: S3C24XX: remove maskack irq ack funtions Date: Tue, 1 Jan 2013 22:59:58 +0100 User-Agent: KMail/1.13.7 (Linux/3.2.0-3-686-pae; KDE/4.8.4; i686; ; ) References: <201301012251.15899.heiko@sntech.de> In-Reply-To: <201301012251.15899.heiko@sntech.de> MIME-Version: 1.0 Message-Id: <201301012259.58754.heiko@sntech.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130101_170005_481992_992A73C4 X-CRM114-Status: GOOD ( 14.58 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-samsung-soc@vger.kernel.org, Thomas Abraham , linux-arm-kernel@lists.infradead.org, ben-linux@fluff.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org In the past level irqs provided a special ack handler that also masked the interrupt. But handle_level_irq also does mask-ack the interrupt itself, so there is no need to keep this special ack function around. We therefore can simplyfy the number of irq-chips again. Signed-off-by: Heiko Stuebner --- arch/arm/plat-s3c24xx/irq.c | 41 +++++++++-------------------------------- 1 files changed, 9 insertions(+), 32 deletions(-) diff --git a/arch/arm/plat-s3c24xx/irq.c b/arch/arm/plat-s3c24xx/irq.c index 8cba552..0516cbc 100644 --- a/arch/arm/plat-s3c24xx/irq.c +++ b/arch/arm/plat-s3c24xx/irq.c @@ -128,12 +128,6 @@ static inline void s3c_irq_ack(struct irq_data *data) __raw_writel(bitval, intc->reg_intpnd); } -static inline void s3c_irq_maskack(struct irq_data *data) -{ - s3c_irq_mask(data); - s3c_irq_ack(data); -} - #ifdef CONFIG_PM /* state for IRQs over sleep * @@ -164,22 +158,6 @@ int s3c_irq_wake(struct irq_data *data, unsigned int state) } #endif -struct irq_chip s3c_irq_level_chip = { - .name = "s3c-level", - .irq_ack = s3c_irq_maskack, - .irq_mask = s3c_irq_mask, - .irq_unmask = s3c_irq_unmask, - .irq_set_wake = s3c_irq_wake -}; - -struct irq_chip s3c_irq_chip = { - .name = "s3c", - .irq_ack = s3c_irq_ack, - .irq_mask = s3c_irq_mask, - .irq_unmask = s3c_irq_unmask, - .irq_set_wake = s3c_irq_wake -}; - static int s3c_irqext_type_set(void __iomem *gpcon_reg, void __iomem *extint_reg, unsigned long gpcon_offset, @@ -299,17 +277,16 @@ static struct irq_chip s3c_irq_eint0t4 = { .irq_set_type = s3c_irqext0_type, }; -/* used for UARTs */ -static struct irq_chip s3c_irq_sublevel_chip = { - .name = "s3c-sublevel", +struct irq_chip s3c_irq_chip = { + .name = "s3c", + .irq_ack = s3c_irq_ack, .irq_mask = s3c_irq_mask, .irq_unmask = s3c_irq_unmask, - .irq_ack = s3c_irq_maskack, + .irq_set_wake = s3c_irq_wake }; -/* used for ADC and Touchscreen */ -static struct irq_chip s3c_irq_subedge_chip = { - .name = "s3c-subedge", +static struct irq_chip s3c_irq_general_chip = { + .name = "s3c-general", .irq_mask = s3c_irq_mask, .irq_unmask = s3c_irq_unmask, .irq_ack = s3c_irq_ack, @@ -412,7 +389,7 @@ static int s3c24xx_irq_map(struct irq_domain *h, unsigned int virq, case S3C_IRQTYPE_EDGE: if (irq_data->parent_irq || intc->reg_pending == S3C2416_SRCPND2) - irq_set_chip_and_handler(virq, &s3c_irq_subedge_chip, + irq_set_chip_and_handler(virq, &s3c_irq_general_chip, handle_edge_irq); else irq_set_chip_and_handler(virq, &s3c_irq_chip, @@ -420,10 +397,10 @@ static int s3c24xx_irq_map(struct irq_domain *h, unsigned int virq, break; case S3C_IRQTYPE_LEVEL: if (irq_data->parent_irq) - irq_set_chip_and_handler(virq, &s3c_irq_sublevel_chip, + irq_set_chip_and_handler(virq, &s3c_irq_general_chip, handle_level_irq); else - irq_set_chip_and_handler(virq, &s3c_irq_level_chip, + irq_set_chip_and_handler(virq, &s3c_irq_chip, handle_level_irq); break; default: