diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2018-10-15 02:21:22 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-11-14 09:16:28 -0800 |
commit | 7a20614eb292c48b4a42c3b5314b26d975aa84b4 (patch) | |
tree | b4640aef36e084ce1749e3ec72a0ce34c301d3bc /drivers/misc/swap_case.c | |
parent | a8c5f8d3d02807f72d048950d72b0c73d55bd7fb (diff) | |
download | u-boot-7a20614eb292c48b4a42c3b5314b26d975aa84b4.zip u-boot-7a20614eb292c48b4a42c3b5314b26d975aa84b4.tar.gz u-boot-7a20614eb292c48b4a42c3b5314b26d975aa84b4.tar.bz2 |
test: dm: pci: Add cases for finding next PCI capability APIs
Add test cases to cover the two newly added PCI APIs:
dm_pci_find_next_capability() & dm_pci_find_next_ext_capability().
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/misc/swap_case.c')
-rw-r--r-- | drivers/misc/swap_case.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c index bffb809..fa608ce 100644 --- a/drivers/misc/swap_case.c +++ b/drivers/misc/swap_case.c @@ -124,12 +124,21 @@ static int sandbox_swap_case_read_config(struct udevice *emul, uint offset, case PCI_CAP_ID_PM_OFFSET: *valuep = (PCI_CAP_ID_EXP_OFFSET << 8) | PCI_CAP_ID_PM; break; + case PCI_CAP_ID_PM_OFFSET + PCI_CAP_LIST_NEXT: + *valuep = PCI_CAP_ID_EXP_OFFSET; + break; case PCI_CAP_ID_EXP_OFFSET: *valuep = (PCI_CAP_ID_MSIX_OFFSET << 8) | PCI_CAP_ID_EXP; break; + case PCI_CAP_ID_EXP_OFFSET + PCI_CAP_LIST_NEXT: + *valuep = PCI_CAP_ID_MSIX_OFFSET; + break; case PCI_CAP_ID_MSIX_OFFSET: *valuep = PCI_CAP_ID_MSIX; break; + case PCI_CAP_ID_MSIX_OFFSET + PCI_CAP_LIST_NEXT: + *valuep = 0; + break; case PCI_EXT_CAP_ID_ERR_OFFSET: *valuep = (PCI_EXT_CAP_ID_VC_OFFSET << 20) | PCI_EXT_CAP_ID_ERR; break; |