lkml.org 
[lkml]   [2018]   [Oct]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 4/4] PCI: imx: Add PME_Turn_Off support
Date
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)?

--
Regards,
Leonard
\
 
 \ /
  Last update: 2018-10-04 15:20    [W:0.115 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site