drivers: pcie: Introduce API to look up devices by ID

In some cases we cannot know the BDF up-front, so provide a way to
look it up based on the vendor and device ID.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2021-02-04 13:14:29 +02:00 committed by Anas Nashif
commit d01fa56f6a
3 changed files with 38 additions and 0 deletions

View file

@ -35,6 +35,8 @@
#define PCIE_ID_NONE PCIE_ID(0xFFFF, 0xFFFF)
#define PCIE_BDF_NONE 0xFFFFFFFFU
/*
* Since our internal representation of bus/device/function is arbitrary,
* we choose the same format employed in the x86 Configuration Address Port: