diff options
author | Minghuan Lian <Minghuan.Lian@freescale.com> | 2014-11-11 03:42:06 (GMT) |
---|---|---|
committer | Matthew Weigel <Matthew.Weigel@freescale.com> | 2014-12-11 18:40:38 (GMT) |
commit | 2bdbe1255bf910aec0e49a5bc776f039e97822a2 (patch) | |
tree | 17eb16dbae5271560073070b182baab5457bffa2 /drivers/pci | |
parent | 1b706728df9fb41fdec5349526dca4ae6651af96 (diff) | |
download | linux-fsl-qoriq-2bdbe1255bf910aec0e49a5bc776f039e97822a2.tar.xz |
PCI: Layerscape: Call ls_pcie_host_init in PM resume function
In PM resume function, we call ls_pcie_host_init function to
re-initialize PCIe controller.
Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
Change-Id: Ife9fe90d63563ce9c56f4757bd233b4df4c35188
Reviewed-on: http://git.am.freescale.net:8181/23498
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Dongsheng Wang <dongsheng.wang@freescale.com>
Reviewed-by: Mingkai Hu <Mingkai.Hu@freescale.com>
Reviewed-by: Matthew Weigel <Matthew.Weigel@freescale.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/host/pci-layerscape.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c index f541a88..04ba519 100644 --- a/drivers/pci/host/pci-layerscape.c +++ b/drivers/pci/host/pci-layerscape.c @@ -261,29 +261,8 @@ static int ls_pcie_pm_suspend(struct device *dev) static int ls_pcie_pm_resume(struct device *dev) { struct ls_pcie *pcie = dev_get_drvdata(dev); - int count = 0; - u32 val; - - while (!ls_pcie_link_up(&pcie->pp)) { - usleep_range(100, 1000); - count++; - if (count >= 200) { - dev_info(dev, "No Link\n"); - return 0; - } - } - - if (of_device_is_compatible(pcie->dev->of_node, "fsl,ls1021a-pcie")) { - /* - * LS1021A Workaround for internal TKT228622 - * to fix the INTx hang issue - */ - val = ioread32(pcie->dbi + PCIE_STRFMR1); - val &= 0xffff; - iowrite32(val, pcie->dbi + PCIE_STRFMR1); - ls1021a_pcie_msi_fixup(&pcie->pp); - } + ls_pcie_host_init(&pcie->pp); return 0; }; |