Commit 0a40891b authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by Vinod Koul
Browse files

phy: qcom-qmp-pcie: fix resource mapping for SDM845 QHP PHY



On SDM845 one of PCIe PHYs (the QHP one) has the same region for TX and
RX registers. Since the commit 4be26f69 ("phy: qcom-qmp-pcie: fix
memleak on probe deferral") added checking that resources are not
allocated beforehand, this PHY can not be probed anymore. Fix this by
skipping the map of ->rx resource on the QHP PHY and assign it manually.

Fixes: 4be26f69 ("phy: qcom-qmp-pcie: fix memleak on probe deferral")
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: default avatarJohan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20220926172514.880776-1-dmitry.baryshkov@linaro.org


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 37d40a21
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2210,6 +2210,9 @@ static int qmp_pcie_create(struct device *dev, struct device_node *np, int id,
	if (IS_ERR(qphy->tx))
		return PTR_ERR(qphy->tx);

	if (of_device_is_compatible(dev->of_node, "qcom,sdm845-qhp-pcie-phy"))
		qphy->rx = qphy->tx;
	else
		qphy->rx = devm_of_iomap(dev, np, 1, NULL);
	if (IS_ERR(qphy->rx))
		return PTR_ERR(qphy->rx);