8134-pci-layerscape-add-LUT-DBG-reigster-offset-member.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. From 57d147c02fdcbae5e61ba322d51c5734f9511fd7 Mon Sep 17 00:00:00 2001
  2. From: Mingkai Hu <mingkai.hu@nxp.com>
  3. Date: Mon, 26 Sep 2016 14:19:32 +0800
  4. Subject: [PATCH 134/141] pci/layerscape: add LUT DBG reigster offset member
  5. commit 59ab37d6f46356a5b9755fcec74b23616dfdd62f
  6. [doesn't apply pm part]
  7. Different chip have different LUT debug register offset,
  8. so add a member to avoid macro redifinition.
  9. Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
  10. Integrated-by: Zhao Qiang <qiang.zhao@nxp.com>
  11. Integrated-by: Yutang Jiang <yutang.jiang@nxp.com>
  12. ---
  13. drivers/pci/host/pci-layerscape.c | 8 ++++++--
  14. 1 file changed, 6 insertions(+), 2 deletions(-)
  15. --- a/drivers/pci/host/pci-layerscape.c
  16. +++ b/drivers/pci/host/pci-layerscape.c
  17. @@ -41,6 +41,7 @@
  18. struct ls_pcie_drvdata {
  19. u32 lut_offset;
  20. u32 ltssm_shift;
  21. + u32 lut_dbg;
  22. struct pcie_host_ops *ops;
  23. };
  24. @@ -134,7 +135,7 @@ static int ls_pcie_link_up(struct pcie_p
  25. struct ls_pcie *pcie = to_ls_pcie(pp);
  26. u32 state;
  27. - state = (ioread32(pcie->lut + PCIE_LUT_DBG) >>
  28. + state = (ioread32(pcie->lut + pcie->drvdata->lut_dbg) >>
  29. pcie->drvdata->ltssm_shift) &
  30. LTSSM_STATE_MASK;
  31. @@ -196,24 +197,28 @@ static struct ls_pcie_drvdata ls1021_drv
  32. static struct ls_pcie_drvdata ls1012_drvdata = {
  33. .lut_offset = 0xC0000,
  34. .ltssm_shift = 24,
  35. + .lut_dbg = 0x7fc,
  36. .ops = &ls_pcie_host_ops,
  37. };
  38. static struct ls_pcie_drvdata ls1043_drvdata = {
  39. .lut_offset = 0x10000,
  40. .ltssm_shift = 24,
  41. + .lut_dbg = 0x7fc,
  42. .ops = &ls_pcie_host_ops,
  43. };
  44. static struct ls_pcie_drvdata ls1046_drvdata = {
  45. - .lut_offset = 0x10000,
  46. + .lut_offset = 0x80000,
  47. .ltssm_shift = 24,
  48. + .lut_dbg = 0x407fc,
  49. .ops = &ls_pcie_host_ops,
  50. };
  51. static struct ls_pcie_drvdata ls2080_drvdata = {
  52. .lut_offset = 0x80000,
  53. .ltssm_shift = 0,
  54. + .lut_dbg = 0x7fc,
  55. .ops = &ls_pcie_host_ops,
  56. };