From: Sajid Dalvi <sdalvi@google.com>
To: "Jingoo Han" <jingoohan1@gmail.com>,
"Gustavo Pimentel" <gustavo.pimentel@synopsys.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>
Cc: Sajid Dalvi <sdalvi@google.com>,
kernel-team@android.com, linux-pci@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Andrew Chant <achant@google.com>
Subject: [PATCH v1 2/2] PCI: dwc: Skip waiting for link up on probe
Date: Fri, 24 Feb 2023 13:57:47 -0600 [thread overview]
Message-ID: <20230224195749.818282-3-sdalvi@google.com> (raw)
In-Reply-To: <20230224195749.818282-1-sdalvi@google.com>
When the Root Complex is probed, the default behavior is to spin in a loop
waiting for the link to come up. In some systems the link is not brought up
during probe, but later in the context of an end-point turning on.
Call trace:
dw_pcie_wait_for_link << spins in a loop for 1 second
dw_pcie_host_init
Adding the snps,skip-wait-link-up property in the pcie device tree node
will skip this loop and save 1 second per interface on pcie probe for
systems that do not need to bring up the link this early in the boot
sequence.
Signed-off-by: Sajid Dalvi <sdalvi@google.com>
Signed-off-by: Andrew Chant <achant@google.com>
---
drivers/pci/controller/dwc/pcie-designware-host.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
index 3ab6ae3712c4..f5cba44ebf39 100644
--- a/drivers/pci/controller/dwc/pcie-designware-host.c
+++ b/drivers/pci/controller/dwc/pcie-designware-host.c
@@ -477,8 +477,9 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp)
goto err_free_msi;
}
- /* Ignore errors, the link may come up later */
- dw_pcie_wait_for_link(pci);
+ if (!of_property_read_bool(np, "snps,skip-wait-link-up"))
+ /* Ignore errors, the link may come up later */
+ dw_pcie_wait_for_link(pci);
bridge->sysdata = pp;
--
2.39.2.637.g21b0678d19-goog
prev parent reply other threads:[~2023-02-24 19:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 19:57 [PATCH v1 0/2] Skip waiting for link up during probe Sajid Dalvi
2023-02-24 19:57 ` [PATCH v1 1/2] dt-bindings: PCI: dwc: Add snps,skip-wait-link-up Sajid Dalvi
2023-02-24 20:40 ` Krzysztof Kozlowski
[not found] ` <CAEbtx1k-7TJPcd3+cueRoKLJcoUQLfF6nfOQFVfzB0YCUrbtqg@mail.gmail.com>
[not found] ` <2e4964c1-0831-c156-3372-81a56f8d623e@linaro.org>
2023-02-24 22:09 ` Sajid Dalvi
2023-02-25 10:00 ` Krzysztof Kozlowski
2023-02-25 10:08 ` Krzysztof Kozlowski
2023-02-27 20:15 ` Sajid Dalvi
2023-02-24 19:57 ` Sajid Dalvi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230224195749.818282-3-sdalvi@google.com \
--to=sdalvi@google.com \
--cc=achant@google.com \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=gustavo.pimentel@synopsys.com \
--cc=jingoohan1@gmail.com \
--cc=kernel-team@android.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox