Skip to contentSkip to conversation

PCI: tegra194: Set address alignment for endpoint mode

PATCH In review Jon Hunter 2 participants 3 messages Apr 26, 2024

Subsystems (3)
lore
Share & tools
lore

Jon Hunter

author maintainer
#0 lore raw

PATCH 1/1 PCI: tegra194: Set address alignment for endpoint mode

Tegra194 and Tegra234 devices require that the endpoint address is aligned on a 64kB boundary and therefore, set the endpoint address alignment to 64kB in the Tegra194 PCIe driver.

Fixes c57247f940e8 ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194")
---
 drivers/pci/controller/dwc/pcie-tegra194.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/controller/dwc/pcie-tegra194.c +1 -0
index 93f5433c5c55..4537313ef37a 100644
@@ -2015,6 +2015,7 @@ static const struct pci_epc_features tegra_pcie_epc_features = {
 	.bar[BAR_3] = { .type = BAR_RESERVED, },
 	.bar[BAR_4] = { .type = BAR_RESERVED, },
 	.bar[BAR_5] = { .type = BAR_RESERVED, },
+	.align = SZ_64K,
 };
 
 static const struct pci_epc_features*
Signature · 1 line
2.34.1
#1 lore raw
Quoted 3 lines · Jon Hunter

Tegra194 and Tegra234 devices require that the endpoint address is aligned on a 64kB boundary and therefore, set the endpoint address alignment to 64kB in the Tegra194 PCIe driver.

Hello Jon,

While I think the change in this patch looks good, I think you need to rephrase your commit message.

The 'align' of pci_epc_features represents inbound ATU constraints. (So for BAR access.)
See Kishon reply at:
https://lore.kernel.org/linux-pci/[email protected]/T/#m7697d1d745d8499fc6b8db855b7f93dafd7ed5b3

Kind regards,
Niklas

Quoted 23 lines
Fixes c57247f940e8 ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194")
---
 drivers/pci/controller/dwc/pcie-tegra194.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/controller/dwc/pcie-tegra194.c +1 -0
index 93f5433c5c55..4537313ef37a 100644
@@ -2015,6 +2015,7 @@ static const struct pci_epc_features tegra_pcie_epc_features = {
 	.bar[BAR_3] = { .type = BAR_RESERVED, },
 	.bar[BAR_4] = { .type = BAR_RESERVED, },
 	.bar[BAR_5] = { .type = BAR_RESERVED, },
+	.align = SZ_64K,
 };
 
 static const struct pci_epc_features*
Signature · 1 line
2.34.1
author maintainer
#2 lore raw
Quoted 7 lines · Niklas Cassel
Quoted 3 lines · Jon Hunter

Tegra194 and Tegra234 devices require that the endpoint address is aligned on a 64kB boundary and therefore, set the endpoint address alignment to 64kB in the Tegra194 PCIe driver.

Hello Jon,

Quoted 7 lines

While I think the change in this patch looks good, I think you need to rephrase your commit message.

The 'align' of pci_epc_features represents inbound ATU constraints. (So for BAR access.)
See Kishon reply at:
https://lore.kernel.org/linux-pci/[email protected]/T/#m7697d1d745d8499fc6b8db855b7f93dafd7ed5b3

Thanks! I will fix up the commit message and re-send.

Jon