Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2645616ybv; Mon, 24 Feb 2020 08:57:42 -0800 (PST) X-Google-Smtp-Source: APXvYqwCziFUxxBhAxoZZlUd3K6o3UctkPgD/3I/7clsAQLSsjK0Zo/HfznjH46YWadCpRKfjFJh X-Received: by 2002:a05:6830:2015:: with SMTP id e21mr39843699otp.106.1582563462362; Mon, 24 Feb 2020 08:57:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582563462; cv=none; d=google.com; s=arc-20160816; b=Fgj1NrW3VmIVulTU36iPHInl5whkVtjcTHwkqOlxJjHJ44C9NQH+3z27SCFpWZFh7i SzIJ8lLjdYgP+BHil3B2nGmzuBb75AY8DSsMTu4Fu/d+JNW34OLHIl3mZeL+awKJyqP0 KTH1wMck2q0wAGg3hCgg38W7IF3qfGcY/bnYIsHmzlbbhEa40ZQ2K4JsJuOuCMkJSHat hhAMRG2AJdJfi1XsjiMNKn1AEBgXshQBPgzqTEePi/nkxBe/doQtkl12qy2k3jzTONaR 6x1xsYhqji4OTMwae4wF7vxOHvE3vuQRCNVovnKbee1LjHnSw3hV9PBh6rZIw8BnTdo1 h5iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=BwVm0kTdxw6SztrrqbyUEhatN7pPXBUcSggw5yxKlJc=; b=W7lYNknJReIOSLHwLLZ/EjUVYq8ZfHh2i92Xf36z36jpcdAOlmqTVvlhjwrp6/akuW gw+G0vulHfFHjr1C/tysA5nhX3mXRlGbMUs+hvfe3HBTMMQICojQ3q/XoCvaOSn2isQY WxkxFReHcsu2M5Rq9i86J/Vkfz24zDoloMX3k27R0+HiS5xT5joW1jA2no7mS0nE+cYC JNmzYippHc8VZ0suf89EugbhJ6EsyWXQYZez6R/eGaH//LHDD90NL0VGKrplCVo9agnh /Y3ivB6w0+OBR8sShKCgXYPz+JdZQRJMeSgPd2SZtpbzojRFZq2e6ILLg6zo/r35AI+7 ttOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=p682gilM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si5023293oig.25.2020.02.24.08.57.30; Mon, 24 Feb 2020 08:57:42 -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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=p682gilM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727940AbgBXQ5U (ORCPT + 99 others); Mon, 24 Feb 2020 11:57:20 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:6763 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727405AbgBXQ5U (ORCPT ); Mon, 24 Feb 2020 11:57:20 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 24 Feb 2020 08:57:06 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 24 Feb 2020 08:57:19 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 24 Feb 2020 08:57:19 -0800 Received: from [10.25.75.13] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 24 Feb 2020 16:57:15 +0000 Subject: Re: [PATCH V3 4/5] PCI: dwc: Add API to notify core initialization completion To: Lorenzo Pieralisi CC: , , , , , , , , , , , , 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> <20200224143218.GC15614@e121166-lin.cambridge.arm.com> X-Nvconfidentiality: public From: Vidya Sagar Message-ID: <8ed75fb3-e5d8-7f7b-3c1b-4fd4d1de348d@nvidia.com> Date: Mon, 24 Feb 2020 22:27:12 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200224143218.GC15614@e121166-lin.cambridge.arm.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1582563426; bh=BwVm0kTdxw6SztrrqbyUEhatN7pPXBUcSggw5yxKlJc=; h=X-PGP-Universal:Subject:To:CC:References:X-Nvconfidentiality:From: Message-ID:Date:User-Agent:MIME-Version:In-Reply-To: X-Originating-IP:X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=p682gilM9Yg/5prBLRD8RMd/ZIVZWGzYSRsGYSYJ45ycnioqJzuax1N7FrzjCNpTV aPAQ2fEFcotpLbfrUgR8IC543uU7CK+ngO/ZatgCpbnWdjYi4DoXYbUNSri1XcatJQ ou14sX+ANVevM/QXL2TokvE0qkIAz/WXEF7ggSgY7MWzHQNugZ0egWkaYzppcY7Joi Vm7KPEEBRFA9HIO+kCOl6A2MTgXYaGnnrmdbv1gdkRNCpfSjzifSPts9orGZ95pbl3 G3ka2GJovUMkj+PuCfk6o+/fYG8h5d37FvRc62U6IVPbglIzB5MDT+PmGO7itIIRwn OYk88FCFTxTcQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/24/2020 8:02 PM, Lorenzo Pieralisi wrote: > External email: Use caution opening links or attachments > > > 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'll get the Ack from Thierry. BTW, my Tegra change series applies cleanly on top of this series. Do I still need to repost them? > > 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. This is inline with other API dw_pcie_ep_linkup() for which this notification mechanism is used. Thanks, Vidya Sagar > > 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 >>>>