Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3525776imm; Sun, 14 Oct 2018 22:48:18 -0700 (PDT) X-Google-Smtp-Source: ACcGV616hRXLRuM7v40mn8J3l+Q7WPDpKgMsy5Id+05XYVwfvyBeiAhsPbqOwgzPE8V9ZMIp9Kiu X-Received: by 2002:a17:902:ceb:: with SMTP id 98-v6mr16045999plt.331.1539582498307; Sun, 14 Oct 2018 22:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539582498; cv=none; d=google.com; s=arc-20160816; b=S5Ie64IvOzNUt0gXj2LtobNU4ntbgXERfWO4IFaTvhMonxBNE3I0RSyzvPdx3c1CoC 85CdHoYcPehsy5G5GKA3ToVHTvnswV1nFKtXBQAtGsM65tRWmveWlwZ/FrAq7JjTf7s5 ozQDXG4Id951V/uvMwAmQB3WRPad5kw8rG9sfGDydWoGhhXgV73Y/zsmVaEf/3CBQpul oN6Dwm+RC+o3CM6qS2rzHgXaCdXWYXKspCqMkA1YsqiXc8ssUkR3niDU0GR2ch++kFbC 9zzsiVVSDpptIkww+jDc+OeMZIF6J1Dxyszt/6cT/Fru9lf8wpbmgqQf2GHdM5rI5Urh YRrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=u+Yewf0yZbALZSmaffV497b1KH/ZZp5VQ/EzqntXLMw=; b=M5rSvpJD5wLGS27qytACa37DPFN4a0DsmnHAkU5saGQh3134FYHoHcPIUlL3xhHeb3 uFI4f6bc7fOVUZowIzNuclbPYt/C5bFJZICJ90ahQAowSpAupX+NdUy7mLk2od9+QUib A7Xd7yknXM+JYXDuLa4OZcPpCSFjFLRXgzhYj/MeFS2lTXf49KpKhaPl7/OwUHBv1f4y 9yEVj88zSc8HloxnObSrmlguQoJ3TamntE7yUQjKOQ7LB8lgkIPvSwynmVXr1uJm9IEV ftBhwv1P5NFb7HlXxlxwDPTWa9oDyE3fyeAIOnqdRvCBNurRsuKWPUqLLyMt9k5T8720 BwEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b65-v6si10218950pfa.92.2018.10.14.22.48.03; Sun, 14 Oct 2018 22:48:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726766AbeJON2s (ORCPT + 99 others); Mon, 15 Oct 2018 09:28:48 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:48703 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726553AbeJON2r (ORCPT ); Mon, 15 Oct 2018 09:28:47 -0400 X-UUID: 5b197c3fc09b4f3fa1a0016a6fd96ed6-20181015 X-UUID: 5b197c3fc09b4f3fa1a0016a6fd96ed6-20181015 Received: from mtkcas08.mediatek.inc [(172.21.101.126)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 866280829; Mon, 15 Oct 2018 13:44:59 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 15 Oct 2018 13:44:57 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 15 Oct 2018 13:44:56 +0800 From: To: , , , , , , CC: , , , , , , , , , Subject: [PATCH v7 8/9] PCI: mediatek: Save the GIC IRQ in mtk_pcie_port Date: Mon, 15 Oct 2018 13:44:46 +0800 Message-ID: <1539582287-9171-9-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1539582287-9171-1-git-send-email-honghui.zhang@mediatek.com> References: <1539582287-9171-1-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Honghui Zhang Need to save the PCIe's GIC IRQ for dispose_irq, this is a prepare patch for add mediatek PCIe module support to tear down the IRQ, no functional changed. Signed-off-by: Honghui Zhang --- drivers/pci/controller/pcie-mediatek.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c index 42cf2a4..daba78f 100644 --- a/drivers/pci/controller/pcie-mediatek.c +++ b/drivers/pci/controller/pcie-mediatek.c @@ -162,6 +162,7 @@ struct mtk_pcie_soc { * @phy: pointer to PHY control block * @lane: lane count * @slot: port slot + * @irq: GIC irq * @irq_domain: legacy INTx IRQ domain * @inner_domain: inner IRQ domain * @msi_domain: MSI IRQ domain @@ -182,6 +183,7 @@ struct mtk_pcie_port { struct phy *phy; u32 lane; u32 slot; + int irq; struct irq_domain *irq_domain; struct irq_domain *inner_domain; struct irq_domain *msi_domain; @@ -620,7 +622,7 @@ static int mtk_pcie_setup_irq(struct mtk_pcie_port *port, struct mtk_pcie *pcie = port->pcie; struct device *dev = pcie->dev; struct platform_device *pdev = to_platform_device(dev); - int err, irq; + int err; err = mtk_pcie_init_irq_domain(port, node); if (err) { @@ -628,8 +630,9 @@ static int mtk_pcie_setup_irq(struct mtk_pcie_port *port, return err; } - irq = platform_get_irq(pdev, port->slot); - irq_set_chained_handler_and_data(irq, mtk_pcie_intr_handler, port); + port->irq = platform_get_irq(pdev, port->slot); + irq_set_chained_handler_and_data(port->irq, + mtk_pcie_intr_handler, port); return 0; } -- 2.6.4