From: Bin Meng Date: Thu, 20 Aug 2015 13:40:26 +0000 (-0700) Subject: dm: pci: Save devfn without bus number in pci_uclass_child_post_bind() X-Git-Tag: v2015.10-rc3~92^2~19 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dce54dd6c70e6af9a1b506ed45c0cfc9a90fcc92;p=u-boot dm: pci: Save devfn without bus number in pci_uclass_child_post_bind() In pci_uclass_child_post_bind(), bdf is extracted from fdt_pci_addr. Mask bus number before save it to pplat->devfn. Signed-off-by: Bin Meng Acked-by: Simon Glass --- diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index c90e7ac8dd..2d12344ae2 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -794,8 +794,8 @@ static int pci_uclass_child_post_bind(struct udevice *dev) if (ret != -ENOENT) return -EINVAL; } else { - /* extract the bdf from fdt_pci_addr */ - pplat->devfn = addr.phys_hi & 0xffff00; + /* extract the devfn from fdt_pci_addr */ + pplat->devfn = addr.phys_hi & 0xff00; } return 0;