aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Carlson <stcarlso@linux.microsoft.com>2023-03-10 11:07:14 -0800
committerTom Rini <trini@konsulko.com>2023-03-30 15:09:59 -0400
commit713db6f6d3a3212270fd12ba5c47e986b36dbc39 (patch)
tree9bc1c2f4ece171ec599c76d7867cd383590a3c3a
parent59b1c9be01934222cf773b35de7c8d086dabaef6 (diff)
downloadu-boot-713db6f6d3a3212270fd12ba5c47e986b36dbc39.zip
u-boot-713db6f6d3a3212270fd12ba5c47e986b36dbc39.tar.gz
u-boot-713db6f6d3a3212270fd12ba5c47e986b36dbc39.tar.bz2
drivers: pci: sandbox: Add stub sandbox PCI MPS support
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>
-rw-r--r--drivers/misc/swap_case.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/misc/swap_case.c b/drivers/misc/swap_case.c
index 7093ad1..ee5c12b 100644
--- a/drivers/misc/swap_case.c
+++ b/drivers/misc/swap_case.c
@@ -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;