PCI: j721e: Get offset within "syscon" from "ti,syscon-pcie-ctrl" phandle arg
authorKishon Vijay Abraham I <kishon@ti.com>
Thu, 10 Dec 2020 12:49:17 +0000 (18:19 +0530)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Thu, 10 Dec 2020 14:37:48 +0000 (14:37 +0000)
commit7aa256234c4c86d8b8fa19a7647051b8fd9721d9
tree7c42916de2d7f3847a90164efde05f9ef9155515
parent17c5b458a99049eec6915bc4b2188b8540cc22b0
PCI: j721e: Get offset within "syscon" from "ti,syscon-pcie-ctrl" phandle arg

Get "syscon" pcie_ctrl offset from the argument of "ti,syscon-pcie-ctrl"
phandle. Previously a subnode to "syscon" node was added which has the
exact memory mapped address of pcie_ctrl but now the offset of pcie_ctrl
within "syscon" is now being passed as argument to "ti,syscon-pcie-ctrl"
phandle.

If the offset is not provided in "ti,syscon-pcie-ctrl", the
full memory mapped address of pcie_ctrl is used in order to maintain old
DT compatibility.

This change is as discussed in [1]

[1] -> http://lore.kernel.org/r/CAL_JsqKiUcO76bo1GoepWM1TusJWoty_BRy2hFSgtEVMqtrvvQ@mail.gmail.com

Link: https://lore.kernel.org/r/20201210124917.24185-5-kishon@ti.com
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Rob Herring <robh@kernel.org>
drivers/pci/controller/cadence/pci-j721e.c