]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: dw-rockchip: Enumerate endpoints based on dll_link_up IRQ
authorNiklas Cassel <cassel@kernel.org>
Wed, 27 Nov 2024 14:50:42 +0000 (15:50 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Sat, 18 Jan 2025 17:35:25 +0000 (11:35 -0600)
commit0e0b45ab5d770a748487ba0ae8f77d1fb0f0de3e
tree61c7ca26f3eaae7f07d5bfadd4da36c6f5f08bbb
parentf0639013d340580b72df95d012a93f35eeb0da64
PCI: dw-rockchip: Enumerate endpoints based on dll_link_up IRQ

Most boards using the pcie-dw-rockchip PCIe controller lack standard
hotplug support.

Thus, when an endpoint is attached to the SoC, users have to rescan the bus
manually to enumerate the device. This can be avoided by using the
'dll_link_up' interrupt in the combined system interrupt 'sys'.

Once the 'dll_link_up' IRQ is received, the bus underneath the host bridge
is scanned to enumerate PCIe endpoint devices.

This implements the same functionality that was implemented in the DWC
based pcie-qcom driver in 4581403f6792 ("PCI: qcom: Enumerate endpoints
based on Link up event in 'global_irq' interrupt").

The Root Complex specific device tree binding for pcie-dw-rockchip already
has the 'sys' interrupt marked as required, so there is no need to update
the device tree binding. This also means that we can request the 'sys' IRQ
unconditionally.

Link: https://lore.kernel.org/r/20241127145041.3531400-2-cassel@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org>
[bhelgaas: commit log, squash Pei Xiao's redundant dev_err() fix from
https://lore.kernel.org/r/327718207d3cd72847c079ff9d56eb246744c182.1736126067.git.xiaopei01@kylinos.cn,
squash Niklas's #define change from https://lore.kernel.org/r/20250103095812.2408364-2-cassel@kernel.org]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
drivers/pci/controller/dwc/pcie-dw-rockchip.c