phy: qcom-qmp-combo: rename common-register pointers
The common registers are shared by the USB and DP parts of the PHY so drop the misleading "dp" prefix from the corresponding pointers. Note that the "DP" prefix could also be dropped from the corresponding defines, but leave that in place for now. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20221121085058.31213-12-johan+linaro@kernel.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
@ -864,7 +864,7 @@ struct qmp_combo {
|
|||||||
|
|
||||||
const struct qmp_phy_cfg *cfg;
|
const struct qmp_phy_cfg *cfg;
|
||||||
|
|
||||||
void __iomem *dp_com;
|
void __iomem *com;
|
||||||
|
|
||||||
void __iomem *serdes;
|
void __iomem *serdes;
|
||||||
void __iomem *tx;
|
void __iomem *tx;
|
||||||
@ -1767,7 +1767,7 @@ static int qmp_combo_dp_calibrate(struct phy *phy)
|
|||||||
static int qmp_combo_com_init(struct qmp_combo *qmp)
|
static int qmp_combo_com_init(struct qmp_combo *qmp)
|
||||||
{
|
{
|
||||||
const struct qmp_phy_cfg *cfg = qmp->cfg;
|
const struct qmp_phy_cfg *cfg = qmp->cfg;
|
||||||
void __iomem *dp_com = qmp->dp_com;
|
void __iomem *com = qmp->com;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
mutex_lock(&qmp->phy_mutex);
|
mutex_lock(&qmp->phy_mutex);
|
||||||
@ -1798,25 +1798,25 @@ static int qmp_combo_com_init(struct qmp_combo *qmp)
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err_assert_reset;
|
goto err_assert_reset;
|
||||||
|
|
||||||
qphy_setbits(dp_com, QPHY_V3_DP_COM_POWER_DOWN_CTRL, SW_PWRDN);
|
qphy_setbits(com, QPHY_V3_DP_COM_POWER_DOWN_CTRL, SW_PWRDN);
|
||||||
|
|
||||||
/* override hardware control for reset of qmp phy */
|
/* override hardware control for reset of qmp phy */
|
||||||
qphy_setbits(dp_com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
|
qphy_setbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
|
||||||
SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
|
SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
|
||||||
SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
|
SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
|
||||||
|
|
||||||
/* Default type-c orientation, i.e CC1 */
|
/* Default type-c orientation, i.e CC1 */
|
||||||
qphy_setbits(dp_com, QPHY_V3_DP_COM_TYPEC_CTRL, 0x02);
|
qphy_setbits(com, QPHY_V3_DP_COM_TYPEC_CTRL, 0x02);
|
||||||
|
|
||||||
qphy_setbits(dp_com, QPHY_V3_DP_COM_PHY_MODE_CTRL, USB3_MODE | DP_MODE);
|
qphy_setbits(com, QPHY_V3_DP_COM_PHY_MODE_CTRL, USB3_MODE | DP_MODE);
|
||||||
|
|
||||||
/* bring both QMP USB and QMP DP PHYs PCS block out of reset */
|
/* bring both QMP USB and QMP DP PHYs PCS block out of reset */
|
||||||
qphy_clrbits(dp_com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
|
qphy_clrbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
|
||||||
SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
|
SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
|
||||||
SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
|
SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
|
||||||
|
|
||||||
qphy_clrbits(dp_com, QPHY_V3_DP_COM_SWI_CTRL, 0x03);
|
qphy_clrbits(com, QPHY_V3_DP_COM_SWI_CTRL, 0x03);
|
||||||
qphy_clrbits(dp_com, QPHY_V3_DP_COM_SW_RESET, SW_RESET);
|
qphy_clrbits(com, QPHY_V3_DP_COM_SW_RESET, SW_RESET);
|
||||||
|
|
||||||
qphy_setbits(qmp->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL],
|
qphy_setbits(qmp->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL],
|
||||||
SW_PWRDN);
|
SW_PWRDN);
|
||||||
@ -2538,9 +2538,9 @@ static int qmp_combo_parse_dt_legacy(struct qmp_combo *qmp, struct device_node *
|
|||||||
if (IS_ERR(qmp->serdes))
|
if (IS_ERR(qmp->serdes))
|
||||||
return PTR_ERR(qmp->serdes);
|
return PTR_ERR(qmp->serdes);
|
||||||
|
|
||||||
qmp->dp_com = devm_platform_ioremap_resource(pdev, 1);
|
qmp->com = devm_platform_ioremap_resource(pdev, 1);
|
||||||
if (IS_ERR(qmp->dp_com))
|
if (IS_ERR(qmp->com))
|
||||||
return PTR_ERR(qmp->dp_com);
|
return PTR_ERR(qmp->com);
|
||||||
|
|
||||||
qmp->dp_serdes = devm_platform_ioremap_resource(pdev, 2);
|
qmp->dp_serdes = devm_platform_ioremap_resource(pdev, 2);
|
||||||
if (IS_ERR(qmp->dp_serdes))
|
if (IS_ERR(qmp->dp_serdes))
|
||||||
|
Reference in New Issue
Block a user