From: Philipp Zabel <p.zabel@pengutronix.de>
To: Leonard Crestez <leonard.crestez@nxp.com>,
"l.stach@pengutronix.de" <l.stach@pengutronix.de>,
"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
Richard Zhu <hongxing.zhu@nxp.com>
Cc: dl-linux-imx <linux-imx@nxp.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"jingoohan1@gmail.com" <jingoohan1@gmail.com>,
"gustavo.pimentel@synopsys.com" <gustavo.pimentel@synopsys.com>,
Fabio Estevam <fabio.estevam@nxp.com>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
"andrew.smirnov@gmail.com" <andrew.smirnov@gmail.com>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"kernel@pengutronix.de" <kernel@pengutronix.de>
Subject: Re: [PATCH 4/4] PCI: imx: Add PME_Turn_Off support
Date: Thu, 04 Oct 2018 15:25:58 +0200 [thread overview]
Message-ID: <1538659558.14153.12.camel@pengutronix.de> (raw)
In-Reply-To: <e7d5a2beb146f627e7043a81083e6978961b2761.camel@nxp.com>
On Thu, 2018-10-04 at 13:20 +0000, Leonard Crestez wrote:
> On Thu, 2018-10-04 at 10:59 +0200, Lucas Stach wrote:
> > Am Montag, den 01.10.2018, 22:53 +0300 schrieb Leonard Crestez:
> > > When the root complex suspends it must send a PME_Turn_Off TLP.
> > > Implement this by asserting the "turnoff" reset.
> > >
> > > +static void imx6_pcie_pm_turnoff(struct imx6_pcie *imx6_pcie)
> > > +{
> > > + reset_control_assert(imx6_pcie->turnoff_reset);
> > > + reset_control_deassert(imx6_pcie->turnoff_reset);
> >
> > I'm a bit surprised to see no timing requirements here. I would have
> > expected that there is a minimum time from asserting the reset, so the
> > turnoff message gets transmitted to the EP before the clocks are
> > stopped.
>
> According to the PCI standard after PME_Turn_Off is sent all components
> must respond with PME_TO_Ack. There doesn't seem to be any bit exposed
> to check if acks were received but the standard recommends a 1-10ms
> timeout after which you should proceed anyway.
>
> It seems the NXP vendor tree has an udelay(1000) which I missed, it
> seems like an acceptable solution. Or maybe it should be msleep(10)?
Maybe usleep_range(1000, 10000) ?
regards
Philipp
next prev parent reply other threads:[~2018-10-04 13:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 19:53 [PATCH 0/4] PCI: imx: Add PME_Turn_Off support Leonard Crestez
2018-10-01 19:53 ` [PATCH 1/4] reset: imx7: Add PCIE_CTRL_APPS_TURNOFF Leonard Crestez
2018-10-01 19:53 ` [PATCH 2/4] dt-bindings: imx6q-pcie: Add turnoff reset for imx7d Leonard Crestez
2018-10-01 19:53 ` [PATCH 3/4] ARM: dts: imx7d: Add turnoff reset Leonard Crestez
2018-10-01 19:53 ` [PATCH 4/4] PCI: imx: Add PME_Turn_Off support Leonard Crestez
2018-10-02 13:49 ` Lorenzo Pieralisi
2018-10-04 8:59 ` Lucas Stach
2018-10-04 13:20 ` Leonard Crestez
2018-10-04 13:25 ` Philipp Zabel [this message]
2018-10-04 13:34 ` Lucas Stach
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=1538659558.14153.12.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=andrew.smirnov@gmail.com \
--cc=bhelgaas@google.com \
--cc=fabio.estevam@nxp.com \
--cc=gustavo.pimentel@synopsys.com \
--cc=hongxing.zhu@nxp.com \
--cc=jingoohan1@gmail.com \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=leonard.crestez@nxp.com \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=shawnguo@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;
as well as URLs for NNTP newsgroup(s).