[PATCH] powerpc/85xx: Save and restore pcie ATMU windows for PM

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE5620d

9 messages, 3 authors, 2011-05-20 · open the first message on its own page

[PATCH] powerpc/85xx: Save and restore pcie ATMU windows for PM

From: Prabhakar Kushwaha <hidden>
Date: 2011-04-28 06:36:42

D3-cold state indicates removal of the clock and power. however auxiliary (AUX)
Power may remain available even after the main power rails are powered down.

wakeup from D3-cold state requires full context restore. Other things are taken
care in pci-driver except ATMUs.
ATMU windows needs to be saved and restored during suspend and resume.

Signed-off-by: Jiang Yutang <redacted>
Signed-off-by: Prabhakar Kushwaha <redacted>
---
 Based upon git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git(branch master)

 arch/powerpc/sysdev/fsl_pci.c |  116 +++++++++++++++++++++++++++++++++++++++++
 arch/powerpc/sysdev/fsl_pci.h |    7 ++-
 2 files changed, 121 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index f8f7f28..809fbfe 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -35,6 +35,9 @@
 #include <sysdev/fsl_pci.h>
 
 static int fsl_pcie_bus_fixup, is_mpc83xx_pci;
+static int pcie_saved_pow_piw;
+struct pci_outbound_window_regs pcie_saved_pow[PCIE_POW_NUMBER];
+struct pci_inbound_window_regs pcie_saved_piw[PCIE_PIW_NUMBER];
 
 static void __init quirk_fsl_pcie_header(struct pci_dev *dev)
 {
@@ -746,3 +749,116 @@ u64 fsl_pci_immrbar_base(struct pci_controller *hose)
 
 	return 0;
 }
+
+
+static int fsl_pcie_save_pow_piw(struct device_node *np,
+					struct resource *rsrc)
+{
+	struct ccsr_pci __iomem *pci;
+	int start_idx = 1, end_idx = 4;
+	unsigned int i;
+
+	pci = ioremap(rsrc->start, rsrc->end - rsrc->start + 1);
+
+	if (!pci) {
+		printk(KERN_WARNING"pcie_pow ioremap error!\n");
+		return -1;
+	}
+
+	if (of_device_is_compatible(np, "fsl,qoriq-pcie-v2.2")) {
+		start_idx = 0;
+		end_idx = 3;
+	}
+
+	for (i = 0; i < PCIE_POW_NUMBER; i++) {
+		pcie_saved_pow[i].potar = in_be32(&pci->pow[i].potar);
+		pcie_saved_pow[i].potear = in_be32(&pci->pow[i].potear);
+		pcie_saved_pow[i].powbar = in_be32(&pci->pow[i].powbar);
+		pcie_saved_pow[i].powar = in_be32(&pci->pow[i].powar);
+	}
+
+	for (i = start_idx; i < end_idx; i++) {
+		pcie_saved_piw[i].pitar = in_be32(&pci->piw[i].pitar);
+		pcie_saved_piw[i].piwbar = in_be32(&pci->piw[i].piwbar);
+		pcie_saved_piw[i].piwbear = in_be32(&pci->piw[i].piwbear);
+		pcie_saved_piw[i].piwar = in_be32(&pci->piw[i].piwar);
+	}
+
+	iounmap(pci);
+	return 0;
+}
+
+static int fsl_pcie_restore_pow_piw(struct device_node *np,
+					struct resource *rsrc)
+{
+	struct ccsr_pci __iomem *pci;
+	int start_idx = 1, end_idx = 4;
+	unsigned int i;
+
+	pci = ioremap(rsrc->start, rsrc->end - rsrc->start + 1);
+
+	if (of_device_is_compatible(np, "fsl,qoriq-pcie-v2.2")) {
+		start_idx = 0;
+		end_idx = 3;
+	}
+	if (!pci) {
+		printk(KERN_WARNING"pcie_pow ioremap error!\n");
+		return -1;
+	}
+
+	for (i = 0; i < PCIE_POW_NUMBER; i++) {
+		out_be32(&pci->pow[i].potar, pcie_saved_pow[i].potar);
+		out_be32(&pci->pow[i].potear, pcie_saved_pow[i].potear);
+		out_be32(&pci->pow[i].powbar, pcie_saved_pow[i].powbar);
+		out_be32(&pci->pow[i].powar, pcie_saved_pow[i].powar);
+	}
+
+	for (i = 0; i < PCIE_PIW_NUMBER; i++) {
+		out_be32(&pci->piw[i].pitar, pcie_saved_piw[i].pitar);
+		out_be32(&pci->piw[i].piwbar, pcie_saved_piw[i].piwbar);
+		out_be32(&pci->piw[i].piwbear, pcie_saved_piw[i].piwbear);
+		out_be32(&pci->piw[i].piwar, pcie_saved_piw[i].piwar);
+	}
+
+	iounmap(pci);
+	return 0;
+}
+
+static void fsl_pcie_suspend_save(struct pci_dev *dev)
+{
+	struct device_node *np;
+	struct resource rsrc;
+
+	if (pcie_saved_pow_piw == 1)
+		return;
+
+	for_each_node_by_type(np, "pci") {
+		if (of_device_is_compatible(np, "fsl,p1022-pcie")) {
+			of_address_to_resource(np, 0, &rsrc);
+			fsl_pcie_save_pow_piw(np, &rsrc);
+		}
+	}
+	pcie_saved_pow_piw = 1;
+}
+DECLARE_PCI_FIXUP_SUSPEND(0x1957, PCI_DEVICE_ID_P1022E, fsl_pcie_suspend_save);
+DECLARE_PCI_FIXUP_SUSPEND(0x1957, PCI_DEVICE_ID_P1022, fsl_pcie_suspend_save);
+
+static void fsl_pcie_resume_restore(struct pci_dev *dev)
+{
+	struct device_node *np;
+	struct resource rsrc;
+
+	if (pcie_saved_pow_piw == 0)
+		return;
+
+	for_each_node_by_type(np, "pci") {
+		if (of_device_is_compatible(np, "fsl,p1022-pcie")) {
+			of_address_to_resource(np, 0, &rsrc);
+			fsl_pcie_restore_pow_piw(np, &rsrc);
+		}
+	}
+	pcie_saved_pow_piw = 0;
+}
+DECLARE_PCI_FIXUP_RESUME(0x1957, PCI_DEVICE_ID_P1022E, fsl_pcie_resume_restore);
+DECLARE_PCI_FIXUP_RESUME(0x1957, PCI_DEVICE_ID_P1022, fsl_pcie_resume_restore);
+
diff --git a/arch/powerpc/sysdev/fsl_pci.h b/arch/powerpc/sysdev/fsl_pci.h
index a39ed5c..853672f 100644
--- a/arch/powerpc/sysdev/fsl_pci.h
+++ b/arch/powerpc/sysdev/fsl_pci.h
@@ -14,6 +14,9 @@
 #ifndef __POWERPC_FSL_PCI_H
 #define __POWERPC_FSL_PCI_H
 
+#define PCIE_POW_NUMBER	5
+#define PCIE_PIW_NUMBER	4
+
 #define PCIE_LTSSM	0x0404		/* PCIE Link Training and Status */
 #define PCIE_LTSSM_L0	0x16		/* L0 state */
 #define PIWAR_EN		0x80000000	/* Enable */
@@ -64,7 +67,7 @@ struct ccsr_pci {
  * The default outbound register set is used when a transaction misses
  * in all of the other outbound windows.
  */
-	struct pci_outbound_window_regs pow[5];
+	struct pci_outbound_window_regs pow[PCIE_POW_NUMBER];
 	u8	res14[96];
 	struct pci_inbound_window_regs	pmit;	/* 0xd00 - 0xd9c Inbound MSI */
 	u8	res6[96];
@@ -72,7 +75,7 @@ struct ccsr_pci {
  * inbound window 1 supports only a 32-bit base address and does not
  * define an inbound window base extended address register.
  */
-	struct pci_inbound_window_regs piw[4];
+	struct pci_inbound_window_regs piw[PCIE_PIW_NUMBER];
 
 	__be32	pex_err_dr;		/* 0x.e00 - PCI/PCIE error detect register */
 	u8	res21[4];
-- 
1.7.3

Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows for PM

From: Kumar Gala <hidden>
Date: 2011-05-19 06:30:12

On Apr 28, 2011, at 1:38 AM, Prabhakar Kushwaha wrote:
D3-cold state indicates removal of the clock and power. however =
auxiliary (AUX)
Power may remain available even after the main power rails are powered =
down.
=20
wakeup from D3-cold state requires full context restore. Other things =
are taken
care in pci-driver except ATMUs.
ATMU windows needs to be saved and restored during suspend and resume.
=20
Signed-off-by: Jiang Yutang <redacted>
Signed-off-by: Prabhakar Kushwaha <redacted>
---
Based upon =
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git(branc=
h master)
=20
arch/powerpc/sysdev/fsl_pci.c |  116 =
+++++++++++++++++++++++++++++++++++++++++
arch/powerpc/sysdev/fsl_pci.h |    7 ++-
2 files changed, 121 insertions(+), 2 deletions(-)
Is this patch for when we are a host or agent?

- k=

RE: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows for PM

From: Kushwaha Prabhakar-B32579 <hidden>
Date: 2011-05-19 11:22:31

Hi Kumar,
  Please find my answer in-lined
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Thursday, May 19, 2011 12:00 PM
To: Kushwaha Prabhakar-B32579
Cc: linuxppc-dev@lists.ozlabs.org; meet2prabhu@gmail.com; Jiang Yutang-
B14898
Subject: Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows for
PM
=20
=20
On Apr 28, 2011, at 1:38 AM, Prabhakar Kushwaha wrote:
=20
quoted
D3-cold state indicates removal of the clock and power. however
auxiliary (AUX) Power may remain available even after the main power
rails are powered down.
quoted
wakeup from D3-cold state requires full context restore. Other things
are taken care in pci-driver except ATMUs.
ATMU windows needs to be saved and restored during suspend and resume.

Signed-off-by: Jiang Yutang <redacted>
Signed-off-by: Prabhakar Kushwaha <redacted>
---
Based upon
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git(b
ranch master)

arch/powerpc/sysdev/fsl_pci.c |  116
+++++++++++++++++++++++++++++++++++++++++
quoted
arch/powerpc/sysdev/fsl_pci.h |    7 ++-
2 files changed, 121 insertions(+), 2 deletions(-)
=20
Is this patch for when we are a host or agent?
This patch is independent of host or agent. It is for supporting D3 cold st=
ate for P1022.
These functions are called during System level suspend and resume.=20

--Prabhakar

Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows for PM

From: Kumar Gala <hidden>
Date: 2011-05-19 13:22:45

On May 19, 2011, at 6:22 AM, Kushwaha Prabhakar-B32579 wrote:
Hi Kumar,
 Please find my answer in-lined
=20
quoted
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Thursday, May 19, 2011 12:00 PM
To: Kushwaha Prabhakar-B32579
Cc: linuxppc-dev@lists.ozlabs.org; meet2prabhu@gmail.com; Jiang =
Yutang-
quoted
B14898
Subject: Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows =
for
quoted
PM
=20
=20
On Apr 28, 2011, at 1:38 AM, Prabhakar Kushwaha wrote:
=20
quoted
D3-cold state indicates removal of the clock and power. however
auxiliary (AUX) Power may remain available even after the main power
rails are powered down.
quoted
=20
wakeup from D3-cold state requires full context restore. Other =
things
quoted
quoted
are taken care in pci-driver except ATMUs.
ATMU windows needs to be saved and restored during suspend and =
resume.
quoted
quoted
=20
Signed-off-by: Jiang Yutang <redacted>
Signed-off-by: Prabhakar Kushwaha <redacted>
---
Based upon
=
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git(b
quoted
quoted
ranch master)
=20
arch/powerpc/sysdev/fsl_pci.c |  116
+++++++++++++++++++++++++++++++++++++++++
quoted
arch/powerpc/sysdev/fsl_pci.h |    7 ++-
2 files changed, 121 insertions(+), 2 deletions(-)
=20
Is this patch for when we are a host or agent?
=20
This patch is independent of host or agent. It is for supporting D3 =
cold state for P1022.
These functions are called during System level suspend and resume.=20
=20
--Prabhakar
I'm trying to figure out why this is limited to P1022.

- k=

RE: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows for PM

From: Kushwaha Prabhakar-B32579 <hidden>
Date: 2011-05-20 04:44:24

-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Thursday, May 19, 2011 6:53 PM
To: Kushwaha Prabhakar-B32579
Cc: linuxppc-dev@lists.ozlabs.org; meet2prabhu@gmail.com; Jiang Yutang-
B14898
Subject: Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows for
PM
=20
=20
On May 19, 2011, at 6:22 AM, Kushwaha Prabhakar-B32579 wrote:
=20
quoted
Hi Kumar,
 Please find my answer in-lined
quoted
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Thursday, May 19, 2011 12:00 PM
To: Kushwaha Prabhakar-B32579
Cc: linuxppc-dev@lists.ozlabs.org; meet2prabhu@gmail.com; Jiang
Yutang-
B14898
Subject: Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows
for PM


On Apr 28, 2011, at 1:38 AM, Prabhakar Kushwaha wrote:
quoted
D3-cold state indicates removal of the clock and power. however
auxiliary (AUX) Power may remain available even after the main power
rails are powered down.
quoted
wakeup from D3-cold state requires full context restore. Other
things are taken care in pci-driver except ATMUs.
ATMU windows needs to be saved and restored during suspend and
resume.
quoted
quoted
quoted
Signed-off-by: Jiang Yutang <redacted>
Signed-off-by: Prabhakar Kushwaha <redacted>
---
Based upon
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
(b
ranch master)

arch/powerpc/sysdev/fsl_pci.c |  116
+++++++++++++++++++++++++++++++++++++++++
quoted
arch/powerpc/sysdev/fsl_pci.h |    7 ++-
2 files changed, 121 insertions(+), 2 deletions(-)
Is this patch for when we are a host or agent?
This patch is independent of host or agent. It is for supporting D3
cold state for P1022.
quoted
These functions are called during System level suspend and resume.

--Prabhakar
=20
I'm trying to figure out why this is limited to P1022.
Till now, No SOC was supporting D3 cold state. First time P1022 supporting =
it.
Note:  D3 cold state =3D=3D PCIe block Power down

--Prabhakar=20

Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows for PM

From: Kumar Gala <hidden>
Date: 2011-05-20 04:46:40

On May 19, 2011, at 11:41 PM, Kushwaha Prabhakar-B32579 wrote:
=20
=20
quoted
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Thursday, May 19, 2011 6:53 PM
To: Kushwaha Prabhakar-B32579
Cc: linuxppc-dev@lists.ozlabs.org; meet2prabhu@gmail.com; Jiang =
Yutang-
quoted
B14898
Subject: Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows =
for
quoted
PM
=20
=20
On May 19, 2011, at 6:22 AM, Kushwaha Prabhakar-B32579 wrote:
=20
quoted
Hi Kumar,
Please find my answer in-lined
=20
quoted
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Thursday, May 19, 2011 12:00 PM
To: Kushwaha Prabhakar-B32579
Cc: linuxppc-dev@lists.ozlabs.org; meet2prabhu@gmail.com; Jiang
Yutang-
B14898
Subject: Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU =
windows
quoted
quoted
quoted
for PM
=20
=20
On Apr 28, 2011, at 1:38 AM, Prabhakar Kushwaha wrote:
=20
quoted
D3-cold state indicates removal of the clock and power. however
auxiliary (AUX) Power may remain available even after the main =
power
quoted
quoted
quoted
rails are powered down.
quoted
=20
wakeup from D3-cold state requires full context restore. Other
things are taken care in pci-driver except ATMUs.
ATMU windows needs to be saved and restored during suspend and
resume.
quoted
quoted
quoted
=20
Signed-off-by: Jiang Yutang <redacted>
Signed-off-by: Prabhakar Kushwaha <redacted>
---
Based upon
=
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
quoted
quoted
quoted
quoted
(b
ranch master)
=20
arch/powerpc/sysdev/fsl_pci.c |  116
+++++++++++++++++++++++++++++++++++++++++
quoted
arch/powerpc/sysdev/fsl_pci.h |    7 ++-
2 files changed, 121 insertions(+), 2 deletions(-)
=20
Is this patch for when we are a host or agent?
=20
This patch is independent of host or agent. It is for supporting D3
cold state for P1022.
quoted
These functions are called during System level suspend and resume.
=20
--Prabhakar
=20
I'm trying to figure out why this is limited to P1022.
=20
Till now, No SOC was supporting D3 cold state. First time P1022 =
supporting it.
Note:  D3 cold state =3D=3D PCIe block Power down
=20
--Prabhakar=20
how do we test this ?

- k=

Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows for PM

From: Kumar Gala <hidden>
Date: 2011-05-20 04:49:06

On May 19, 2011, at 11:41 PM, Kushwaha Prabhakar-B32579 wrote:
=20
=20
quoted
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Thursday, May 19, 2011 6:53 PM
To: Kushwaha Prabhakar-B32579
Cc: linuxppc-dev@lists.ozlabs.org; meet2prabhu@gmail.com; Jiang =
Yutang-
quoted
B14898
Subject: Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows =
for
quoted
PM
=20
=20
On May 19, 2011, at 6:22 AM, Kushwaha Prabhakar-B32579 wrote:
=20
quoted
Hi Kumar,
Please find my answer in-lined
=20
quoted
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Thursday, May 19, 2011 12:00 PM
To: Kushwaha Prabhakar-B32579
Cc: linuxppc-dev@lists.ozlabs.org; meet2prabhu@gmail.com; Jiang
Yutang-
B14898
Subject: Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU =
windows
quoted
quoted
quoted
for PM
=20
=20
On Apr 28, 2011, at 1:38 AM, Prabhakar Kushwaha wrote:
=20
quoted
D3-cold state indicates removal of the clock and power. however
auxiliary (AUX) Power may remain available even after the main =
power
quoted
quoted
quoted
rails are powered down.
quoted
=20
wakeup from D3-cold state requires full context restore. Other
things are taken care in pci-driver except ATMUs.
ATMU windows needs to be saved and restored during suspend and
resume.
quoted
quoted
quoted
=20
Signed-off-by: Jiang Yutang <redacted>
Signed-off-by: Prabhakar Kushwaha <redacted>
---
Based upon
=
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
quoted
quoted
quoted
quoted
(b
ranch master)
=20
arch/powerpc/sysdev/fsl_pci.c |  116
+++++++++++++++++++++++++++++++++++++++++
quoted
arch/powerpc/sysdev/fsl_pci.h |    7 ++-
2 files changed, 121 insertions(+), 2 deletions(-)
=20
Is this patch for when we are a host or agent?
=20
This patch is independent of host or agent. It is for supporting D3
cold state for P1022.
quoted
These functions are called during System level suspend and resume.
=20
--Prabhakar
=20
I'm trying to figure out why this is limited to P1022.
=20
Till now, No SOC was supporting D3 cold state. First time P1022 =
supporting it.
Note:  D3 cold state =3D=3D PCIe block Power down
=20
I'm wondering a few things:

1. Is there any reason not to do this for ALL FSL PCIe SoCs?
2. why do bother saving state, we don't we re-parse the .dts and =
reconfigure ATMUs that way?

- k

RE: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows for PM

From: Kushwaha Prabhakar-B32579 <hidden>
Date: 2011-05-20 05:03:37

-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Friday, May 20, 2011 10:19 AM
To: Kushwaha Prabhakar-B32579
Cc: linuxppc-dev@lists.ozlabs.org; meet2prabhu@gmail.com; Jiang Yutang-
B14898
Subject: Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows for
PM
=20
=20
On May 19, 2011, at 11:41 PM, Kushwaha Prabhakar-B32579 wrote:
=20
quoted
quoted
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Thursday, May 19, 2011 6:53 PM
To: Kushwaha Prabhakar-B32579
Cc: linuxppc-dev@lists.ozlabs.org; meet2prabhu@gmail.com; Jiang
Yutang-
B14898
Subject: Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows
for PM


On May 19, 2011, at 6:22 AM, Kushwaha Prabhakar-B32579 wrote:
quoted
Hi Kumar,
Please find my answer in-lined
quoted
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Thursday, May 19, 2011 12:00 PM
To: Kushwaha Prabhakar-B32579
Cc: linuxppc-dev@lists.ozlabs.org; meet2prabhu@gmail.com; Jiang
Yutang-
B14898
Subject: Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU
windows for PM


On Apr 28, 2011, at 1:38 AM, Prabhakar Kushwaha wrote:
quoted
D3-cold state indicates removal of the clock and power. however
auxiliary (AUX) Power may remain available even after the main
power
rails are powered down.
quoted
wakeup from D3-cold state requires full context restore. Other
things are taken care in pci-driver except ATMUs.
ATMU windows needs to be saved and restored during suspend and
resume.
quoted
quoted
quoted
Signed-off-by: Jiang Yutang <redacted>
Signed-off-by: Prabhakar Kushwaha <redacted>
---
Based upon
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.g
it
(b
ranch master)

arch/powerpc/sysdev/fsl_pci.c |  116
+++++++++++++++++++++++++++++++++++++++++
quoted
arch/powerpc/sysdev/fsl_pci.h |    7 ++-
2 files changed, 121 insertions(+), 2 deletions(-)
Is this patch for when we are a host or agent?
This patch is independent of host or agent. It is for supporting D3
cold state for P1022.
quoted
These functions are called during System level suspend and resume.

--Prabhakar
I'm trying to figure out why this is limited to P1022.
Till now, No SOC was supporting D3 cold state. First time P1022
supporting it.
quoted
Note:  D3 cold state =3D=3D PCIe block Power down
=20
I'm wondering a few things:
=20
1. Is there any reason not to do this for ALL FSL PCIe SoCs?
Yes, I am agree with you. It can be done.=20
But as only P1022 SOC supporting it. There is no use of handling it.=20
2. why do bother saving state, we don't we re-parse the .dts and
reconfigure ATMUs that way?
I also thought of this case. But Agent use case scenario forbid me to do th=
is.=20
As ATMU's are programmed by host depending upon different use case . And th=
is information is never stored in the dts.

--Prabhakar



=20

Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows for PM

From: Kumar Gala <hidden>
Date: 2011-05-20 05:15:22

On May 20, 2011, at 12:01 AM, Kushwaha Prabhakar-B32579 wrote:
=20
=20
quoted
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Friday, May 20, 2011 10:19 AM
To: Kushwaha Prabhakar-B32579
Cc: linuxppc-dev@lists.ozlabs.org; meet2prabhu@gmail.com; Jiang =
Yutang-
quoted
B14898
Subject: Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU windows =
for
quoted
PM
=20
=20
On May 19, 2011, at 11:41 PM, Kushwaha Prabhakar-B32579 wrote:
=20
quoted
=20
=20
quoted
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Thursday, May 19, 2011 6:53 PM
To: Kushwaha Prabhakar-B32579
Cc: linuxppc-dev@lists.ozlabs.org; meet2prabhu@gmail.com; Jiang
Yutang-
B14898
Subject: Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU =
windows
quoted
quoted
quoted
for PM
=20
=20
On May 19, 2011, at 6:22 AM, Kushwaha Prabhakar-B32579 wrote:
=20
quoted
Hi Kumar,
Please find my answer in-lined
=20
quoted
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Thursday, May 19, 2011 12:00 PM
To: Kushwaha Prabhakar-B32579
Cc: linuxppc-dev@lists.ozlabs.org; meet2prabhu@gmail.com; Jiang
Yutang-
B14898
Subject: Re: [PATCH] powerpc/85xx: Save and restore pcie ATMU
windows for PM
=20
=20
On Apr 28, 2011, at 1:38 AM, Prabhakar Kushwaha wrote:
=20
quoted
D3-cold state indicates removal of the clock and power. however
auxiliary (AUX) Power may remain available even after the main
power
rails are powered down.
quoted
=20
wakeup from D3-cold state requires full context restore. Other
things are taken care in pci-driver except ATMUs.
ATMU windows needs to be saved and restored during suspend and
resume.
quoted
quoted
quoted
=20
Signed-off-by: Jiang Yutang <redacted>
Signed-off-by: Prabhakar Kushwaha <redacted>
---
Based upon
=
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.g
quoted
quoted
quoted
quoted
quoted
quoted
it
(b
ranch master)
=20
arch/powerpc/sysdev/fsl_pci.c |  116
+++++++++++++++++++++++++++++++++++++++++
quoted
arch/powerpc/sysdev/fsl_pci.h |    7 ++-
2 files changed, 121 insertions(+), 2 deletions(-)
=20
Is this patch for when we are a host or agent?
=20
This patch is independent of host or agent. It is for supporting =
D3
quoted
quoted
quoted
cold state for P1022.
quoted
These functions are called during System level suspend and resume.
=20
--Prabhakar
=20
I'm trying to figure out why this is limited to P1022.
=20
Till now, No SOC was supporting D3 cold state. First time P1022
supporting it.
quoted
Note:  D3 cold state =3D=3D PCIe block Power down
=20
=20
I'm wondering a few things:
=20
1. Is there any reason not to do this for ALL FSL PCIe SoCs?
=20
Yes, I am agree with you. It can be done.=20
But as only P1022 SOC supporting it. There is no use of handling it.
I'm also not clear if the DECLARE_PCI_FIXUP_SUSPEND() is the right way =
for us to connect up these suspend/resume functions.
quoted
2. why do bother saving state, we don't we re-parse the .dts and
reconfigure ATMUs that way?
=20
I also thought of this case. But Agent use case scenario forbid me to =
do this.=20
As ATMU's are programmed by host depending upon different use case . =
And this information is never stored in the dts.

Fair point, but in agent mode will this code ever really be called?  It =
seems like we'd never register ourselves with the PCI subsystem so how =
would this get called?

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