lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fdcb19ff-c949-4538-8819-88720e514f04@ti.com>
Date: Sat, 7 Feb 2026 00:57:04 +0530
From: Santhosh Kumar K <s-k6@...com>
To: Miquel Raynal <miquel.raynal@...tlin.com>
CC: <broonie@...nel.org>, <robh@...nel.org>, <krzk+dt@...nel.org>,
	<conor+dt@...nel.org>, <richard@....at>, <vigneshr@...com>,
	<tudor.ambarus@...aro.org>, <pratyush@...nel.org>, <mwalle@...nel.org>,
	<linux-spi@...r.kernel.org>, <devicetree@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <linux-mtd@...ts.infradead.org>,
	<praneeth@...com>, <u-kumar1@...com>, <p-mantena@...com>, <a-dutta@...com>,
	<s-k6@...com>
Subject: Re: [RFC PATCH v2 11/12] spi: cadence-quadspi: restrict PHY frequency
 to tuned operations



On 05/02/26 23:17, Miquel Raynal wrote:
> Hi Santhosh,
> 
>> +	/*
>> +	 * PHY tuning allows high-frequency operation only for calibrated
>> +	 * commands. Uncalibrated operations use safe non-PHY frequency to
>> +	 * avoid timing violations.
>> +	 */
>> +	if (cqspi->ddata->execute_tuning && f_pdata->use_phy &&
>> +	    (cqspi_op_matches_tuned(op, &f_pdata->phy_read_op) ||
>> +	     cqspi_op_matches_tuned(op, &f_pdata->phy_write_op))) {
>> +		cqspi_configure(f_pdata, op->max_freq);
>> +	} else if (cqspi->ddata->execute_tuning) {
>> +		/* Use safe frequency for untuned operations */
>> +		cqspi_configure(f_pdata, f_pdata->non_phy_clk_rate);
>> +	} else {
>> +		/* No tuning support, always use requested frequency */
>> +		cqspi_configure(f_pdata, op->max_freq);
>> +	}
> 
> Shouldn't we handle this at the core level? We know what kind of
> operation pattern we provided, so it is easy to set the correct
> frequency in the operation structure.
> 
> Can you please make this happen? Perhaps you can return the operation
> frequency once the calibration is successful (in the read and write op
> templates maybe?) so this can be picked up by the core and used for the
> following operations. This way the controller driver no longer needs to
> check if the operation has been tuned or not, it can just look at the
> frequency. When using the highest frequency, PHY tuning must be
> used/enabled, otherwise not.

No, Miquel, this may not be correct. There can be cases where an
operation does not require tuning but still can run at maximum
frequency (166 MHz, for instance). In such scenarios, simply setting
op->max_freq to the maximum frequency value and deciding whether to
enable tuning based on an op->max_freq comparison would not be
sufficient.

Regards,
Santhosh.

> 
> Thanks,
> Miquèl
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ