aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/pcie_xilinx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/pcie_xilinx.c')
-rw-r--r--drivers/pci/pcie_xilinx.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pci/pcie_xilinx.c b/drivers/pci/pcie_xilinx.c
index ae9a65b0a9..eb9ec97b74 100644
--- a/drivers/pci/pcie_xilinx.c
+++ b/drivers/pci/pcie_xilinx.c
@@ -76,10 +76,7 @@ static int pcie_xilinx_config_address(const struct udevice *udev, pci_dev_t bdf,
return -ENODEV;
addr = pcie->cfg_base;
- addr += bus << 20;
- addr += dev << 15;
- addr += func << 12;
- addr += offset;
+ addr += PCIE_ECAM_OFFSET(bus, dev, func, offset);
*paddress = addr;
return 0;