diff mbox series

[4/7] spi: a3700: support BE for AC5 SPI driver

Message ID 20220723102237.10281-1-vadym.kochan@plvision.eu (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Vadym Kochan July 23, 2022, 10:22 a.m. UTC
From: Noam <lnoam@marvell.com>

Tested-by: Raz Adashi <raza@marvell.com>
Reviewed-by: Raz Adashi <raza@marvell.com>
Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
---
 drivers/spi/spi-armada-3700.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Christophe JAILLET July 23, 2022, 10:49 a.m. UTC | #1
Le 23/07/2022 à 12:22, Vadym Kochan a écrit :
> From: Noam <lnoam-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
> 
> Tested-by: Raz Adashi <raza-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
> Reviewed-by: Raz Adashi <raza-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
> Signed-off-by: Vadym Kochan <vadym.kochan-Nq3fbkz6jlnsq35pWSNszA@public.gmane.org>
> ---
>   drivers/spi/spi-armada-3700.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-armada-3700.c b/drivers/spi/spi-armada-3700.c
> index d8cc4b270644..386c7959ea93 100644
> --- a/drivers/spi/spi-armada-3700.c
> +++ b/drivers/spi/spi-armada-3700.c
> @@ -497,7 +497,7 @@ static int a3700_spi_fifo_write(struct a3700_spi *a3700_spi)
>   
>   	while (!a3700_is_wfifo_full(a3700_spi) && a3700_spi->buf_len) {
>   		val = *(u32 *)a3700_spi->tx_buf;
> -		spireg_write(a3700_spi, A3700_SPI_DATA_OUT_REG, val);
> +		spireg_write(a3700_spi, A3700_SPI_DATA_OUT_REG, cpu_to_le32(val));
>   		a3700_spi->buf_len -= 4;
>   		a3700_spi->tx_buf += 4;
>   	}
> @@ -519,7 +519,7 @@ static int a3700_spi_fifo_read(struct a3700_spi *a3700_spi)
>   	while (!a3700_is_rfifo_empty(a3700_spi) && a3700_spi->buf_len) {
>   		val = spireg_read(a3700_spi, A3700_SPI_DATA_IN_REG);
>   		if (a3700_spi->buf_len >= 4) {
> -
> +			val = cpu_to_le32(val);

Hi,

even if both should generate the same code, should'nt this be le32_to_cpu()?

CJ

>   			memcpy(a3700_spi->rx_buf, &val, 4);
>   
>   			a3700_spi->buf_len -= 4;
Mark Brown July 23, 2022, 7:28 p.m. UTC | #2
On Sat, Jul 23, 2022 at 01:22:37PM +0300, Vadym Kochan wrote:
> From: Noam <lnoam@marvell.com>
> 
> Tested-by: Raz Adashi <raza@marvell.com>
> Reviewed-by: Raz Adashi <raza@marvell.com>
> Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
> ---

There's no signoff here from Noam or anyone else at Marvell...

You've not copied me on the rest of the series so I've no idea what's
going on with dependencies.  When sending a patch series it is important
to ensure that all the various maintainers understand what the
relationship between the patches as the expecation is that there will be
interdependencies.  Either copy everyone on the whole series or at least
copy them on the cover letter and explain what's going on.  If there are
no strong interdependencies then it's generally simplest to just send
the patches separately to avoid any possible confusion.
Vadym Kochan July 25, 2022, 12:52 p.m. UTC | #3
Hi Christophe,

On Sat, Jul 23, 2022 at 12:49:55PM +0200, Christophe JAILLET wrote:
> Le 23/07/2022 à 12:22, Vadym Kochan a écrit :
> > From: Noam <lnoam-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
> > 
> > Tested-by: Raz Adashi <raza-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
> > Reviewed-by: Raz Adashi <raza-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
> > Signed-off-by: Vadym Kochan <vadym.kochan-Nq3fbkz6jlnsq35pWSNszA@public.gmane.org>
> > ---
> >   drivers/spi/spi-armada-3700.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/spi/spi-armada-3700.c b/drivers/spi/spi-armada-3700.c
> > index d8cc4b270644..386c7959ea93 100644
> > --- a/drivers/spi/spi-armada-3700.c
> > +++ b/drivers/spi/spi-armada-3700.c
> > @@ -497,7 +497,7 @@ static int a3700_spi_fifo_write(struct a3700_spi *a3700_spi)
> >   	while (!a3700_is_wfifo_full(a3700_spi) && a3700_spi->buf_len) {
> >   		val = *(u32 *)a3700_spi->tx_buf;
> > -		spireg_write(a3700_spi, A3700_SPI_DATA_OUT_REG, val);
> > +		spireg_write(a3700_spi, A3700_SPI_DATA_OUT_REG, cpu_to_le32(val));
> >   		a3700_spi->buf_len -= 4;
> >   		a3700_spi->tx_buf += 4;
> >   	}
> > @@ -519,7 +519,7 @@ static int a3700_spi_fifo_read(struct a3700_spi *a3700_spi)
> >   	while (!a3700_is_rfifo_empty(a3700_spi) && a3700_spi->buf_len) {
> >   		val = spireg_read(a3700_spi, A3700_SPI_DATA_IN_REG);
> >   		if (a3700_spi->buf_len >= 4) {
> > -
> > +			val = cpu_to_le32(val);
> 
> Hi,
> 
> even if both should generate the same code, should'nt this be le32_to_cpu()?
> 
> CJ
> 
> >   			memcpy(a3700_spi->rx_buf, &val, 4);
> >   			a3700_spi->buf_len -= 4;
> 

Thank you!
Vadym Kochan July 25, 2022, 12:55 p.m. UTC | #4
Hi Mark,

On Sat, Jul 23, 2022 at 08:28:26PM +0100, Mark Brown wrote:
> On Sat, Jul 23, 2022 at 01:22:37PM +0300, Vadym Kochan wrote:
> > From: Noam <lnoam@marvell.com>
> > 
> > Tested-by: Raz Adashi <raza@marvell.com>
> > Reviewed-by: Raz Adashi <raza@marvell.com>
> > Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
> > ---
> 
> There's no signoff here from Noam or anyone else at Marvell...
> 

Will fix it.

> You've not copied me on the rest of the series so I've no idea what's
> going on with dependencies.  When sending a patch series it is important
> to ensure that all the various maintainers understand what the
> relationship between the patches as the expecation is that there will be
> interdependencies.  Either copy everyone on the whole series or at least
> copy them on the cover letter and explain what's going on.  If there are
> no strong interdependencies then it's generally simplest to just send
> the patches separately to avoid any possible confusion.

Sorry, I picked it from locally generated series, I will send it as
a separate patch because there are no dependencies on other patches.

Thanks!
diff mbox series

Patch

diff --git a/drivers/spi/spi-armada-3700.c b/drivers/spi/spi-armada-3700.c
index d8cc4b270644..386c7959ea93 100644
--- a/drivers/spi/spi-armada-3700.c
+++ b/drivers/spi/spi-armada-3700.c
@@ -497,7 +497,7 @@  static int a3700_spi_fifo_write(struct a3700_spi *a3700_spi)
 
 	while (!a3700_is_wfifo_full(a3700_spi) && a3700_spi->buf_len) {
 		val = *(u32 *)a3700_spi->tx_buf;
-		spireg_write(a3700_spi, A3700_SPI_DATA_OUT_REG, val);
+		spireg_write(a3700_spi, A3700_SPI_DATA_OUT_REG, cpu_to_le32(val));
 		a3700_spi->buf_len -= 4;
 		a3700_spi->tx_buf += 4;
 	}
@@ -519,7 +519,7 @@  static int a3700_spi_fifo_read(struct a3700_spi *a3700_spi)
 	while (!a3700_is_rfifo_empty(a3700_spi) && a3700_spi->buf_len) {
 		val = spireg_read(a3700_spi, A3700_SPI_DATA_IN_REG);
 		if (a3700_spi->buf_len >= 4) {
-
+			val = cpu_to_le32(val);
 			memcpy(a3700_spi->rx_buf, &val, 4);
 
 			a3700_spi->buf_len -= 4;