summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backport/backport-include/linux/of_address.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/backport/backport-include/linux/of_address.h b/backport/backport-include/linux/of_address.h
new file mode 100644
index 00000000..63ac79dd
--- /dev/null
+++ b/backport/backport-include/linux/of_address.h
@@ -0,0 +1,18 @@
+#ifndef __BACKPORT_OF_ADDRESS_H
+#define __BACKPORT_OF_ADDRESS_H
+#include_next <linux/of_address.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0) && !defined(CONFIG_OF_ADDRESS)
+#ifndef OF_BAD_ADDR
+#define OF_BAD_ADDR ((u64)-1)
+#endif
+#define of_translate_address LINUX_BACKPORT(of_translate_addres)
+static inline u64 of_translate_address(struct device_node *np,
+ const __be32 *addr)
+{
+ return OF_BAD_ADDR;
+}
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4,4,0) */
+
+#endif /* __BACKPORT_OF_IRQ_H */