Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3211083lqo; Wed, 15 May 2024 03:11:22 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUzVUJ83HabgPNYDjr9EeAsPyFstH4+jGthYij597UcIHECSeOOZHTzakxDBmOsYzBeoVPmCSYy8HUQYJXLkHo+Gx256NxADbk9FuKtGA== X-Google-Smtp-Source: AGHT+IHX/mQvvjPWBMmUe4m/qQjz+5WlAaLnfhY5V2mKfkDNntGI89/4xUCukoP47wjPvLJ7N+Ba X-Received: by 2002:a05:6a20:158f:b0:1ad:5325:d9b7 with SMTP id adf61e73a8af0-1afde1c5780mr16894720637.52.1715767882518; Wed, 15 May 2024 03:11:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715767882; cv=pass; d=google.com; s=arc-20160816; b=DviU2lfJAIrjo8yZ6atqi/vGY7r59bDF/iNa/66dHCFjral17h4OGRA52yPTiiSbsT gacZ+yVj6rK2IAAiWjfrq1DWbEkPL9UknIDxmU8k+fRGguOfKtgDCc2QqB/O+KoSsFmo rfahO4HhsXiPIhlluUusFSHJuxaYYwF7NCjCSyakXoXs4ystxi671pFY+wW3dUCRrji4 JeuOP4WBsu/tQa5Z863zOe8mxWQWmig7vL/yTVX59CljpiSQRzGhxadWUkwOGt0dSqMV D/PwP75wZJbzE63jhOXsYLn3d/xEUxUPI0XUiMw3MvpSPAMOCJvZbABZ1djqvDTKyHle D32Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=SOtYByFbOq/kD+SHjuSXQZVzJTtVnLBLPoL8nOih1ao=; fh=+6o6d2KGt2ZTSidIuE8uz1q8yt3pK0TjTqozrmclSIs=; b=T8ipiVI2Bphv9wW+FcWtUPzkdQCfPYdfTIynYXplAd1QukRLh2hVL8tDbzoRS08e3K 3AHo/DHZ5KQA6egCQaz3rvHOdfhQuSJQS7SOcjgjyYI/YVU7uNSKP379q/IV6hk/yX5K JySGtFK2cCSt5m2jTPOgqnP3LJdg/FzsUGY+/nosPe9EQP+egBMU9D+d30Ri8yMDYRpV KpDmr0gJE2D86IG16mAEp4RZMM2EUjWJgejrC14JmzzKZgMUucVyAX2N8ayaIiG3f23j 9JJMyf2UOD/J7+HWFfBTIi5dKmjUDlRfTeOiDmXx9fAjlXcdc86/zfWREwTQMXLnrCw4 a99g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UiqFlvbH; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-179746-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179746-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b628ea76ccsi14920225a91.98.2024.05.15.03.11.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 03:11:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179746-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UiqFlvbH; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-179746-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179746-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A05F2B2488E for ; Wed, 15 May 2024 10:04:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E0492811E7; Wed, 15 May 2024 10:01:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="UiqFlvbH" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E37B778C71; Wed, 15 May 2024 10:01:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715767307; cv=none; b=DktMgCcIMVRvd4s2AKEeastGx4NLo4NqYV0QbSbPqCsf7wVnDBqVfRI5KHkBnhHUh7BgCsS/l8GfZRSPboxfZ5GnXNEvbM+GEXcxLle1evnsx4/2FZ+I5Iy8sCyQJ43IGDGxYAjlYpkV8m7X8oB5mw7qi/r+ontdwJl0cXnVx/4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715767307; c=relaxed/simple; bh=aNY1BCk37hgomQWTjUsQ5l9jnB52GHjycJLv3+RRDtA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rG8v83xVpvWIyycXVzh+yQUVJ9/3IxKqxBcJf7fjhX1UlKn9ZdonNYEchz86ERjOmpLNxwLKdo42kt2wUyD/4GuoXtyi1cv8EGDgYTjiRrHkPjKlcLHj3JCl3Ms4jZCS7pCAQqgxu0LSCDHpkYWEdtLJtEgEmpkjLrA6IQ5mIm4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=UiqFlvbH; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 623221BF20D; Wed, 15 May 2024 10:01:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1715767303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SOtYByFbOq/kD+SHjuSXQZVzJTtVnLBLPoL8nOih1ao=; b=UiqFlvbH31h6V/QqiutFpVZFkSvYJguJAqLq14slR5t3xFhTKJFij4/0pjFzQKnj3FKigV V2vHnDu8KSr0PElHxCY9Qwv7mCsXy2ne49/DoO+nHoT1JJJg3ubrODx7DDoYIsI7BxXQil 6NgtXiIrxS+qPPdi9YY0o0TZpesHtDcjffgUFI6DehZyonsC7wYyCQsLfPF40vgWT3pYrz pf802u1LaV0EVzcJXPErOrFwrhG7xdkvSzvBKQN7QvuRHGyAc31SqQlRtp48cI4Wnna/1t 8007ES6min2YDQl2jKdDICssfUD9ph4vIKZ+znQZho3pqksf3SJfaIo7DMBeaA== From: Thomas Richard Date: Wed, 15 May 2024 12:01:11 +0200 Subject: [PATCH v6 10/12] PCI: Add T_PERST_CLK_US macro Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240102-j7200-pcie-s2r-v6-10-4656ef6e6d66@bootlin.com> References: <20240102-j7200-pcie-s2r-v6-0-4656ef6e6d66@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v6-0-4656ef6e6d66@bootlin.com> To: Linus Walleij , Bartosz Golaszewski , Tony Lindgren , Aaro Koskinen , Janusz Krzysztofik , Vignesh R , Andi Shyti , Peter Rosin , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Siddharth Vadapalli Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-i2c@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com, Thomas Richard X-Mailer: b4 0.12.0 X-GND-Sasl: thomas.richard@bootlin.com "Power Sequencing and Reset Signal Timings" table (section 2.9.2) in PCI EXPRESS CARD ELECTROMECHANICAL SPECIFICATION, REV. 5.1 indicates PERST# should be deasserted after minimum of 100us once REFCLK is stable (symbol T_PERST-CLK). Add a macro so that PCIe controller drivers can use it. Signed-off-by: Thomas Richard --- drivers/pci/pci.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 17fed1846847..c47b1d3b5887 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -16,6 +16,9 @@ /* Power stable to PERST# inactive from PCIe card Electromechanical Spec */ #define PCIE_T_PVPERL_MS 100 +/* REFCLK stable before PERST# inactive from PCIe card Electromechanical Spec */ +#define PCIE_T_PERST_CLK_US 100 + /* * PCIe r6.0, sec 5.3.3.2.1 * Recommends 1ms to 10ms timeout to check L2 ready. -- 2.39.2