diff mbox series

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

Message ID 20191003155642.14909-9-hauke@hauke-m.de (mailing list archive)
State Accepted
Headers show
Series backports: Update to kernel 5.4-rc1 | expand

Commit Message

Hauke Mehrtens Oct. 3, 2019, 3:56 p.m. UTC
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>
---
 backport/backport-include/linux/io.h | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

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