diff options
author | Pantelis Antoniou <pantelis.antoniou@konsulko.com> | 2016-12-07 14:48:18 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-12-09 13:26:39 +1100 |
commit | 20f29d8d41f6d1bd2fbe466aa5676026eb012832 (patch) | |
tree | 1a988fa4e9da16bca01af7f43b99b75912142373 /dtc.h | |
parent | a2c92cac53f806e6c1936c1c522a6c24a5ec7199 (diff) | |
download | dtc-20f29d8d41f6d1bd2fbe466aa5676026eb012832.zip dtc-20f29d8d41f6d1bd2fbe466aa5676026eb012832.tar.gz dtc-20f29d8d41f6d1bd2fbe466aa5676026eb012832.tar.bz2 |
dtc: Plugin and fixup support
This patch enable the generation of symbols & local fixup information
for trees compiled with the -@ (--symbols) option.
Using this patch labels in the tree and their users emit information
in __symbols__ and __local_fixups__ nodes.
The __fixups__ node make possible the dynamic resolution of phandle
references which are present in the plugin tree but lie in the
tree that are applying the overlay against.
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'dtc.h')
-rw-r--r-- | dtc.h | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -55,6 +55,9 @@ extern int minsize; /* Minimum blob size */ extern int padsize; /* Additional padding to blob */ extern int alignsize; /* Additional padding to blob accroding to the alignsize */ extern int phandle_format; /* Use linux,phandle or phandle properties */ +extern int generate_symbols; /* generate symbols for nodes with labels */ +extern int generate_fixups; /* generate fixups */ +extern int auto_label_aliases; /* auto generate labels -> aliases */ #define PHANDLE_LEGACY 0x1 #define PHANDLE_EPAPR 0x2 @@ -202,6 +205,8 @@ void delete_property(struct property *prop); void add_child(struct node *parent, struct node *child); void delete_node_by_name(struct node *parent, char *name); void delete_node(struct node *node); +void append_to_property(struct node *node, + char *name, const void *data, int len); const char *get_unitname(struct node *node); struct property *get_property(struct node *node, const char *propname); @@ -237,14 +242,23 @@ struct reserve_info *add_reserve_entry(struct reserve_info *list, struct boot_info { + unsigned int dtsflags; struct reserve_info *reservelist; struct node *dt; /* the device tree */ uint32_t boot_cpuid_phys; }; -struct boot_info *build_boot_info(struct reserve_info *reservelist, +/* DTS version flags definitions */ +#define DTSF_V1 0x0001 /* /dts-v1/ */ +#define DTSF_PLUGIN 0x0002 /* /plugin/ */ + +struct boot_info *build_boot_info(unsigned int dtsflags, + struct reserve_info *reservelist, struct node *tree, uint32_t boot_cpuid_phys); void sort_tree(struct boot_info *bi); +void generate_label_tree(struct boot_info *bi, char *name, bool allocph); +void generate_fixups_tree(struct boot_info *bi, char *name); +void generate_local_fixups_tree(struct boot_info *bi, char *name); /* Checks */ |