From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752198AbaH2WSX (ORCPT ); Fri, 29 Aug 2014 18:18:23 -0400 Received: from mail-qc0-f202.google.com ([209.85.216.202]:34427 "EHLO mail-qc0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751631AbaH2WOs (ORCPT ); Fri, 29 Aug 2014 18:14:48 -0400 From: Andrew Bresticker To: Ralf Baechle , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala Cc: Andrew Bresticker , Jeffrey Deans , Markos Chandras , Paul Burton , Thomas Gleixner , Jason Cooper , linux-mips@linux-mips.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/12] MIPS: GIC: Implement generic irq_ack/irq_eoi callbacks Date: Fri, 29 Aug 2014 15:14:35 -0700 Message-Id: <1409350479-19108-9-git-send-email-abrestic@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1409350479-19108-1-git-send-email-abrestic@chromium.org> References: <1409350479-19108-1-git-send-email-abrestic@chromium.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Implement a default gic_irq_ack() and gic_finish_irq(). These are suitable for handling IPIs on Malta and the upcoming Danube board. Signed-off-by: Andrew Bresticker --- arch/mips/kernel/irq-gic.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/mips/kernel/irq-gic.c b/arch/mips/kernel/irq-gic.c index 01fcc28..1764b01 100644 --- a/arch/mips/kernel/irq-gic.c +++ b/arch/mips/kernel/irq-gic.c @@ -242,6 +242,20 @@ static void gic_unmask_irq(struct irq_data *d) GIC_SET_INTR_MASK(d->irq - gic_irq_base); } +void __weak gic_irq_ack(struct irq_data *d) +{ + GIC_CLR_INTR_MASK(d->irq - gic_irq_base); + + /* Clear edge detector */ + if (gic_irq_flags[d->irq - gic_irq_base] & GIC_TRIG_EDGE) + GICWRITE(GIC_REG(SHARED, GIC_SH_WEDGE), d->irq - gic_irq_base); +} + +void __weak gic_finish_irq(struct irq_data *d) +{ + GIC_SET_INTR_MASK(d->irq - gic_irq_base); +} + static int gic_set_type(struct irq_data *d, unsigned int type) { unsigned int irq = d->irq - gic_irq_base; -- 2.1.0.rc2.206.gedb03e5