pci: dw_mvebu: Use dev_read_addr_x APIs
Use dev_read_addr_x APIs which support both live device tree and flat DT backends, avoiding direct dependency on devfdt_* helpers. No functional changes. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Stefan Roese <stefan.roese@mailbox.org> Link: https://patch.msgid.link/20260526-devfdt-pci-v1-3-ed7f31d73938@nxp.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
This commit is contained in:
@@ -565,13 +565,12 @@ static int pcie_dw_mvebu_of_to_plat(struct udevice *dev)
|
||||
struct pcie_dw_mvebu *pcie = dev_get_priv(dev);
|
||||
|
||||
/* Get the controller base address */
|
||||
pcie->ctrl_base = devfdt_get_addr_index_ptr(dev, 0);
|
||||
pcie->ctrl_base = dev_read_addr_index_ptr(dev, 0);
|
||||
if (!pcie->ctrl_base)
|
||||
return -EINVAL;
|
||||
|
||||
/* Get the config space base address and size */
|
||||
pcie->cfg_base = devfdt_get_addr_size_index_ptr(dev, 1,
|
||||
&pcie->cfg_size);
|
||||
pcie->cfg_base = dev_read_addr_size_index_ptr(dev, 1, &pcie->cfg_size);
|
||||
if (!pcie->cfg_base)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user