From patchwork Thu May 29 22:40:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 4267831 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 D9B7D9F37E for ; Thu, 29 May 2014 22:43:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1C8322035D for ; Thu, 29 May 2014 22:43:45 +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 5F04C20122 for ; Thu, 29 May 2014 22:43:44 +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 1Wq90Z-0008Nf-I0; Thu, 29 May 2014 22:41:11 +0000 Received: from mail-ob0-x234.google.com ([2607:f8b0:4003:c01::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wq90X-0008LC-Ua for linux-arm-kernel@lists.infradead.org; Thu, 29 May 2014 22:41:10 +0000 Received: by mail-ob0-f180.google.com with SMTP id va2so1014337obc.25 for ; Thu, 29 May 2014 15:40:47 -0700 (PDT) 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=Wx7XqXl3WdDUcsfZvZamsig2BXWO5HrX4wRuCGVQfl0=; b=fAHYeANa7Wfd74/xLymf2DukoWeXLTXfFdfGk35zrX10xHKw7ii3O/eM2X4XN4pQ6I pEpZCdGFcTTNDSItKFEoXJuT77EM+CFTopcZfHGdphwnRi4h+TrY5G5P/2U6j83uIEBQ VHlOsgDqnYwHUcAXBs+8v07CvqqRVvQwrhoX7ECF2LLh7TaXKeJgwMr0/gX8mtQ3ZYn8 wrjW2cJO+n50bhWLFYlF4BiznboHABrAH0VhOOdyRjFBVlNZVpvNFT3ehina3xUFT1r8 7zs8H0LMi4Uq0kDwRUwx4Oy4gqcrCBd0A0WUzXLgizQHYzkk7stI/YB/D4aWQ6l7oxCY O5zw== X-Received: by 10.182.206.113 with SMTP id ln17mr12290617obc.53.1401403247810; Thu, 29 May 2014 15:40:47 -0700 (PDT) Received: from localhost.localdomain (66-90-144-10.dyn.grandenetworks.net. [66.90.144.10]) by mx.google.com with ESMTPSA id tz6sm3528543obc.10.2014.05.29.15.40.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 May 2014 15:40:46 -0700 (PDT) From: Rob Herring To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH v2 02/11] irqchip: versatile-fpga: Add IRQCHIP_DECLARE support Date: Thu, 29 May 2014 17:40:12 -0500 Message-Id: <1401403221-27523-3-git-send-email-robherring2@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1401403221-27523-1-git-send-email-robherring2@gmail.com> References: <1401403221-27523-1-git-send-email-robherring2@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140529_154110_034915_29F96F46 X-CRM114-Status: GOOD ( 12.29 ) X-Spam-Score: 0.1 (/) Cc: Rob Herring , Linus Walleij , arm@kernel.org, Thomas Gleixner , Jason Cooper X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Rob Herring Add support for initialization using IRQCHIP_DECLARE. This also requires that the controller initialization set the handle_irq function pointer itself when it is a primary controller. Signed-off-by: Rob Herring Cc: Thomas Gleixner Cc: Jason Cooper Acked-by: Linus Walleij --- v2: - New patch drivers/irqchip/irq-versatile-fpga.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-versatile-fpga.c b/drivers/irqchip/irq-versatile-fpga.c index 3ae2bb8..8e0bb56 100644 --- a/drivers/irqchip/irq-versatile-fpga.c +++ b/drivers/irqchip/irq-versatile-fpga.c @@ -14,6 +14,8 @@ #include #include +#include "irqchip.h" + #define IRQ_STATUS 0x00 #define IRQ_RAW_STATUS 0x04 #define IRQ_ENABLE_SET 0x08 @@ -201,8 +203,10 @@ int __init fpga_irq_of_init(struct device_node *node, /* Some chips are cascaded from a parent IRQ */ parent_irq = irq_of_parse_and_map(node, 0); - if (!parent_irq) + if (!parent_irq) { + set_handle_irq(fpga_handle_irq); parent_irq = -1; + } fpga_irq_init(base, node->name, 0, parent_irq, valid_mask, node); @@ -211,4 +215,5 @@ int __init fpga_irq_of_init(struct device_node *node, return 0; } +IRQCHIP_DECLARE(arm_fpga, "arm,versatile-fpga-irq", fpga_irq_of_init); #endif