mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Devarsh Thakkar <devarsht@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	<vkoul@kernel.org>, <kishon@kernel.org>, <mripard@kernel.org>,
	<linux-phy@lists.infradead.org>, <linux-kernel@vger.kernel.org>
Cc: <sakari.ailus@linux.intel.com>, <u.kleine-koenig@baylibre.com>,
	<vigneshr@ti.com>, <aradhya.bhatia@linux.dev>, <s-jain1@ti.com>,
	<r-donadkar@ti.com>
Subject: Re: [PATCH v2 1/2] phy: cadence: cdns-dphy: Fix PLL lock and O_CMN_READY polling
Date: Wed, 2 Apr 2025 18:59:58 +0530	[thread overview]
Message-ID: <e7cff4f9-da46-4352-8900-3eddae9345a7@ti.com> (raw)
In-Reply-To: <cddb8c30-c614-4fae-9cbd-f5776f930165@ideasonboard.com>

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;
>>   }
> 

  reply	other threads:[~2025-04-02 13:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-26 15:23 [PATCH v2 0/2] Fix PLL lock timeout and calibration wait time Devarsh Thakkar
2025-03-26 15:23 ` [PATCH v2 1/2] phy: cadence: cdns-dphy: Fix PLL lock and O_CMN_READY polling Devarsh Thakkar
2025-04-02 11:55   ` Tomi Valkeinen
2025-04-02 13:29     ` Devarsh Thakkar [this message]
2025-03-26 15:23 ` [PATCH v2 2/2] phy: cadence: cdns-dphy: Update calibration wait time for startup state machine Devarsh Thakkar
2025-04-02 11:42   ` Tomi Valkeinen
2025-04-02 13:35     ` Devarsh Thakkar
2025-04-02 13:59       ` Tomi Valkeinen
2025-04-30  7:36     ` Devarsh Thakkar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e7cff4f9-da46-4352-8900-3eddae9345a7@ti.com \
    --to=devarsht@ti.com \
    --cc=aradhya.bhatia@linux.dev \
    --cc=kishon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=mripard@kernel.org \
    --cc=r-donadkar@ti.com \
    --cc=s-jain1@ti.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=vigneshr@ti.com \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®