[OpenWrt-Devel] [PATCH 04/10] imx6: Add gen2 disable patch
Pushpal Sidhu
psidhu at gateworks.com
Mon Dec 21 17:25:14 EST 2015
Disable pcie-gen2 in this kernel as the products meant to run it do not fall
within specification for it. Instead, leave only Gen1 enabled.
Signed-off-by: Tim Harvey <tharvey at gateworks.com>
Signed-off-by: Pushpal Sidhu <psidhu at gateworks.com>
---
.../linux/imx6/patches-4.3/210-disable_gen2.patch | 30 ++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100644 target/linux/imx6/patches-4.3/210-disable_gen2.patch
diff --git a/target/linux/imx6/patches-4.3/210-disable_gen2.patch b/target/linux/imx6/patches-4.3/210-disable_gen2.patch
new file mode 100644
index 0000000..8b3a010
--- /dev/null
+++ b/target/linux/imx6/patches-4.3/210-disable_gen2.patch
@@ -0,0 +1,30 @@
+Index: linux-4.3/drivers/pci/host/pci-imx6.c
+===================================================================
+--- linux-4.3.orig/drivers/pci/host/pci-imx6.c 2015-11-01 16:05:25.000000000 -0800
++++ linux-4.3/drivers/pci/host/pci-imx6.c 2015-12-18 10:39:45.015158318 -0800
+@@ -392,12 +392,15 @@
+ if (ret)
+ return ret;
+
++#if 0 /* Disable Gen2 */
+ /* Allow Gen2 mode after the link is up. */
+ tmp = readl(pp->dbi_base + PCIE_RC_LCR);
+ tmp &= ~PCIE_RC_LCR_MAX_LINK_SPEEDS_MASK;
+ tmp |= PCIE_RC_LCR_MAX_LINK_SPEEDS_GEN2;
+ writel(tmp, pp->dbi_base + PCIE_RC_LCR);
+-
++#else
++ dev_info(pp->dev, "Link: Gen2 disabled\n");
++#endif
+ /*
+ * Start Directed Speed Change so the best possible speed both link
+ * partners support can be negotiated.
+@@ -420,7 +423,7 @@
+ }
+
+ tmp = readl(pp->dbi_base + PCIE_RC_LCSR);
+- dev_dbg(pp->dev, "Link up, Gen=%i\n", (tmp >> 16) & 0xf);
++ dev_info(pp->dev, "Link up, Gen=%i\n", (tmp >> 16) & 0xf);
+ return 0;
+ }
+
--
2.6.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list