From: Bjorn Helgaas <helgaas@kernel.org>
To: Marek Vasut <marek.vasut+renesas@mailbox.org>
Cc: linux-pci@vger.kernel.org,
"Geert Uytterhoeven" <geert@linux-m68k.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Magnus Damm" <magnus.damm@gmail.com>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] PCI: rcar-gen4: Add missing 1ms delay after PWR reset assertion
Date: Thu, 18 Sep 2025 15:04:47 -0500 [thread overview]
Message-ID: <20250918200447.GA1919114@bhelgaas> (raw)
In-Reply-To: <20250918030058.330960-1-marek.vasut+renesas@mailbox.org>
On Thu, Sep 18, 2025 at 05:00:26AM +0200, Marek Vasut wrote:
> R-Car V4H Reference Manual R19UH0186EJ0130 Rev.1.30 Apr. 21, 2025 page 585
> Figure 9.3.2 Software Reset flow (B) indicates that for peripherals in HSC
> domain, after reset has been asserted by writing a matching reset bit into
> register SRCR, it is mandatory to wait 1ms.
> @@ -182,8 +182,10 @@ static int rcar_gen4_pcie_common_init(struct rcar_gen4_pcie *rcar)
> return ret;
> }
>
> - if (!reset_control_status(dw->core_rsts[DW_PCIE_PWR_RST].rstc))
> + if (!reset_control_status(dw->core_rsts[DW_PCIE_PWR_RST].rstc)) {
> reset_control_assert(dw->core_rsts[DW_PCIE_PWR_RST].rstc);
> + usleep_range(1000, 2000);
What would you think of "fsleep(1000)"?
I know there's controvery about fsleep(), but while the 1000 usec
lower bound is important, I think the selection of the 2000 usec upper
bound is pretty arbitrary and doesn't really justify spelling it out.
> + }
>
> val = readl(rcar->base + PCIEMSR0);
> if (rcar->drvdata->mode == DW_PCIE_RC_TYPE) {
> --
> 2.51.0
>
next prev parent reply other threads:[~2025-09-18 20:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 3:00 [PATCH] PCI: rcar-gen4: Add missing 1ms delay after PWR reset assertion Marek Vasut
2025-09-18 20:04 ` Bjorn Helgaas [this message]
2025-09-18 20:35 ` Marek Vasut
2025-09-18 20:44 ` Bjorn Helgaas
2025-09-18 21:41 ` Marek Vasut
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=20250918200447.GA1919114@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=geert+renesas@glider.be \
--cc=geert@linux-m68k.org \
--cc=kwilczynski@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mani@kernel.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=robh@kernel.org \
--cc=yoshihiro.shimoda.uh@renesas.com \
/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