diff options
author | Ben Dooks <ben.dooks@codethink.co.uk> | 2015-03-18 11:53:08 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-03-22 14:00:25 -0400 |
commit | ea467326e36b496a92c677cbbed1dfd03b707aaf (patch) | |
tree | c88ff1efb1a69417e16408d5a532e24746f26707 /drivers/spi | |
parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) |
spi: atmel: use endian agnostic IO
Use the endian agnositc IO functions instead of the __raw ones for when
the driver is in use on big-endian systems.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-atmel.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 9af7841f2e8c..75757aa531f2 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c | |||
@@ -180,11 +180,17 @@ | |||
180 | | SPI_BF(name, value)) | 180 | | SPI_BF(name, value)) |
181 | 181 | ||
182 | /* Register access macros */ | 182 | /* Register access macros */ |
183 | #ifdef CONFIG_AVR32 | ||
183 | #define spi_readl(port, reg) \ | 184 | #define spi_readl(port, reg) \ |
184 | __raw_readl((port)->regs + SPI_##reg) | 185 | __raw_readl((port)->regs + SPI_##reg) |
185 | #define spi_writel(port, reg, value) \ | 186 | #define spi_writel(port, reg, value) \ |
186 | __raw_writel((value), (port)->regs + SPI_##reg) | 187 | __raw_writel((value), (port)->regs + SPI_##reg) |
187 | 188 | #else | |
189 | #define spi_readl(port, reg) \ | ||
190 | readl_relaxed((port)->regs + SPI_##reg) | ||
191 | #define spi_writel(port, reg, value) \ | ||
192 | writel_relaxed((value), (port)->regs + SPI_##reg) | ||
193 | #endif | ||
188 | /* use PIO for small transfers, avoiding DMA setup/teardown overhead and | 194 | /* use PIO for small transfers, avoiding DMA setup/teardown overhead and |
189 | * cache operations; better heuristics consider wordsize and bitrate. | 195 | * cache operations; better heuristics consider wordsize and bitrate. |
190 | */ | 196 | */ |