Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5004127imm; Tue, 16 Oct 2018 03:45:59 -0700 (PDT) X-Google-Smtp-Source: ACcGV62g/OybT+l2UCS8TpSPl9C+wRcTiZHGqUfSRrddH87KriyEbeo6LkrLUk3X+VinzBjrdvut X-Received: by 2002:a17:902:6102:: with SMTP id t2-v6mr20389417plj.278.1539686759340; Tue, 16 Oct 2018 03:45:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539686759; cv=none; d=google.com; s=arc-20160816; b=UOOTUe2ixPUEqo//Fyj0COMtr57oZ8QuOzOkx9IobsGs17AloTVbb70xesX70PNkuo eh/yLaBrsJSKLnYrFUt1tbC0yP39mPSDmJtXoNDNrNPqYI5rH+kBijTS4IRaQewqY57W tx7tsyQKZZ1EZu9OPRijNaEMY9tzc37FB9tmc9qV2LQG/N7U19ZhZDFiKF7oQyY6mA+O Z2fYDNYqV+4Au2pg7rrW2a0NxH/p9bcwbZ7dARRiFXoo2ALwcWn7XTvNNxvNf1OOsqUw GgmAeV69SEo7GUOXpoNqYvTWpy1iMsX4VTPWLzHRXIolzjwv7hCpiB4AY1bMGsGTHLaG 1noA== 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=hS2Vcv5aHWT9x8zPe3et0AtQer7WSWwSDBasCDZnvEI=; b=Q/IhG6CFlrSvJKGPWKBPcPrgmKuXfqR6w9UM3onBA5CeFI2kjR9PS0K1F4ooJWdfuR eaJQWzZMy1UAeTv70kesktipRIcYkc0G9ePmYdWH1s02DuCH6gx1UH93C8MqMQyZtG/m TVsTAZ/batncNrzeKqwhPCY0pa9PGctpClgiX5+l9TqI1SlhYSjKPyEIVk+9hPJqwwOu Dal8hb+4q+K3neR4l+UNQAde99xZdJWIeO4uqC1ChHwrJlq4ZYpqLTlzvcbxIObbSHWJ VBig6RURByMLbW3nBMPYaVlw+dTR02OOE/ZdSUytC0bFEAb0Cg4KE7IaPMFQkfyL8is7 0QTw== 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 w19-v6si7071346pgf.197.2018.10.16.03.45.44; Tue, 16 Oct 2018 03:45:59 -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 S1727259AbeJPSfD (ORCPT + 99 others); Tue, 16 Oct 2018 14:35:03 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:21166 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726861AbeJPSfC (ORCPT ); Tue, 16 Oct 2018 14:35:02 -0400 X-UUID: 8389329c96444ae59f7fe6875c30481c-20181016 X-UUID: 8389329c96444ae59f7fe6875c30481c-20181016 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 988359658; Tue, 16 Oct 2018 18:45:07 +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; Tue, 16 Oct 2018 18:45: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; Tue, 16 Oct 2018 18:45:06 +0800 From: To: , , , , , , CC: , , , , , , , , , Subject: [PATCH v9 8/9] PCI: mediatek: Save the GIC IRQ in mtk_pcie_port Date: Tue, 16 Oct 2018 18:44:49 +0800 Message-ID: <1539686690-24068-9-git-send-email-honghui.zhang@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1539686690-24068-1-git-send-email-honghui.zhang@mediatek.com> References: <1539686690-24068-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 cf7e357..7f3b8a0 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