Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4723764ybv; Mon, 17 Feb 2020 04:45:23 -0800 (PST) X-Google-Smtp-Source: APXvYqzotfl7xMAVbwotsKK1OwSXpYu15da8O/E4JFYfzE4ItDIuyL2FrVFsKaUno4ekJ2AVDFZe X-Received: by 2002:a05:6808:249:: with SMTP id m9mr10049062oie.5.1581943523767; Mon, 17 Feb 2020 04:45:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581943523; cv=none; d=google.com; s=arc-20160816; b=c3ZS6Darij5mSiVpqEIUeK1R9nooNBAoT9ZHkU1+fUHs9tUFRXHxkOuLbcmTzUgp/y pP1fA8dTC1I948L02fkLM2PwCkJhOhhKHfZnbmCRzlAZ3QO3Fw6aPZ6VXg9lus6ZW7QB g0DUDJHQ/5RJCZfdIO3etyR4hzLWw1L/H9i41hTbHTxHNMzwbWfRbfRmGgCvGR+eYw3U 3YSGPCnGJVuop1QEU3TWYjzlNpa2Nkgdz7QNBQOyLO6R36AIu54G2hg5A/zZIkajAkuq WLlGr8TKRlXjCv5ZD6gLtGkqWp6vKx9umU1/w2L0nsQgYtiu2aU8OsaIBO578JKBaoa9 ZE5Q== 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:message-id :date:subject:cc:to:from; bh=G+TCTgGYyb/7NJSBkD2cISCV8tcJmRltzI9xyL6GCdk=; b=CcbzKEW+CkaMJ2/CBl+r4a8HEEFmIGbMEq0aUVJLVqNf6PF7s4SXIs0AV2gGv47eXH CzzVM2pfq376uWDezfxZO93M2wk8BnxzvxjNTvtxylvTU61lTrlE7trSFB3C/C5AUk9A lxILv4ei6GSa/GY3075rYsE+uuYTvEk5lf/2F+Mz4Dg+d1GoqUn7J4xuOPtJgMihWT0z lhuqCpqb/sULA/qDfLozSQr31zHcGHRejLKajvJ8eVCVqBxI9C6Z5tP4oMsIkwuC1DGy L/Bt7WZH80vdAtKhS7doeUJwjHRcbwoVp/ft+kBZgUcNnbE3Aph0v/vJkmEESAVzuSDG lBdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=NuCMyIus; 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 i6si164458otj.24.2020.02.17.04.45.12; Mon, 17 Feb 2020 04:45:23 -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=NuCMyIus; 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 S1729623AbgBQMKp (ORCPT + 99 others); Mon, 17 Feb 2020 07:10:45 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:2658 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729049AbgBQMKp (ORCPT ); Mon, 17 Feb 2020 07:10:45 -0500 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 17 Feb 2020 04:10:30 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Mon, 17 Feb 2020 04:10:44 -0800 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Mon, 17 Feb 2020 04:10:44 -0800 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 17 Feb 2020 12:10:44 +0000 Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Mon, 17 Feb 2020 12:10:44 +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 ; Mon, 17 Feb 2020 04:10:43 -0800 From: Vidya Sagar To: , , , , , , CC: , , , , , , , Subject: [PATCH V3 0/5] Add support to defer core initialization Date: Mon, 17 Feb 2020 17:40:31 +0530 Message-ID: <20200217121036.3057-1-vidyas@nvidia.com> X-Mailer: git-send-email 2.17.1 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=1581941430; bh=G+TCTgGYyb/7NJSBkD2cISCV8tcJmRltzI9xyL6GCdk=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: X-NVConfidentiality:MIME-Version:Content-Type; b=NuCMyIusrCLbnT9wJm7UdE+qjLgloFLg6wldtrjn+WeOmYQdtun/nenfC1CdGgikm pl27PMX93crTmwpL1ETwF0GQXnqEYcjR1dXR6iNVMQVdUQm70be5Fhoodq3ymsYJXk L33Cj+nkRwTAHxkGR+EYg+8xB/pTF+6mN0r34wRNQO6Mwgs31PUQUZZPoW/sAJRfom XDg1la8xR9ixrIEZnbmycnXK4dpt87CqT4x8MxZw1dTUutAXrcCw6xTwjAIGTS2FmU I9qgluVg6dHYRfJ9rfRnPYBKWvTc9a6Yk4rBdr9KfVXeF1+lAn/8m6wCGDcz5wty5h AsM0VoNXKXmeA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org EPC/DesignWare core endpoint subsystems assume that the core registers are available always for SW to initialize. But, that may not be the case always. For example, Tegra194 hardware has the core running on a clock that is derived from reference clock that is coming into the endpoint system from host. Hence core is made available asynchronously based on when host system is going for enumeration of devices. To accommodate this kind of hardwares, support is required to defer the core initialization until the respective platform driver informs the EPC/DWC endpoint sub-systems that the core is indeed available for initiaization. This patch series is attempting to add precisely that. This series is based on Kishon's patch that adds notification mechanism support from EPC to EPF @ http://patchwork.ozlabs.org/patch/1236793/ from the series @ http://patchwork.ozlabs.org/project/linux-pci/list/?series=158088 V3: * Rebased this series on top of kishon's new patch series as mentioned above * Added Acked-by: Kishon Vijay Abraham I V2: * Addressed review comments from Kishon Vidya Sagar (5): PCI: endpoint: Add core init notifying feature PCI: dwc: Refactor core initialization code for EP mode PCI: endpoint: Add notification for core init completion PCI: dwc: Add API to notify core initialization completion PCI: pci-epf-test: Add support to defer core initialization .../pci/controller/dwc/pcie-designware-ep.c | 79 +++++++----- drivers/pci/controller/dwc/pcie-designware.h | 11 ++ drivers/pci/endpoint/functions/pci-epf-test.c | 118 ++++++++++++------ drivers/pci/endpoint/pci-epc-core.c | 19 ++- include/linux/pci-epc.h | 2 + include/linux/pci-epf.h | 5 + 6 files changed, 164 insertions(+), 70 deletions(-) -- 2.17.1