Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2512828ybv; Mon, 24 Feb 2020 06:36:59 -0800 (PST) X-Google-Smtp-Source: APXvYqxXA74gdtZNwGddn7u/IhxumN1bsg7pLgEwH+bc7lzynszEuIpGVqPvYygdDc9wjqsGIW0+ X-Received: by 2002:a54:4117:: with SMTP id l23mr12335432oic.140.1582555019233; Mon, 24 Feb 2020 06:36:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582555019; cv=none; d=google.com; s=arc-20160816; b=aUZf6BIBqMo4XChtBAfTkUZpaB3W8bixc6aJk+GmyBNRSvJkWw1Kec4dgZlwh/2XBU NDR4Zru6f5ODg2iSRdeRV6GCVkecfXc5L9VaKkJCH1NoEnz4Foc0wrwlXNYDItgZvHCj Bj+vX8OrQJ/FvkgRGo+90N+dpltrJNdLQ3uEvJ7rWXC/b/UA6scxhN9McBs666NGELBH bIme7sb0xOAliC9ZMwcIraJwaO/5BPAnikfgVQPmH+Dn48wJkVKTc3BZ5iUFcWRZrpJ2 wnRmcMk2k6fqYUfvKiTHwK8vJkXJFQZSCrBOpaOOh33oRp4c9OdWRaiqM+cDCNf8JCot wAGQ== 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; bh=Tni3d2p9wWK/sQNrR95WE1an/1PB2g4Fu/QezKfN8kc=; b=qdylHnsGPUudEwC5ClNkfni31MPSI5w8EDMbg2JYzo6gZPoaUHanuDZJl65NaI3y7r BX29BXXUA4hQqCMnDROcD4ealThR47wfe0A78lP5DXiGYp0izAcI/JBWVodn3pCrbcGA oKtEUSzwWzSH/YGrKTsN5BgKt8WYegVGx08a0cO1EP4pbr39o9jtw1BtC9xwzmge+2G1 AUbLbLv6xKB9ZumN8wHI82wsVuEfKVjZyrnug86kNFe2PKH8gs1QSaBBumoBKG5PtkDg a0Ui3jiffzHSRKkK3Dw4jdgZpX3YIGSvT2Oogcd+FTZRbN4RFen1Yb3PLGG/UhOYLZ3I QR1g== 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 g4si5083928oib.152.2020.02.24.06.36.46; Mon, 24 Feb 2020 06:36:59 -0800 (PST) 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 S1727727AbgBXOcX (ORCPT + 99 others); Mon, 24 Feb 2020 09:32:23 -0500 Received: from foss.arm.com ([217.140.110.172]:37972 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727709AbgBXOcX (ORCPT ); Mon, 24 Feb 2020 09:32:23 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A0F5630E; Mon, 24 Feb 2020 06:32:22 -0800 (PST) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D5A413F534; Mon, 24 Feb 2020 06:32:20 -0800 (PST) Date: Mon, 24 Feb 2020 14:32:18 +0000 From: Lorenzo Pieralisi To: Vidya Sagar Cc: jingoohan1@gmail.com, gustavo.pimentel@synopsys.com, andrew.murray@arm.com, bhelgaas@google.com, kishon@ti.com, thierry.reding@gmail.com, Jisheng.Zhang@synaptics.com, jonathanh@nvidia.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kthota@nvidia.com, mmaddireddy@nvidia.com, sagar.tv@gmail.com Subject: Re: [PATCH V3 4/5] PCI: dwc: Add API to notify core initialization completion Message-ID: <20200224143218.GC15614@e121166-lin.cambridge.arm.com> References: <20200217121036.3057-1-vidyas@nvidia.com> <20200217121036.3057-5-vidyas@nvidia.com> <20200224113217.GA11120@e121166-lin.cambridge.arm.com> <77748536-4f9a-1357-8180-91c1da2e912e@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <77748536-4f9a-1357-8180-91c1da2e912e@nvidia.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 24, 2020 at 05:50:26PM +0530, Vidya Sagar wrote: > > > On 2/24/2020 5:02 PM, Lorenzo Pieralisi wrote: > > External email: Use caution opening links or attachments > > > > > > On Mon, Feb 17, 2020 at 05:40:35PM +0530, Vidya Sagar wrote: > > > Add a new API dw_pcie_ep_init_notify() to let platform drivers > > > call it when the core is available for initialization. > > > > > > Signed-off-by: Vidya Sagar > > > Acked-by: Kishon Vijay Abraham I > > > --- > > > V3: > > > * Added Acked-by: Kishon Vijay Abraham I > > > > > > V2: > > > * None > > > > > > drivers/pci/controller/dwc/pcie-designware-ep.c | 7 +++++++ > > > drivers/pci/controller/dwc/pcie-designware.h | 5 +++++ > > > 2 files changed, 12 insertions(+) > > > > > > diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c > > > index 84a102df9f62..dfbb806c25bf 100644 > > > --- a/drivers/pci/controller/dwc/pcie-designware-ep.c > > > +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c > > > @@ -19,6 +19,13 @@ void dw_pcie_ep_linkup(struct dw_pcie_ep *ep) > > > pci_epc_linkup(epc); > > > } > > > > > > +void dw_pcie_ep_init_notify(struct dw_pcie_ep *ep) > > > +{ > > > + struct pci_epc *epc = ep->epc; > > > + > > > + pci_epc_init_notify(epc); > > > +} > > > > Do we really need this wrapper ? I would drop this code and I would > > appreciate if you could post tegra changes benefiting from this > > series, at the moment I don't see any user of this newly added > > infrastructure. > I've posted that series also for review > @ http://patchwork.ozlabs.org/project/linux-pci/list/?series=152889 > Sorry if I have to create explicit dependency by some means. I'm not > aware of that and would like to know if that exists. All that I did was > to mention this as a dependency for the other (Tegra change) series. No worries - I just want to merge code that is actually used, I assume the series above should be reposted right ? You need an ACK from Thierry for it and we can merge the whole thing on top of Kishon's patches. I was just referring to the wrapper above, it does not seem very useful given that we can call pci_epc_init_notify() directly, please correct me if I am wrong, there does not seem to be anything DWC specific (at least for the time being) in the _notify() hook. Thanks, Lorenzo > > Thanks, > Vidya Sagar > > > > > Thanks, > > Lorenzo > > > > > static void __dw_pcie_ep_reset_bar(struct dw_pcie *pci, enum pci_barno bar, > > > int flags) > > > { > > > diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h > > > index b67b7f756bc2..aa98fbd50807 100644 > > > --- a/drivers/pci/controller/dwc/pcie-designware.h > > > +++ b/drivers/pci/controller/dwc/pcie-designware.h > > > @@ -412,6 +412,7 @@ static inline int dw_pcie_allocate_domains(struct pcie_port *pp) > > > void dw_pcie_ep_linkup(struct dw_pcie_ep *ep); > > > int dw_pcie_ep_init(struct dw_pcie_ep *ep); > > > int dw_pcie_ep_init_complete(struct dw_pcie_ep *ep); > > > +void dw_pcie_ep_init_notify(struct dw_pcie_ep *ep); > > > void dw_pcie_ep_exit(struct dw_pcie_ep *ep); > > > int dw_pcie_ep_raise_legacy_irq(struct dw_pcie_ep *ep, u8 func_no); > > > int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 func_no, > > > @@ -434,6 +435,10 @@ static inline int dw_pcie_ep_init_complete(struct dw_pcie_ep *ep) > > > return 0; > > > } > > > > > > +static inline void dw_pcie_ep_init_notify(struct dw_pcie_ep *ep) > > > +{ > > > +} > > > + > > > static inline void dw_pcie_ep_exit(struct dw_pcie_ep *ep) > > > { > > > } > > > -- > > > 2.17.1 > > >