8235-pci-layerscape-fix-pci-lut-offset-issue.patch 1020 B

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