PCI: qcom: Add basic interconnect support
authorJohan Hovold <johan+linaro@kernel.org>
Wed, 2 Nov 2022 09:07:05 +0000 (10:07 +0100)
committerLorenzo Pieralisi <lpieralisi@kernel.org>
Fri, 11 Nov 2022 11:04:22 +0000 (12:04 +0100)
commitc4860af88d0cb1bb006df12615c5515ae509f73b
tree0d76c8e08f5f761b04224afb065fd7e5c6c6572b
parent3a936b2a5a581e50dd5cab20a48eb0055a527f02
PCI: qcom: Add basic interconnect support

On Qualcomm platforms like SC8280XP and SA8540P, interconnect bandwidth
must be requested before enabling interconnect clocks.

Add basic support for managing an optional "pcie-mem" interconnect path
by setting a low constraint before enabling clocks and updating it after
the link is up.

Note that it is not possible for a controller driver to set anything but
a maximum peak bandwidth as expected average bandwidth will vary with
use case and actual use (and power policy?). This very much remains an
unresolved problem with the interconnect framework.

Also note that no constraint is set for the SC8280XP/SA8540P "cpu-pcie"
path for now as it is not clear what an appropriate constraint would be
(and the system does not crash when left unspecified).

Link: https://lore.kernel.org/r/20221102090705.23634-3-johan+linaro@kernel.org
Fixes: 70574511f3fc ("PCI: qcom: Add support for SC8280XP")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: Brian Masney <bmasney@redhat.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Acked-by: Georgi Djakov <djakov@kernel.org>
drivers/pci/controller/dwc/pcie-qcom.c