]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: pci: Save devfn without bus number in pci_uclass_child_post_bind()
authorBin Meng <bmeng.cn@gmail.com>
Thu, 20 Aug 2015 13:40:26 +0000 (06:40 -0700)
committerSimon Glass <sjg@chromium.org>
Wed, 26 Aug 2015 14:54:13 +0000 (07:54 -0700)
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.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/pci/pci-uclass.c

index c90e7ac8dd77cc55f375d827223c41e4ac28fa85..2d12344ae2713be17603fadc16dabd001d4b136c 100644 (file)
@@ -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;