1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

pci: sandbox: Support dynamically binding device driver

At present all emulated sandbox pci devices must be present in the
device tree in order to be used. The real world pci uclass driver
supports pci device driver matching, and we should add such support
on sandbox too.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Bin Meng
2018-08-03 01:14:45 -07:00
committed by Simon Glass
parent ed698aa7de
commit 4345998ae9
4 changed files with 112 additions and 11 deletions

View File

@@ -1441,11 +1441,12 @@ struct dm_pci_emul_ops {
*
* @bus: PCI bus to search
* @find_devfn: PCI device and function address (PCI_DEVFN())
* @containerp: Returns container device if found
* @emulp: Returns emulated device if found
* @return 0 if found, -ENODEV if not found
*/
int sandbox_pci_get_emul(struct udevice *bus, pci_dev_t find_devfn,
struct udevice **emulp);
struct udevice **containerp, struct udevice **emulp);
#endif /* CONFIG_DM_PCI */