Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp555870imm; Fri, 28 Sep 2018 03:05:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV60u9153u1J+bipKUmew6WR+YEfdmD0d6ACIQgo8SdivcE+XEC2LBo0clv0pOaXmHoJnSzvO X-Received: by 2002:a17:902:784a:: with SMTP id e10-v6mr15476313pln.197.1538129130823; Fri, 28 Sep 2018 03:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538129130; cv=none; d=google.com; s=arc-20160816; b=Ew0pijX8QWEIthn/w527XXmy5L6KPSVdgnZJq19MAfdlJbfjZEvMQ/9lJFEOXbqNlB rjDlHr/6nA8LN74wK89+3hPEjQG6LNrac8C48daDZ5GRLLd9HaV3ol9GSEKvnxzrXk0u zFZtuwwGfoCVeMR3iRz1c8KSOzhBMdL7gl2/1S1BKRd3crjpfYb+fuTndcTQxhza5Io+ QMPKRdDc45EL6zJS12g40oPbd5gQzcMHvcahqoHhM9R+kVgaQp7Sx5E2RLmfMB0k8thz +/iDL9G7a/EhUp6WXdj7YNj4Jb3pws8rPbVuXlnQS0HBMPA37zlz66IrcoZqRt7twmgK uAEQ== 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=Qlwd13wcP2wigyQMRu0YHQBn6pwUFwhk6a+E7FzZFKk=; b=r69O5rfIMYju7g6uuAiz9YY5iu/IPsAFHiOXCpHt0cFNkNXt/gw2FY59YIRtfmaGeD kuqHtp91NXWjT8Cfz8PS8TYObVKl6RmqLeJrGPI+HO+vUxPrYIKbeDYz21foNw+5ane2 PhpPsYBMx5//hcF6gXkSwgFGNokX7iY2z82bKf58BlK9U7g9qWjfmoMONoZEk6nInqxE 4/KuUEKU0cPkndOyk1W1E212v0YuUjAWOQiRDta+/vPmF4ByU4THe2sTP6VSuXzOzZY7 pCX+NOFFObdBPSWhUQWion3wzxz8ZrGjIlfTX2vRmo+SZat8JrpmxkCQKTijLt2Enz3i nlag== 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 77-v6si5018225pfu.154.2018.09.28.03.05.14; Fri, 28 Sep 2018 03:05:30 -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 S1729423AbeI1Q16 (ORCPT + 99 others); Fri, 28 Sep 2018 12:27:58 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:15419 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729286AbeI1Q15 (ORCPT ); Fri, 28 Sep 2018 12:27:57 -0400 X-UUID: 763170b4b0dc453c8e608c341ff2e1b2-20180928 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 591704987; Fri, 28 Sep 2018 18:04:52 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 28 Sep 2018 18:04:50 +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; Fri, 28 Sep 2018 18:04:49 +0800 From: To: , , , , , , CC: , , , , , , , , , Subject: [PATCH v5 8/9] PCI: mediatek: Save the GIC IRQ in mtk_pcie_port Date: Fri, 28 Sep 2018 18:04:39 +0800 Message-ID: <1538129080-8206-9-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1538129080-8206-1-git-send-email-honghui.zhang@mediatek.com> References: <1538129080-8206-1-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 947A56C0B4B7B8E09C60703DC9F1C92F7F1961DABBD27288AC2CD77BCB3F36872000:8 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 bd1bde3..d35890c 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; @@ -624,7 +626,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) { @@ -632,8 +634,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