Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3105182imm; Sun, 7 Oct 2018 20:25:44 -0700 (PDT) X-Google-Smtp-Source: ACcGV60934yJfni1iHuNuivQMV5nqi3MD8aOCUau21LdG8OAScyYVtSS/NAm4GOKKHRbvWSMSPxN X-Received: by 2002:a17:902:850b:: with SMTP id bj11-v6mr22548173plb.107.1538969144422; Sun, 07 Oct 2018 20:25:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538969144; cv=none; d=google.com; s=arc-20160816; b=jgf+bF/bDMGtz+npVybWQLCHyGyoh2XG6MFMXYOwFcGYB/cliYRWFj4wR1fN27SdvT /yqCO2Wx09KAbUOrchsfurVk2omWiESYH1edElFAqvkL2/YHwPiYVSboi2kB4v+w9MBG hOlmtlX+kyk8ylXac2K8FOUtJ5R85Mb+/0miuSffgncRiPuYt1r9zPWqNHvqdh4BqrCZ 6hRpJkOsKOf9z6P8H1Xq23j9tJPjAoxK97p8B6MghG5QTzA6WXsJID7qCaTRsEm4Xu8V /jKw6KSxx5ussieZG63jiSsVrLxSRkaBIvUblHnEazt8nDPS/wKx4zgOcdlSZ7auasw7 T62w== 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=VkdOiuRuu/6QxXCoKymbz7/ewOCW3L3kjMp2hqSK/YItOWemH7+0ZPsjjeeFD8Cxzz Ru3DGKwcINoccDGT5d1uZi3JEiEFWVvJV9yf0Hd+QGK/gjwr4IvMTNb5+hdJEwPaWgsP mM5vVbOcqy0Yhm30Yc6VNV4OOgEXDe80LivfHvg8qwq0xjjz3uJaO+20Zl3+SsrEkV9t O+Ck4M2Lvq1yUa3TGksXuEn6+g4eKGbNJ+ukJx7vMuyDlLFhIpNMXLhybRlYJRrz1kDk 9TldhtLpdhUFN7Dhiy9F7bRPgmjvBFHZ8FWLZzsffAuHJeUemk7+LDwNRo1806Gdtwba qknA== 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 f9-v6si15877308pgk.594.2018.10.07.20.25.29; Sun, 07 Oct 2018 20:25:44 -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 S1726925AbeJHKeq (ORCPT + 99 others); Mon, 8 Oct 2018 06:34:46 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:3447 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726683AbeJHKep (ORCPT ); Mon, 8 Oct 2018 06:34:45 -0400 X-UUID: 78a58b3df530483aa56bd04397a7858c-20181008 X-UUID: 78a58b3df530483aa56bd04397a7858c-20181008 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 2116882347; Mon, 08 Oct 2018 11:25:08 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 8 Oct 2018 11:25:06 +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, 8 Oct 2018 11:25:05 +0800 From: To: , , , , , , CC: , , , , , , , , , Subject: [PATCH v6 8/9] PCI: mediatek: Save the GIC IRQ in mtk_pcie_port Date: Mon, 8 Oct 2018 11:24:47 +0800 Message-ID: <1538969088-7136-9-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1538969088-7136-1-git-send-email-honghui.zhang@mediatek.com> References: <1538969088-7136-1-git-send-email-honghui.zhang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-SNTS-SMTP: 1C4B1B96B0277A44CA7E984A4C1C52408656F663C334E75092A6005F3FC798292000: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 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