Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758215Ab3D2OEx (ORCPT ); Mon, 29 Apr 2013 10:04:53 -0400 Received: from mail.free-electrons.com ([94.23.35.102]:49702 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758190Ab3D2OEu (ORCPT ); Mon, 29 Apr 2013 10:04:50 -0400 From: Maxime Ripard To: Shawn Guo Cc: linux-arm-kernel@lists.infradead.org, Maxime Ripard , Russell King , linux-kernel@vger.kernel.org Subject: [PATCH] mxs: icoll: Add function to register an interrupt as FIQ source Date: Mon, 29 Apr 2013 15:58:37 +0200 Message-Id: <1367243917-5177-1-git-send-email-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 1.8.1.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1680 Lines: 54 MXS, unlike other ARM platforms, has no way to make a FIQ from an interrupt from a driver, without poking directly into the icoll. Add an exported function to do this. Signed-off-by: Maxime Ripard --- arch/arm/mach-mxs/icoll.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/mach-mxs/icoll.c b/arch/arm/mach-mxs/icoll.c index 8fb23af..1bb16da 100644 --- a/arch/arm/mach-mxs/icoll.c +++ b/arch/arm/mach-mxs/icoll.c @@ -16,6 +16,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include #include #include #include @@ -34,6 +35,7 @@ #define HW_ICOLL_INTERRUPTn_SET(n) (0x0124 + (n) * 0x10) #define HW_ICOLL_INTERRUPTn_CLR(n) (0x0128 + (n) * 0x10) #define BM_ICOLL_INTERRUPTn_ENABLE 0x00000004 +#define BM_ICOLL_INTERRUPTn_FIQ_ENABLE 0x00000010 #define BV_ICOLL_LEVELACK_IRQLEVELACK__LEVEL0 0x1 #define ICOLL_NUM_IRQS 128 @@ -41,6 +43,15 @@ static void __iomem *icoll_base = MXS_IO_ADDRESS(MXS_ICOLL_BASE_ADDR); static struct irq_domain *icoll_domain; +void mxs_icoll_set_irq_fiq(unsigned int irq) +{ + struct irq_data *d = irq_get_irq_data(irq); + + __raw_writel(BM_ICOLL_INTERRUPTn_FIQ_ENABLE, + icoll_base + HW_ICOLL_INTERRUPTn_SET(d->hwirq)); +} +EXPORT_SYMBOL(mxs_icoll_set_irq_fiq); + static void icoll_ack_irq(struct irq_data *d) { /* -- 1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/