mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
pci: Add pci_get_devfn() to extract devfn from the fdt_pci_addr
This function will be used by the Marvell Armada XP/38x PCIe driver, which is moved to DM right now. So let's extract the functionality from pci_uclass_child_post_bind() to make it available. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
@@ -1560,6 +1560,16 @@ struct dm_pci_emul_ops {
|
||||
int sandbox_pci_get_emul(struct udevice *bus, pci_dev_t find_devfn,
|
||||
struct udevice **containerp, struct udevice **emulp);
|
||||
|
||||
/**
|
||||
* pci_get_devfn() - Extract the devfn from fdt_pci_addr of the device
|
||||
*
|
||||
* Get devfn from fdt_pci_addr of the specifified device
|
||||
*
|
||||
* @dev: PCI device
|
||||
* @return devfn in bits 15...8 if found, -ENODEV if not found
|
||||
*/
|
||||
int pci_get_devfn(struct udevice *dev);
|
||||
|
||||
#endif /* CONFIG_DM_PCI */
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user