layerscape: add ls2088ardb device support
[openwrt/openwrt.git] / target / linux / layerscape / patches-4.4 / 8230-layerscape-pci-fix-linkup-issue.patch
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
6 commit e6612d785198abbb39142e2acb63f9bff26ab718
7 [context adjustment]
8
9 Signed-off-by: Mingkai Hu <mingkai.hu@nxp.com>
10 Integrated-by: Zhao Qiang <qiang.zhao@nxp.com>
11 ---
12 drivers/pci/host/pci-layerscape.c | 13 +++++++++----
13 1 file changed, 9 insertions(+), 4 deletions(-)
14
15 diff --git a/drivers/pci/host/pci-layerscape.c b/drivers/pci/host/pci-layerscape.c
16 index 00feabf..f85ebcf 100644
17 --- a/drivers/pci/host/pci-layerscape.c
18 +++ b/drivers/pci/host/pci-layerscape.c
19 @@ -158,11 +158,16 @@ static void ls1021_pcie_host_init(struct pcie_port *pp)
20 static int ls_pcie_link_up(struct pcie_port *pp)
21 {
22 struct ls_pcie *pcie = to_ls_pcie(pp);
23 - u32 state;
24 + u32 state, offset;
25 +
26 + if (of_get_property(pp->dev->of_node, "fsl,lut_diff", NULL))
27 + offset = 0x407fc;
28 + else
29 + offset = PCIE_LUT_DBG;
30
31 - state = (ioread32(pcie->lut + pcie->drvdata->lut_dbg) >>
32 - pcie->drvdata->ltssm_shift) &
33 - LTSSM_STATE_MASK;
34 + state = (ioread32(pcie->lut + offset) >>
35 + pcie->drvdata->ltssm_shift) &
36 + LTSSM_STATE_MASK;
37
38 if (state < LTSSM_PCIE_L0)
39 return 0;
40 --
41 1.7.9.5
42