Commit b0b48550 authored by Max Filippov's avatar Max Filippov Committed by Mark Brown

spi: xtensa-xtfpga: fix register endianness

XTFPGA SPI controller has native endian registers.
Fix register acessors so that they work in big-endian configurations.
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
parent 6ff33f39
...@@ -34,13 +34,13 @@ struct xtfpga_spi { ...@@ -34,13 +34,13 @@ struct xtfpga_spi {
static inline void xtfpga_spi_write32(const struct xtfpga_spi *spi, static inline void xtfpga_spi_write32(const struct xtfpga_spi *spi,
unsigned addr, u32 val) unsigned addr, u32 val)
{ {
iowrite32(val, spi->regs + addr); __raw_writel(val, spi->regs + addr);
} }
static inline unsigned int xtfpga_spi_read32(const struct xtfpga_spi *spi, static inline unsigned int xtfpga_spi_read32(const struct xtfpga_spi *spi,
unsigned addr) unsigned addr)
{ {
return ioread32(spi->regs + addr); return __raw_readl(spi->regs + addr);
} }
static inline void xtfpga_spi_wait_busy(struct xtfpga_spi *xspi) static inline void xtfpga_spi_wait_busy(struct xtfpga_spi *xspi)
......
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