Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5171670ybp; Mon, 14 Oct 2019 16:55:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgA74j5TTjhxL5wVNuAknPi0aVFzKtNUQl2yAzaKFRCi9DooLcbZgoPGtGQLFEXDxSUmd/ X-Received: by 2002:aa7:d358:: with SMTP id m24mr30940331edr.204.1571097306738; Mon, 14 Oct 2019 16:55:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571097306; cv=none; d=google.com; s=arc-20160816; b=KkMz2XmixfbpY7zDMv5pHoh+2a7CTcxch7XF74JWnQGtxtJuz/u4QPz11CsMZW4DJM 7MB9QCQe+Iq/KsoYP8/Gqav5UTOAv6SCQL6hcJ+u46XxH+LbIlr4yhJvwdEuPy7aeeRO ftSTtM70ciMnskqmDvfJaiFBjRAGxFIPGMRwAL710MGD0N+HUYupjHmOiZu8L/8Thyxy 0wGcNYfwEBV6Wqrt+DOFwo/v94e6wCnoKYo9HgAGAPzkoScPqKcaeIL3RU/HdhYJ3vYU U8smtL1QaMj8DhyLM3QslAqstBRq9SSdcBzsURDueKfKCfMv0En49CmQvC5t6vedYEU5 rorg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=ZU9nt78Xu7x5FX4MBdfhmBtZ46slywJqmoR2wRLvL1E=; b=1DXzone04EjOxNhzOTDO6CaxHq7vfMkkT50PrmtidbNJ97FsKGmjG8/NkWFMl+5u/K AptKSCXeyIKkWTzKqITZsV4LWouamgyB7PP7YNJIh+tkD3H/bFeTdVEqF144heGiNsdj lAwLqUzh/mQkvpxffAxwqN/aXaZ4pq3vr3U1QyriLemQctScS0CHTj5/C8uoxFM1b64d 9lMx+5l14/6gf/9bSLUAHEARra5z66d9GvD49VVvMz0FXEzvq8KFKRFVYWCbIw+atXyK VjJ7uYy7eAhyPe6JyEdcxUosF8ur8oSB38tQXpddq2HpSfk4j1udm6dn+3fMNWBFCw5i wdMA== 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 c1si12511728edq.250.2019.10.14.16.54.43; Mon, 14 Oct 2019 16:55:06 -0700 (PDT) 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 S2388865AbfJNT3y (ORCPT + 99 others); Mon, 14 Oct 2019 15:29:54 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:46625 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730405AbfJNT3y (ORCPT ); Mon, 14 Oct 2019 15:29:54 -0400 X-Originating-IP: 90.76.216.45 Received: from windsurf.home (lfbn-1-2159-45.w90-76.abo.wanadoo.fr [90.76.216.45]) (Authenticated sender: thomas.petazzoni@bootlin.com) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id CA804FF808; Mon, 14 Oct 2019 19:29:39 +0000 (UTC) Date: Mon, 14 Oct 2019 21:29:38 +0200 From: Thomas Petazzoni To: Remi Pommarel Cc: Lorenzo Pieralisi , Bjorn Helgaas , Ellie Reeves , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] PCI: aardvark: Wait for endpoint to be ready before training link Message-ID: <20191014212938.14516102@windsurf.home> In-Reply-To: <20190522213351.21366-2-repk@triplefau.lt> References: <20190522213351.21366-2-repk@triplefau.lt> Organization: Bootlin X-Mailer: Claws Mail 3.17.4git47 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Remi, On Wed, 22 May 2019 23:33:50 +0200 Remi Pommarel wrote: > When configuring pcie reset pin from gpio (e.g. initially set by > u-boot) to pcie function this pin goes low for a brief moment > asserting the PERST# signal. Thus connected device enters fundamental > reset process and link configuration can only begin after a minimal > 100ms delay (see [1]). > > Because the pin configuration comes from the "default" pinctrl it is > implicitly configured before the probe callback is called: > > driver_probe_device() > really_probe() > ... > pinctrl_bind_pins() /* Here pin goes from gpio to PCIE reset > function and PERST# is asserted */ > ... > drv->probe() > > [1] "PCI Express Base Specification", REV. 4.0 > PCI Express, February 19 2014, 6.6.1 Conventional Reset > > Signed-off-by: Remi Pommarel It is always a bit annoying to add another 100ms in the boot path, but I don't see an easy alternative solution, so: Acked-by: Thomas Petazzoni Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com