From 594d272cfd3dc43f118efb952676715b0382af24 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 25 Sep 2019 08:56:41 -0600 Subject: dm: core: Drop fdtdec_get_pci_addr() This function ise effectively replaced by ofnode_read_pci_addr() which works with flat tree. Delete it to avoid code duplication. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- drivers/core/fdtaddr.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'drivers/core') diff --git a/drivers/core/fdtaddr.c b/drivers/core/fdtaddr.c index c9a941116a..575798fae9 100644 --- a/drivers/core/fdtaddr.c +++ b/drivers/core/fdtaddr.c @@ -202,16 +202,13 @@ fdt_addr_t devfdt_get_addr_pci(struct udevice *dev) u32 bar; int ret; - ret = fdtdec_get_pci_addr(gd->fdt_blob, - dev_of_offset(dev), - FDT_PCI_SPACE_MEM32, "reg", - &pci_addr); + ret = ofnode_read_pci_addr(dev_ofnode(dev), FDT_PCI_SPACE_MEM32, + "reg", &pci_addr); if (ret) { /* try if there is any i/o-mapped register */ - ret = fdtdec_get_pci_addr(gd->fdt_blob, - dev_of_offset(dev), - FDT_PCI_SPACE_IO, "reg", - &pci_addr); + ret = ofnode_read_pci_addr(dev_ofnode(dev), + FDT_PCI_SPACE_IO, "reg", + &pci_addr); if (ret) return FDT_ADDR_T_NONE; } -- cgit