Commit 51c711f2 authored by Masahisa Kojima's avatar Masahisa Kojima Committed by Mark Brown

spi: spi-synquacer: Fixed build on architectures missing readsl/writesl series

kbuild test reported that alpha and some of the architectures
are missing readsl/writesl series.
Use more portable ioread32_rep()/iowrite32_rep() series.

Fixes: b0823ee3 ("spi: Add spi driver for Socionext SynQuacer platform")
Reported-by: default avatarkbuild test robot <lkp@intel.com>
Signed-off-by: default avatarMasahisa Kojima <masahisa.kojima@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b5e3cf41
......@@ -150,14 +150,16 @@ static int read_fifo(struct synquacer_spi *sspi)
case 8: {
u8 *buf = sspi->rx_buf;
readsb(sspi->regs + SYNQUACER_HSSPI_REG_RX_FIFO, buf, len);
ioread8_rep(sspi->regs + SYNQUACER_HSSPI_REG_RX_FIFO,
buf, len);
sspi->rx_buf = buf + len;
break;
}
case 16: {
u16 *buf = sspi->rx_buf;
readsw(sspi->regs + SYNQUACER_HSSPI_REG_RX_FIFO, buf, len);
ioread16_rep(sspi->regs + SYNQUACER_HSSPI_REG_RX_FIFO,
buf, len);
sspi->rx_buf = buf + len;
break;
}
......@@ -166,7 +168,8 @@ static int read_fifo(struct synquacer_spi *sspi)
case 32: {
u32 *buf = sspi->rx_buf;
readsl(sspi->regs + SYNQUACER_HSSPI_REG_RX_FIFO, buf, len);
ioread32_rep(sspi->regs + SYNQUACER_HSSPI_REG_RX_FIFO,
buf, len);
sspi->rx_buf = buf + len;
break;
}
......@@ -191,14 +194,16 @@ static int write_fifo(struct synquacer_spi *sspi)
case 8: {
const u8 *buf = sspi->tx_buf;
writesb(sspi->regs + SYNQUACER_HSSPI_REG_TX_FIFO, buf, len);
iowrite8_rep(sspi->regs + SYNQUACER_HSSPI_REG_TX_FIFO,
buf, len);
sspi->tx_buf = buf + len;
break;
}
case 16: {
const u16 *buf = sspi->tx_buf;
writesw(sspi->regs + SYNQUACER_HSSPI_REG_TX_FIFO, buf, len);
iowrite16_rep(sspi->regs + SYNQUACER_HSSPI_REG_TX_FIFO,
buf, len);
sspi->tx_buf = buf + len;
break;
}
......@@ -207,7 +212,8 @@ static int write_fifo(struct synquacer_spi *sspi)
case 32: {
const u32 *buf = sspi->tx_buf;
writesl(sspi->regs + SYNQUACER_HSSPI_REG_TX_FIFO, buf, len);
iowrite32_rep(sspi->regs + SYNQUACER_HSSPI_REG_TX_FIFO,
buf, len);
sspi->tx_buf = buf + len;
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment