]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: keystone: Specify correct alignment requirement
authorNiklas Cassel <cassel@kernel.org>
Fri, 31 Jan 2025 18:29:55 +0000 (19:29 +0100)
committerKrzysztof Wilczyński <kwilczynski@kernel.org>
Sat, 8 Mar 2025 14:47:25 +0000 (14:47 +0000)
commita2fa5f96140e30d5ff47c92c5164e0256d92c794
tree5f23d20ffbd8d2f5fbf01080f1e4b3263b346b3d
parent6a6b66f7e607e8f6e5b48e246093ed911c8b31be
PCI: keystone: Specify correct alignment requirement

The support for a specific iATU alignment was added in
commit 2a9a801620ef ("PCI: endpoint: Add support to specify alignment for
buffers allocated to BARs").

This commit specifically mentions both that the alignment by each DWC
based EP driver should match CX_ATU_MIN_REGION_SIZE, and that AM65x
specifically has a 64 KB alignment.

This also matches the CX_ATU_MIN_REGION_SIZE value specified in the
section "12.2.2.4.7 PCIe Subsystem Address Translation" of the Technical
Reference Manual (TRM) for AM65x:

  https://www.ti.com/lit/ug/spruid7e/spruid7e.pdf

This higher value, 1 MB, was obviously an ugly hack used to be able to
handle Resizable BARs which have a minimum size of 1 MB.

Now when we actually have support for Resizable BARs, let's configure the
iATU alignment requirement to the actual requirement.
(BARs described as Resizable will still get aligned to 1 MB.)

Cc: stable+noautosel@kernel.org # Depends on PCI endpoint Resizable BARs series
Fixes: 23284ad677a9 ("PCI: keystone: Add support for PCIe EP in AM654x Platforms")
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20250131182949.465530-15-cassel@kernel.org
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
[kwilczynski: commit log]
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
drivers/pci/controller/dwc/pci-keystone.c