diff options
author | Victor Kamensky <victor.kamensky@linaro.org> | 2013-09-29 21:19:14 -0700 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2014-04-16 23:51:58 +0400 |
commit | ea74f1e7bb2baf4f32aa03702792d1de031c78d9 (patch) | |
tree | 172767fa965ac1f35fcd0758942851fca4ae7e10 /drivers/tty/serial | |
parent | aeeb7354d6fb29705af44c6420a223f838ccabc9 (diff) |
exynos: driver raw read and write endian fix
Need to use endian neutral functions to read/write LE h/w registers. I.e
instead of __raw_read[lw] and _raw_write[lw] functions code need to use
read[lw]_relaxed and write[lw]_relaxed functions. If the first just
read/write register with memory barrier, the second will byteswap it if host
operates in BE mode.
This patch covers drivers used by arndale board where all changes are trivial,
sed like replacement of __raw_xxx functions with xxx_relaxed variant.
Literally this sed program was used to make the change:
s|__raw_readl|readl_relaxed|g
s|__raw_writel|writel_relaxed|g
s|__raw_readw|readw_relaxed|g
s|__raw_writew|writew_relaxed|g
Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/samsung.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/samsung.h b/drivers/tty/serial/samsung.h index 8827e5424ce..ceb11f73c77 100644 --- a/drivers/tty/serial/samsung.h +++ b/drivers/tty/serial/samsung.h @@ -72,10 +72,10 @@ struct s3c24xx_uart_port { ((unsigned long *)(unsigned long)((port)->membase + (reg))) #define rd_regb(port, reg) (__raw_readb(portaddr(port, reg))) -#define rd_regl(port, reg) (__raw_readl(portaddr(port, reg))) +#define rd_regl(port, reg) (readl_relaxed(portaddr(port, reg))) #define wr_regb(port, reg, val) __raw_writeb(val, portaddr(port, reg)) -#define wr_regl(port, reg, val) __raw_writel(val, portaddr(port, reg)) +#define wr_regl(port, reg, val) writel_relaxed(val, portaddr(port, reg)) #if defined(CONFIG_SERIAL_SAMSUNG_DEBUG) && \ defined(CONFIG_DEBUG_LL) && \ |