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>
This commit is contained in:
parent
c517d838eb
commit
ea467326e3
1 changed files with 7 additions and 1 deletions
|
@ -180,11 +180,17 @@
|
|||
| SPI_BF(name, value))
|
||||
|
||||
/* Register access macros */
|
||||
#ifdef CONFIG_AVR32
|
||||
#define spi_readl(port, reg) \
|
||||
__raw_readl((port)->regs + SPI_##reg)
|
||||
#define spi_writel(port, reg, value) \
|
||||
__raw_writel((value), (port)->regs + SPI_##reg)
|
||||
|
||||
#else
|
||||
#define spi_readl(port, reg) \
|
||||
readl_relaxed((port)->regs + SPI_##reg)
|
||||
#define spi_writel(port, reg, value) \
|
||||
writel_relaxed((value), (port)->regs + SPI_##reg)
|
||||
#endif
|
||||
/* use PIO for small transfers, avoiding DMA setup/teardown overhead and
|
||||
* cache operations; better heuristics consider wordsize and bitrate.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue