diff options
author | Victor Kamensky <victor.kamensky@linaro.org> | 2013-11-08 18:10:47 +0200 |
---|---|---|
committer | Andrey Konovalov <andrey.konovalov@linaro.org> | 2014-02-28 17:31:09 +0400 |
commit | f2f16146c5a4eb9f0e7751b6852207b8f0d3b35a (patch) | |
tree | 5d6077f42aa762ca30ed48b5ed4f2586f13fcfca | |
parent | 15d31a85c748c02d268772cf5b84f4e371a7f0bb (diff) |
crypto: omap-sham - raw read and write endian fix
All OMAP IP blocks expect LE data, but CPU may operate in BE mode.
Need to use endian neutral functions to read/write 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 simply reads/writes register, the second will byteswap
it if host operates in BE mode.
Changes are trivial sed like replacement of __raw_xxx functions
with xxx_relaxed variant.
Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
-rw-r--r-- | drivers/crypto/omap-sham.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index a727a6a59653..25bde7cc7d2c 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -244,13 +244,13 @@ static struct omap_sham_drv sham = { static inline u32 omap_sham_read(struct omap_sham_dev *dd, u32 offset) { - return __raw_readl(dd->io_base + offset); + return readl_relaxed(dd->io_base + offset); } static inline void omap_sham_write(struct omap_sham_dev *dd, u32 offset, u32 value) { - __raw_writel(value, dd->io_base + offset); + writel_relaxed(value, dd->io_base + offset); } static inline void omap_sham_write_mask(struct omap_sham_dev *dd, u32 address, |