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.
Unified · Split
| @@ -864,7 +864,7 @@ struct qmp_combo { · 863 unmodified lines | |||
| 864 | 864 | ||
| 865 | const struct qmp_phy_cfg *cfg; | 865 | const struct qmp_phy_cfg *cfg; |
| 866 | 866 | ||
| 867 | void __iomem *dp_com; | 867 | void __iomem *com; |
| 868 | 868 | ||
| 869 | void __iomem *serdes; | 869 | void __iomem *serdes; |
| 870 | void __iomem *tx; | 870 | void __iomem *tx; |
| @@ -1767,7 +1767,7 @@ static int qmp_combo_dp_calibrate(struct phy *phy) · 896 unmodified lines | |||
| 1767 | static int qmp_combo_com_init(struct qmp_combo *qmp) | 1767 | static int qmp_combo_com_init(struct qmp_combo *qmp) |
| 1768 | { | 1768 | { |
| 1769 | const struct qmp_phy_cfg *cfg = qmp->cfg; | 1769 | const struct qmp_phy_cfg *cfg = qmp->cfg; |
| 1770 | void __iomem *dp_com = qmp->dp_com; | 1770 | void __iomem *com = qmp->com; |
| 1771 | int ret; | 1771 | int ret; |
| 1772 | 1772 | ||
| 1773 | mutex_lock(&qmp->phy_mutex); | 1773 | mutex_lock(&qmp->phy_mutex); |
| @@ -1798,25 +1798,25 @@ static int qmp_combo_com_init(struct qmp_combo *qmp) · 24 unmodified lines | |||
| 1798 | if (ret) | 1798 | if (ret) |
| 1799 | goto err_assert_reset; | 1799 | goto err_assert_reset; |
| 1800 | 1800 | ||
| 1801 | qphy_setbits(dp_com, QPHY_V3_DP_COM_POWER_DOWN_CTRL, SW_PWRDN); | 1801 | qphy_setbits(com, QPHY_V3_DP_COM_POWER_DOWN_CTRL, SW_PWRDN); |
| 1802 | 1802 | ||
| 1803 | /* override hardware control for reset of qmp phy */ | 1803 | /* override hardware control for reset of qmp phy */ |
| 1804 | qphy_setbits(dp_com, QPHY_V3_DP_COM_RESET_OVRD_CTRL, | 1804 | qphy_setbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL, |
| 1805 | SW_DPPHY_RESET_MUX | SW_DPPHY_RESET | | 1805 | SW_DPPHY_RESET_MUX | SW_DPPHY_RESET | |
| 1806 | SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET); | 1806 | SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET); |
| 1807 | 1807 | ||
| 1808 | /* Default type-c orientation, i.e CC1 */ | 1808 | /* Default type-c orientation, i.e CC1 */ |
| 1809 | qphy_setbits(dp_com, QPHY_V3_DP_COM_TYPEC_CTRL, 0x02); | 1809 | qphy_setbits(com, QPHY_V3_DP_COM_TYPEC_CTRL, 0x02); |
| 1810 | 1810 | ||
| 1811 | qphy_setbits(dp_com, QPHY_V3_DP_COM_PHY_MODE_CTRL, USB3_MODE | DP_MODE); | 1811 | qphy_setbits(com, QPHY_V3_DP_COM_PHY_MODE_CTRL, USB3_MODE | DP_MODE); |
| 1812 | 1812 | ||
| 1813 | /* bring both QMP USB and QMP DP PHYs PCS block out of reset */ | 1813 | /* bring both QMP USB and QMP DP PHYs PCS block out of reset */ |
| 1814 | qphy_clrbits(dp_com, QPHY_V3_DP_COM_RESET_OVRD_CTRL, | 1814 | qphy_clrbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL, |
| 1815 | SW_DPPHY_RESET_MUX | SW_DPPHY_RESET | | 1815 | SW_DPPHY_RESET_MUX | SW_DPPHY_RESET | |
| 1816 | SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET); | 1816 | SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET); |
| 1817 | 1817 | ||
| 1818 | qphy_clrbits(dp_com, QPHY_V3_DP_COM_SWI_CTRL, 0x03); | 1818 | qphy_clrbits(com, QPHY_V3_DP_COM_SWI_CTRL, 0x03); |
| 1819 | qphy_clrbits(dp_com, QPHY_V3_DP_COM_SW_RESET, SW_RESET); | 1819 | qphy_clrbits(com, QPHY_V3_DP_COM_SW_RESET, SW_RESET); |
| 1820 | 1820 | ||
| 1821 | qphy_setbits(qmp->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], | 1821 | qphy_setbits(qmp->pcs, cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL], |
| 1822 | SW_PWRDN); | 1822 | SW_PWRDN); |
| @@ -2538,9 +2538,9 @@ static int qmp_combo_parse_dt_legacy(struct qmp_combo *qmp, struct device_node * · 715 unmodified lines | |||
| 2538 | if (IS_ERR(qmp->serdes)) | 2538 | if (IS_ERR(qmp->serdes)) |
| 2539 | return PTR_ERR(qmp->serdes); | 2539 | return PTR_ERR(qmp->serdes); |
| 2540 | 2540 | ||
| 2541 | qmp->dp_com = devm_platform_ioremap_resource(pdev, 1); | 2541 | qmp->com = devm_platform_ioremap_resource(pdev, 1); |
| 2542 | if (IS_ERR(qmp->dp_com)) | 2542 | if (IS_ERR(qmp->com)) |
| 2543 | return PTR_ERR(qmp->dp_com); | 2543 | return PTR_ERR(qmp->com); |
| 2544 | 2544 | ||
| 2545 | qmp->dp_serdes = devm_platform_ioremap_resource(pdev, 2); | 2545 | qmp->dp_serdes = devm_platform_ioremap_resource(pdev, 2); |
| 2546 | if (IS_ERR(qmp->dp_serdes)) | 2546 | if (IS_ERR(qmp->dp_serdes)) |