Thread (21 messages) 21 messages, 4 authors, 2012-10-30

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

From: Li Yang-R58472 <hidden>
Date: 2012-09-21 03:50:56

-----Original Message-----
From: Jia Hongtao-B38951
Sent: Friday, September 21, 2012 11:14 AM
To: Kumar Gala
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
=20
quoted
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Wednesday, September 19, 2012 11:49 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
quoted
quoted
quoted
On Sep 17, 2012, at 9:10 PM, Jia Hongtao wrote:
quoted
Power supply for PCI inbound/outbound window registers is off
when system go to deep-sleep state. We save the values of
registers
before
quoted
quoted
quoted
quoted
suspend and restore to registers after resume.

Signed-off-by: Jiang Yutang <redacted>
Signed-off-by: Jia Hongtao <redacted>
Signed-off-by: Li Yang <redacted>
---
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
+++++++++++++++++++++++++++++++++
quoted
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.]
quoted
Yes, I see this in my testing.
Also PCIe ethernet card works well after resuming from sleep in both
save/restore
quoted
and re-parsing way. (Maybe PCIe ethernet card don't need outbound IO
resource)
quoted
So, I guess the result of re-parsing (actually it's re-setup) is
right
and ATMU is not setup
quoted
properly at the first bootup.
Are you seeing the following message - "PCI: I/O resource not set for
host bridge" ?
=20
No.
=20
quoted
Trying to understand why you'd hit the reassignment of io_resource.

- k
=20
I did some investigations and the conclusion is:
=20
io_resource.flags & IORESOURCE_IO are both positive but io_resource.start
is 0 before pcibios_setup_phb_io_space() is done.
=20
The sequence of related process listed below:
fsl_add_bridge() -> setup_pci_atmu()
pcibios_init() -> pcibios_scan_phb() -> pcibios_setup_phb_io_space()
=20
Because fsl_add_bridge() must be finished before pcibios_init() so ATMU
is set when io_resource.start is 0. That means outbound IO regs are not
set.
=20
If system re-setup ATMU the io_resource.start has already updated so
outbound IO regs are set.
=20
My question is:
Is there any problem if outbound IO regs are not set in first bootup?
Please also provide the IO resource address range before and after the pci =
scan.  Then we can evaluate if the range is needed to be mapped via ATMU.

Leo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help