Hi Richard, On Mon, Sep 22, 2014 at 7:45 AM, Richard Zhu <r65037@xxxxxxxxxxxxx> wrote: > +#ifdef CONFIG_PM_SLEEP > +static int pci_imx_suspend(void) > +{ > + int rc = 0; > + > + if (is_imx6sx_pcie(imx6_pcie)) { > + /* PM_TURN_OFF */ > + regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, > + BIT(16), 1 << 16); > + udelay(10); > + regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, > + BIT(16), 0 << 16); > + } > + > + return rc; You could get rid of this 'rc' variable and just return 0. > +} > + > +static void pci_imx_resume(void) > +{ > + struct pcie_port *pp = &imx6_pcie->pp; > + > + if (is_imx6sx_pcie(imx6_pcie)) { > + /* reset iMX6SX PCIe */ > + regmap_update_bits(imx6_pcie->iomuxc_gpr, > + IOMUXC_GPR5, BIT(18), 1 << 18); > + > + regmap_update_bits(imx6_pcie->iomuxc_gpr, > + IOMUXC_GPR5, BIT(18), 0 << 18); > + > + /* > + * controller maybe turn off, re-configure again > + * Set the CLASS_REV of RC CFG header to > + * PCI_CLASS_BRIDGE_PCI > + */ > + writel(readl(pp->dbi_base + PCI_CLASS_REVISION) > + | (PCI_CLASS_BRIDGE_PCI << 16), > + pp->dbi_base + PCI_CLASS_REVISION); > + > + dw_pcie_setup_rc(pp); > + } > +} Not related to this patch, but on mx6q/dl we still get kernel hang after doing suspend/resume when a PCI card is inserted. Is this fixed on mx6solox? Any idea as to how to fix it for mx6q? -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html