aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/host/pci-aardvark.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c
index b72f15c99793..5b8201aaf34d 100644
--- a/drivers/pci/host/pci-aardvark.c
+++ b/drivers/pci/host/pci-aardvark.c
@@ -172,8 +172,6 @@
172#define PCIE_CONFIG_WR_TYPE0 0xa 172#define PCIE_CONFIG_WR_TYPE0 0xa
173#define PCIE_CONFIG_WR_TYPE1 0xb 173#define PCIE_CONFIG_WR_TYPE1 0xb
174 174
175/* PCI_BDF shifts 8bit, so we need extra 4bit shift */
176#define PCIE_BDF(dev) (dev << 4)
177#define PCIE_CONF_BUS(bus) (((bus) & 0xff) << 20) 175#define PCIE_CONF_BUS(bus) (((bus) & 0xff) << 20)
178#define PCIE_CONF_DEV(dev) (((dev) & 0x1f) << 15) 176#define PCIE_CONF_DEV(dev) (((dev) & 0x1f) << 15)
179#define PCIE_CONF_FUNC(fun) (((fun) & 0x7) << 12) 177#define PCIE_CONF_FUNC(fun) (((fun) & 0x7) << 12)
@@ -456,7 +454,7 @@ static int advk_pcie_rd_conf(struct pci_bus *bus, u32 devfn,
456 advk_writel(pcie, reg, PIO_CTRL); 454 advk_writel(pcie, reg, PIO_CTRL);
457 455
458 /* Program the address registers */ 456 /* Program the address registers */
459 reg = PCIE_BDF(devfn) | PCIE_CONF_REG(where); 457 reg = PCIE_CONF_ADDR(bus->number, devfn, where);
460 advk_writel(pcie, reg, PIO_ADDR_LS); 458 advk_writel(pcie, reg, PIO_ADDR_LS);
461 advk_writel(pcie, 0, PIO_ADDR_MS); 459 advk_writel(pcie, 0, PIO_ADDR_MS);
462 460