mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-27 23:20:26 +09:00
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 <marek.behun@nic.cz> Cc: Stefan Roese <sr@denx.de> Cc: Phil Sutter <phil@nwl.cc> Cc: Mario Six <mario.six@gdsys.cc> Cc: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
579e656f4f
commit
201958af10
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user