lkml.org 
[lkml]   [2022]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2] spi: a3700: support BE for AC5 SPI driver
    Date
    From: Noam <lnoam@marvell.com>

    Signed-off-by: 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>
    ---
    v2:
    #1 added missing SOB for Noam

    #2 fix wrong endianess in a3700_spi_fifo_read()

    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..9df9fc40b783 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 = le32_to_cpu(val);
    memcpy(a3700_spi->rx_buf, &val, 4);

    a3700_spi->buf_len -= 4;
    --
    2.17.1
    \
     
     \ /
      Last update: 2022-07-26 15:02    [W:2.813 / U:1.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site