Skip to contentSkip to conversation

backport: add stub for of_translate_address() function

PATCH In review Arend van Spriel 2 participants 3 messages Apr 1, 2016 – May 6, 2016

lore
Share & tools
lore
#1 lore raw

PATCH 2/2 defconfig: brcmsmac: remove selection of BCMA GPIO

In reply to Arend van Spriel

BCMA GPIO driver now relies on functionality that is available since v4.5. Just drop GPIO which disables brcmsmac led functionality so it can be backported to kernels prior to 4.5.

---
 backport/defconfigs/brcmsmac | 1 -
 1 file changed, 1 deletion(-)
backport/defconfigs/brcmsmac +0 -1
index a1c56bc..e4ca066 100644
@@ -6,4 +6,3 @@ CPTCFG_WLAN=y
 CPTCFG_BRCMSMAC=m
 CPTCFG_BCMA=m
 CPTCFG_BCMA_HOST_PCI=y
-CPTCFG_BCMA_DRIVER_GPIO=y
Signature · 4 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#0 lore raw

PATCH 1/2 backport: add stub for of_translate_address() function

The stub for of_translate_address() was added in 4.4 kernel. Prior to that it was only available when CONFIG_OF_ADDRESS was selected. So backport the stub for kernel < 4.4 and !CONFIG_OF_ADDRESS.

---
 backport/backport-include/linux/of_address.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 backport/backport-include/linux/of_address.h
backport/backport-include/linux/of_address.h new file +18 -0
new file mode 100644
index 0000000..63ac79d
@@ -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 */
Signature · 4 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in
#2 lore raw
Quoted 10 lines · Arend van Spriel

The stub for of_translate_address() was added in 4.4 kernel. Prior to that it was only available when CONFIG_OF_ADDRESS was selected. So backport the stub for kernel < 4.4 and !CONFIG_OF_ADDRESS.

---
 backport/backport-include/linux/of_address.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 backport/backport-include/linux/of_address.h

Thank you for the patch, it was applied with a minor modification.

Hauke

--
To unsubscribe from this list: send the line "unsubscribe backports" in