summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2019-09-27 23:49:45 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2019-10-09 23:03:34 +0200
commit441a9c0ad81e5c420dcf60684e202ae47d0af08b (patch)
treed4bab8d403ef3b96cec9ddc403b4d1e988fe6042
parentf0676dd5a38c03e6334db8f153e43575552118b7 (diff)
backports: io: Add writel_relaxed()
Add writel_relaxed() from upstream commit 9439eb3ab9d1 ("asm-generic: io: implement relaxed accessor macros as conditional wrappers") which is used by the wil6210 driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--backport/backport-include/linux/io.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/backport/backport-include/linux/io.h b/backport/backport-include/linux/io.h
index f91085be..e04305c3 100644
--- a/backport/backport-include/linux/io.h
+++ b/backport/backport-include/linux/io.h
@@ -11,4 +11,12 @@
void __ioread32_copy(void *to, const void __iomem *from, size_t count);
#endif
+#ifndef writel_relaxed
+#define writel_relaxed writel_relaxed
+static inline void writel_relaxed(u32 value, volatile void __iomem *addr)
+{
+ __raw_writel(__cpu_to_le32(value), addr);
+}
+#endif
+
#endif /* __BP_LINUX_IO_H */