diff options
author | 2012-07-05 18:12:38 +0200 | |
---|---|---|
committer | 2012-07-23 13:54:52 +0100 | |
commit | ab25383983fb8d7786696f5371e75e79c3e9a405 (patch) | |
tree | 7e35f3abdd680e2cccf3749a2a21b07bc02c7c5b /lib/fdt.c | |
parent | MIPS: OCTEON: Consolidate the edge and level irq_chip structures. (diff) | |
download | wireguard-linux-ab25383983fb8d7786696f5371e75e79c3e9a405.tar.xz wireguard-linux-ab25383983fb8d7786696f5371e75e79c3e9a405.zip |
of/lib: Allow scripts/dtc/libfdt to be used from kernel code
libfdt is part of the device tree support in scripts/dtc/libfdt. For
some platforms that use the Device Tree, we want to be able to edit
the flattened device tree form.
We don't want to burden kernel builds that do not require it, so we
gate compilation of libfdt files with CONFIG_LIBFDT. So if it is
needed, you need to do this in your Kconfig:
select LIBFDT
And in the Makefile of the code using libfdt something like:
ccflags-y := -I$(src)/../../../scripts/dtc/libfdt
Signed-off-by: David Daney <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Grant Likely <[email protected]>
Cc: [email protected]
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Ralf Baechle <[email protected]>
Diffstat (limited to 'lib/fdt.c')
-rw-r--r-- | lib/fdt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/fdt.c b/lib/fdt.c new file mode 100644 index 000000000000..97f20069fc37 --- /dev/null +++ b/lib/fdt.c @@ -0,0 +1,2 @@ +#include <linux/libfdt_env.h> +#include "../scripts/dtc/libfdt/fdt.c" |