2022-07-23 11:01:29

by Vadym Kochan

[permalink] [raw]
Subject: [PATCH 4/7] spi: a3700: support BE for AC5 SPI driver

From: Noam <[email protected]>

Tested-by: Raz Adashi <[email protected]>
Reviewed-by: Raz Adashi <[email protected]>
Signed-off-by: Vadym Kochan <[email protected]>
---
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);
memcpy(a3700_spi->rx_buf, &val, 4);

a3700_spi->buf_len -= 4;
--
2.17.1


2022-07-23 11:21:51

by Christophe JAILLET

[permalink] [raw]
Subject: Re: [PATCH 4/7] spi: a3700: support BE for AC5 SPI driver

Le 23/07/2022 à 12:22, Vadym Kochan a écrit :
> From: Noam <[email protected]>
>
> Tested-by: Raz Adashi <[email protected]>
> Reviewed-by: Raz Adashi <[email protected]>
> Signed-off-by: Vadym Kochan <[email protected]>
> ---
> 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;

2022-07-23 19:56:09

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 4/7] spi: a3700: support BE for AC5 SPI driver

On Sat, Jul 23, 2022 at 01:22:37PM +0300, Vadym Kochan wrote:
> From: Noam <[email protected]>
>
> Tested-by: Raz Adashi <[email protected]>
> Reviewed-by: Raz Adashi <[email protected]>
> Signed-off-by: Vadym Kochan <[email protected]>
> ---

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.


Attachments:
(No filename) (883.00 B)
signature.asc (499.00 B)
Download all attachments

2022-07-25 13:13:59

by Vadym Kochan

[permalink] [raw]
Subject: Re: [PATCH 4/7] spi: a3700: support BE for AC5 SPI driver

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 <[email protected]>
> >
> > Tested-by: Raz Adashi <[email protected]>
> > Reviewed-by: Raz Adashi <[email protected]>
> > Signed-off-by: Vadym Kochan <[email protected]>
> > ---
>
> 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!

2022-07-25 13:33:50

by Vadym Kochan

[permalink] [raw]
Subject: Re: [PATCH 4/7] spi: a3700: support BE for AC5 SPI driver

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 <[email protected]>
> >
> > Tested-by: Raz Adashi <[email protected]>
> > Reviewed-by: Raz Adashi <[email protected]>
> > Signed-off-by: Vadym Kochan <[email protected]>
> > ---
> > 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!