aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2017-01-20 10:58:37 -0500
committerBjorn Helgaas <bhelgaas@google.com>2017-01-30 18:00:31 -0500
commita71280722eeba8f1afa51ad6656028dcb96e110b (patch)
treebf49dbe30522e774e9cf3fee4a46fe36512a0bfd
parentcaf3f562e1161a86bd48a4c4c33af89d3693c658 (diff)
PCI: imx6: Remove LTSSM disable workaround
This causes CPU hangs when the system is reset by the watchdog, as the GPRs aren't cleared, but the clocks are back to disabled state. If the bootloader uses PCIe, it must take care to bring it down into a safe state, before passing control to the Linux kernel. This is the only way to get a properly operating system at all times and circumstances. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r--drivers/pci/host/pci-imx6.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
index 66c3b84a84d7..0f4f7c6eabfd 100644
--- a/drivers/pci/host/pci-imx6.c
+++ b/drivers/pci/host/pci-imx6.c
@@ -247,9 +247,6 @@ static int imx6q_pcie_abort_handler(unsigned long addr,
247 247
248static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie) 248static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie)
249{ 249{
250 struct pcie_port *pp = &imx6_pcie->pp;
251 u32 val, gpr1, gpr12;
252
253 switch (imx6_pcie->variant) { 250 switch (imx6_pcie->variant) {
254 case IMX6SX: 251 case IMX6SX:
255 regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, 252 regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12,
@@ -266,33 +263,6 @@ static void imx6_pcie_assert_core_reset(struct imx6_pcie *imx6_pcie)
266 IMX6Q_GPR1_PCIE_SW_RST); 263 IMX6Q_GPR1_PCIE_SW_RST);
267 break; 264 break;
268 case IMX6Q: 265 case IMX6Q:
269 /*
270 * If the bootloader already enabled the link we need some
271 * special handling to get the core back into a state where
272 * it is safe to touch it for configuration. As there is
273 * no dedicated reset signal wired up for MX6QDL, we need
274 * to manually force LTSSM into "detect" state before
275 * completely disabling LTSSM, which is a prerequisite for
276 * core configuration.
277 *
278 * If both LTSSM_ENABLE and REF_SSP_ENABLE are active we
279 * have a strong indication that the bootloader activated
280 * the link.
281 */
282 regmap_read(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, &gpr1);
283 regmap_read(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, &gpr12);
284
285 if ((gpr1 & IMX6Q_GPR1_PCIE_REF_CLK_EN) &&
286 (gpr12 & IMX6Q_GPR12_PCIE_CTL_2)) {
287 val = dw_pcie_readl_rc(pp, PCIE_PL_PFLR);
288 val &= ~PCIE_PL_PFLR_LINK_STATE_MASK;
289 val |= PCIE_PL_PFLR_FORCE_LINK;
290 dw_pcie_writel_rc(pp, PCIE_PL_PFLR, val);
291
292 regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12,
293 IMX6Q_GPR12_PCIE_CTL_2, 0 << 10);
294 }
295
296 regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, 266 regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1,
297 IMX6Q_GPR1_PCIE_TEST_PD, 1 << 18); 267 IMX6Q_GPR1_PCIE_TEST_PD, 1 << 18);
298 regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1, 268 regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR1,