[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e7cff4f9-da46-4352-8900-3eddae9345a7@ti.com>
Date: Wed, 2 Apr 2025 18:59:58 +0530
From: Devarsh Thakkar <devarsht@...com>
To: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>, <vkoul@...nel.org>,
<kishon@...nel.org>, <mripard@...nel.org>,
<linux-phy@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
CC: <sakari.ailus@...ux.intel.com>, <u.kleine-koenig@...libre.com>,
<vigneshr@...com>, <aradhya.bhatia@...ux.dev>, <s-jain1@...com>,
<r-donadkar@...com>
Subject: Re: [PATCH v2 1/2] phy: cadence: cdns-dphy: Fix PLL lock and
O_CMN_READY polling
Hi Tomi,
Thanks for the review.
On 02/04/25 17:25, Tomi Valkeinen wrote:
<snip>
>> /*
>> * This is the reference implementation of DPHY hooks. Specific
>> integration of
>> * this IP may have to re-implement some of them depending on how
>> they decided
>> @@ -278,6 +309,8 @@ static const struct cdns_dphy_ops j721e_dphy_ops = {
>> .get_wakeup_time_ns = cdns_dphy_j721e_get_wakeup_time_ns,
>> .set_pll_cfg = cdns_dphy_j721e_set_pll_cfg,
>> .set_psm_div = cdns_dphy_j721e_set_psm_div,
>> + .wait_for_pll_lock = cdns_dphy_j721e_wait_for_pll_lock,
>> + .wait_for_cmn_ready = cdns_dphy_j721e_wait_for_cmn_ready,
>> };
>> static int cdns_dphy_config_from_opts(struct phy *phy,
>> @@ -373,6 +406,14 @@ static int cdns_dphy_configure(struct phy *phy,
>> union phy_configure_opts *opts)
>> FIELD_PREP(DPHY_BAND_CFG_RIGHT_BAND, band_ctrl);
>> writel(reg, dphy->regs + DPHY_BAND_CFG);
>> + ret = cdns_dphy_wait_for_pll_lock(dphy);
>> + if (ret)
>> + dev_err(&dphy->phy->dev, "Failed to lock PLL with err %d\n",
>> ret);
>> +
>> + ret = cdns_dphy_wait_for_cmn_ready(dphy);
>> + if (ret)
>> + dev_err(&dphy->phy->dev, "O_CMN_READY signal failed to assert
>> with err %d\n", ret);
>> +
>
> Shouldn't these return an error? Or what's the reason these are ok (and
> if so, should the prints be dev_dbg?)
>
Yes, I think it would be better if we can return error and fail if
timeout happen. I will fix it in next revision.
Regards
Devarsh
> Tomi
>
>> return 0;
>> }
>
Powered by blists - more mailing lists