From: Tom Rini Date: Tue, 5 Feb 2019 13:37:21 +0000 (-0500) Subject: Merge git://git.denx.de/u-boot-marvell X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=bdac5e18a80427e1f44413dce78aefece956ffc2;p=u-boot.git Merge git://git.denx.de/u-boot-marvell - Move Armada XP / 38x PCIe driver to DM_PCI from me - Move Armada XP / 38x LCD driver to DM_VIDEO from me - Add uDPU board (Armada-3720) from Vladimir [trini: Fix warning in pci-uclass.c by removing ret from pci_uclass_child_post_bind as it no longer calls functions with a return code to catch.] Signed-off-by: Tom Rini II --- bdac5e18a80427e1f44413dce78aefece956ffc2 diff --cc drivers/pci/pci-uclass.c index 2cf55cb743,47f3cc9107..824fa11907 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@@ -1012,7 -1012,22 +1012,21 @@@ int pci_get_devfn(struct udevice *dev struct fdt_pci_addr addr; int ret; + /* Extract the devfn from fdt_pci_addr */ + ret = ofnode_read_pci_addr(dev_ofnode(dev), FDT_PCI_SPACE_CONFIG, + "reg", &addr); + if (ret) { + if (ret != -ENOENT) + return -EINVAL; + } + + return addr.phys_hi & 0xff00; + } + + static int pci_uclass_child_post_bind(struct udevice *dev) + { + struct pci_child_platdata *pplat; - int ret; + if (!dev_of_valid(dev)) return 0; @@@ -1022,14 -1037,9 +1036,7 @@@ ofnode_read_pci_vendev(dev_ofnode(dev), &pplat->vendor, &pplat->device); /* Extract the devfn from fdt_pci_addr */ - ret = ofnode_read_pci_addr(dev_ofnode(dev), FDT_PCI_SPACE_CONFIG, "reg", - &addr); - if (ret) { - if (ret != -ENOENT) - return -EINVAL; - } else { - pplat->devfn = addr.phys_hi & 0xff00; - } + pplat->devfn = pci_get_devfn(dev); - if (ret < 0) - return ret; return 0; }