]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
phy: qcom-qmp-usb: initialize PCS_USB registers
authorAdrien Thierry <athierry@redhat.com>
Mon, 28 Aug 2023 15:23:50 +0000 (11:23 -0400)
committerVinod Koul <vkoul@kernel.org>
Thu, 21 Sep 2023 13:47:26 +0000 (15:47 +0200)
Currently, PCS_USB registers that have their initialization data in a
pcs_usb_tbl table are never initialized. Fix that.

Fixes: fc64623637da ("phy: qcom-qmp-combo,usb: add support for separate PCS_USB region")
Signed-off-by: Adrien Thierry <athierry@redhat.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20230828152353.16529-2-athierry@redhat.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/phy-qcom-qmp-usb.c

index 0130bb8e809afcd6cf78fe07ab5fff1e35ded237..e49262ce6d91da878a5c3a8aeeeea50bda839afb 100644 (file)
@@ -1703,6 +1703,7 @@ static int qmp_usb_power_on(struct phy *phy)
        void __iomem *tx = qmp->tx;
        void __iomem *rx = qmp->rx;
        void __iomem *pcs = qmp->pcs;
+       void __iomem *pcs_usb = qmp->pcs_usb;
        void __iomem *status;
        unsigned int val;
        int ret;
@@ -1726,6 +1727,9 @@ static int qmp_usb_power_on(struct phy *phy)
 
        qmp_usb_configure(pcs, cfg->pcs_tbl, cfg->pcs_tbl_num);
 
+       if (pcs_usb)
+               qmp_usb_configure(pcs_usb, cfg->pcs_usb_tbl, cfg->pcs_usb_tbl_num);
+
        if (cfg->has_pwrdn_delay)
                usleep_range(10, 20);