Skip to content

Commit ff529a9

Browse files
bruelcbjorn-helgaas
authored andcommitted
PCI: stm32: Fix EP page_size alignment
pci_epc_mem_alloc_addr() allocates a CPU address from the ATU window phys base and a page number. Set the ep->page_size so the resulting CPU address is correctly aligned with the ATU required alignment. Fixes: 151f3d2 ("PCI: stm32-ep: Add PCIe Endpoint support for STM32MP25") Signed-off-by: Christian Bruel <christian.bruel@foss.st.com> [mani: added fixes tag] Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20251114-atu_align_ep-v1-1-88da5366fa04@foss.st.com
1 parent fa81d60 commit ff529a9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/pci/controller/dwc/pcie-stm32-ep.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ static int stm32_add_pcie_ep(struct stm32_pcie *stm32_pcie,
214214

215215
ep->ops = &stm32_pcie_ep_ops;
216216

217+
ep->page_size = stm32_pcie_epc_features.align;
218+
217219
ret = dw_pcie_ep_init(ep);
218220
if (ret) {
219221
dev_err(dev, "Failed to initialize ep: %d\n", ret);

0 commit comments

Comments
 (0)