[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1555918009-13172-1-git-send-email-naga.sureshkumar.relli@xilinx.com>
Date: Mon, 22 Apr 2019 12:56:49 +0530
From: Naga Sureshkumar Relli <naga.sureshkumar.relli@...inx.com>
To: <broonie@...nel.org>, <bbrezillon@...nel.org>
CC: <vigneshr@...com>, <linux-spi@...r.kernel.org>,
<marek.vasut@...il.com>, <dwmw2@...radead.org>, <richard@....at>,
<linux-mtd@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<michals@...inx.com>, <nagasuresh12@...il.com>,
Naga Sureshkumar Relli <naga.sureshkumar.relli@...inx.com>
Subject: [LINUX PATCH] spi: spi-mem: zynq-qspi: Fix build error on architectures missing readsl/writesl
Alpha and some of the architectures are missing readsl/writesl functions.
so the zynq-qspi driver won't be able to build on these arches. hence use
ioread32_rep()/iowrite32_rep() instead of readsl()/writesl().
Signed-off-by: Naga Sureshkumar Relli <naga.sureshkumar.relli@...inx.com>
Reported-by: kbuild test robot <lkp@...el.com>
---
Verified the same by cross compiling the zynq-qspi driver for alpha
architecture
ARCH=alpha CROSS_COMPILE=alpha-linux-gnu- make all
Reference took from the below commit
0cf1725 mtd: spi-nor: cqspi: Fix build on arches missing readsl/writesl
---
drivers/spi/spi-zynq-qspi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/spi/spi-zynq-qspi.c b/drivers/spi/spi-zynq-qspi.c
index 8079d00..c6bee67 100644
--- a/drivers/spi/spi-zynq-qspi.c
+++ b/drivers/spi/spi-zynq-qspi.c
@@ -407,8 +407,8 @@ static void zynq_qspi_write_op(struct zynq_qspi *xqspi, int txcount,
count = txcount;
if (xqspi->txbuf) {
- writesl(xqspi->regs + ZYNQ_QSPI_TXD_00_00_OFFSET,
- xqspi->txbuf, count);
+ iowrite32_rep(xqspi->regs + ZYNQ_QSPI_TXD_00_00_OFFSET,
+ xqspi->txbuf, count);
xqspi->txbuf += count * 4;
} else {
for (k = 0; k < count; k++)
@@ -433,8 +433,8 @@ static void zynq_qspi_read_op(struct zynq_qspi *xqspi, int rxcount)
if (count > rxcount)
count = rxcount;
if (xqspi->rxbuf) {
- readsl(xqspi->regs + ZYNQ_QSPI_RXD_OFFSET,
- xqspi->rxbuf, count);
+ ioread32_rep(xqspi->regs + ZYNQ_QSPI_RXD_OFFSET,
+ xqspi->rxbuf, count);
xqspi->rxbuf += count * 4;
} else {
for (k = 0; k < count; k++)
--
2.7.4
Powered by blists - more mailing lists