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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <de0672bc-b75b-48a8-aa01-2ed7b89aeff5@linaro.org>
Date: Wed, 12 Jun 2024 16:35:02 +0200
From: Neil Armstrong <neil.armstrong@...aro.org>
To: xianwei.zhao@...ogic.com, Mark Brown <broonie@...nel.org>,
 Kevin Hilman <khilman@...libre.com>, Jerome Brunet <jbrunet@...libre.com>,
 Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Cc: linux-spi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org,
 Sunny Luo <sunny.luo@...ogic.com>
Subject: Re: [PATCH] spi: meson-spicc: add spicc loopback mode

On 12/06/2024 11:44, Xianwei Zhao via B4 Relay wrote:
> From: Xianwei Zhao <xianwei.zhao@...ogic.com>
> 
> Add spicc loopback mode for debugging convenience.
> 
> Signed-off-by: Sunny Luo <sunny.luo@...ogic.com>
> Signed-off-by: Xianwei Zhao <xianwei.zhao@...ogic.com>
> ---
>   drivers/spi/spi-meson-spicc.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-meson-spicc.c b/drivers/spi/spi-meson-spicc.c
> index 8a4a8ba9dfed..8838a98b04c2 100644
> --- a/drivers/spi/spi-meson-spicc.c
> +++ b/drivers/spi/spi-meson-spicc.c
> @@ -514,7 +514,9 @@ static int meson_spicc_prepare_message(struct spi_controller *host,
>   	/* Setup no wait cycles by default */
>   	writel_relaxed(0, spicc->base + SPICC_PERIODREG);
>   
> -	writel_bits_relaxed(SPICC_LBC_W1, 0, spicc->base + SPICC_TESTREG);
> +	writel_bits_relaxed(SPICC_LBC_W1,
> +			    spi->mode & SPI_LOOP ? SPICC_LBC_W1 : 0,
> +			    spicc->base + SPICC_TESTREG);
>   
>   	return 0;
>   }
> @@ -850,7 +852,7 @@ static int meson_spicc_probe(struct platform_device *pdev)
>   
>   	host->num_chipselect = 4;
>   	host->dev.of_node = pdev->dev.of_node;
> -	host->mode_bits = SPI_CPHA | SPI_CPOL | SPI_CS_HIGH;
> +	host->mode_bits = SPI_CPHA | SPI_CPOL | SPI_CS_HIGH | SPI_LOOP;
>   	host->bits_per_word_mask = SPI_BPW_MASK(32) |
>   				   SPI_BPW_MASK(24) |
>   				   SPI_BPW_MASK(16) |
> 
> ---
> base-commit: ec0d19f2b59699e2e148091debaa0d9d6af5800a
> change-id: 20240611-spi_lbc-0859cebc580e
> 
> Best regards,

Reviewed-by: Neil Armstrong <neil.armstrong@...aro.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ