[PATCH v2 3/5] PCI: tegra194: Make BAR0 programmable and remove 1MB size limit
From: Manikanta Maddireddy
Date: Tue Mar 03 2026 - 02:24:29 EST
The Tegra194/234 Endpoint does not support the Resizable BAR capability,
but BAR0 can be programmed to different sizes via the DBI2 BAR registers
in dw_pcie_ep_set_bar_programmable(). The BAR0 size is set once during
initialization.
Remove the fixed 1MB limit from pci_epc_features so Endpoint function
drivers can configure the BAR0 size they need.
Signed-off-by: Manikanta Maddireddy <mmaddireddy@xxxxxxxxxx>
---
v2: drop .type init for BAR_0
drivers/pci/controller/dwc/pcie-tegra194.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
index ddb1570e257d..2f35f18ba766 100644
--- a/drivers/pci/controller/dwc/pcie-tegra194.c
+++ b/drivers/pci/controller/dwc/pcie-tegra194.c
@@ -2001,11 +2001,11 @@ static int tegra_pcie_ep_raise_irq(struct dw_pcie_ep *ep, u8 func_no,
return 0;
}
+/* Tegra EP: BAR0 = 64-bit programmable BAR */
static const struct pci_epc_features tegra_pcie_epc_features = {
.linkup_notifier = true,
.msi_capable = true,
- .bar[BAR_0] = { .type = BAR_FIXED, .fixed_size = SZ_1M,
- .only_64bit = true, },
+ .bar[BAR_0] = { .only_64bit = true, },
.bar[BAR_1] = { .type = BAR_64BIT_UPPER, },
.bar[BAR_2] = { .type = BAR_DISABLED, },
.bar[BAR_3] = { .type = BAR_DISABLED, },
--
2.34.1