From patchwork Thu Mar 25 09:00:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 12163507 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C56A2C433C1 for ; Thu, 25 Mar 2021 09:05:03 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5999861A0E for ; Thu, 25 Mar 2021 09:05:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5999861A0E Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zMdgKKd6hvQVNiJ7GrX5St9pVspZcf7hjf/V6eVkaIQ=; b=IF/GephBayhLWH/9lBLVnFr3f spijkYfk9I7xH16fbTBqg5tR+wQdF1emyQG2jz3hAMe0Jiluw0RGEQLMF4cprcdufMQGwtv/ASdhg 9Ex7q6gcQSdrCphQNSIm2KcxPxsP0qvL5wyUj0fVQ+RkIIbtcTD7Uv8uiVnzp6mNCmpwUVTdNhjjM vQDAc5LhyHs2G4ieC+8CSVzEDHQ4gFJ5DQTUcTBbNVw5sTjkgpojwl0G41XwVCeagoWWzMpNMjw0j Q3DRjdIrOgmp5FUUKDlwy3+P2pG7C5gRn3f0O+myohw8RQgcYK4OPLZUl2ue+v56LaTIlYAxcGpfl Oyi1TUXuw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lPLsS-001052-VU; Thu, 25 Mar 2021 09:02:05 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lPLrG-000zms-9x for linux-arm-kernel@lists.infradead.org; Thu, 25 Mar 2021 09:00:53 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 12P90ieq035055; Thu, 25 Mar 2021 04:00:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1616662844; bh=abH1W5WXyijsp3MpriPtz1CV3oRWfYGjXmRCI8jXfHw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=lM2KiiKkp96TVlEqMMbEPuTxv1ikOMSktPK+iUxy7v6cTZe+/WmWXoNBpBOyhe6Iz EYULf55yXukDGF1q2ZgKSIlnqUlD6itch/SmschQGS1mUduTrDk+52igdtxJ97V5Se bGvk9FuxEPzRnUd6FsRl1PS/Cj+dL2RNvsPhHBqs= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 12P90imA008768 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 25 Mar 2021 04:00:44 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 25 Mar 2021 04:00:44 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Thu, 25 Mar 2021 04:00:44 -0500 Received: from a0393678-ssd.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 12P90RkA115556; Thu, 25 Mar 2021 04:00:40 -0500 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Bjorn Helgaas , Rob Herring , Lorenzo Pieralisi , Marc Zyngier CC: , , , , Lokesh Vutla Subject: [PATCH 3/6] irqdomain: Export of_phandle_args_to_fwspec() Date: Thu, 25 Mar 2021 14:30:23 +0530 Message-ID: <20210325090026.8843-4-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210325090026.8843-1-kishon@ti.com> References: <20210325090026.8843-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210325_090051_054275_EAD31BA6 X-CRM114-Status: GOOD ( 12.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Export of_phandle_args_to_fwspec() to be used by drivers. of_phandle_args_to_fwspec() can be used by drivers to get irq specifier from device node useful while creating hierarchy domain. This was suggested by Marc Zyngier [1]. [1] -> http://lore.kernel.org/r/20190223121143.14c1f150@why.wild-wind.fr.eu.org/ Signed-off-by: Kishon Vijay Abraham I --- include/linux/irqdomain.h | 2 ++ kernel/irq/irqdomain.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 42d196805f58..0236f508259e 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -391,6 +391,8 @@ extern void irq_domain_associate_many(struct irq_domain *domain, extern unsigned int irq_create_mapping_affinity(struct irq_domain *host, irq_hw_number_t hwirq, const struct irq_affinity_desc *affinity); +void of_phandle_args_to_fwspec(struct device_node *np, const u32 *args, unsigned int count, + struct irq_fwspec *fwspec); extern unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec); extern void irq_dispose_mapping(unsigned int virq); diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 288151393a06..70f050741ab2 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -756,9 +756,8 @@ static int irq_domain_translate(struct irq_domain *d, return 0; } -static void of_phandle_args_to_fwspec(struct device_node *np, const u32 *args, - unsigned int count, - struct irq_fwspec *fwspec) +void of_phandle_args_to_fwspec(struct device_node *np, const u32 *args, unsigned int count, + struct irq_fwspec *fwspec) { int i; @@ -768,6 +767,7 @@ static void of_phandle_args_to_fwspec(struct device_node *np, const u32 *args, for (i = 0; i < count; i++) fwspec->param[i] = args[i]; } +EXPORT_SYMBOL_GPL(of_phandle_args_to_fwspec); unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec) {