PCI: qcom: Add QCS404 PCIe controller support
authorBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 29 May 2019 00:57:10 +0000 (17:57 -0700)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Wed, 29 May 2019 16:12:35 +0000 (17:12 +0100)
commit67021ae0bbe941dca6605efab52089bcbf245fb5
tree375aefdfba5079caf51f20fd44ef02909f741769
parent29a50257a9d6d16320bc5e2fc1b15e0f2b2eb7cf
PCI: qcom: Add QCS404 PCIe controller support

The QCS404 platform contains a PCIe version 2.4.0 controller and a
Qualcomm PCIe2 PHY. The driver already supports version 2.4.0, for the
IPQ4019, but this support touches clocks and resets related to the PHY
as well and there's no upstream driver for the PHY.

On QCS404 we must initialize the PHY, so a separate PHY driver is
implemented to take care of this and the controller driver is updated to
not require the PHY related resources. This is done by relying on the
fact that operations in both the clock and reset framework are NOPs when
passed NULL, so we can isolate this change to only the
qcom_pcie_get_resources_2_4_0() function.

For QCS404 we also need to enable the AHB (iface) clock, in order to
access the register space of the controller, but as this is not part of
the IPQ4019 DT binding this is only added for new users of the 2.4.0
controller.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Niklas Cassel <niklas.cassel@linaro.org>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>
drivers/pci/controller/dwc/pcie-qcom.c