Expose libfdt for use by Alveo/XRT
Subsystems (2)
cover Expose libfdt for use by Alveo/XRT
Hello,
This patch series adds support for exporting limited set of libfdt symbols from Linux kernel. It enables drivers and other kernel modules to use libfdt for working with device trees. This may be used by platform vendors to describe HW features inside a PCIe device to its driver in a data driven manner.
"Xilinx Alveo" PCIe accelerator card driver patch series which follows this patch makes use of device tree to advertise HW subsystems sitting behind PCIe BARs. The use of device trees makes the driver data driven and overall solution more scalable.
Thanks,
-Sonal
Sonal Santan (1):
Export subset of libfdt symbols for use by other drivers.
lib/fdt.c | 6 ++++++ lib/fdt_empty_tree.c | 3 +++ lib/fdt_ro.c | 11 +++++++++++ lib/fdt_rw.c | 6 ++++++ 4 files changed, 26 insertions(+)
Signature · 1 line
2.17.1
PATCH 1/1 Export subset of libfdt symbols for use by other drivers.
From: Sonal Santan <[email protected]>
Some drivers may want to use device tree as metadata format to discover HW subsystems behind PCIe BAR. This is particularly useful for PCIe FPGA devices.
--- lib/fdt.c | 6 ++++++ lib/fdt_empty_tree.c | 3 +++ lib/fdt_ro.c | 11 +++++++++++ lib/fdt_rw.c | 6 ++++++ 4 files changed, 26 insertions(+)
lib/fdt.c +6 -0
@@ -1,2 +1,8 @@#include <linux/libfdt_env.h> +#include <linux/export.h> #include "../scripts/dtc/libfdt/fdt.c" + +EXPORT_SYMBOL_GPL (fdt_next_node); +EXPORT_SYMBOL_GPL (fdt_first_subnode); +EXPORT_SYMBOL_GPL (fdt_next_subnode); +EXPORT_SYMBOL_GPL (fdt_subnode_offset);
lib/fdt_empty_tree.c +3 -0
@@ -1,2 +1,5 @@#include <linux/libfdt_env.h> +#include <linux/export.h> #include "../scripts/dtc/libfdt/fdt_empty_tree.c" + +EXPORT_SYMBOL_GPL (fdt_create_empty_tree);
lib/fdt_ro.c +11 -0
@@ -1,2 +1,13 @@#include <linux/libfdt_env.h> +#include <linux/export.h> #include "../scripts/dtc/libfdt/fdt_ro.c" + +EXPORT_SYMBOL_GPL (fdt_getprop_by_offset); +EXPORT_SYMBOL_GPL (fdt_node_check_compatible); +EXPORT_SYMBOL_GPL (fdt_get_name); +EXPORT_SYMBOL_GPL (fdt_next_property_offset); +EXPORT_SYMBOL_GPL (fdt_getprop); +EXPORT_SYMBOL_GPL (fdt_node_offset_by_compatible); +EXPORT_SYMBOL_GPL (fdt_parent_offset); +EXPORT_SYMBOL_GPL (fdt_stringlist_get); +EXPORT_SYMBOL_GPL (fdt_first_property_offset);
lib/fdt_rw.c +6 -0
@@ -1,2 +1,8 @@#include <linux/libfdt_env.h> +#include <linux/export.h> #include "../scripts/dtc/libfdt/fdt_rw.c" + +EXPORT_SYMBOL_GPL (fdt_del_node); +EXPORT_SYMBOL_GPL (fdt_add_subnode); +EXPORT_SYMBOL_GPL (fdt_pack); +EXPORT_SYMBOL_GPL (fdt_setprop);
Signature · 1 line
2.17.1