8230-layerscape-pci-fix-linkup-issue.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 1b23a4e0f03063f823ea38065c1106f62a56b408 Mon Sep 17 00:00:00 2001
  2. From: Mingkai Hu <mingkai.hu@nxp.com>
  3. Date: Mon, 7 Nov 2016 15:03:51 +0800
  4. Subject: [PATCH 230/238] layerscape/pci: fix linkup issue
  5. commit e6612d785198abbb39142e2acb63f9bff26ab718
  6. [context adjustment]
  7. Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
  8. Integrated-by: Zhao Qiang <qiang.zhao@nxp.com>
  9. ---
  10. drivers/pci/host/pci-layerscape.c | 13 +++++++++----
  11. 1 file changed, 9 insertions(+), 4 deletions(-)
  12. --- a/drivers/pci/host/pci-layerscape.c
  13. +++ b/drivers/pci/host/pci-layerscape.c
  14. @@ -158,11 +158,16 @@ static void ls1021_pcie_host_init(struct
  15. static int ls_pcie_link_up(struct pcie_port *pp)
  16. {
  17. struct ls_pcie *pcie = to_ls_pcie(pp);
  18. - u32 state;
  19. + u32 state, offset;
  20. - state = (ioread32(pcie->lut + pcie->drvdata->lut_dbg) >>
  21. - pcie->drvdata->ltssm_shift) &
  22. - LTSSM_STATE_MASK;
  23. + if (of_get_property(pp->dev->of_node, "fsl,lut_diff", NULL))
  24. + offset = 0x407fc;
  25. + else
  26. + offset = PCIE_LUT_DBG;
  27. +
  28. + state = (ioread32(pcie->lut + offset) >>
  29. + pcie->drvdata->ltssm_shift) &
  30. + LTSSM_STATE_MASK;
  31. if (state < LTSSM_PCIE_L0)
  32. return 0;