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 authored and Simon Glass committed 2018-08-08 12:49:31 +01:00
1 parent ed698aa7de
commit 4345998ae9
4 files changed
+112 -11

No files matched your search

+2 -1
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 */