Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18430115ybl; Fri, 3 Jan 2020 02:08:58 -0800 (PST) X-Google-Smtp-Source: APXvYqx6c7XTRMo9g/I3SnyCEbCWvI9s3STXRuek5zm6CODNG4cUhDmRpBL+vT/n8Lzxc41SFlTv X-Received: by 2002:a05:6830:1e16:: with SMTP id s22mr85907948otr.340.1578046138636; Fri, 03 Jan 2020 02:08:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578046138; cv=none; d=google.com; s=arc-20160816; b=NXPtA/mDHdwAzKsywSpHiSDENabJg7kRuhUX6xEe1FXdOxJ9KroDAEltaig5i3cwV5 nXdZSb9aZWV5cFkXFnZzhR30PcZF1gJpfelBO38rMSV4iXYvPtrARmZz2R4u/B7tzL4P PIe4b2HgrKHE7bP82Z8XaZB6mWHainOKcYyJ4RxCLJG6YxkQeaCaieLWVWAyoZXuT5iJ DnldRXEyZAXdxpLVkXqL7K7ZTOWuOl0FT9uzQ89n+zSS68Y/LoR2DClRKpfV/9SPH7kD PYL5ECOooVzF5xyrCXo9+64i5WOpvDFkDndEesNpZXiI7vxVwXcuzBp+icCWbFaexUmA Sm3w== 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=dl13GPM9AbiWil3yHZjKpRFuwuDi44Uw7VHC0WTHXtE=; b=kSKDpeZrt0KcH9d2uX9V4R+kHTEEBCDWe844foZozJPk2f35iFdnKa7uSmnUbj7Hz0 tuQ3Y1DYUaws7MjWB0IWKhKLYaslHJXo8CXKHHEiagQ9hggmSj8SaxKrc5Adt8RIl8Oa 2lXQyCTD/ab+YzPo8YReEP3tQZF2wS/t9xl+kKfhjJ772OVTt4xBv8GImyKOOelJ+QGY lk+99hZ8Ap6vR4IbLPpp3WD8PhsgXD/hlhMfwgCcintksAc/G1B8/aOBPxay4Mlf8zM6 cZmyZsLFx0HPcW3xRDtwD9wZsMWcvUX9aEPb+eZaKX809I3FTKkIwZFGMschA8e5nNDW NfZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=AxV8nRlk; 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 c21si31085147oto.176.2020.01.03.02.08.47; Fri, 03 Jan 2020 02:08:58 -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=AxV8nRlk; 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 S1727533AbgACKH5 (ORCPT + 99 others); Fri, 3 Jan 2020 05:07:57 -0500 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:10104 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727221AbgACKHy (ORCPT ); Fri, 3 Jan 2020 05:07:54 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 03 Jan 2020 02:07:37 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 03 Jan 2020 02:07:53 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 03 Jan 2020 02:07:53 -0800 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 3 Jan 2020 10:07:44 +0000 Received: from rnnvemgw01.nvidia.com (10.128.109.123) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Fri, 3 Jan 2020 10:07:44 +0000 Received: from vidyas-desktop.nvidia.com (Not Verified[10.24.37.48]) by rnnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Fri, 03 Jan 2020 02:07:43 -0800 From: Vidya Sagar To: , , , , , , CC: , , , , , , , Subject: [PATCH V2 0/5] Add support to defer core initialization Date: Fri, 3 Jan 2020 15:37:31 +0530 Message-ID: <20200103100736.27627-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=1578046057; bh=dl13GPM9AbiWil3yHZjKpRFuwuDi44Uw7VHC0WTHXtE=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: X-NVConfidentiality:MIME-Version:Content-Type; b=AxV8nRlk6FlZdSKu2lEQ1a7Lokso0TbKcNSb+dCY2dmk2PWpxjn6qXmEfDO3//037 eF+5PIDe9c2zH6kPCJI90nfCKmnQz34hpmKsaqzeNIez8F2V/n6/s/XwpdXok/Lpl3 4rCeJXzV3/6YUY1nfbbZl7hPnvOkzxek/OfGUkNdSIvJ+oQFXMnCPCnKQ5Q1XEOjzj hTHTi+xQSTv7Dd+J/0uV+r5MO1FacFEPMzVoox6Ee6YsoCtObYBwhGiRhS4byt3qPO XLZAO9eTSGUOdb9ti2pk4qx/oSMEJK+i37T1w+M+6Jnpew8FlLd9W/riCdWfEm8pu7 RmrxPwwniAvAQ== 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/1109884/ 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