Hi, Scott
We have a patch to enable PCIe PM in 3.10.9 Beta release, please get it to have a try.
commit 615ee93d9fcafc55ee487588fa1c39be47bc3d54
Author: Richard Zhu <r65037@freescale.com>
Date: Mon Nov 18 16:42:18 2013 +0800
ENGR00288409 pcie: enable pcie pm when pcie is enabled
L2 can exit by 'reset' or Inband beacon (from remote EP)
toggling phy_powerdown has same effect as 'inband beacon'
So, toggle bit18 of GPR1, used as a workaround of errata
"PCIe PCIe does not support L2 Power Down"
WARNING: This is not official workaround for ERR005723. But we
have not found issue yet. User should take own risk to use it.
Signed-off-by: Richard Zhu <r65037@freescale.com>
arch/arm/mach-imx/pm-imx6.c
diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c
index 5629f11..a4af0c5 100644
--- a/arch/arm/mach-imx/pm-imx6.c
+++ b/arch/arm/mach-imx/pm-imx6.c
@@ -18,6 +18,9 @@
#include <linux/of_irq.h>
#include <linux/suspend.h>
#include <linux/genalloc.h>
+#include <linux/regmap.h>
+#include <linux/mfd/syscon.h>
+#include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
#include <asm/cacheflush.h>
#include <asm/fncpy.h>
#include <asm/proc-fns.h>
@@ -223,6 +226,24 @@ static int imx6_suspend_finish(unsigned long val)
static int imx6_pm_enter(suspend_state_t state)
{
+ struct regmap *g;
+
+ /*
+ /*
+ * L2 can exit by 'reset' or Inband beacon (from remote EP)
+ * toggling phy_powerdown has same effect as 'inband beacon'
+ * So, toggle bit18 of GPR1, used as a workaround of errata
+ * "PCIe PCIe does not support L2 Power Down"
+ */
+ if (IS_ENABLED(CONFIG_PCI_IMX6)) {
+ g = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr");
+ if (IS_ERR(g)) {
+ pr_err("failed to find fsl,imx6q-iomux-gpr regmap\n");
+ return PTR_ERR(g);
+ }
+ regmap_update_bits(g, IOMUXC_GPR1, IMX6Q_GPR1_PCIE_TEST_PD,
+ IMX6Q_GPR1_PCIE_TEST_PD);
+ }
+
switch (state) {
case PM_SUSPEND_STANDBY:
imx6_set_lpm(STOP_POWER_ON);
@@ -259,6 +280,17 @@ static int imx6_pm_enter(suspend_state_t state)
return -EINVAL;
}
+ /*
+ * L2 can exit by 'reset' or Inband beacon (from remote EP)
+ * toggling phy_powerdown has same effect as 'inband beacon'
+ * So, toggle bit18 of GPR1, used as a workaround of errata
+ * "PCIe PCIe does not support L2 Power Down"
+ */
+ if (IS_ENABLED(CONFIG_PCI_IMX6)) {
+ regmap_update_bits(g, IOMUXC_GPR1, IMX6Q_GPR1_PCIE_TEST_PD,
+ !IMX6Q_GPR1_PCIE_TEST_PD);
+ }
+
return 0;
}