From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3AF232C0080 for ; Thu, 20 Sep 2012 00:27:35 +1000 (EST) Subject: Re: [PATCH][V4] powerpc/fsl-pci: Add pci inbound/outbound PM support Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Kumar Gala In-Reply-To: <412C8208B4A0464FA894C5F0C278CD5D01AAA35A@039-SN1MPN1-002.039d.mgd.msft.net> Date: Wed, 19 Sep 2012 09:27:17 -0500 Message-Id: <36119932-E4BF-4DF6-8D33-C9A832883272@kernel.crashing.org> References: <1347934234-18223-1-git-send-email-B38951@freescale.com> <86ADF4ED-B84C-4560-8781-D9FA4486D854@kernel.crashing.org> <412C8208B4A0464FA894C5F0C278CD5D01AAA35A@039-SN1MPN1-002.039d.mgd.msft.net> To: Jia Hongtao-B38951 Cc: Wood Scott-B07421 , "linuxppc-dev@lists.ozlabs.org" , Li Yang-R58472 List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Sep 19, 2012, at 2:10 AM, Jia Hongtao-B38951 wrote: >=20 >=20 >> -----Original Message----- >> From: Kumar Gala [mailto:galak@kernel.crashing.org] >> Sent: Tuesday, September 18, 2012 1:04 PM >> To: Jia Hongtao-B38951 >> Cc: linuxppc-dev@lists.ozlabs.org; Li Yang-R58472; Wood Scott-B07421 >> Subject: Re: [PATCH][V4] powerpc/fsl-pci: Add pci inbound/outbound PM >> support >>=20 >>=20 >> On Sep 17, 2012, at 9:10 PM, 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 >>> Signed-off-by: Jia Hongtao >>> Signed-off-by: Li Yang >>> --- >>> Changes for V4: >>> We just rebase the patch upon following patch: >>> powerpc/fsl-pci: Unify pci/pcie initialization code >>>=20 >>> arch/powerpc/include/asm/pci-bridge.h | 2 +- >>> arch/powerpc/sysdev/fsl_pci.c | 121 >> +++++++++++++++++++++++++++++++++ >>> 2 files changed, 122 insertions(+), 1 deletions(-) >>=20 >> Did you ever compare this to just re-parsing device tree method? >>=20 >> - k >=20 > 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. >=20 > 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. >=20 > 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. >=20 > 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. >=20 >=20 > - Hongtao.