Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp2065486lqp; Tue, 16 Apr 2024 06:34:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVOoKh1ZAe530L20pHzngqaG5GYNeYVoNhDdalR6P33JRcqu18U9tcEUCB3TUyBrDet577d2LpWHN2kVRqbKR2Lrx8TUrpGPZm71Jt9Jw== X-Google-Smtp-Source: AGHT+IHtz+6bdMVyanVloBywCd9l9GYa7S3N/oHV4iqMuwlnxB9fXazbAM1hwYkpIhmntMKnFREE X-Received: by 2002:a05:6a20:43a4:b0:1a9:3e55:a8c4 with SMTP id i36-20020a056a2043a400b001a93e55a8c4mr14593604pzl.21.1713274450233; Tue, 16 Apr 2024 06:34:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713274450; cv=pass; d=google.com; s=arc-20160816; b=TQDqMKWmMcY/3ZP6twyF4aeozPpNK9bR1jgWEGHduK9BkFRaPVkuLGugfrq4+vTMeq RM/D4qp/jf6a5GRWmoTXCH4wJCyZtk/H2kIDxo57o8XMCh8O0jIJjHwq9ONx3q5nHYLt mOlNpqCerzZd+f6ChNvWSTURZ+QOizN/5iHV/om/mEzFUgIa8yKgT58kZsp3CjDPw0Ao sMgZgfgQvNJ68OBT4r10Rn5wKf2sCfutBSBYcXHDbs5N/VUkuKfFsnW36RHM4bUdcM+O 77KQbddQRfVEEuIPj77Zesc1aYGbDHElothp/7NusaleKtKvkoLALPNB14UrGGcDp7iF O6bQ== 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=Dz2VRt1eYU2Yn1Zq0UzRssr4OULhgUymfDl+btMNlwWquwEL2rfC6zZCYsG81gEeFH R15TM6uyUsFQ66+c5VLViGfOoxzXsB/3nCFShmXXuhiPWPY1GuE/4d47zatzZnb8tnD/ 02YMNCriwnF1j0uCBg02ivI7Jb/5NhWvos5migogIQ1djyOd0w4nIEcsJcr/I/nhpF2o hNPsE3KifMFOz3aQ6d5THTnIdA/lm0Ir9LG5BpdryXnpAXG22NlkI7FbfGmtegkZxmjQ HqdLjewz+7zVqows0/Rjvt22rggMEJZKi5ji9NXhqKJV3nR6H2p0cggaxCWdAIEnaAzV ovwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UVoXazS6; 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-146890-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146890-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w15-20020a63d74f000000b005f4200c2dc5si9591714pgi.613.2024.04.16.06.34.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Apr 2024 06:34:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146890-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UVoXazS6; 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-146890-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146890-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D3262281525 for ; Tue, 16 Apr 2024 13:34:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C30D7131BC5; Tue, 16 Apr 2024 13:30:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="UVoXazS6" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 D79BF130E46; Tue, 16 Apr 2024 13:30:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713274230; cv=none; b=AbPOu+ghU2mGrWe8xNQMbDnn7f15bCpzlRv9I3UvXnDgL6+SmksoKzl2H/ScNHH6eIl24dYH65HA88G3hhc33jo4tAWaYjypN+sZDgc9TxBrwGdz7V4dtRSAR/bcHcpLsjXVxunxaZUJvA50CsFilCDQqpLAx1fHGyZ+l4+2HmQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713274230; c=relaxed/simple; bh=aNY1BCk37hgomQWTjUsQ5l9jnB52GHjycJLv3+RRDtA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QRZejzaymNJ6FHxdQX3u8Ce8zm6vTKCe1SMClT2SbkcIg8N5zQKTguniYTRgUKQjKG4AmqHJqr53orpPhwLfjNiLR2bQar47qWMV/XkOolZyNXhbmZFnlAl2IHreF/RZLs8fptaUD7PfiereXz1RLyk6C7/ahW/VFZHvedH3LLQ= 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=UVoXazS6; arc=none smtp.client-ip=217.70.183.194 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 89DAA40007; Tue, 16 Apr 2024 13:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1713274226; 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=UVoXazS64pUJ2dqd9Efwu8fZrPjLcY9GpSxAvev1gs9Hgos2iof1LFsA+ZhzfJE+UXyn0/ +1Jvy5CC2vbg9ToO/ekDRTZVWDnrxnGFoWvtvLmfvnSkhJKkK8THhbvPswiWmF3XMfOag/ MiMp9dhJb4gw0HVPYxA5f3b1Lu2rv2a39PVKsBcURzPKiOZp9MtAv+z5jZGOBZVJoH+vu0 KoQxtte/MO2O/yqxhATTXLX3lVzuO4JBePHkrzgK9Ve7GQvB+8NXW/J5nL8cg3Pr/wgBiP tv8c+DseqNoXJmmMgeL06ksnSoRz0uK2zrpb+ecLqstSeZUurC0zxbOW4/nRhg== From: Thomas Richard Date: Tue, 16 Apr 2024 15:29:58 +0200 Subject: [PATCH v5 09/11] 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-v5-9-4b8c46711ded@bootlin.com> References: <20240102-j7200-pcie-s2r-v5-0-4b8c46711ded@bootlin.com> In-Reply-To: <20240102-j7200-pcie-s2r-v5-0-4b8c46711ded@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