Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1604845ybc; Wed, 13 Nov 2019 01:13:21 -0800 (PST) X-Google-Smtp-Source: APXvYqz6UgqnXd3AD0d8WeaBM3IimrIWgOskwV1k64VAFKgPBAzmwVMHqhF2tI71zUsPTvewdrrx X-Received: by 2002:aa7:c39a:: with SMTP id k26mr2351705edq.128.1573636401356; Wed, 13 Nov 2019 01:13:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573636401; cv=none; d=google.com; s=arc-20160816; b=TfQxEQxsbQOXY+HoQ4IZXgx7c+IaRWcsBxOYZTe/++NDuU0bN3x0CQ4l+rNgHfcvPX K8dObBCgpZPO8SPVtFkb8rthPqf7g0NlBo86ww1QceoId/Fv0NH0bG7BdZwbjh5eDBX4 MXRkL2EumAK+T081dKu+xtE5JJ/AzaHK9rj+uVsB3yzNmgytd2h4vE8zUjywC90M9Exq izW38FrA3OZGMSOwwXF6xzcely+IKJEM5bpuaFwMRq4L9g7DjPV2tN0tjQ3W7MCHNpaa eLgRDVVzT4Ih/AeIh2VHyG30KB340hihn1zu3YIyl4E7t9lCs2chsArPiob814164UjD wsAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=JkeNaPfCuo2cwfh+tW4stGIdSKJ0SABy1KQ6fcPdVVI=; b=XS1CjtYedx6XtIT62drou7rVXCs3A1nUz7Ys7KJhV6OzqpnWXIFVQoDd7+sogA41EM HnmSHS/TweeM3ZTmpUCKo65z5ZjI+4kDCwgn4xV4IwKU3xuSm6rCbQTjiqhTY3aMDyC/ Oh9H4s5NCIm1Xal/n6Ce1G9HnLovxo5Z+FdVLYqeI3SiRDr5GWehrvLTAbcvEy19kqyw k54hQilBIAqW5UGTxrUzvNer7yRlVZenmKYnQfBBEkmP0XU5lnCU5ADhJi8dhkTnszsp eQfaOEg3NFBSdIqN6sNzztuwimyLO2SqLrozFo3Wh2nyY2AttQRHbDKFgA+ecs2bwyNY 2xEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=R6khcFZu; 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 j16si927706eda.161.2019.11.13.01.12.56; Wed, 13 Nov 2019 01:13:21 -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=R6khcFZu; 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 S1727366AbfKMJJS (ORCPT + 99 others); Wed, 13 Nov 2019 04:09:18 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:18397 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbfKMJJP (ORCPT ); Wed, 13 Nov 2019 04:09:15 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 13 Nov 2019 01:08:19 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 13 Nov 2019 01:09:15 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 13 Nov 2019 01:09:15 -0800 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 13 Nov 2019 09:09:14 +0000 Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 13 Nov 2019 09:09:15 +0000 Received: from vidyas-desktop.nvidia.com (Not Verified[10.24.37.38]) by hqnvemgw03.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Wed, 13 Nov 2019 01:09:14 -0800 From: Vidya Sagar To: , , , , , , CC: , , , , , , , Subject: [PATCH 3/4] PCI: dwc: Add API to notify core initialization completion Date: Wed, 13 Nov 2019 14:38:50 +0530 Message-ID: <20191113090851.26345-4-vidyas@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191113090851.26345-1-vidyas@nvidia.com> References: <20191113090851.26345-1-vidyas@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1573636099; bh=JkeNaPfCuo2cwfh+tW4stGIdSKJ0SABy1KQ6fcPdVVI=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=R6khcFZu8N36RWzLvQ95VBTDFQ1aa1n0hCmBkWzEJJfNwWioMAyoU8ry5E7S68VfG Gs2TRbD+m/H5VPt7EDvM3psWm/KNErsev5Zk4KuibiPO2H69PXDi1GqM7ebhnKdfRo twFU9Eo+KfwQP3bHBjzlPMp6fpF668LBFBAmqrXMzlqFTFK03CROzN6EEkolJ33NAB tneW7AHTrxugdYnpNwr32hueewwiz4Kv0Y8in4aqi95/zbh3BvenhTmOhmB6uvbzjL /a7iGkkm6GpQ7fypp6wMjJDqRMY480LWo20GbX5zDGNG/a4RK4HYZ+Frb4q/xl5ZeX UzwS+uCptsukg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 06f4379be8a3..1355e1d4d426 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); +} + 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 340783e9032e..f62c5bae6b2d 100644 --- a/drivers/pci/controller/dwc/pcie-designware.h +++ b/drivers/pci/controller/dwc/pcie-designware.h @@ -400,6 +400,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, @@ -422,6 +423,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