From: "Pali Rohár" <pali@kernel.org>
To: xxm <xxm@rock-chips.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org,
devicetree@vger.kernel.org, robh+dt@kernel.org,
Johan Jonker <jbx6244@gmail.com>,
Heiko Stuebner <heiko@sntech.de>,
Peter Geis <pgwipeout@gmail.com>,
Kever Yang <kever.yang@rock-chips.com>,
kernel test robot <lkp@intel.com>,
Shawn Lin <shawn.lin@rock-chips.com>
Subject: Re: [PATCH v9 2/2] PCI: rockchip: Add Rockchip RK356X host controller driver
Date: Thu, 24 Jun 2021 10:23:14 +0200 [thread overview]
Message-ID: <20210624082314.mw3ilcufswmb635m@pali> (raw)
In-Reply-To: <46b3f277-2bde-321d-b616-3f3b41259e4d@rock-chips.com>
On Thursday 24 June 2021 10:08:54 xxm wrote:
> 在 2021/6/23 22:33, Lorenzo Pieralisi 写道:
> > On Thu, May 06, 2021 at 10:35:44AM +0800, Simon Xue wrote:
> > > +static int rockchip_pcie_start_link(struct dw_pcie *pci)
> > > +{
> > > + struct rockchip_pcie *rockchip = to_rockchip_pcie(pci);
> > > +
> > > + /* Reset device */
> > > + gpiod_set_value_cansleep(rockchip->rst_gpio, 0);
> > > +
> > > + rockchip_pcie_enable_ltssm(rockchip);
> > > +
> > > + /*
> > > + * PCIe requires the refclk to be stable for 100µs prior to releasing
> > > + * PERST. See table 2-4 in section 2.6.2 AC Specifications of the PCI
> > > + * Express Card Electromechanical Specification, 1.1. However, we don't
> > > + * know if the refclk is coming from RC's PHY or external OSC. If it's
> > > + * from RC, so enabling LTSSM is the just right place to release #PERST.
> > > + * We need more extra time as before, rather than setting just
> > > + * 100us as we don't know how long should the device need to reset.
> > > + */
> > > + msleep(100);
> > Any rationale behind the time chosen ?
> We found some device need about 30ms, so 100ms here just leave more room for
> other devices.
Can you share information which PCIe card needs 30ms?
Last year I did tests with more WiFi AC cards and "the slowest" one was
Compex WLE1216 which needed about 11ms (more than 10ms). All other cards
were happy with just 1-2ms.
next prev parent reply other threads:[~2021-06-24 8:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-06 2:34 [PATCH v9 1/2] dt-bindings: rockchip: Add DesignWare based PCIe controller Simon Xue
2021-05-06 2:35 ` [PATCH v9 2/2] PCI: rockchip: Add Rockchip RK356X host controller driver Simon Xue
2021-06-23 14:33 ` Lorenzo Pieralisi
2021-06-24 2:08 ` xxm
2021-06-24 8:23 ` Pali Rohár [this message]
2021-06-24 8:58 ` xxm
2021-06-23 21:15 ` Rob Herring
2021-10-27 15:41 ` [PATCH v9 1/2] dt-bindings: rockchip: Add DesignWare based PCIe controller Rob Herring
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=20210624082314.mw3ilcufswmb635m@pali \
--to=pali@kernel.org \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=jbx6244@gmail.com \
--cc=kever.yang@rock-chips.com \
--cc=linux-pci@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=lkp@intel.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=pgwipeout@gmail.com \
--cc=robh+dt@kernel.org \
--cc=shawn.lin@rock-chips.com \
--cc=xxm@rock-chips.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;
as well as URLs for NNTP newsgroup(s).