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: <aMmEzZAT5JLOKDJL@lizhi-Precision-Tower-5810>
Date: Tue, 16 Sep 2025 11:39:57 -0400
From: Frank Li <Frank.li@....com>
To: Haibo Chen <haibo.chen@....com>
Cc: Han Xu <han.xu@....com>, Yogesh Gaur <yogeshgaur.83@...il.com>,
	Mark Brown <broonie@...nel.org>, linux-spi@...r.kernel.org,
	imx@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] spi: spi-nxp-fspi: correct the clock rate for DTR
 mode

On Tue, Sep 16, 2025 at 03:56:43PM +0800, Haibo Chen wrote:
> For DTR mode, flexspi will automatically div 2 of the root clock
> and output to device. the formula is:
> device_clock = root_clock / (is_dtr ? 2 : 1);
>
> So correct the clock rate setting for DTR mode to get the max
> performance.
>
> Signed-off-by: Haibo Chen <haibo.chen@....com>

You can squash this to previous patch

This belong to add DTR support part.

Frank
> ---
>  drivers/spi/spi-nxp-fspi.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/spi/spi-nxp-fspi.c b/drivers/spi/spi-nxp-fspi.c
> index be1e56072b94f38af934556055e321d9834bb07b..15b094e8e892f0b61c1f320bba897fa1f588be91 100644
> --- a/drivers/spi/spi-nxp-fspi.c
> +++ b/drivers/spi/spi-nxp-fspi.c
> @@ -806,10 +806,15 @@ static void nxp_fspi_select_mem(struct nxp_fspi *f, struct spi_device *spi,
>
>  	nxp_fspi_select_rx_sample_clk_source(f, op_is_dtr);
>
> -	if (op_is_dtr)
> +	if (op_is_dtr) {
>  		f->flags |= FSPI_DTR_MODE;
> -	else
> +		/* For DTR mode, flexspi will default div 2 and output to device.
> +		 * so here to config the root clock to 2 * device rate.
> +		 */
> +		rate = rate * 2;
> +	} else {
>  		f->flags &= ~FSPI_DTR_MODE;
> +	}
>
>  	nxp_fspi_clk_disable_unprep(f);
>
>
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ