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 <bmeng...@gmail.com>
---

Changes in v2: None

 drivers/pci/pci-uclass.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 63e85b9..4a509a2 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -787,8 +787,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;
-- 
1.8.2.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to