From patchwork Wed Jun 19 10:15:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Richard X-Patchwork-Id: 13703626 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C161AC27C53 for ; Wed, 19 Jun 2024 10:15:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IcIvJM/PVv8xQhULVlebx488rIln5blmKYSSLR0xIrs=; b=gJv9FGkwcet4tcwd292PZJYOrw ITlRdn3F8yEoCA3WJFS+vJvZdF7MMcmGs5RL61V4FAgI+Vv4wKSYv0w9JYuOK9D0bZzOKxTGkpTJI ghOJrh9qvtOFY6UGxJp0qcppDPEYoNmftoH5ZG4UbtKkL7Uy7YRAPiFpDFCecduw8FQn+bjsxxRZ/ HzfjHV+JF8nyBEoaObQ9FOWQ4+nzpFEXqTtLpLTUL/Y1IWnxafyvd3zFdaLVQox7k6tmBkkWl8Ita QFLPohuk3BrWKYKoOjNgCD6iK+pabiO0hqwePnFUmepdl0AcW4dfF1rEtEZtpwwN/LtoYgEAIv7IY KMdKOiFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJsLs-00000000kib-36cP; Wed, 19 Jun 2024 10:15:40 +0000 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJsLi-00000000kdM-3CK2 for linux-arm-kernel@lists.infradead.org; Wed, 19 Jun 2024 10:15:34 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 6F663E0006; Wed, 19 Jun 2024 10:15:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1718792129; 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=IcIvJM/PVv8xQhULVlebx488rIln5blmKYSSLR0xIrs=; b=GDnnH+jf9b1CYJdycv9jbarLX53OM2TOHFTrLRm5e0lhyG6Axv32nP9xVPV+ikoyOTp5Y9 qWw6tMrSNWQdCPX4+x9cACZ2IwYSroD85JOHCwPASlr5ASryhhQ8VzXGdno7Njmd8Jaoh0 lZMKeXTj+VjIFoUEKch7SGjfkhOCB75v9wa4RWEDo2ebrvTc9bsvW7UDRIY459+NXoslj1 EErIFnVfmrQYErqQtpFoyWgOBKL5AZn3MMiX5QIJPpkfmUJmOPZll8MBMRNprQ0OVjBgrb e0KKicNZxu1r/ucXISo7LVXponxyP+u15y0RzWq9LUzLzr0OTao6idreVdDSvA== From: Thomas Richard Date: Wed, 19 Jun 2024 12:15:13 +0200 Subject: [PATCH v7 5/7] PCI: Add T_PERST_CLK_US macro MIME-Version: 1.0 Message-Id: <20240102-j7200-pcie-s2r-v7-5-a2f9156da6c3@bootlin.com> References: <20240102-j7200-pcie-s2r-v7-0-a2f9156da6c3@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v7-0-a2f9156da6c3@bootlin.com> To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , Rob Herring , Bjorn Helgaas , Vignesh Raghavendra , Siddharth Vadapalli Cc: gregory.clement@bootlin.com, theo.lebrun@bootlin.com, thomas.petazzoni@bootlin.com, u-kumar1@ti.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thomas Richard X-Mailer: b4 0.12.0 X-GND-Sasl: thomas.richard@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240619_031531_143388_A533E27C X-CRM114-Status: UNSURE ( 8.97 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org "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 fd44565c4756..1a11f2fe3efe 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.