mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "NG, TZE YEE" <tze.yee.ng@altera.com>
To: Adrian Hunter <adrian.hunter@intel.com>,
	Tanmay Kathpalia <tanmay.kathpalia@altera.com>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v2 4/4] mmc: sdhci-cadence6: read SD6HC DDR50 tuning from device tree
Date: Fri, 30 Oct 2026 14:03:22 +0800	[thread overview]
Message-ID: <b71ef5bb-aafb-4360-a402-aac8f48f2b16@altera.com> (raw)
In-Reply-To: <16c32323-0869-40b2-aabe-81727c87bf35@intel.com>

Hi Adrian,

Thanks for the review. All three will be addressed in v3:

On 29/10/2026 9:25 pm, Adrian Hunter wrote:
> On 09/10/2026 05:14, tze.yee.ng@altera.com wrote:
>> +	if ((phy->mode == MMC_TIMING_UHS_DDR50 ||
>> +	     phy->mode == MMC_TIMING_MMC_DDR52) && phy->ddr_read_dqs_delay_ps) {
> 
> The same (phy->mode == MMC_TIMING_UHS_DDR50 || phy->mode == MMC_TIMING_MMC_DDR52)
> appears 4 times.  Might be neater to assign it to a local variable.
> 

Agreed. I will move this check to a local "bool ddr" and used in all 
four places.

>> +	/*
>> +	 * Optional read-path tuning for the extended-read DDR modes (SD DDR50,
>> +	 * eMMC DDR52).
>> +	 */
>> +	phy->ddr_read_dqs_delay_ps = 0;
>> +	of_property_read_u32(dev->of_node, "cdns,ddr-read-dqs-delay-ps",
>> +			     &phy->ddr_read_dqs_delay_ps);
>> +	if (phy->ddr_read_dqs_delay_ps / phy->delay_element_org >
>> +	    FIELD_MAX(SDHCI_CDNS6_PHY_DLL_SLAVE_CTRL_READ_DQS_DELAY))
> 
> This is still effectively validating the firmware values
> 

I will drop the probe-time range check and dev_warn entirely.

>> +		dev_warn(dev,
>> +			 "cdns,ddr-read-dqs-delay-ps %u too large, clamping to %lu elements\n",
>> +			 phy->ddr_read_dqs_delay_ps,
>> +			 (unsigned long)FIELD_MAX(SDHCI_CDNS6_PHY_DLL_SLAVE_CTRL_READ_DQS_DELAY));
>> +
>> +	phy->ddr_no_lpbk_dqs = of_property_read_bool(dev->of_node,
>> +						     "cdns,ddr-no-lpbk-dqs");
> 
> Unneeded line wrapping - can use 100 cols
> 

I will change both of_property_read*() calls in single line.

>> +
>> +	phy->ddr_phony_dqs_timing = -1;
>> +	if (!of_property_read_u32(dev->of_node, "cdns,ddr-phony-dqs-timing",
>> +				  &prop))
> 
> Unneeded line wrapping - can use 100 cols
> 
>> +		phy->ddr_phony_dqs_timing = prop;
>> +
>>   	priv->phy = phy;
>>   
>>   	return 0;
> 

Thanks,
Tze Yee


  reply	other threads:[~2026-10-30  6:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09  2:14 [PATCH v2 0/4] mmc: sdhci-cadence: SD6HC DDR50/DDR52 read-path tuning and fixes tze.yee.ng
2026-10-09  2:14 ` [PATCH v2 1/4] mmc: sdhci-cadence: add PHY settle after tuning for SD6HC tze.yee.ng
2026-10-25 20:17   ` Kathpalia, Tanmay
2026-10-30  5:25     ` NG, TZE YEE
2026-10-30  7:04       ` Kathpalia, Tanmay
2026-10-30  7:50         ` NG, TZE YEE
2026-10-09  2:14 ` [PATCH v2 2/4] mmc: sdhci-cadence6: program PHONY_DQS_TIMING for extended-read DDR tze.yee.ng
2026-10-09  2:14 ` [PATCH v2 3/4] dt-bindings: mmc: cdns,sd6hc: add SD6HC DDR50 read-path tuning tze.yee.ng
2026-10-12  8:48   ` Krzysztof Kozlowski
2026-10-29  6:21     ` NG, TZE YEE
2026-10-09  2:14 ` [PATCH v2 4/4] mmc: sdhci-cadence6: read SD6HC DDR50 tuning from device tree tze.yee.ng
2026-10-29 13:25   ` Adrian Hunter
2026-10-30  6:03     ` NG, TZE YEE [this message]
2026-10-18 21:19 ` [PATCH v2 0/4] mmc: sdhci-cadence: SD6HC DDR50/DDR52 read-path tuning and fixes Kathpalia, Tanmay

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=b71ef5bb-aafb-4360-a402-aac8f48f2b16@altera.com \
    --to=tze.yee.ng@altera.com \
    --cc=adrian.hunter@intel.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=tanmay.kathpalia@altera.com \
    /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®