diff options
author | Damien Le Moal <dlemoal@kernel.org> | 2024-10-17 10:58:48 +0900 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2024-11-25 13:18:36 -0600 |
commit | a7137cbf6bd53a9f9c40c64fc8b12b88289b3d4a (patch) | |
tree | 154cb2e8fe4be54ca5378370a08d0683d69710d4 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | bd6e61df4b2e69985daa312ce28b6af629b30870 (diff) | |
download | linux-stable-a7137cbf6bd53a9f9c40c64fc8b12b88289b3d4a.tar.gz linux-stable-a7137cbf6bd53a9f9c40c64fc8b12b88289b3d4a.tar.bz2 linux-stable-a7137cbf6bd53a9f9c40c64fc8b12b88289b3d4a.zip |
PCI: rockchip-ep: Handle PERST# signal in EP mode
Currently, the Rockchip PCIe endpoint controller driver does not handle
the PERST# signal, which prevents detecting when link training should
actually be started or if the host resets the device. This however can
be supported using the controller reset_gpios property set as an input
GPIO for endpoint mode.
Modify the Rockchip PCI endpoint controller driver to get the reset_gpio
and its associated interrupt which is serviced using a threaded IRQ with
the function rockchip_pcie_ep_perst_irq_thread() as handler.
This handler function notifies a link down event corresponding to the RC
side asserting the PERST# signal using pci_epc_linkdown() when the gpio
is high. Once the gpio value goes down, corresponding to the RC
de-asserting the PERST# signal, link training is started. The polarity
of the gpio interrupt trigger is changed from high to low after the RC
asserted PERST#, and conversely changed from low to high after the RC
de-asserts PERST#.
Also, given that the host mode controller and the endpoint mode
controller use two different property names for the same PERST# signal
(ep_gpios property and reset_gpios property respectively), for clarity,
rename the ep_gpio field of struct rockchip_pcie to perst_gpio.
Link: https://lore.kernel.org/r/20241017015849.190271-14-dlemoal@kernel.org
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
[kwilczynski: make log messages consistent, add missing include]
Signed-off-by: Krzysztof WilczyĆski <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions