[PATCH u-boot-marvell 3/4] arm: a37xx: pci: Use dev_read_addr()

Pali Rohár pali at kernel.org
Thu Feb 10 14:53:44 CET 2022


There is only one base address, so use dev_read_addr() instead of dev_read_addr_index().

Signed-off-by: Pali Rohár <pali at kernel.org>
---
 drivers/pci/pci-aardvark.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
index 8e3b13b49ea0..6e65c0e1558c 100644
--- a/drivers/pci/pci-aardvark.c
+++ b/drivers/pci/pci-aardvark.c
@@ -991,7 +991,7 @@ static int pcie_advk_of_to_plat(struct udevice *dev)
 	struct pcie_advk *pcie = dev_get_priv(dev);
 
 	/* Get the register base address */
-	pcie->base = (void *)dev_read_addr_index(dev, 0);
+	pcie->base = (void *)dev_read_addr(dev);
 	if ((fdt_addr_t)pcie->base == FDT_ADDR_T_NONE)
 		return -EINVAL;
 
-- 
2.20.1



More information about the U-Boot mailing list