From: Bjorn Helgaas <helgaas@kernel.org>
To: Thierry Reding <thierry.reding@kernel.org>
Cc: "Bjorn Helgaas" <bhelgaas@google.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Jon Hunter" <jonathanh@nvidia.com>,
linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
linux-tegra@vger.kernel.org
Subject: Re: [PATCH 4/5] PCI: tegra: Add Tegra264 support
Date: Fri, 20 Mar 2026 09:27:05 -0500 [thread overview]
Message-ID: <20260320142705.GA699200@bhelgaas> (raw)
In-Reply-To: <ab0XT15uG0YEVjBZ@orome>
On Fri, Mar 20, 2026 at 11:34:53AM +0100, Thierry Reding wrote:
> On Thu, Mar 19, 2026 at 12:46:39PM -0500, Bjorn Helgaas wrote:
> > On Thu, Mar 19, 2026 at 05:01:08PM +0100, Thierry Reding wrote:
> > > From: Thierry Reding <treding@nvidia.com>
> > >
> > > Add a driver for the PCIe controller found on NVIDIA Tegra264 SoCs. The
> > > driver is very small, with its main purpose being to set up the address
> > > translation registers and then creating a standard PCI host using ECAM.
> > > +#define PCIE_LINK_UP_DELAY 10000 /* 10 msec */
> > > +#define PCIE_LINK_UP_TIMEOUT 1000000 /* 1 s */
> >
> > Use something from drivers/pci/pci.h if possible. If not, please add
> > units suffixes to the name, e.g., it looks like these are in "_US".
> >
> > PCIE_LINK_WAIT_MAX_RETRIES and PCIE_LINK_WAIT_SLEEP_MS look like
> > they're used in similar ways in other drivers.
>
> I see a bunch of implementations that use custom defines, if you don't
> mind I'll have a go and unifying this a little. Most implementations
> seem to use usleep_range(90000, 100000) with 10 retries.
That would be awesome!
> > > + err = gpiod_to_irq(pcie->wake_gpio);
> > > + if (err < 0) {
> > > + dev_err(pcie->dev, "failed to get wake IRQ: %d\n", err);
> >
> > Does %pe work here (and below)?
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/core-api/printk-formats.rst?id=v6.19#n96
>
> It won't work in this particular case because %pe needs an ERR_PTR-
> encoded error code. For the other messages it's probably better to move
> to dev_err_probe() as Krzysztof suggested.
We could use dev_err(dev, "..., %pe\n", ERR_PTR(err)). It's kind of ugly,
but seems like a fairly common style. I wish we had a simpler way to do
this; it seems like a shame to print a negative number when we have the
symbols available.
Bjorn
next prev parent reply other threads:[~2026-03-20 14:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 16:01 [PATCH 0/5] PCI: tegra: Add Tegra264 support Thierry Reding
2026-03-19 16:01 ` [PATCH 1/5] soc/tegra: Update BPMP ABI header Thierry Reding
2026-03-19 16:15 ` Krzysztof Kozlowski
2026-03-20 9:34 ` Thierry Reding
2026-03-20 9:44 ` Krzysztof Kozlowski
2026-03-20 9:49 ` Krzysztof Kozlowski
2026-03-20 10:52 ` Thierry Reding
2026-03-20 12:46 ` Krzysztof Kozlowski
2026-03-19 16:01 ` [PATCH 2/5] firmware: tegra: bpmp: Add tegra_bpmp_get_with_id() function Thierry Reding
2026-03-19 16:01 ` [PATCH 3/5] dt-bindings: pci: Document the NVIDIA Tegra264 PCIe controller Thierry Reding
2026-03-19 16:11 ` Krzysztof Kozlowski
2026-03-20 10:56 ` Thierry Reding
2026-03-19 17:53 ` Rob Herring (Arm)
2026-03-19 21:26 ` Rob Herring
2026-03-20 9:39 ` Thierry Reding
2026-03-20 13:06 ` Rob Herring
2026-03-20 13:48 ` Thierry Reding
2026-03-20 15:58 ` Rob Herring
2026-03-19 16:01 ` [PATCH 4/5] PCI: tegra: Add Tegra264 support Thierry Reding
2026-03-19 16:14 ` Krzysztof Kozlowski
2026-03-20 10:39 ` Thierry Reding
2026-03-19 17:46 ` Bjorn Helgaas
2026-03-20 10:34 ` Thierry Reding
2026-03-20 14:27 ` Bjorn Helgaas [this message]
2026-03-19 16:01 ` [PATCH 5/5] arm64: tegra: Add PCI controllers on Tegra264 Thierry Reding
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=20260320142705.GA699200@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=krzk+dt@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
--cc=thierry.reding@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