Commit ff529a93 authored by Christian Bruel's avatar Christian Bruel Committed by Bjorn Helgaas
Browse files

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: 151f3d29 ("PCI: stm32-ep: Add PCIe Endpoint support for STM32MP25")
Signed-off-by: default avatarChristian Bruel <christian.bruel@foss.st.com>
[mani: added fixes tag]
Signed-off-by: default avatarManivannan Sadhasivam <mani@kernel.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Link: https://patch.msgid.link/20251114-atu_align_ep-v1-1-88da5366fa04@foss.st.com
parent fa81d609
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -214,6 +214,8 @@ static int stm32_add_pcie_ep(struct stm32_pcie *stm32_pcie,

	ep->ops = &stm32_pcie_ep_ops;

	ep->page_size = stm32_pcie_epc_features.align;

	ret = dw_pcie_ep_init(ep);
	if (ret) {
		dev_err(dev, "Failed to initialize ep: %d\n", ret);