]> git.ipfire.org Git - thirdparty/linux.git/commit
PCI: cadence: Use cdns_pcie_read_sz() for byte or word read access
authorAksh Garg <a-garg7@ti.com>
Thu, 2 Apr 2026 08:55:45 +0000 (14:25 +0530)
committerManivannan Sadhasivam <mani@kernel.org>
Sat, 4 Apr 2026 17:25:27 +0000 (22:55 +0530)
commitd9cf7154deed71a4f23e81101571c79cdc77be00
tree3c116a6762ed0d569c21ec32df7dbf429bf6f473
parent6de23f81a5e08be8fbf5e8d7e9febc72a5b5f27f
PCI: cadence: Use cdns_pcie_read_sz() for byte or word read access

The commit 18ac51ae9df9 ("PCI: cadence: Implement capability search
using PCI core APIs") assumed all the platforms using Cadence PCIe
controller support byte and word register accesses. This is not true
for all platforms (e.g., TI J721E SoC, which only supports dword
register accesses).

This causes capability searches via cdns_pcie_find_capability() to fail
on such platforms.

Fix this by using cdns_pcie_read_sz() for config read functions, which
properly handles size-aligned accesses. Remove the now-unused byte and
word read wrapper functions (cdns_pcie_readw and cdns_pcie_readb).

Fixes: 18ac51ae9df9 ("PCI: cadence: Implement capability search using PCI core APIs")
Signed-off-by: Aksh Garg <a-garg7@ti.com>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260402085545.284457-1-a-garg7@ti.com
drivers/pci/controller/cadence/pcie-cadence.h