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

Message ID 20191003155642.14909-9-hauke@hauke-m.de
State New
Headers show
Series
  • backports: Update to kernel 5.4-rc1
Related show

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(+)

Patch
diff mbox series

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