[PATCH 10/17] phy: samsung-ufs: ufs: Add SoC callbacks for calibration and clk data recovery
Peter Griffin
peter.griffin at linaro.org
Mon Apr 22 05:39:28 PDT 2024
Hi Dan,
Thanks for the review.
On Wed, 17 Apr 2024 at 10:52, Dan Carpenter <dan.carpenter at linaro.org> wrote:
>
> On Thu, Apr 04, 2024 at 01:25:52PM +0100, Peter Griffin wrote:
> > diff --git a/drivers/phy/samsung/phy-samsung-ufs.c b/drivers/phy/samsung/phy-samsung-ufs.c
> > index c567efafc30f..f57a2f2a415d 100644
> > --- a/drivers/phy/samsung/phy-samsung-ufs.c
> > +++ b/drivers/phy/samsung/phy-samsung-ufs.c
> > @@ -46,7 +46,7 @@ static void samsung_ufs_phy_config(struct samsung_ufs_phy *phy,
> > }
> > }
> >
> > -static int samsung_ufs_phy_wait_for_lock_acq(struct phy *phy)
> > +int samsung_ufs_phy_wait_for_lock_acq(struct phy *phy, u8 lane)
> > {
> > struct samsung_ufs_phy *ufs_phy = get_samsung_ufs_phy(phy);
> > const unsigned int timeout_us = 100000;
> > @@ -98,8 +98,15 @@ static int samsung_ufs_phy_calibrate(struct phy *phy)
> > }
> > }
> >
> > - if (ufs_phy->ufs_phy_state == CFG_POST_PWR_HS)
> > - err = samsung_ufs_phy_wait_for_lock_acq(phy);
> > + for_each_phy_lane(ufs_phy, i) {
> > + if (ufs_phy->ufs_phy_state == CFG_PRE_INIT &&
> > + ufs_phy->drvdata->wait_for_cal)
> > + err = ufs_phy->drvdata->wait_for_cal(phy, i);
> > +
> > + if (ufs_phy->ufs_phy_state == CFG_POST_PWR_HS &&
> > + ufs_phy->drvdata->wait_for_cdr)
> > + err = ufs_phy->drvdata->wait_for_cdr(phy, i);
>
> The "err" value is only preserved from the last iteration in this loop.
I'll send a follow up patch for this as it's already applied.
Thanks,
Peter
More information about the linux-phy
mailing list