[PATCH 08/11] backports: io: Add writel_relaxed()

Hauke Mehrtens <[email protected]>
Newsgroups org.kernel.vger.backports
Message-ID <[email protected]>
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 <[email protected]>
---
 backport/backport-include/linux/io.h | 8 ++++++++
 1 file changed, 8 insertions(+)

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 */
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.