]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ENGR00270192 imx: pcie: toggle bit18 of grp1 fix pcie pm issue.
authorRichard Zhu <r65037@freescale.com>
Tue, 9 Jul 2013 05:40:07 +0000 (13:40 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:14:11 +0000 (14:14 +0200)
Set bit18 of gpr1 before enter into supend, and clean it
after resume, can fix the following errata.
Errata ERR005723_PCIe PCIe does not support L2 Power Down.

Signed-off-by: Richard Zhu <r65037@freescale.com>
arch/arm/mach-mx6/pm.c

index 6e306c279d201a7953184a61ac6ff5ba3bc54ebe..46d8196eae35ee745e6acb28910828b60a33fa4f 100644 (file)
@@ -342,6 +342,14 @@ static int mx6_suspend_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, to fix errata
+        * "PCIe PCIe does not support L2 Power Down"
+        */
+       __raw_writel(__raw_readl(IOMUXC_GPR1) | (1 << 18), IOMUXC_GPR1);
+
        if (state == PM_SUSPEND_MEM || state == PM_SUSPEND_STANDBY) {
 
                local_flush_tlb_all();
@@ -405,6 +413,14 @@ static int mx6_suspend_enter(suspend_state_t state)
                        cpu_do_idle();
        }
 
+       /*
+        * 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, to fix errata
+        * "PCIe PCIe does not support L2 Power Down"
+        */
+       __raw_writel(__raw_readl(IOMUXC_GPR1) & (~(1 << 18)), IOMUXC_GPR1);
+
        return 0;
 }