]> git.baikalelectronics.ru Git - uboot.git/commitdiff
drivers: pci: sandbox: Add stub sandbox PCI MPS support
authorStephen Carlson <stcarlso@linux.microsoft.com>
Fri, 10 Mar 2023 19:07:14 +0000 (11:07 -0800)
committerTom Rini <trini@konsulko.com>
Thu, 30 Mar 2023 19:09:59 +0000 (15:09 -0400)
Reports the sandbox swapcase PCI Express device to support a 256 byte
Maximum Payload Size for MPS tuning tests.

Signed-off-by: Stephen Carlson <stcarlso@linux.microsoft.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/misc/swap_case.c

index 7093ad1cd4fc642e953a715cc0015ecff94f2456..ee5c12bd0a426cb2e68deb3f89c93b33c309a060 100644 (file)
@@ -165,6 +165,9 @@ static int sandbox_swap_case_read_config(const struct udevice *emul,
        case PCI_CAP_ID_EXP_OFFSET + PCI_CAP_LIST_NEXT:
                *valuep = PCI_CAP_ID_MSIX_OFFSET;
                break;
+       case PCI_CAP_ID_EXP_OFFSET + PCI_EXP_DEVCAP:
+               *valuep = PCI_EXP_DEVCAP_PAYLOAD_256B;
+               break;
        case PCI_CAP_ID_MSIX_OFFSET:
                if (sandbox_swap_case_use_ea(emul))
                        *valuep = (PCI_CAP_ID_EA_OFFSET << 8) | PCI_CAP_ID_MSIX;