# Re: \[PATCH 5/6\] powerpc/fsl-pci: Add pci inbound/outbound PM support

- From: Kumar Gala \<hidden\>
- Date: 2012-08-08 12:46:44 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2012/08/9470731
- Thread: https://ratatoskr.run/linuxppc-dev/2012/07/9470407/t.md

```text
>>>>>>=20
>>>>>> On Jul 24, 2012, at 5:20 AM, Jia Hongtao wrote:
>>>>>>=20
>>>>>>> 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.
>>>>>>>=20
>>>>>>> Signed-off-by: Jiang Yutang <redacted>
>>>>>>> Signed-off-by: Jia Hongtao <redacted>
>>>>>>> Signed-off-by: Li Yang <redacted>
>>>>>>> ---
>>>>>>> arch/powerpc/include/asm/pci-bridge.h |    2 +-
>>>>>>> arch/powerpc/sysdev/fsl_pci.c         |  121
>>>>>> +++++++++++++++++++++++++++++++++
>>>>>>> 2 files changed, 122 insertions(+), 1 deletions(-)
>>>>>>=20
>>>>>> Remind me why we need to save/restore PCI ATMUs, why not just
>>>>>> re-parse the device tree to restore?
>>>>>>=20
>>>>>> - k
>>>>>=20
>>>>> Save/restore is the more efficient way. Latency of sleep/wakeup is
>>>>> one of most important features in power management.
>>>>>=20
>>>>> -Hongtao.
>>>>=20
>>>> I don't think the time it takes to run through setup_pci_atmu() is
>>>> that long compared to fsl_pci_resume().
>>>>=20
>>>> Also, don't you need to setup PCICCSRBAR and do setup_pci_cmd() on
>> resume?
>>>>=20
>>>> - k
>>>=20
>>> Hi Kumar,
>>> I did some tests on P1022DS and found out that PCI_CMD and PCICSRBAR
>>> is not lost when system in deep sleep. We don't need to save it.
>>=20
>> How does the PCI code know you're entering deep sleep and not =
hibernation?
>>=20
>> -Scott
>=20
> When system come back from hibernation PCI will be initialized again.
> So no need to save PCI_CMD and PEXCSRBAR.
>=20
> -Hongtao.=20
>=20

What do you mean PCI will be initialized again?  What code path are you =
talking about that would set PCI_CMD & PEXCSRBAR?

- k=
```
