> -----Original Message----- > From: Kumar Gala [mailto:ga...@kernel.crashing.org] > Sent: Thursday, August 09, 2012 9:08 PM > To: Li Yang-R58472 > Cc: Jia Hongtao-B38951; Wood Scott-B07421; linuxppc-dev@lists.ozlabs.org; > Li Yang-R58472 > Subject: Re: [PATCH 5/6] powerpc/fsl-pci: Add pci inbound/outbound PM > support > > > On Aug 9, 2012, at 12:05 AM, Li Yang wrote: > > > On Thu, Aug 9, 2012 at 10:52 AM, Jia Hongtao-B38951 > > <b38...@freescale.com> wrote: > >> > >> > >>> -----Original Message----- > >>> From: Linuxppc-dev [mailto:linuxppc-dev- > >>> bounces+b38951=freescale....@lists.ozlabs.org] On Behalf Of Kumar > >>> bounces+Gala > >>> Sent: Wednesday, August 08, 2012 8:47 PM > >>> To: Jia Hongtao-B38951 > >>> Cc: Wood Scott-B07421; linuxppc-dev@lists.ozlabs.org; Li Yang-R58472 > >>> Subject: Re: [PATCH 5/6] powerpc/fsl-pci: Add pci inbound/outbound > >>> PM support > >>> > >>>>>>>>> > >>>>>>>>> On Jul 24, 2012, at 5:20 AM, 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 <b14...@freescale.com> > >>>>>>>>>> Signed-off-by: Jia Hongtao <b38...@freescale.com> > >>>>>>>>>> Signed-off-by: Li Yang <le...@freescale.com> > >>>>>>>>>> --- > >>>>>>>>>> arch/powerpc/include/asm/pci-bridge.h | 2 +- > >>>>>>>>>> arch/powerpc/sysdev/fsl_pci.c | 121 > >>>>>>>>> +++++++++++++++++++++++++++++++++ > >>>>>>>>>> 2 files changed, 122 insertions(+), 1 deletions(-) > >>>>>>>>> > >>>>>>>>> Remind me why we need to save/restore PCI ATMUs, why not just > >>>>>>>>> re-parse the device tree to restore? > >>>>>>>>> > >>>>>>>>> - k > >>>>>>>> > >>>>>>>> Save/restore is the more efficient way. Latency of sleep/wakeup > >>>>>>>> is one of most important features in power management. > >>>>>>>> > >>>>>>>> -Hongtao. > >>>>>>> > >>>>>>> I don't think the time it takes to run through setup_pci_atmu() > >>>>>>> is that long compared to fsl_pci_resume(). > >>>>>>> > >>>>>>> Also, don't you need to setup PCICCSRBAR and do setup_pci_cmd() > >>>>>>> on > >>>>> resume? > >>>>>>> > >>>>>>> - k > >>>>>> > >>>>>> 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. > >>>>> > >>>>> How does the PCI code know you're entering deep sleep and not > >>> hibernation? > >>>>> > >>>>> -Scott > >>>> > >>>> When system come back from hibernation PCI will be initialized again. > >>>> So no need to save PCI_CMD and PEXCSRBAR. > >>>> > >>>> -Hongtao. > >>>> > >>> > >>> What do you mean PCI will be initialized again? What code path are > >>> you talking about that would set PCI_CMD & PEXCSRBAR? > >>> > >>> - k > >> > >> > >> In hibernation mode: > >> > >> When system come back from hibernation kernel will start up again. > >> Before loading hibernation image PCI initialization has already done. > >> Some other hardware also re-init again. > > > > In current Linux implementation, restoring from hibernation image is > > using late initcall. By that time, all the platform devices are > > already initialized like a fresh boot. > > > > - Leo > > I ask against, what specific code path (I'd like a call trace) would > cause PCI_CMD and PEXCSRBAR to be set in the wakeup case? > > - k
The code path is the same as a fresh boot: fsl_add_bridge() -> setup_pci_cmd() [PCI_CMD is set] -> setup_pci_atmu() [PEXCSRBAR is set] - Hongtao. _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev