summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2015-08-20 06:40:26 -0700
committerSimon Glass <sjg@chromium.org>2015-08-26 07:54:13 -0700
commitdce54dd6c70e6af9a1b506ed45c0cfc9a90fcc92 (patch)
tree6d12b18cdf8f365643ed7089022ebbde3305fa99 /drivers/pci
parentbc6351eb48c116e9d38329c06f7e5a87ea8ec8ac (diff)
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 <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci-uclass.c4
1 files changed, 2 insertions, 2 deletions
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;