Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3631362imm; Mon, 15 Oct 2018 01:11:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV61RO8Qkst31Bzz+rwLMchuWQxFMOghBXJRu8z3mu0Yr5TfVHJ8wOF5ON9RmZMhDHDRKghqh X-Received: by 2002:a17:902:768b:: with SMTP id m11-v6mr16106421pll.163.1539591093864; Mon, 15 Oct 2018 01:11:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539591093; cv=none; d=google.com; s=arc-20160816; b=d6VIxzA5EEjinR0SXa1P8j0KN75qHeZC+owqBDpZLST5Lbd3NU2N7pcAOS0i4WjlZd UFh1xnFUHruZVqy0z+4/YLCrLFh67cEOJBTimrJN60MQCMQTnA3EhljMmnoc9Tu9n0OQ 3EFkgBJstwjDor2E0ErH+8qfJT9WsS90596KjLepNDVV6iuUC00BM0JImjcrAItpdsEj 7R4IXYmKjQzFGxbz0Z3INnEVLpWYA66hEC3Xqtep3NsJ3ypsSY3mY32pe+OKc/iDv+ju IPYRBQXh9gpdgUoyeldYeWCPk1Qb16tujt3fbGmlOpy/kcbcHG9LfjTMZ2PbXl0Lw/X5 7SaA== 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=2eLYm+Pudv7FWbpIuM9mevyZBkswszV2o2lnOwmuJk0=; b=iPkhm9PWt4igIPO2nKxzwTCNaZHotj2V8AoscLaOVkX+lZqIVW3Umwioq/A2nVVMfE iO1telIwMo8j+tBeSrQ1YP1duPtn+A71yyNxJ41l0lVEIjkxfHFfnVNn/nM7wFcd8V/l 6rwD3B0SvPW7+KGc+Pf8vV3WPQ6tOaIoWJRAKZaN9HwEDcU97kvCmL1Zo9dis2Yz5OPZ FwVIXgyD34Ue4h/T9je3OyyO8Ne24ImZWGxwsvefQYyuI6awFq62NbSWF+yON848uMLD v/6Jg11S0t3UMI973G/mcuIG+xXNj98VsaDJ0aHEa7A+57zKUF8KV6LVUDDaankp16zg MIHA== 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 r68-v6si10063882pfa.15.2018.10.15.01.11.19; Mon, 15 Oct 2018 01:11:33 -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 S1726923AbeJOPxc (ORCPT + 99 others); Mon, 15 Oct 2018 11:53:32 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:5739 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726764AbeJOPxb (ORCPT ); Mon, 15 Oct 2018 11:53:31 -0400 X-UUID: b976cc221a1146d2850bc604aa247955-20181015 X-UUID: b976cc221a1146d2850bc604aa247955-20181015 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1885654133; Mon, 15 Oct 2018 16:09:13 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 15 Oct 2018 16:09:11 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 15 Oct 2018 16:09:10 +0800 From: To: , , , , , , CC: , , , , , , , , , , Subject: [PATCH v8 8/9] PCI: mediatek: Save the GIC IRQ in mtk_pcie_port Date: Mon, 15 Oct 2018 16:08:59 +0800 Message-ID: <1539590940-13355-9-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1539590940-13355-1-git-send-email-honghui.zhang@mediatek.com> References: <1539590940-13355-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 Acked-by: Ryder Lee --- 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