[PATCH][V4] powerpc/fsl-pci: Add pci inbound/outbound PM support

Jia Hongtao-B38951 B38951 at freescale.com
Thu Sep 20 01:41:41 EST 2012


________________________________________
From: Kumar Gala [galak at kernel.crashing.org]
Sent: Wednesday, September 19, 2012 10:27 PM
To: Jia Hongtao-B38951
Cc: linuxppc-dev at lists.ozlabs.org; Li Yang-R58472; Wood Scott-B07421
Subject: Re: [PATCH][V4] powerpc/fsl-pci: Add pci inbound/outbound PM support

On Sep 19, 2012, at 2:10 AM, Jia Hongtao-B38951 wrote:

>
>
>> -----Original Message-----
>> From: Kumar Gala [mailto:galak at kernel.crashing.org]
>> Sent: Tuesday, September 18, 2012 1:04 PM
>> To: Jia Hongtao-B38951
>> Cc: linuxppc-dev at lists.ozlabs.org; Li Yang-R58472; Wood Scott-B07421
>> Subject: Re: [PATCH][V4] powerpc/fsl-pci: Add pci inbound/outbound PM
>> support
>>
>>
>> On Sep 17, 2012, at 9:10 PM, Jia Hongtao wrote:
>>
>>> Power supply for PCI inbound/outbound window registers is off when
>>> system go to deep-sleep state. We save the values of registers before
>>> suspend and restore to registers after resume.
>>>
>>> Signed-off-by: Jiang Yutang <b14898 at freescale.com>
>>> Signed-off-by: Jia Hongtao <B38951 at freescale.com>
>>> Signed-off-by: Li Yang <leoli at freescale.com>
>>> ---
>>> Changes for V4:
>>> We just rebase the patch upon following patch:
>>> powerpc/fsl-pci: Unify pci/pcie initialization code
>>>
>>> arch/powerpc/include/asm/pci-bridge.h |    2 +-
>>> arch/powerpc/sysdev/fsl_pci.c         |  121
>> +++++++++++++++++++++++++++++++++
>>> 2 files changed, 122 insertions(+), 1 deletions(-)
>>
>> Did you ever compare this to just re-parsing device tree method?
>>
>> - k
>
> I tested the re-parsing way by using setup_pci_atmu() when resume.
> And I found out that re-parsing will *change* outbound IO translation
> address regitster.
>
> It seems that in the first bootup, after setup_atmu()
> pcibios_setup_phb_resources() may update hose->io_resource, but atmu
> is not updated according to the new hose->io_resource value.
> In resume from sleep setup_atmu() will reset atmu according to the
> new hose->io_resource value. So the setup_atmu() will cause different
> result on outbound IO register between first bootup and resume from
> sleep.
>
> So... There's a possibility that in the first bootup atmu is not setup
> properly.

[Are you seeing this happen in your testing?  If so its a bug we need to look at fixing.]

Yes, I see this in my testing.
Also PCIe ethernet card works well after resuming from sleep in both save/restore
and re-parsing way. (Maybe PCIe ethernet card don't need outbound IO resource)
So, I guess the result of re-parsing (actually it's re-setup) is right and ATMU is not setup
properly at the first bootup.



>
> Anyway, if setup_pci_atmu() at resume is functionally right then re-parsing
> is a good way for PM. I also test the latency of re-parsing and save/restore,
> both way are acceptable.
>
>
> - Hongtao.





More information about the Linuxppc-dev mailing list