Lines Matching full:ufs_phy
50 struct samsung_ufs_phy *ufs_phy = get_samsung_ufs_phy(phy); in samsung_ufs_phy_wait_for_lock_acq() local
57 ufs_phy->reg_pma + PHY_APB_ADDR(PHY_PLL_LOCK_STATUS), in samsung_ufs_phy_wait_for_lock_acq()
60 dev_err(ufs_phy->dev, in samsung_ufs_phy_wait_for_lock_acq()
66 ufs_phy->reg_pma + in samsung_ufs_phy_wait_for_lock_acq()
67 PHY_APB_ADDR(ufs_phy->drvdata->cdr_lock_status_offset), in samsung_ufs_phy_wait_for_lock_acq()
70 dev_err(ufs_phy->dev, in samsung_ufs_phy_wait_for_lock_acq()
78 struct samsung_ufs_phy *ufs_phy = get_samsung_ufs_phy(phy); in samsung_ufs_phy_calibrate() local
79 const struct samsung_ufs_phy_cfg * const *cfgs = ufs_phy->cfgs; in samsung_ufs_phy_calibrate()
84 if (unlikely(ufs_phy->ufs_phy_state < CFG_PRE_INIT || in samsung_ufs_phy_calibrate()
85 ufs_phy->ufs_phy_state >= CFG_TAG_MAX)) { in samsung_ufs_phy_calibrate()
86 dev_err(ufs_phy->dev, "invalid phy config index %d\n", ufs_phy->ufs_phy_state); in samsung_ufs_phy_calibrate()
90 cfg = cfgs[ufs_phy->ufs_phy_state]; in samsung_ufs_phy_calibrate()
95 for_each_phy_lane(ufs_phy, i) { in samsung_ufs_phy_calibrate()
96 samsung_ufs_phy_config(ufs_phy, cfg, i); in samsung_ufs_phy_calibrate()
100 for_each_phy_lane(ufs_phy, i) { in samsung_ufs_phy_calibrate()
101 if (ufs_phy->ufs_phy_state == CFG_PRE_INIT && in samsung_ufs_phy_calibrate()
102 ufs_phy->drvdata->wait_for_cal) { in samsung_ufs_phy_calibrate()
103 err = ufs_phy->drvdata->wait_for_cal(phy, i); in samsung_ufs_phy_calibrate()
108 if (ufs_phy->ufs_phy_state == CFG_POST_PWR_HS && in samsung_ufs_phy_calibrate()
109 ufs_phy->drvdata->wait_for_cdr) { in samsung_ufs_phy_calibrate()
110 err = ufs_phy->drvdata->wait_for_cdr(phy, i); in samsung_ufs_phy_calibrate()
126 switch (ufs_phy->ufs_phy_state) { in samsung_ufs_phy_calibrate()
128 ufs_phy->ufs_phy_state = CFG_POST_INIT; in samsung_ufs_phy_calibrate()
131 ufs_phy->ufs_phy_state = CFG_PRE_PWR_HS; in samsung_ufs_phy_calibrate()
134 ufs_phy->ufs_phy_state = CFG_POST_PWR_HS; in samsung_ufs_phy_calibrate()
138 ufs_phy->ufs_phy_state = CFG_PRE_INIT; in samsung_ufs_phy_calibrate()
141 dev_err(ufs_phy->dev, "wrong state for phy calibration\n"); in samsung_ufs_phy_calibrate()