summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarek BehĂșn <[email protected]>2021-02-08 23:01:37 +0100
committerStefan Roese <[email protected]>2021-02-26 10:22:29 +0100
commit201958af103a4ae8679e0d4d36353b8fb38486ec (patch)
tree816bf8041e1324dfc082dd230f0c3d79c91f63f2 /drivers
parent579e656f4fef3538c88ee2429ce80e65f4124013 (diff)
pci: pci_mvebu: use dev_seq instead of static variable
PCI uclass maps PCI bus numbers to the seq member of struct udevice. Use dev_seq(dev) as the bus number in mvebu_pcie_probe instead of an incrementing a static variable. Signed-off-by: Marek BehĂșn <[email protected]> Cc: Stefan Roese <[email protected]> Cc: Phil Sutter <[email protected]> Cc: Mario Six <[email protected]> Cc: Baruch Siach <[email protected]> Reviewed-by: Stefan Roese <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/pci_mvebu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
index 235d9bb90ca..bea8dcfc919 100644
--- a/drivers/pci/pci_mvebu.c
+++ b/drivers/pci/pci_mvebu.c
@@ -273,7 +273,7 @@ static int mvebu_pcie_probe(struct udevice *dev)
struct mvebu_pcie *pcie = dev_get_plat(dev);
struct udevice *ctlr = pci_get_controller(dev);
struct pci_controller *hose = dev_get_uclass_priv(ctlr);
- static int bus;
+ int bus = dev_seq(dev);
u32 reg;
debug("%s: PCIe %d.%d - up, base %08x\n", __func__,
@@ -336,8 +336,6 @@ static int mvebu_pcie_probe(struct udevice *dev)
writel(SOC_REGS_PHY_BASE, pcie->base + PCIE_BAR_LO_OFF(0));
writel(0, pcie->base + PCIE_BAR_HI_OFF(0));
- bus++;
-
return 0;
}