1 From 562f1311b529d81662ed41786b8d240db2e2ff51 Mon Sep 17 00:00:00 2001
2 From: Shengzhou Liu <Shengzhou.Liu@nxp.com>
3 Date: Tue, 6 Dec 2016 15:30:39 +0800
4 Subject: [PATCH 237/238] pcie/ls208x: use unified compatible
5 "fsl,ls2080a-pcie" for ls208x
7 To avoid unnecessary reduplication, let's use unified compatible
8 "fsl,ls2080a-pcie" for ls2080a, ls2085a, ls2088a.
10 This patch fixes issue of pcie not working on ls2088a.
12 Signed-off-by: Shengzhou Liu <Shengzhou.Liu@nxp.com>
14 arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi | 12 ++++--------
15 drivers/pci/host/pci-layerscape.c | 13 ++++++++-----
16 2 files changed, 12 insertions(+), 13 deletions(-)
18 --- a/arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi
19 +++ b/arch/arm64/boot/dts/freescale/fsl-ls2088a.dtsi
24 - compatible = "fsl,ls2088a-pcie", "fsl,ls2080a-pcie",
25 - "fsl,ls2085a-pcie", "snps,dw-pcie";
26 + compatible = "fsl,ls2080a-pcie", "snps,dw-pcie";
27 reg = <0x00 0x03400000 0x0 0x00100000 /* controller registers */
28 0x20 0x00000000 0x0 0x00002000>; /* configuration space */
29 reg-names = "regs", "config";
34 - compatible = "fsl,ls2080a-pcie", "fsl,ls2080a-pcie",
35 - "fsl,ls2085a-pcie", "snps,dw-pcie";
36 + compatible = "fsl,ls2080a-pcie", "snps,dw-pcie";
37 reg = <0x00 0x03500000 0x0 0x00100000 /* controller registers */
38 0x28 0x00000000 0x0 0x00002000>; /* configuration space */
39 reg-names = "regs", "config";
44 - compatible = "fsl,ls2088a-pcie", "fsl,ls2080a-pcie",
45 - "fsl,ls2085a-pcie", "snps,dw-pcie";
46 + compatible = "fsl,ls2080a-pcie", "snps,dw-pcie";
47 reg = <0x00 0x03600000 0x0 0x00100000 /* controller registers */
48 0x30 0x00000000 0x0 0x00002000>; /* configuration space */
49 reg-names = "regs", "config";
54 - compatible = "fsl,ls2080a-pcie", "fsl,ls2080a-pcie",
55 - "fsl,ls2085a-pcie", "snps,dw-pcie";
56 + compatible = "fsl,ls2080a-pcie", "snps,dw-pcie";
57 reg = <0x00 0x03700000 0x0 0x00100000 /* controller registers */
58 0x38 0x00000000 0x0 0x00002000>; /* configuration space */
59 reg-names = "regs", "config";
60 --- a/drivers/pci/host/pci-layerscape.c
61 +++ b/drivers/pci/host/pci-layerscape.c
62 @@ -158,9 +158,14 @@ static void ls1021_pcie_host_init(struct
63 static int ls_pcie_link_up(struct pcie_port *pp)
65 struct ls_pcie *pcie = to_ls_pcie(pp);
69 - state = (ioread32(pcie->lut + pcie->drvdata->lut_dbg) >>
70 + if (of_get_property(pp->dev->of_node, "fsl,lut_diff", NULL))
73 + offset = pcie->drvdata->lut_dbg;
75 + state = (ioread32(pcie->lut + offset) >>
76 pcie->drvdata->ltssm_shift) &
79 @@ -261,7 +266,6 @@ static const struct of_device_id ls_pcie
80 { .compatible = "fsl,ls1046a-pcie", .data = &ls1046_drvdata },
81 { .compatible = "fsl,ls1088a-pcie", .data = &ls1088_drvdata },
82 { .compatible = "fsl,ls2080a-pcie", .data = &ls2080_drvdata },
83 - { .compatible = "fsl,ls2085a-pcie", .data = &ls2080_drvdata },
86 MODULE_DEVICE_TABLE(of, ls_pcie_of_match);
87 @@ -315,8 +319,7 @@ static int __init ls_pcie_probe(struct p
88 if (!ls_pcie_is_bridge(pcie))
91 - if (of_device_is_compatible(pdev->dev.of_node, "fsl,ls2085a-pcie") ||
92 - of_device_is_compatible(pdev->dev.of_node, "fsl,ls2080a-pcie") ||
93 + if (of_device_is_compatible(pdev->dev.of_node, "fsl,ls2080a-pcie") ||
94 of_device_is_compatible(pdev->dev.of_node, "fsl,ls1088a-pcie")) {