[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1538659558.14153.12.camel@pengutronix.de>
Date: Thu, 04 Oct 2018 15:25:58 +0200
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Leonard Crestez <leonard.crestez@....com>,
"l.stach@...gutronix.de" <l.stach@...gutronix.de>,
"lorenzo.pieralisi@....com" <lorenzo.pieralisi@....com>,
Richard Zhu <hongxing.zhu@....com>
Cc: dl-linux-imx <linux-imx@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"jingoohan1@...il.com" <jingoohan1@...il.com>,
"gustavo.pimentel@...opsys.com" <gustavo.pimentel@...opsys.com>,
Fabio Estevam <fabio.estevam@....com>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"andrew.smirnov@...il.com" <andrew.smirnov@...il.com>,
"bhelgaas@...gle.com" <bhelgaas@...gle.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"kernel@...gutronix.de" <kernel@...gutronix.de>
Subject: Re: [PATCH 4/4] PCI: imx: Add PME_Turn_Off support
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
Powered by blists - more mailing lists