Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp396310imm; Wed, 11 Jul 2018 04:32:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeEqYh3JFOcCv/+05FbonWiXhG2kqzIJMWR10QprXFzZgEz/uM5BtbYGlGj+zhJHHeTnM+a X-Received: by 2002:aa7:8591:: with SMTP id w17-v6mr29801644pfn.77.1531308764580; Wed, 11 Jul 2018 04:32:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531308764; cv=none; d=google.com; s=arc-20160816; b=f3qbZdaIIvEkuBPirwnx93s8qZZs4vAS8PnPXsIgfjVe2ciYy+cnuerpxAC9xH86HD IGe4gXW89G6tWtrutSZjeHK3ekhAYWzfF54Yk6gTC3pjhYVom3Eb8+UBlg1dICyJLQKU X7rnRNk4EIGDdTVdcixfIDLtLHPGKhJXIWjsKtxfSzDF6/zHfZ6qPv5GlzoNQklkf8OK T3nkKl3y+xy1CFpkaRjhU1V7r/OZESXo+Xiivd+2vtfYV5rmcQ5wadOLScsxpwT5c6kq kSXqr5EBH+Y4X/Xg47z05WLq79PNO3/G6wuc0dJehNvMLwwuKeeE6EiT4FwbLwd857mi /PTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=bqRGuXwRzdofjX0p3BB7A9GSMyNYqIRN+GTWiAq6yNg=; b=xY1CQmEnP3omjlhp4uWVMyf/pLliptvlgmeKkouYp+iHwcfubF6LpR899tp3jJy5UX nD0h5c4LNvKvgTYj5bRhSRAzFP9B1ImdO02S2UsZAw1S5QFFMuv7y94Ot2rtaaOeqTZw MbMktI5C0QlvBt9Gd9VDWg39Gt15Oxp+NKFxHl8qPOJehnR9mClpFMCRDRXFJWKSa8ZS 25hTkinD212R7kijQGMq6THupCLAZe8mxVfd/hmOXTeNmM7oMY3grtnteXLw+/00Hw/E br0AhctW0o2yrNpUHcsJVRrJgfGoJfwi3VRawjAYRhEHfC+2Yh2PpchMZRzrdh7E0Bg8 bfRA== 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 w126-v6si18340428pgb.11.2018.07.11.04.32.29; Wed, 11 Jul 2018 04:32: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 S1733233AbeGKLfZ (ORCPT + 99 others); Wed, 11 Jul 2018 07:35:25 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:33966 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733028AbeGKLfY (ORCPT ); Wed, 11 Jul 2018 07:35:24 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0133B80D; Wed, 11 Jul 2018 04:31:31 -0700 (PDT) Received: from red-moon (unknown [10.1.206.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 36CE63F589; Wed, 11 Jul 2018 04:31:29 -0700 (PDT) Date: Wed, 11 Jul 2018 12:33:23 +0100 From: Lorenzo Pieralisi To: Xiaowei Song Cc: wangbinghui@hisilicon.com, bhelgaas@google.com, robh+dt@kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, suzhuangluan@hisilicon.com, andy.shevchenko@gmail.com, kongfei@hisilicon.com, chenyao11@huawei.com Subject: Re: [PATCH v7 1/1] PCI: kirin: Add MSI support Message-ID: <20180711113323.GA17546@red-moon> References: <20180711080946.14942-1-songxiaowei@hisilicon.com> <20180711080946.14942-2-songxiaowei@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180711080946.14942-2-songxiaowei@hisilicon.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 11, 2018 at 04:09:46PM +0800, Xiaowei Song wrote: > Add support for MSI > > Signed-off-by: Xiaowei Song > Signed-off-by: Yao Chen > --- > drivers/pci/dwc/pcie-kirin.c | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) Applied to pci/dwc for v4.19, thanks. Lorenzo > diff --git a/drivers/pci/dwc/pcie-kirin.c b/drivers/pci/dwc/pcie-kirin.c > index d2970a009eb5..5352e0c3be82 100644 > --- a/drivers/pci/dwc/pcie-kirin.c > +++ b/drivers/pci/dwc/pcie-kirin.c > @@ -430,6 +430,9 @@ static int kirin_pcie_host_init(struct pcie_port *pp) > { > kirin_pcie_establish_link(pp); > > + if (IS_ENABLED(CONFIG_PCI_MSI)) > + dw_pcie_msi_init(pp); > + > return 0; > } > > @@ -445,9 +448,34 @@ static const struct dw_pcie_host_ops kirin_pcie_host_ops = { > .host_init = kirin_pcie_host_init, > }; > > +static int kirin_pcie_add_msi(struct dw_pcie *pci, > + struct platform_device *pdev) > +{ > + int irq; > + > + if (IS_ENABLED(CONFIG_PCI_MSI)) { > + irq = platform_get_irq(pdev, 0); > + if (irq < 0) { > + dev_err(&pdev->dev, > + "failed to get MSI IRQ (%d)\n", irq); > + return irq; > + } > + > + pci->pp.msi_irq = irq; > + } > + > + return 0; > +} > + > static int __init kirin_add_pcie_port(struct dw_pcie *pci, > struct platform_device *pdev) > { > + int ret; > + > + ret = kirin_pcie_add_msi(pci, pdev); > + if (ret) > + return ret; > + > pci->pp.ops = &kirin_pcie_host_ops; > > return dw_pcie_host_init(&pci->pp); > -- > 2.11.GIT >